Skip to content

Show ESMValTool and ESMValCore documentation on a single readthedocs site#89

Merged
bouweandela merged 37 commits into
developmentfrom
docu_join
Jul 11, 2019
Merged

Show ESMValTool and ESMValCore documentation on a single readthedocs site#89
bouweandela merged 37 commits into
developmentfrom
docu_join

Conversation

@bjoernbroetz

@bjoernbroetz bjoernbroetz commented Jun 14, 2019

Copy link
Copy Markdown
Contributor

This PR addresses the issue ESMValGroup/ESMValTool#1155 and is the counterpart to ESMValGroup/ESMValTool#1157.

There is a new utility module introduced in esmvaltool.utils.doc.gensidebar that creates a common sidebar for esmvaltool and esmvaltool-core documentation or any future part of the esmvaltool. If one needs to change the content of the sidebar, it needs to be done in this place.

The configuration file for sphinx was adapted (here and in the other repo) to make use of the utility module.

Also closes #114

@bjoernbroetz

Copy link
Copy Markdown
Contributor Author

The accompanying PR at esmvaltool repo is ESMValGroup/ESMValTool#1157

@bouweandela

Copy link
Copy Markdown
Member

Nice job! Would it be possible to move the gensidebar script to the doc directory? That way we keep all documentation stuff together. I would also like to move the documentation to just doc instead of doc/sphinx/source, but maybe that's something for a different pull request.

@bjoernbroetz

Copy link
Copy Markdown
Contributor Author

Would it be possible to move the gensidebar script to the doc directory? That way we keep all documentation stuff together.

I tried that first but the now independent ESMValTool repository needs access to this script (when coding in development mode as well as when coding with a preinstalled core part). The original approach of the inventors of this was to copy this script to all subprojects and keep them manually synchronized. I wanted to have it just in one place and to make it part of the esmvalcore-module appeared to me as straightforward.

@mattiarighi mattiarighi added the documentation Improvements or additions to documentation label Jun 15, 2019
@mattiarighi

Copy link
Copy Markdown
Contributor

Can we merge?

@bouweandela

bouweandela commented Jun 19, 2019

Copy link
Copy Markdown
Member

We need to test that it works first. I've enabled the docu_join branch on readthedocs for both the esmvalcore and esmvaltool repositories. @bjoernbroetz Can you try to get that working? At the moment the build fails. Also, I think as part of these pull requests we need to divide the documentation between the esmvalcore and esmvaltool repositories, because at the moment they both contain the same files, with the ones in esmvalcore being slightly outdated. If possible I would also prefer to keep the documentation for esmvalcore directly in the doc directory instead of in doc/sphinx/source.

@bjoernbroetz

Copy link
Copy Markdown
Contributor Author

@bouweandela Thanks for enabling the branches at RTD. The esmvaltool part will need the module esmvalcore available with the enhancements that are in the branch ESMValCore/docu_join at build-time of the docs.
The ESMValTool-core part documentation, however, should build independently. Could you point me to the error messages reported by RTD?

We should first merge the core part.

@bouweandela

Copy link
Copy Markdown
Member

The esmvalcore build information is available here: https://readthedocs.org/projects/esmvalcore/builds/

@bjoernbroetz

Copy link
Copy Markdown
Contributor Author

ModuleNotFoundError: No module named 'esmvalcore'

I see. Both documentations (core and diag parts) need the esmvalcore module installed with the enhancements of docu_join.

There is a hint given in the RTD-FAQs:

If you see ImportError messages for custom Python modules, you should enable the virtualenv feature in the Admin page of your project, which will install your project into a virtualenv, and allow you to specify a requirements.txt file for your project.

Sorry, this happens to be a "chicken and the egg" problem. You can only test after you merge, but you will only merge after you test ...

Do we have any idea?

@bjoernbroetz

Copy link
Copy Markdown
Contributor Author

So with the requirements.txt we can install from github pointing at a branch:
git+git://github.com/ESMValGroup/ESMValCore@docu_join

Shall we proceed on this way? If yes, I will create such a file in this branch and @bouweandela would need to enable virtualenv at RTD.

@bouweandela

Copy link
Copy Markdown
Member

I fixed some dependency issues and a mistake I made in the rootpath, the documentation now builds successfully for esmvalcore.

@bouweandela

Copy link
Copy Markdown
Member

I've added the gensidebar script to the other pull request as a workaround for testing, it should be removed once we are close to something that works.

@bouweandela bouweandela changed the title Enable joined documentation Show ESMValTool and ESMValCore documentation on a single readthedocs site Jun 26, 2019
@JaroCamphuijsen JaroCamphuijsen requested a review from schlunma July 1, 2019 09:05
@JaroCamphuijsen

Copy link
Copy Markdown
Contributor

@axel-lauer @schlunma
Could you maybe review the documentation for this pull request? Please review the structure and not the actual content.
The documentation built from this branch (and pull request) can be found here:
https://esmvaltool.readthedocs.io/projects/ESMValCore/en/docu_join/

@bouweandela bouweandela merged commit d94e6a7 into development Jul 11, 2019
@bouweandela bouweandela deleted the docu_join branch July 11, 2019 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preprocessor API page is missing

4 participants