guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#42082] [PATCH 1/6] gnu: Add python-covdefaults.


From: Marius Bakke
Subject: [bug#42082] [PATCH 1/6] gnu: Add python-covdefaults.
Date: Mon, 20 Jul 2020 23:13:29 +0200

Hi Vinicius,

Sorry for the slow response.  The series look great overall, but I have
a few nitpicks.  :-)

Vinicius Monego <monego@posteo.net> writes:

> * gnu/packages/check.scm (python-covdefaults): New variable.

We now have a 'python-check.scm' which is preferable to check.scm.  Can
you add this library there instead?

Ideally we'd move the current Python test libraries over too, but that's
another issue.

[...]
  
> +(define-public python-covdefaults
> +  (package
> +    (name "python-covdefaults")
> +    (version "1.1.0")
> +    (source
> +     (origin
> +       ;; The PyPI tarball does not include tests.
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/asottile/covdefaults";)
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "11a24c0wzv01n55fy4kdpnyqna4m9k0mp58kmhiaks34xw4k37hq"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda _
> +             (invoke "pytest" "-vv")
> +             #t)))))

Note: invoke returns #t on success, so no need for the explicit return
(though it does not hurt).

> +    (propagated-inputs
> +     `(("python-coverage" ,python-coverage)
> +       ("python-pytest" ,python-pytest)))

Should pytest be propagated here?

Also, as this package is a plugin for coverage, maybe it should not
propagate coverage either.  The reason is that propagating prevents it
from being (easily) used with other versions of coverage.  Let's say
that a package needs a newer coverage than the default in Guix + this
plugin, propagation here would bring in the wrong coverage version.

> +    (home-page "https://github.com/asottile/covdefaults";)
> +    (synopsis "Coverage plugin to provide sensible default settings")
> +    (description
> +     "Covdefaults is a coverage plugin to provide sensible default 
> settings.")

I know it's a lot to ask :-) but can you try to expand on how it differs
from the apparently unreasonable defaults in coverage?  "Sensible" also
borders on "marketing speak", perhaps "opinionated" is a better term.

This was more text than I intended for an otherwise good-looking patch!
Will comment on the others too.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]