-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Update docs requirements list #74956
Conversation
sphinx-notfound-page >= 0.6 | ||
sphinx-intl | ||
sphinx_ansible_theme === 0.6.0 |
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'd like to have an exact pin here. ==
matches .post
releases while ===
matches the exact spec.
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.
Ah, thanks @webknjaz, that is not syntax I knew before. I'll restore that.
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's documented here: https://www.python.org/dev/peps/pep-0440/#arbitrary-equality
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.
fixed in a4fb538
Tested locally (Fedora 34) in new venv - all permutations work:
|
@@ -74,8 +74,7 @@ Setting up your environment to build documentation locally | |||
|
|||
To build documentation locally, ensure you have a working :ref:`development environment <environment_setup>`. | |||
|
|||
To work with documentation on your local machine, you need to have python-3.5 or greater and the | |||
following packages installed: | |||
To work with documentation on your local machine, you need to have python-3.5 or greater and the following packages installed: |
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.
There was a comment in an older PR that suggests we just remove this list and say something like see xx requirements.txt for the packages and versions required (maybe even link to that file in github.)
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, I've updated based on this comment
I've mentioned this in Slack but let me document it here. It's easier and more reliable to test such a setup with pip-tools. |
The test
The test
|
a0cff42
to
987be2a
Compare
@webknjaz I'm sure pip-tools is an excellent option, but adding another tool seems like an over-engineered solution for the problem we're addressing |
@acozine it's not really overengineering, its a pretty standard practice of keeping the builds reproducible. Currently, this PR almost solves a part of the problem not taking into account transitive deps that may break things while my proposal is to actually address the root of the issue. But I agree that the current patch is better than nothing, of course. And automatic pinning could be implemented separately. |
sphinx==4.0.2 | ||
sphinx-notfound-page==0.7.1 # must be >= 0.6 | ||
sphinx-intl==2.0.1 | ||
sphinx_ansible_theme===0.6.0 |
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.
Taking into account #75059, it should now be
sphinx_ansible_theme===0.6.0 | |
sphinx_ansible_theme===0.7.0 |
PyYAML | ||
rstcheck | ||
sphinx==2.1.2 | ||
sphinx | ||
sphinx-notfound-page >= 0.6 | ||
sphinx-intl | ||
sphinx_ansible_theme === 0.6.0 |
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.
With #75059 it's now
sphinx_ansible_theme === 0.6.0 | |
sphinx_ansible_theme >= 0.7.0 |
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 would really avoid >=
here.
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 think it's okay for direct unpinned deps. Anybody wanting the pins should do pip install -r docs/docsite/requirements.txt -c docs/docsite/known_good_reqs.txt
jinja2 | ||
Pygments >= 2.4.0 |
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 is not necessary among the direct deps anymore because the theme pulls in this dep and we no longer use it directly.
Pygments >= 2.4.0 |
The goal we agreed on in the DaWGs meeting is to offer two options: one set of requirements with the least possible restrictions on versions, and a second set of requirements with a known-good set that updates infrequently. I think the current PR meets those requirements. I'm fine with the known-good list getting stale, as long as it continues to work. |
We can update again in future if we all agree on a goal and an implementation strategy. |
* removes upper bound on sphinx version * updates versions of docs build dependencies, adds known good requirements file * adds instructions for using known_good_reqs file (cherry picked from commit 58f2638)
pip install --user -r requirements.txt | ||
pip install --user -r docs/docsite/known_good_reqs.txt |
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.
The point is that it won't continue to work if some indirect dependency changes in an incompatible way. This will be a silent change with no instrumentation to notice it automatically until a human complains. This is because the current pins list is incomplete. |
* Use `sphinx_ansible_theme` Sphinx theme in docs (#74318) (cherry picked from commit 346c7a7) * 🔥 Drop unused `core.css` file This is a forgotten leftover from #74318 that should've been removed earlier. (cherry picked from commit ec408a6) * Update docs requirements list (#74956) * removes upper bound on sphinx version * updates versions of docs build dependencies, adds known good requirements file * adds instructions for using known_good_reqs file (cherry picked from commit 58f2638) Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com> Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua> Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
SUMMARY
In the Docs Working Group meeting on 25 May 2021 we agreed to maintain two requirements files for the docs build:
The plan is to "unleash" the known good versions, test the most recent available packages, and update the. known_good_reqs. file on a quarterly basis going forward, so the versions don't get too stale.
This PR:
Related to #74318
Closes #74194
Closes #71395
Tested on a mac running macOS Catalina. Pip package versions listed below. Test if you have time and report any issues you find!
ISSUE TYPE
COMPONENT NAME
docs.ansible.com
ADDITIONAL INFORMATION
Versions installed from the main (unpinned)
requirements.txt
: