-
Notifications
You must be signed in to change notification settings - Fork 192
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
📚 DOCS: Add intersphinx aliases for __all__ imports #5657
Conversation
This PR adds alias objects to python sphinx domain. This allows for any project to reference e.g. `aiida.orm.Data` instead of `aiida.orm.nodes.data.data.Data` (and also works for all methods etc)
supercedes #5569 |
FYI, this YAML file is created directly from the |
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.
Apart from one comment, looks good to me. Is there a simple way to add a small test for this? Currently we have no idea if this actually works, correct?
docs/source/conf.py
Outdated
py: PythonDomain = env.get_domain('py') | ||
|
||
shorthands = {} | ||
for modname, module in (('orm', orm),( 'common', common), ('engine', engine), ('plugins', plugins)): |
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.
Why hardcode these modules? Shouldn't we simply do this for all subpackages of the aiida
package?
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.
done in 9e23ab9 👍
You just have to trust my brilliance 😆 |
Fair enough. Fine to leave it without an explicit test then. Are you still looking into my other comment? |
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.
Cheers @chrisjsewell
This commit adds alias objects to the sphinx python domain. This allows for any project to reference, e.g. `aiida.orm.Data` instead of `aiida.orm.nodes.data.data.Data`, etc. Cherry-pick: 3591163
This PR adds alias objects to python sphinx domain. This allows for any project to reference e.g.
aiida.orm.Data
instead ofaiida.orm.nodes.data.data.Data
(and also works for all methods etc)