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

Remove load_documentation_profile which not used anymore #6231

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Dec 20, 2023

No description provided.


# # we call this to make sure the ORM metadata is fully populated,
# # so that ORM models can be properly documented
# get_orm_metadata()
Copy link
Member Author

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?

Copy link
Contributor

@sphuber sphuber Dec 20, 2023

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Member Author

@unkcpz unkcpz Dec 20, 2023

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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. 👍

@unkcpz unkcpz force-pushed the doc/xx/use-sqlite-temp-for-sphinx branch 2 times, most recently from 5a4263a to 0b7bf54 Compare December 20, 2023 11:49
[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
@unkcpz unkcpz force-pushed the doc/xx/use-sqlite-temp-for-sphinx branch from 0b7bf54 to a6d3fde Compare December 20, 2023 11:59
@unkcpz unkcpz changed the title Use sqlite_tmep backend profile for sphinx documentation Remove load_documentation_profile which not used anymore Dec 20, 2023
@sphuber sphuber self-requested a review December 20, 2023 12:31
Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @unkcpz

@sphuber sphuber merged commit 9941266 into aiidateam:main Dec 20, 2023
18 checks passed
@unkcpz unkcpz deleted the doc/xx/use-sqlite-temp-for-sphinx branch December 20, 2023 12:46
unkcpz pushed a commit to aiidateam/aiida-hyperqueue that referenced this pull request Jul 17, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants