Skip to content
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

write more thorough API documentation in the code #624

Open
ctb opened this issue Jan 12, 2019 · 2 comments
Open

write more thorough API documentation in the code #624

ctb opened this issue Jan 12, 2019 · 2 comments

Comments

@ctb
Copy link
Contributor

ctb commented Jan 12, 2019

With #621, our readthedocs doc site will once again contain documentation auto-extracted from the Python code. w00t!

However, our auto-extracted documentation is not that useful, especially in comparison to our API examples, which have been updated much more recently.

we should think about this as we move forward, since it's becoming clear that the Python API for sourmash is super-duper useful.

we also need to fix up our MinHash(...) class documentation, which doesn't get auto-extracted because its an extension module that doesn't get built on readthedocs (although with #616 maybe we can move these docs up to the Signature(...) class.

@luizirber
Copy link
Member

luizirber commented Jan 13, 2019

I would say moving more of the API examples into docstrings? I added some docstrings at some point, but only in some methods.
https://github.com/dib-lab/sourmash/blob/ceb9b1751e339824614196135aa98843482518c2/sourmash/sbt.py#L105-L125

Benefit of using docstrings is that they are available in IPython (with obj.method?) or even plain Python (with help(obj.method))

@ctb
Copy link
Contributor Author

ctb commented Jan 13, 2019

I think the docstrings are more useful for being complete discussions of the arguments, while the examples are aimed at people interested in stealing code to use the functions. Different but overlapping audiences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants