Skip to content
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

[stable 2.17] remove the relaxed reqs #2362

Open
wants to merge 5 commits into
base: stable-2.17
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/docsite/rst/community/documentation_contributions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ For more information on minimum Python versions, see the :ref:`support matrix <s

pip install -r tests/requirements.in -c tests/requirements.txt # Installs tested dependency versions.
pip install -r tests/requirements.in # Installs the unpinned dependency versions.
pip install -r tests/requirements-relaxed.in # Installs the unpinned dependency versions including untested antsibull-docs.


.. note::
Expand Down
52 changes: 25 additions & 27 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import shlex
import shutil
from argparse import ArgumentParser, BooleanOptionalAction
from glob import iglob
from pathlib import Path
from typing import cast
Expand Down Expand Up @@ -209,20 +208,6 @@ def _clone_core_check(session: nox.Session) -> None:
session.run("python", "docs/bin/clone-core.py", "--check")


def _relaxed_parser(session: nox.Session) -> ArgumentParser:
"""
Generate an argument parser with a --relaxed option.
"""
parser = ArgumentParser(prog=f"nox -e {session.name} --")
parser.add_argument(
"--relaxed",
default=False,
action=BooleanOptionalAction,
help="Whether to use requirements-relaxed file. (Default: %(default)s)",
)
return parser


def _env_python(session: nox.Session) -> str:
"""
Get the full path to an environment's python executable
Expand All @@ -240,9 +225,8 @@ def checkers(session: nox.Session, test: str):
"""
Run docs build checkers
"""
args = _relaxed_parser(session).parse_args(session.posargs)

install(session, req="requirements-relaxed" if args.relaxed else "requirements")
install(session, req="requirements")
_clone_core_check(session)
session.run("make", "-C", "docs/docsite", "clean", external=True)
session.run("python", "tests/checkers.py", test)
Expand All @@ -253,16 +237,30 @@ def make(session: nox.Session):
"""
Generate HTML from documentation source using the Makefile
"""
parser = _relaxed_parser(session)
parser.add_argument(
"make_args", nargs="*", help="Specify make targets as arguments"
)
args = parser.parse_args(session.posargs)
make_args = session.posargs or ["clean", "coredocs"]

install(session, req="requirements-relaxed" if args.relaxed else "requirements")
install(session, req="requirements")
_clone_core_check(session)
make_args: list[str] = [
session.run(
"make",
"-C",
"docs/docsite",
f"PYTHON={_env_python(session)}",
*(args.make_args or ("clean", "coredocs")),
]
session.run("make", "-C", "docs/docsite", *make_args, external=True)
*make_args,
external=True,
)


@nox.session
def tag(session: nox.Session):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was intentionally not there. (And maybe should also be removed in stable-2.18? Or should we just keep it to make branching simpler?)

"""
Check the core repo for new releases and create tags in ansible-documentation
"""
install(session, req="tag")
args = list(session.posargs)

# If run without any arguments, default to "tag"
if not any(arg.startswith(("hash", "mantag", "new-tags", "tag")) for arg in args):
args.append("tag")

session.run("python", "hacking/tagger/tag.py", *args)
4 changes: 0 additions & 4 deletions tests/constraints-base.in

This file was deleted.

7 changes: 7 additions & 0 deletions tests/constraints.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# This constraints file contains pins for the stable, tested versions of sphinx
# and antsibull-docs that production builds rely upon.
# This constraint file also pins other versions for which there are known limitations.

sphinx == 7.2.5
antsibull-docs == 2.16.2 # currently approved version

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
sphinx-rtd-theme>=2.0.0 # Fix 404 pages with new sphinx -- https://github.com/ansible/ansible-documentation/issues/678
jinja2 >= 3.0.0 # https://github.com/ansible/ansible/blob/stable-2.17/requirements.txt
pyyaml >= 5.1 # https://github.com/ansible/ansible/blob/stable-2.17/requirements.txt
resolvelib >= 0.5.3, < 1.1.0 # https://github.com/ansible/ansible/blob/stable-2.17/requirements.txt
16 changes: 0 additions & 16 deletions tests/requirements-relaxed.in

This file was deleted.

194 changes: 0 additions & 194 deletions tests/requirements-relaxed.txt

This file was deleted.

17 changes: 14 additions & 3 deletions tests/requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# This requirements file is used for stable ansible docs builds
# It depends on specific, tested antsibull-docs and sphinx versions
# This requirements file is used for doc builds

-c constraints.in # <-- contains known limitations
-r requirements-relaxed.in # <-- contains base set of dependencies

# Base set of dependencies.

antsibull-docs
sphinx
sphinx-intl # translation utility used by docs/docsite/Makefile
sphinx-notfound-page # extension used for the custom 404 page (cowsay)
sphinx-ansible-theme # extension used for the custom docs theme
sphinx-copybutton
rstcheck
jinja2 # used by hacking/build_library/build_ansible/command_plugins/generate_man.py and dump_keywords.py
pyyaml # used by ansible-core
resolvelib # used by ansible-core
Loading
Loading