[Numpy-discussion] music package and testing

2024-07-10 Thread Jacopo Donati
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
___
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


[Numpy-discussion] Re: NumPy-Discussion Digest, Vol 214, Issue 14

2024-07-10 Thread David Nicholson
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 
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 -
> From: "Jacopo Donati" 
> 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


[Numpy-discussion] Next NumPy Newcomers' Hour - July 11th, 2024 at 12 PM UTC

2024-07-10 Thread Ganesh Kathiresan
Our next Newcomers' Hour will be held this Thursday, 11th, 2024 at 12 PM
UTC,  Stop by to ask questions, share your progress, celebrate success, or
just to say hi.

To add to the meeting agenda the topics you’d like to discuss, follow the
link: https://hackmd.io/3f3otyyuTte3FU9y3QzsLg?both.

Join the meeting via Zoom:
https://us06web.zoom.us/j/82563808729?pwd=ZFU3Z2dMcXBGb05YemRsaGE1OW5nQT09.

Thanks,
Ganesh
___
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