Skip to content

Commit 1ce9a2f

Browse files
oraNodfelixfontein
andauthored
[stable 2.15] remove the relaxed reqs (#2364)
* 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 * remove tagger session * Update tests/constraints.in Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]>
1 parent 5c074c4 commit 1ce9a2f

File tree

8 files changed

+56
-224
lines changed

8 files changed

+56
-224
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
@@ -2,7 +2,6 @@
22

33
import os
44
import shlex
5-
from argparse import ArgumentParser, BooleanOptionalAction
65
from glob import iglob
76
from pathlib import Path
87
from typing import cast
@@ -162,20 +161,6 @@ def _clone_core_check(session: nox.Session) -> None:
162161
session.run("python", "docs/bin/clone-core.py", "--check")
163162

164163

165-
def _relaxed_parser(session: nox.Session) -> ArgumentParser:
166-
"""
167-
Generate an argument parser with a --relaxed option.
168-
"""
169-
parser = ArgumentParser(prog=f"nox -e {session.name} --")
170-
parser.add_argument(
171-
"--relaxed",
172-
default=False,
173-
action=BooleanOptionalAction,
174-
help="Whether to use requirements-relaxed file. (Default: %(default)s)",
175-
)
176-
return parser
177-
178-
179164
def _env_python(session: nox.Session) -> str:
180165
"""
181166
Get the full path to an environment's python executable
@@ -193,9 +178,8 @@ def checkers(session: nox.Session, test: str):
193178
"""
194179
Run docs build checkers
195180
"""
196-
args = _relaxed_parser(session).parse_args(session.posargs)
197181

198-
install(session, req="requirements-relaxed" if args.relaxed else "requirements")
182+
install(session, req="requirements")
199183
_clone_core_check(session)
200184
session.run("make", "-C", "docs/docsite", "clean", external=True)
201185
session.run("python", "tests/checkers.py", test)
@@ -206,16 +190,15 @@ def make(session: nox.Session):
206190
"""
207191
Generate HTML from documentation source using the Makefile
208192
"""
209-
parser = _relaxed_parser(session)
210-
parser.add_argument(
211-
"make_args", nargs="*", help="Specify make targets as arguments"
212-
)
213-
args = parser.parse_args(session.posargs)
193+
make_args = session.posargs or ["clean", "coredocs"]
214194

215-
install(session, req="requirements-relaxed" if args.relaxed else "requirements")
195+
install(session, req="requirements")
216196
_clone_core_check(session)
217-
make_args: list[str] = [
197+
session.run(
198+
"make",
199+
"-C",
200+
"docs/docsite",
218201
f"PYTHON={_env_python(session)}",
219-
*(args.make_args or ("clean", "coredocs")),
220-
]
221-
session.run("make", "-C", "docs/docsite", *make_args, external=True)
202+
*make_args,
203+
external=True,
204+
)

tests/constraints-base.in

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

tests/constraints.in

Lines changed: 8 additions & 1 deletion
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

4-
sphinx == 5.3.0
5+
sphinx == 5.3.0 # https://github.com/readthedocs/sphinx-notfound-page/issues/219
56
antsibull-docs == 2.7.0 # 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+
jinja2 >= 3.0.0 # https://github.com/ansible/ansible/blob/stable-2.15/requirements.txt
10+
pyyaml >= 5.1 # https://github.com/ansible/ansible/blob/stable-2.15/requirements.txt
11+
importlib_resources >= 5.0, < 5.1; python_version < '3.10' # https://github.com/ansible/ansible/blob/stable-2.15/requirements.txt
12+
resolvelib >= 0.5.3, < 1.1.0 # https://github.com/ansible/ansible/blob/stable-2.15/requirements.txt

tests/requirements-relaxed.in

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

tests/requirements-relaxed.txt

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

tests/requirements.in

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

tests/requirements.txt

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ antsibull-core==2.1.0
2525
antsibull-docs==2.7.0
2626
# via
2727
# -c tests/constraints.in
28-
# -r tests/requirements-relaxed.in
28+
# -r tests/requirements.in
2929
antsibull-docs-parser==1.0.0
3030
# via antsibull-docs
3131
async-timeout==4.0.3
@@ -35,13 +35,17 @@ asyncio-pool==0.6.0
3535
attrs==23.1.0
3636
# via aiohttp
3737
babel==2.12.1
38-
# via sphinx
38+
# via
39+
# sphinx
40+
# sphinx-intl
3941
build==1.0.3
4042
# via antsibull-core
4143
certifi==2023.7.22
4244
# via requests
4345
charset-normalizer==3.2.0
4446
# via requests
47+
click==8.1.8
48+
# via sphinx-intl
4549
docutils==0.18.1
4650
# via
4751
# antsibull-docs
@@ -60,7 +64,8 @@ imagesize==1.4.1
6064
# via sphinx
6165
jinja2==3.1.2
6266
# via
63-
# -r tests/requirements-relaxed.in
67+
# -c tests/constraints.in
68+
# -r tests/requirements.in
6469
# antsibull-docs
6570
# sphinx
6671
markupsafe==2.1.3
@@ -89,17 +94,20 @@ pyproject-hooks==1.0.0
8994
# via build
9095
pyyaml==6.0.1
9196
# via
92-
# -r tests/requirements-relaxed.in
97+
# -c tests/constraints.in
98+
# -r tests/requirements.in
9399
# antsibull-core
94100
# antsibull-docs
95101
requests==2.31.0
96102
# via sphinx
97103
resolvelib==1.0.1
98-
# via -r tests/requirements-relaxed.in
104+
# via
105+
# -c tests/constraints.in
106+
# -r tests/requirements.in
99107
rstcheck==5.0.0
100108
# via
101-
# -c tests/constraints-base.in
102-
# -r tests/requirements-relaxed.in
109+
# -c tests/constraints.in
110+
# -r tests/requirements.in
103111
# antsibull-docs
104112
semantic-version==2.10.0
105113
# via
@@ -113,11 +121,11 @@ snowballstemmer==2.2.0
113121
# via sphinx
114122
sphinx==5.3.0
115123
# via
116-
# -c tests/constraints-base.in
117124
# -c tests/constraints.in
118-
# -r tests/requirements-relaxed.in
125+
# -r tests/requirements.in
119126
# antsibull-docs
120127
# sphinx-ansible-theme
128+
# sphinx-intl
121129
# sphinx-notfound-page
122130
# sphinx-rtd-theme
123131
# sphinxcontrib-applehelp
@@ -127,9 +135,11 @@ sphinx==5.3.0
127135
# sphinxcontrib-qthelp
128136
# sphinxcontrib-serializinghtml
129137
sphinx-ansible-theme==0.10.2
130-
# via -r tests/requirements-relaxed.in
138+
# via -r tests/requirements.in
139+
sphinx-intl==2.3.1
140+
# via -r tests/requirements.in
131141
sphinx-notfound-page==1.0.0
132-
# via -r tests/requirements-relaxed.in
142+
# via -r tests/requirements.in
133143
sphinx-rtd-theme==1.3.0
134144
# via sphinx-ansible-theme
135145
sphinxcontrib-applehelp==1.0.7
@@ -164,3 +174,7 @@ urllib3==2.0.5
164174
# via requests
165175
yarl==1.9.2
166176
# via aiohttp
177+
178+
# The following packages are considered to be unsafe in a requirements file:
179+
setuptools==75.8.0
180+
# via sphinx-intl

0 commit comments

Comments
 (0)