-
Notifications
You must be signed in to change notification settings - Fork 208
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
Remove load_documentation_profile which not used anymore #6231
Remove load_documentation_profile which not used anymore #6231
Conversation
|
||
# # we call this to make sure the ORM metadata is fully populated, | ||
# # so that ORM models can be properly documented | ||
# get_orm_metadata() |
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.
I am not sure how this is used, I found there is a similar model implementation for sqlite_temp
storage, how to get orm metadata from it?
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.
This would be done implicitly by loading the storage backend, i.e., get_manager().get_profile_storage()
. But apparently the docs build is passing without it, so it is no longer necessary it seems.
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.
I wonder if even need this load_documentation_profile
at all anymore. This may be a relic from before v2.0 when we still had a Django backend as well which required the database to be loaded on import. This is no longer the case, so I think we can just import without having access to a profile storage. Could you try removing the load_documentation_profile
call from the docs/source/conf.py
file and see if the docs still build? If the case, we can just get rid of this function entirely.
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.
It is also called by pre-commit
through python ./utils/validate_consistency.py verdi-autodocs
, and that is where the verdi doc generated I assume.
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.
Yes, but I think you can also remove it there, it doesn't need it anymore I think
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.
Seems you still need this part in the conf.py
:
# imports required for docs/source/reference/api/public.rst
from aiida import ( # pylint: disable=unused-import
cmdline,
common,
engine,
manage,
orm,
parsers,
plugins,
schedulers,
tools,
transports,
)
from aiida.cmdline.params import arguments, options # pylint: disable=unused-import
Apparently still need explicit import to have the autoapi work properly.
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.
Seems it should be there, otherwise, the doc build will failed with the module not being found.
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.
Seems the profile is needed to build the apidoc.
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.
I am really confused though, because it is speaking of process.aiida
which is the temp profile that was created for running the howto/archive_profile.md
notebook. It is a bit of a coincidence that we just fixed things there. I just merged that PR, so maybe you can rebase this PR and see if it still fails.
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.
You are all correct about it. 👍
5a4263a
to
0b7bf54
Compare
[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
0b7bf54
to
a6d3fde
Compare
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.
Thanks @unkcpz
Adding the HyperQueue paper to the README and also to the acknowledgement section of the docs. Moreover, I also added the AiiDA refs to the README. - Finally, I removed the load_documentation_profile function from the conf.py for the docs, as it is deprecated aiidateam/aiida-core#6231.
No description provided.