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

Using autodocsumm fails for inherited attributes #4401

Closed
jenshnielsen opened this issue Jul 16, 2022 · 2 comments
Closed

Using autodocsumm fails for inherited attributes #4401

jenshnielsen opened this issue Jul 16, 2022 · 2 comments
Labels
docs Related to docs improvements

Comments

@jenshnielsen
Copy link
Collaborator

We are using autodocsumm to generate helpful summary tables for modules classes and attributes.

However this triggers a warning and skips the member for inherited instance attributes. I bit of debugging using the
most verbose setting of sphinx with $env:SPHINXOPTS = "-v -v -v " reveals the generated code for this.

It turns out that autodocsumm generates the correct code using the autosummary extension. However, this triggers a bug in sphinx
sphinx-doc/sphinx#9884

In #4273 I have tried working around this by converting instance attributes to properties. While this is often a good solution this does not work well for Parameters that are assigned using self.myparam = Parameter(...) in instrument super classes such as the ones done in #4371. This means that we cannot document inherited instruments using autodocsumm without a propper fix

@jenshnielsen jenshnielsen added the docs Related to docs improvements label Jul 16, 2022
@jenshnielsen
Copy link
Collaborator Author

To debug this I created a project here https://github.com/jenshnielsen/debugproject doing things but without any extra dependencies

@jenshnielsen
Copy link
Collaborator Author

Currently worked around using a fork of Sphinx. Will close when this has made it into an official release and we are using that

@jenshnielsen jenshnielsen added this to the Public api rewrite milestone Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Related to docs improvements
Projects
None yet
Development

No branches or pull requests

1 participant