Skip to content

Directive .. autoapiclass does not respect autoapi_member_order = "bysource" #325

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

Open
astrojuanlu opened this issue Feb 8, 2022 · 0 comments

Comments

@astrojuanlu
Copy link

As per title: directive .. autoapiclass does not respect autoapi_member_order = "bysource", and I'm not sure if there are others.

Here is a minimal working example: https://github.com/astrojuanlu/sphinx-autoapi-debug/tree/033f68fd

Even though testpkg.A has members c, a and b defined in this order, the rendered documentation gives a, b, and c:

Screenshot 2022-02-08 at 18-34-56 sphinx-autoapi debug — sphinx-autoapi debug documentation

Other things I found along the way:

  • Initially I wrote autoapi_dirs = [""] by mistake, and .. autoapiclass:: testpkg.A didn't even give a warning. That made debugging more difficult.
  • I get several warnings saying duplicate object description, probably because of the generated autoapi/testpkg/index.rst (don't think this is unheard of, but at the moment I can't locate what would be the best way to avoid them):
$ make html
Running Sphinx v4.4.0
loading pickled environment... done
[AutoAPI] Reading files... [100%] /home/juanlu/Projects/Other/sphinx-autoapi-debug/src/testpkg/__init__.py                                                                                                                                    
[AutoAPI] Mapping Data... [100%] /home/juanlu/Projects/Other/sphinx-autoapi-debug/src/testpkg/__init__.py                                                                                                                                     
[AutoAPI] Rendering Data... [100%] testpkg

[autosummary] generating autosummary for: autoapi/index.rst, autoapi/testpkg/index.rst, index.rst
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: 0 added, 2 changed, 0 removed
reading sources... [100%] autoapi/testpkg/index                                                                                                                                                                                               
/home/juanlu/Projects/Other/sphinx-autoapi-debug/docs/source/autoapi/testpkg/index.rst:38: WARNING: duplicate object description of testpkg.A, other instance in index, use :noindex: for one of them
/home/juanlu/Projects/Other/sphinx-autoapi-debug/docs/source/autoapi/testpkg/index.rst:42: WARNING: duplicate object description of testpkg.A.c, other instance in index, use :noindex: for one of them
/home/juanlu/Projects/Other/sphinx-autoapi-debug/docs/source/autoapi/testpkg/index.rst:47: WARNING: duplicate object description of testpkg.A.a, other instance in index, use :noindex: for one of them
/home/juanlu/Projects/Other/sphinx-autoapi-debug/docs/source/autoapi/testpkg/index.rst:53: WARNING: duplicate object description of testpkg.A.b, other instance in index, use :noindex: for one of them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants