-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove READTHEDOCS specific code from
aiida.manage.configuration
To compile the documentation, the code has to be imported which includes the Django database models. Unfortunately, Django will raise here if it has not been configured. Normally this is done through the backend which will load the backend environment for the currently loaded AiiDA profile. Since on readthedocs.org AiiDA is not installed and so there won't be a configuration with a profile to load, the profile management code was monkey patched to provide a dummy profile just for this purpose. Instead of cluttering the main codebase for this one exception, we move the responsibility to the documentation configuration itself. The requirements boil down to the Django settings being called and an AiiDA configuration and profile to be loaded. Since loading a profile with a django backend and loading said backend, the former will be accomplished automatically. This will now also allow building the documentation locally even if the default profile is not using a Django backend because the dummy documentation profile will simply be used. The function `aiida.manage.configuration.load_documentation_profile` performs all the required actions.
- Loading branch information
Showing
2 changed files
with
49 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters