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

Sphinx bug: reminder (:show-inheritance:) #68

Closed
MuellerSeb opened this issue Jan 25, 2020 · 2 comments
Closed

Sphinx bug: reminder (:show-inheritance:) #68

MuellerSeb opened this issue Jan 25, 2020 · 2 comments
Assignees
Labels
bug Something isn't working Documentation wontfix This will not be worked on
Milestone

Comments

@MuellerSeb
Copy link
Member

MuellerSeb commented Jan 25, 2020

Due to a bug in sphinx, the :show-inheritance: option is not working in some cases, since the generated base class reference could have a wrong path, so you can't be redirected to the base class documentation.

See here:

@MuellerSeb MuellerSeb added bug Something isn't working wontfix This will not be worked on Documentation labels Jan 25, 2020
@MuellerSeb MuellerSeb self-assigned this Jan 25, 2020
@MuellerSeb
Copy link
Member Author

Sphinx 4.1 will add an option for this:
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#event-autodoc-process-bases

Added via: sphinx-doc/sphinx#9233

Then we can use the new hook def autodoc_process_bases(app, name, obj, options, bases) in conf.py to check for the CovModel base class and redirect to the correct gstools.covmodel.CovModel to get the correct site in documentation.

@MuellerSeb MuellerSeb added this to the 1.3.2 milestone Jun 29, 2021
@MuellerSeb
Copy link
Member Author

This is magically solved now.
Clicking on gstools.covmodel.base.CovModel now correctly resolves.
https://geostat-framework.readthedocs.io/projects/gstools/en/stable/generated/gstools.covmodel.Gaussian.html#gstools.covmodel.Gaussian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Documentation wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant