-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Autogenerate all API docs #2002
Conversation
09b691b
to
26907b2
Compare
docs/conf.py
Outdated
Return True if a module should be skipped in th API docs. | ||
""" | ||
parts = name.split(".") | ||
if what == "module" and any((part.startswith("_") or part == "v2") for part in parts): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also skip zarr.core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of putting in another condition to skip zarr.core
, could we rename it to zarr._core
instead? This will automatically skip it in the API docs with the current logic, and also signal to folks using autocomplete in their editor that it's not public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhamman I skipped it for now - I think it's worth renaming to zarr.core but it's a big diff so I can propose that in a follow up PR 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this @dstansby. One suggestion but otherwise this looks good.
pre-commit.ci autofix |
pre-commit.ci autofix |
@zarr-developers/python-core-devs would be good to get this reviewed and merged soon before more conflicts with other PRs start coming in 😄 |
this looks good to me! thanks for this @dstansby |
it looks like one of the hypothesis tests is failing -- is that related to these changes? |
I can reproduce on |
In that case I'm going to hit merge on this. |
This updates the doc build to automatically generate all API docs. I've set it so any module with a part that starts with "_" is not documented, so that's the way to make a sub-module private.
See https://zarr--2002.org.readthedocs.build/en/2002/_autoapi/zarr/index.html for the API ref in the build of this PR.
I think it's worth merging this to make sure new additions/removals to the API don't break API docs, and we can bikeshed what's in/out of the public API in a follow up PR.
Fixes #1993.