-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Duplicates in auto-generated documents #358
Comments
Yes, the lack of control over duplicate is currently a huge pain point and prevent us to use autoapi. Also related to: There could be a few easy fixes to avoid those duplicate like:
For example, if we take np.sin
np.core.sin
np.core.umath.sin However the assert 'sin' in np.__all__
assert 'core' not in np.__all__ Currently, |
Heya, as mentioned in #287 (comment), I've just created https://sphinx-autodoc2.readthedocs.io/, which handles this, I hope, in a better way: https://sphinx-autodoc2.readthedocs.io/en/latest/quickstart.html#documenting-only-the-public-api-via-all Happy to have feedback and collaborate on it! |
This issue is essentially a duplicate of #317, which was closed for this reason (#317 (comment)). |
When using peer imports, autoapi seems to be generating its own duplicates in the files it generates, resulting in "duplicate object description" warnings. The warning message says "use :noindex: for one of them", but the problem is that autoapi is generating all of the relevant files, so it's not possible to do this.
The big problem, of course, isn't the warnings as much as the duplicate documentation that is being generated, making the resulting API docs rather a mess.
A complete (minimal) example follows, with 5 (very small) source files to illustrate the various facets of the problem.
After creating a docs structure with sphinx-quickstart and adding a minimal autoapi configuration, running
make html
results in the following warnings in the console (with paths truncated by me for brevity here):Notice that there is one "set" of warnings for each source file that imports HandyClass. That is, there are two sets of warnings because part1.py and part2.py both import from
.common
, but not a third set because part3.py does not. Notice also that, although part2.py imports from.common
, it doesn't actually use it, so it's the existence of the import that's causing the issue.The text was updated successfully, but these errors were encountered: