Skip to content

Commit cb0a8f6

Browse files
authored
[stable 2.16] remove the relaxed reqs (#2363)
* 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
1 parent 0019427 commit cb0a8f6

File tree

8 files changed

+46
-258
lines changed

8 files changed

+46
-258
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: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
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 == 7.1.2
5+
sphinx == 7.1.2 # sphinx >= 7.2 breaks for 404 pages. -- https://github.com/ansible/ansible-documentation/issues/678
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+
jinja2 >= 3.0.0 # https://github.com/ansible/ansible/blob/stable-2.16/requirements.txt
10+
pyyaml >= 5.1 # https://github.com/ansible/ansible/blob/stable-2.16/requirements.txt
11+
resolvelib >= 0.5.3, < 1.1.0 # https://github.com/ansible/ansible/blob/stable-2.16/requirements.txt

tests/requirements-relaxed.in

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

tests/requirements-relaxed.txt

Lines changed: 0 additions & 194 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: 15 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
@@ -79,7 +79,8 @@ imagesize==1.4.1
7979
# via sphinx
8080
jinja2==3.1.4
8181
# via
82-
# -r tests/requirements-relaxed.in
82+
# -c tests/constraints.in
83+
# -r tests/requirements.in
8384
# antsibull-docs
8485
# sphinx
8586
markupsafe==3.0.2
@@ -115,17 +116,20 @@ pyproject-hooks==1.2.0
115116
# via build
116117
pyyaml==6.0.2
117118
# via
118-
# -r tests/requirements-relaxed.in
119+
# -c tests/constraints.in
120+
# -r tests/requirements.in
119121
# antsibull-docs
120122
# antsibull-fileutils
121123
requests==2.32.3
122124
# via sphinx
123125
resolvelib==1.0.1
124-
# via -r tests/requirements-relaxed.in
126+
# via
127+
# -c tests/constraints.in
128+
# -r tests/requirements.in
125129
rstcheck==5.0.0
126130
# via
127-
# -c tests/constraints-base.in
128-
# -r tests/requirements-relaxed.in
131+
# -c tests/constraints.in
132+
# -r tests/requirements.in
129133
# antsibull-changelog
130134
# antsibull-docs
131135
semantic-version==2.10.0
@@ -139,9 +143,8 @@ snowballstemmer==2.2.0
139143
# via sphinx
140144
sphinx==7.1.2
141145
# via
142-
# -c tests/constraints-base.in
143146
# -c tests/constraints.in
144-
# -r tests/requirements-relaxed.in
147+
# -r tests/requirements.in
145148
# antsibull-docs
146149
# sphinx-ansible-theme
147150
# sphinx-copybutton
@@ -150,13 +153,13 @@ sphinx==7.1.2
150153
# sphinx-rtd-theme
151154
# sphinxcontrib-jquery
152155
sphinx-ansible-theme==0.10.3
153-
# via -r tests/requirements-relaxed.in
156+
# via -r tests/requirements.in
154157
sphinx-copybutton==0.5.2
155-
# via -r tests/requirements-relaxed.in
158+
# via -r tests/requirements.in
156159
sphinx-intl==2.3.0
157-
# via -r tests/requirements-relaxed.in
160+
# via -r tests/requirements.in
158161
sphinx-notfound-page==1.0.4
159-
# via -r tests/requirements-relaxed.in
162+
# via -r tests/requirements.in
160163
sphinx-rtd-theme==3.0.2
161164
# via sphinx-ansible-theme
162165
sphinxcontrib-applehelp==2.0.0

0 commit comments

Comments
 (0)