Skip to content

Commit a1e4190

Browse files
authored
[stable 2.18] remove the relaxed reqs (#2361)
* rm relaxed reqs and base constraints * move pins and requirements out of relaxed * sync requirements lock file * update noxfile to rm relaxed reqs * update docs
1 parent b525954 commit a1e4190

File tree

8 files changed

+47
-250
lines changed

8 files changed

+47
-250
lines changed

docs/docsite/rst/community/documentation_contributions.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ For more information on minimum Python versions, see the :ref:`support matrix <s
113113
114114
pip install -r tests/requirements.in -c tests/requirements.txt # Installs tested dependency versions.
115115
pip install -r tests/requirements.in # Installs the unpinned dependency versions.
116-
pip install -r tests/requirements-relaxed.in # Installs the unpinned dependency versions including untested antsibull-docs.
117116
118117
119118
.. note::

noxfile.py

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import shlex
55
import shutil
6-
from argparse import ArgumentParser, BooleanOptionalAction
76
from glob import iglob
87
from pathlib import Path
98
from typing import cast
@@ -209,20 +208,6 @@ def _clone_core_check(session: nox.Session) -> None:
209208
session.run("python", "docs/bin/clone-core.py", "--check")
210209

211210

212-
def _relaxed_parser(session: nox.Session) -> ArgumentParser:
213-
"""
214-
Generate an argument parser with a --relaxed option.
215-
"""
216-
parser = ArgumentParser(prog=f"nox -e {session.name} --")
217-
parser.add_argument(
218-
"--relaxed",
219-
default=False,
220-
action=BooleanOptionalAction,
221-
help="Whether to use requirements-relaxed file. (Default: %(default)s)",
222-
)
223-
return parser
224-
225-
226211
def _env_python(session: nox.Session) -> str:
227212
"""
228213
Get the full path to an environment's python executable
@@ -240,9 +225,8 @@ def checkers(session: nox.Session, test: str):
240225
"""
241226
Run docs build checkers
242227
"""
243-
args = _relaxed_parser(session).parse_args(session.posargs)
244228

245-
install(session, req="requirements-relaxed" if args.relaxed else "requirements")
229+
install(session, req="requirements")
246230
_clone_core_check(session)
247231
session.run("make", "-C", "docs/docsite", "clean", external=True)
248232
session.run("python", "tests/checkers.py", test)
@@ -253,19 +237,18 @@ def make(session: nox.Session):
253237
"""
254238
Generate HTML from documentation source using the Makefile
255239
"""
256-
parser = _relaxed_parser(session)
257-
parser.add_argument(
258-
"make_args", nargs="*", help="Specify make targets as arguments"
259-
)
260-
args = parser.parse_args(session.posargs)
240+
make_args = session.posargs or ["clean", "coredocs"]
261241

262-
install(session, req="requirements-relaxed" if args.relaxed else "requirements")
242+
install(session, req="requirements")
263243
_clone_core_check(session)
264-
make_args: list[str] = [
244+
session.run(
245+
"make",
246+
"-C",
247+
"docs/docsite",
265248
f"PYTHON={_env_python(session)}",
266-
*(args.make_args or ("clean", "coredocs")),
267-
]
268-
session.run("make", "-C", "docs/docsite", *make_args, external=True)
249+
*make_args,
250+
external=True,
251+
)
269252

270253

271254
@nox.session

tests/constraints-base.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/constraints.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# This constraints file contains pins for the stable, tested versions of sphinx
22
# and antsibull-docs that production builds rely upon.
3+
# This constraint file also pins other versions for which there are known limitations.
34

45
sphinx == 7.2.5
56
antsibull-docs == 2.16.2 # currently approved version
7+
8+
rstcheck < 6 # rstcheck 6.x has problem with rstcheck.core triggered by include files w/ sphinx directives https://github.com/rstcheck/rstcheck-core/issues/3
9+
sphinx-rtd-theme>=2.0.0 # Fix 404 pages with new sphinx -- https://github.com/ansible/ansible-documentation/issues/678
10+
jinja2 >= 3.0.0 # https://github.com/ansible/ansible/blob/stable-2.18/requirements.txt
11+
pyyaml >= 5.1 # https://github.com/ansible/ansible/blob/stable-2.18/requirements.txt
12+
resolvelib >= 0.5.3, < 1.1.0 # https://github.com/ansible/ansible/blob/stable-2.18/requirements.txt

tests/requirements-relaxed.in

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/requirements-relaxed.txt

Lines changed: 0 additions & 187 deletions
This file was deleted.

tests/requirements.in

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
# This requirements file is used for stable ansible docs builds
2-
# It depends on specific, tested antsibull-docs and sphinx versions
1+
# This requirements file is used for doc builds
32

43
-c constraints.in # <-- contains known limitations
5-
-r requirements-relaxed.in # <-- contains base set of dependencies
4+
5+
# Base set of dependencies.
6+
7+
antsibull-docs
8+
sphinx
9+
sphinx-intl # translation utility used by docs/docsite/Makefile
10+
sphinx-notfound-page # extension used for the custom 404 page (cowsay)
11+
sphinx-ansible-theme # extension used for the custom docs theme
12+
sphinx-copybutton
13+
rstcheck
14+
jinja2 # used by hacking/build_library/build_ansible/command_plugins/generate_man.py and dump_keywords.py
15+
pyyaml # used by ansible-core
16+
resolvelib # used by ansible-core

tests/requirements.txt

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ antsibull-core==3.4.0
3131
antsibull-docs==2.16.2
3232
# via
3333
# -c tests/constraints.in
34-
# -r tests/requirements-relaxed.in
34+
# -r tests/requirements.in
3535
antsibull-docs-parser==1.1.0
3636
# via antsibull-docs
3737
antsibull-docutils==1.0.0
@@ -77,7 +77,8 @@ imagesize==1.4.1
7777
# via sphinx
7878
jinja2==3.1.4
7979
# via
80-
# -r tests/requirements-relaxed.in
80+
# -c tests/constraints.in
81+
# -r tests/requirements.in
8182
# antsibull-docs
8283
# sphinx
8384
markupsafe==3.0.2
@@ -113,17 +114,20 @@ pyproject-hooks==1.2.0
113114
# via build
114115
pyyaml==6.0.2
115116
# via
116-
# -r tests/requirements-relaxed.in
117+
# -c tests/constraints.in
118+
# -r tests/requirements.in
117119
# antsibull-docs
118120
# antsibull-fileutils
119121
requests==2.32.3
120122
# via sphinx
121123
resolvelib==1.0.1
122-
# via -r tests/requirements-relaxed.in
124+
# via
125+
# -c tests/constraints.in
126+
# -r tests/requirements.in
123127
rstcheck==5.0.0
124128
# via
125-
# -c tests/constraints-base.in
126-
# -r tests/requirements-relaxed.in
129+
# -c tests/constraints.in
130+
# -r tests/requirements.in
127131
# antsibull-changelog
128132
# antsibull-docs
129133
semantic-version==2.10.0
@@ -138,7 +142,7 @@ snowballstemmer==2.2.0
138142
sphinx==7.2.5
139143
# via
140144
# -c tests/constraints.in
141-
# -r tests/requirements-relaxed.in
145+
# -r tests/requirements.in
142146
# antsibull-docs
143147
# sphinx-ansible-theme
144148
# sphinx-copybutton
@@ -147,16 +151,16 @@ sphinx==7.2.5
147151
# sphinx-rtd-theme
148152
# sphinxcontrib-jquery
149153
sphinx-ansible-theme==0.10.3
150-
# via -r tests/requirements-relaxed.in
154+
# via -r tests/requirements.in
151155
sphinx-copybutton==0.5.2
152-
# via -r tests/requirements-relaxed.in
156+
# via -r tests/requirements.in
153157
sphinx-intl==2.3.0
154-
# via -r tests/requirements-relaxed.in
158+
# via -r tests/requirements.in
155159
sphinx-notfound-page==1.0.4
156-
# via -r tests/requirements-relaxed.in
160+
# via -r tests/requirements.in
157161
sphinx-rtd-theme==3.0.2
158162
# via
159-
# -c tests/constraints-base.in
163+
# -c tests/constraints.in
160164
# sphinx-ansible-theme
161165
sphinxcontrib-applehelp==2.0.0
162166
# via sphinx

0 commit comments

Comments
 (0)