-
Notifications
You must be signed in to change notification settings - Fork 112
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
Adapt to new RTD configuration style #491
Conversation
* Migrate Advanced Settings -> Default Settings to config file * Pin versions of required packages to install .[docs]
Codecov Report
@@ Coverage Diff @@
## main #491 +/- ##
=====================================
Coverage 98.5% 98.5%
=====================================
Files 42 42
Lines 4506 4506
=====================================
Hits 4442 4442
Misses 64 64 |
I made the same mistake here as I did for #483: since this PR originates from my fork, I can't easily enable RTD builds for it. The same holds for iiasa/message_ix#733. Luckily, though, I don't (yet) use forks for message-ix-models and message_data, so I was able to build the docs for their PRs:
Both of them are looking good, in particular the bullet lists. Thus, I would trust the changes proposed here and for message_ix to have the same effect as they are essentially the same. Note, though, that I wasn't able to render bullet lists correctly locally, despite updating all packages that I understood to be a dependency of sphinx to their versions suggested in |
Thanks for all the details here. Without addressing all of them yet, one operational question comes up based on the tip in the RTD page on "Reproducible Builds" page:
Namely: how will we know when we need to do this, and how can we minimize the friction involved? In the current process, we don't have to think about it at all or do anything (of course that leads to things like bullet lists mysteriously breaking without our notice, which it will be good to prevent). I'm thinking that if we can automate the steps including "Delete the lines following lines from the file manually" (perhaps with a simple script that lives in |
We might not have to find a way to exclude these lines automatically. If we add a workflow step to create |
I've gathered several strings of information: Why does
|
As discussed earlier with @khaeru, I have added One other thing I noted: comparing the latest version of the message_data docs to the stable one, the bullet lists look fine on both (to my surprise) and a note on the top has gone missing. This is fixed by the |
* Update doc/requirements.txt accordingly * Install with [docs] again via RTD config
Due to the success on the other PRs, this PR receives the same changes now. The steps for arriving at the current |
The pinned dependencies need to be updated regularly, though not necessarily frequently. Since this topic is relevant across all four repositories, I decided to add information on why and how to the ECE wiki rather than any individual repo. |
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.
Using the requirements.in pattern, the requirements.txt now seems to have a smaller set of packages more closely focused on those actually run in the Sphinx build.
LGTM!
This PR aims to get our current RTD builds in line with the upcoming changes to the required configuration file and prevent future build issues due to dependency changes at the same time.
Looking into our docs settings in more detail, I found that the upcoming changes do not just mean that a RTD config file v2 is required, but some options that are now specified at -> Advanced Settings -> Default Settings will be removed in favor of options in the config file, which already overwrite them if such a file is present, even if they are not specified there. That should explain why no PDF builds are produced at the moment. So step 1 of this PR is to append the config file such that these options are active again.
Recently, our builds of the message_data docs have started to fail. The reason for that, as far as I can tell, is that the default pip installation process on RTD used to include
upgrade-strategy eager
, but recently changed toupgrade-strategy only-if-needed
. This seems to be in line with popular demand. Since I couldn't find any mention in the docs on how to enable the upgrade strategy we are used to again (apart from taking complete control and specifying every step of the workflow ourselves), I decided it might be best to follow RTD's recommendation for reproducible builds by pinning the package versions we require. For internal consistency, I want to do so on ixmp, message_ix, message-ix-models, and message_data.Following the recommendation, I performed the following steps to reach the version of
doc/requirements.txt
present here:python -m pip install pip-tools
pip-compile --allow-unsafe --extra docs -o doc/requirements.txt pyproject.toml
ixmp @ file:///home/fridolin/ixmp # via ixmp (pyproject.toml)
Some notes on this process:
--allow-unsafe
is going to be the default soon and so it is recommended to already run pip-compile with it nowdoc/requirements.txt
, since ixmp itself will be missing. The file only provides all dependencies that would be installed withpip install ixmp[docs]
now. @khaeru, do you think it's enough that this file is hidden indoc/
or should we add a comment at the top stating this exact limitation?Finally, I still have to check and figure out how/why the bulleted lists are not rendering correctly. If this issue exists here as well, as I expect, I might use this PR to add commits with related fixes.
How to review
PR checklist
[ ] Add or expand tests; coverage checks both ✅Internal, docs-related, only need them to build/render correctly[ ] Add, expand, or update documentation.Only related to config of docs.[ ] Update release notes.Only related to config of docs.