Skip to content

Commit 8d80477

Browse files
oraNodfelixfontein
andauthored
Remove the relaxed requirements (#2353)
* rm relaxed requirements * rm base constraints file * update requirements input file * sync requirements lock file * update noxfile to rm relaxed reqs * update pip-compile workflow to rm relaxed reqs * update docs * fix noxfile issues * tidy up pins and reqs * Update tests/constraints.in Co-authored-by: Felix Fontein <[email protected]> * add all version ranges to constraints * Update tests/requirements.in Co-authored-by: Felix Fontein <[email protected]> * Update tests/constraints.in Co-authored-by: Felix Fontein <[email protected]> * sync req lock file --------- Co-authored-by: Felix Fontein <[email protected]>
1 parent 277aaca commit 8d80477

File tree

9 files changed

+59
-254
lines changed

9 files changed

+59
-254
lines changed

.github/workflows/pip-compile-docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
nox-args: >-
3131
-e
3232
'pip-compile(requirements)'
33-
'pip-compile(requirements-relaxed)'
3433
reset-branch: "${{ inputs.reset-branch || false }}"
3534
labels: "${{ inputs.labels || 'doc builds,no_backport' }}"
3635
python-versions: "3.11"

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 contextlib import suppress
87
from glob import iglob
98
from pathlib import Path
@@ -225,20 +224,6 @@ def _clone_core_check(session: nox.Session) -> None:
225224
session.run("python", "docs/bin/clone-core.py", "--check")
226225

227226

228-
def _relaxed_parser(session: nox.Session) -> ArgumentParser:
229-
"""
230-
Generate an argument parser with a --relaxed option.
231-
"""
232-
parser = ArgumentParser(prog=f"nox -e {session.name} --")
233-
parser.add_argument(
234-
"--relaxed",
235-
default=False,
236-
action=BooleanOptionalAction,
237-
help="Whether to use requirements-relaxed file. (Default: %(default)s)",
238-
)
239-
return parser
240-
241-
242227
def _env_python(session: nox.Session) -> str:
243228
"""
244229
Get the full path to an environment's python executable
@@ -256,9 +241,8 @@ def checkers(session: nox.Session, test: str):
256241
"""
257242
Run docs build checkers
258243
"""
259-
args = _relaxed_parser(session).parse_args(session.posargs)
260244

261-
install(session, req="requirements-relaxed" if args.relaxed else "requirements")
245+
install(session, req="requirements")
262246
_clone_core_check(session)
263247
session.run("make", "-C", "docs/docsite", "clean", external=True)
264248
session.run("python", "tests/checkers.py", test)
@@ -269,19 +253,18 @@ def make(session: nox.Session):
269253
"""
270254
Generate HTML from documentation source using the Makefile
271255
"""
272-
parser = _relaxed_parser(session)
273-
parser.add_argument(
274-
"make_args", nargs="*", help="Specify make targets as arguments"
275-
)
276-
args = parser.parse_args(session.posargs)
256+
make_args = session.posargs or ["clean", "coredocs"]
277257

278-
install(session, req="requirements-relaxed" if args.relaxed else "requirements")
258+
install(session, req="requirements")
279259
_clone_core_check(session)
280-
make_args: list[str] = [
260+
session.run(
261+
"make",
262+
"-C",
263+
"docs/docsite",
281264
f"PYTHON={_env_python(session)}",
282-
*(args.make_args or ("clean", "coredocs")),
283-
]
284-
session.run("make", "-C", "docs/docsite", *make_args, external=True)
265+
*make_args,
266+
external=True,
267+
)
285268

286269

287270
@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+
sphinx-rtd-theme >= 2.0.0 # Fix 404 pages with new sphinx -- https://github.com/ansible/ansible-documentation/issues/678
9+
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
10+
jinja2 >= 3.0.0 # https://github.com/ansible/ansible/blob/devel/requirements.txt
11+
pyyaml >= 5.1 # https://github.com/ansible/ansible/blob/devel/requirements.txt
12+
resolvelib >= 0.5.3, < 1.1.0 # https://github.com/ansible/ansible/blob/devel/requirements.txt

tests/requirements-relaxed.in

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

tests/requirements-relaxed.txt

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

tests/requirements.in

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
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-rtd-theme
13+
rstcheck
14+
sphinx-copybutton
15+
jinja2 # used by hacking/build_library/build_ansible/command_plugins/generate_man.py and dump_keywords.py
16+
pyyaml # used by ansible-core
17+
resolvelib # used by ansible-core
18+
cryptography # used by ansible-core
19+
packaging # used by ansible-core

0 commit comments

Comments
 (0)