Subject: Re: [PATCH v2] gnu: Add python-pybare.

From: jgart <[email-masked]>
Date: Sun, 12 Jun 2022 15:54:18 -0500

On Sun, 12 Jun 2022 17:41:57 +0200 Maxime Devos <[email-masked]> wrote:
> jgart schreef op za 11-06-2022 om 15:27 [-0500]:
> > +(define-public python-pybare
> > +  (package
> > +    (name "python-pybare")
> > +    (version "0.1.1")
> > +    (source
> > +      (origin
> > +        (method git-fetch)
> > +        (uri
> > +         (git-reference
> > +          (url "https://git.sr.ht/~chiefnoah/pybare")
> > +          (commit (string-append "v" version))))
> > +        (file-name (git-file-name name version))
> > +        (sha256
> > +         (base32 "1ibmwwf1rdxlwyxlzhv3v1i0ybsqg0kppim90sm8rsbns86yy4by"))))
> > +    (build-system python-build-system)
> > +    (arguments
> > +      (list #:phases
> > +            #~(modify-phases %standard-phases
> > +                (replace 'check
> > +                  (lambda* (#:key tests? #:allow-other-keys)
> > +                    (when tests?
> > +                      (chdir "bare")
> > +                      (invoke "pytest" "-vv" ".")))))))
> > +    (native-inputs
> > +      (list python-pytest))
> > +    (home-page "https://sr.ht/~chiefnoah/PyBARE/")
> > +    (synopsis "Declarative implementation of BARE for Python")
> > +    (description
> > +"@code{python-pybare} is a general purpose library for strongly typed
> > +primitives in Python that supports serializing to and from @acronym{BARE,
> > +Binary Application Record Encoding} messages.")
> > +    (license license:expat
> 
> 
> Package definition LGTM, but I have only looked at the definition, not
> the sources etc.

Hi Maxime, no worries. Take your time. The review is much appreciated.

I just looked at the sources again myself and noticed that the tests
use pre-generated BARE binaries to test against.

See here:

https://git.sr.ht/~chiefnoah/pybare/tree/master/item/bare/test_encoder.py#L225

and here:

https://git.sr.ht/~chiefnoah/pybare/tree/master/item/bare/_examples

Should I ask the author if they can provide a way to generate those
binaries for testing instead of vendoring the pre-compiled binaries
without their sources?

all best,

jgart