Hi Jacopo,

Here's a couple resources you might find helpful:
https://www.pyopensci.org/python-package-guide/index.html
https://learn.scientific-python.org/development/

For your question about tests, sounds like you might want to parametrize a
fixture
https://learn.scientific-python.org/development/guides/pytest/#tests-should-stay-easy-when-scaling-out

I'm sure other people on the list will have helpful advice too.
Your questions might be a little outside of the scope of this list though.
You could consider asking in the pyOpenSci or the Python discourse as well
https://pyopensci.discourse.group/
https://discuss.python.org/

--David


David Nicholson, Ph.D.
https://nicholdav.info/
https://github.com/NickleDave


On Wed, Jul 10, 2024 at 12:01 PM <numpy-discussion-requ...@python.org>
wrote:

> Send NumPy-Discussion mailing list submissions to
>         numpy-discussion@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> or, via email, send a message with subject or body 'help' to
>         numpy-discussion-requ...@python.org
>
> You can reach the person managing the list at
>         numpy-discussion-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of NumPy-Discussion digest..."
>
> Today's Topics:
>
>    1. music package and testing (Jacopo Donati)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 10 Jul 2024 11:41:08 -0000
> From: "Jacopo Donati" <jacopo.don...@gmail.com>
> Subject: [Numpy-discussion] music package and testing
> To: numpy-discussion@python.org
> Message-ID: <172061166828.21249.2941220348120809...@mail.python.org>
> Content-Type: text/plain; charset="utf-8"
>
> Hi there,
>
> I'm writing on behalf of the team of `music`, a package that generates and
> manipulates sound in a mathematically precise manner.  You can find it
> here: https://github.com/ttm/music
>
> We are fixing the library so that it conforms as much as possible to the
> characteristics of the other libraries in the numpy universe.  Can you give
> us any suggestion regarding code organization, naming convention, etc.?
>
> Also, we are writing the tests and we need some help to think those for
> the most complex functions.  For example, we test the synth of a simple
> note with this test:
> https://github.com/jacopodonati/music/blob/c33e3eb80e7d4d6455f442ebb12ed16a82480505/tests/core/synths/test_notes.py#L9
> But what if we have to test the synth of a note with both a change in
> pitch and a vibrato applied to it?  What would be the best approach for a
> test?
> For reference, this is the function to synth that kind of note:
> https://github.com/jacopodonati/music/blob/c33e3eb80e7d4d6455f442ebb12ed16a82480505/music/core/synths/notes.py#L421
>
> Any help will be very much appreciated!
>
> Regards,
>
> jd
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
>
>
> ------------------------------
>
> End of NumPy-Discussion Digest, Vol 214, Issue 14
> *************************************************
>
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to