-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding examples into function documentation #50
Comments
One comment I have for this is to use the Examples:
.. testcode:: dynsight-test
import dynsight
x = dynsight.calculate_something()
.. testcode:: dynsight-test
:hide:
assert x == 'something you know' |
I modified, within tropea_clsutering, the doc strings of the functions imported by dynsight.onion, adding the examples. When I run "just check" in tropea_clsutering, they are tested and work fine. When I run "just check" in dynsight, some of the tests randomly fail, as if for some reason the random data used as input were changing. But the random seed is set, and there is no such issue in tropea_clustering. |
|
It's actually random. Sometimes one of the four functions fails the test. Sometimes none of them.
There are many differences, among which numpy, Sphinx, ruff, scipy and scikit.learn. This could be the issue. |
Equating the packages used in tropea and dynsight, the issue is solved. |
It would be very nice to have an example of how to use each function, within the doc string of the function. The same way numpy does it.
It is already done for the LENS module, spatial_average() and the Shannon entropy functions. So it should be added in:
The text was updated successfully, but these errors were encountered: