From a3c2918dcfcd389b068779262ff80f4aaadcef2a Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 28 Feb 2024 14:12:25 +0000 Subject: [PATCH 01/24] use toml file for pip tools config --- .pip-tools.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .pip-tools.toml diff --git a/.pip-tools.toml b/.pip-tools.toml new file mode 100644 index 00000000..c1f6c7ad --- /dev/null +++ b/.pip-tools.toml @@ -0,0 +1,5 @@ +[tool.pip-tools] +resolver = "backtracking" +allow-unsafe = true +strip-extras = true +quiet = true From ab34ed137888f434b37ca001cff31b4fb5a0ad90 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 28 Feb 2024 14:13:16 +0000 Subject: [PATCH 02/24] add pip compile session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) --- noxfile.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/noxfile.py b/noxfile.py index 08f690bd..54e33cab 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,5 +1,27 @@ import nox +@nox.session(name="pip-compile", python=["3.11"]) +def pip_compile(session: nox.Session): + # .pip-tools.toml was introduced in v7 + session.install("pip-tools >= 7") + + # Use --upgrade by default unless a user passes -P. + upgrade_related_cli_flags = "-P", "--upgrade-package", "--no-upgrade" + has_upgrade_related_cli_flags = any( + arg.startswith(upgrade_related_cli_flags) + for arg in session.posargs + ) + injected_extra_cli_args = () if has_upgrade_related_cli_flags else ("--upgrade",) + + session.run( + "pip-compile", + "--output-file", + f"requirements.txt", + *session.posargs, + *injected_extra_cli_args, + f"requirements.in", + ) + @nox.session(python=["3.11"]) # The python version should match the readthedocs configuration. def build(session: nox.Session): session.install( From 9595046c1dd6df37badb7ec6c2d06ebe679f6cdf Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 28 Feb 2024 19:22:25 +0000 Subject: [PATCH 03/24] parametrize requirements files --- noxfile.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/noxfile.py b/noxfile.py index 54e33cab..03a43d90 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,31 +1,43 @@ +from pathlib import Path + import nox +requirements_files = list( + {path.name.replace(".in", "") for path in Path(".").glob("*in")} +) + + @nox.session(name="pip-compile", python=["3.11"]) -def pip_compile(session: nox.Session): +@nox.parametrize(["req"], requirements_files, requirements_files) +def pip_compile(session: nox.Session, req: str): # .pip-tools.toml was introduced in v7 session.install("pip-tools >= 7") # Use --upgrade by default unless a user passes -P. upgrade_related_cli_flags = "-P", "--upgrade-package", "--no-upgrade" has_upgrade_related_cli_flags = any( - arg.startswith(upgrade_related_cli_flags) - for arg in session.posargs + arg.startswith(upgrade_related_cli_flags) for arg in session.posargs ) injected_extra_cli_args = () if has_upgrade_related_cli_flags else ("--upgrade",) session.run( "pip-compile", "--output-file", - f"requirements.txt", + f"{req}.txt", *session.posargs, *injected_extra_cli_args, - f"requirements.in", + f"{req}.in", ) -@nox.session(python=["3.11"]) # The python version should match the readthedocs configuration. + +@nox.session( + python=["3.11"] +) # The python version should match the readthedocs configuration. def build(session: nox.Session): + # fmt: off session.install( "-r", "requirements.in", "-c", "requirements.txt", ) + # fmt: on session.run("python", "-I", "build.py", *session.posargs) From fc6debddd8a3f2f687481d3c76149edc9e1e5593 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 28 Feb 2024 19:24:22 +0000 Subject: [PATCH 04/24] add pip-tools lock file --- pip-tools.in | 2 ++ pip-tools.txt | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 pip-tools.in create mode 100644 pip-tools.txt diff --git a/pip-tools.in b/pip-tools.in new file mode 100644 index 00000000..6bbcb17b --- /dev/null +++ b/pip-tools.in @@ -0,0 +1,2 @@ + +pip-tools >= 7 # .pip-tools.toml was introduced in v7 diff --git a/pip-tools.txt b/pip-tools.txt new file mode 100644 index 00000000..967d5c71 --- /dev/null +++ b/pip-tools.txt @@ -0,0 +1,26 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=pip-tools.txt --strip-extras pip-tools.in +# +build==1.0.3 + # via pip-tools +click==8.1.7 + # via pip-tools +packaging==23.2 + # via build +pip-tools==7.4.0 + # via -r pip-tools.in +pyproject-hooks==1.0.0 + # via + # build + # pip-tools +wheel==0.42.0 + # via pip-tools + +# The following packages are considered to be unsafe in a requirements file: +pip==24.0 + # via pip-tools +setuptools==69.1.1 + # via pip-tools From 185ed951bab14f2136fdfe0b8add05f53ac82f81 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 28 Feb 2024 19:26:44 +0000 Subject: [PATCH 05/24] add pip-tools session requirements --- noxfile.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 03a43d90..a3a48fd2 100644 --- a/noxfile.py +++ b/noxfile.py @@ -10,8 +10,12 @@ @nox.session(name="pip-compile", python=["3.11"]) @nox.parametrize(["req"], requirements_files, requirements_files) def pip_compile(session: nox.Session, req: str): - # .pip-tools.toml was introduced in v7 - session.install("pip-tools >= 7") + # fmt: off + session.install( + "-r", "pip-tools.in", + "-c", "pip-tools.txt", + ) + # fmt: on # Use --upgrade by default unless a user passes -P. upgrade_related_cli_flags = "-P", "--upgrade-package", "--no-upgrade" From 35909c9880d7cf794da014e314ba76bc0f0a02c4 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 28 Feb 2024 19:33:28 +0000 Subject: [PATCH 06/24] add docstrings to nox sessions --- noxfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/noxfile.py b/noxfile.py index a3a48fd2..29a04441 100644 --- a/noxfile.py +++ b/noxfile.py @@ -10,6 +10,7 @@ @nox.session(name="pip-compile", python=["3.11"]) @nox.parametrize(["req"], requirements_files, requirements_files) def pip_compile(session: nox.Session, req: str): + """Generate lock files from input files or upgrade packages in lock files.""" # fmt: off session.install( "-r", "pip-tools.in", @@ -38,6 +39,7 @@ def pip_compile(session: nox.Session, req: str): python=["3.11"] ) # The python version should match the readthedocs configuration. def build(session: nox.Session): + """Generate HTML files for the Ansible docsite.""" # fmt: off session.install( "-r", "requirements.in", From 1c1dcf8847629453d426d8960b373519f2b187f9 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 28 Feb 2024 19:35:29 +0000 Subject: [PATCH 07/24] formatting nit --- noxfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index 29a04441..df23cc0d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -35,9 +35,7 @@ def pip_compile(session: nox.Session, req: str): ) -@nox.session( - python=["3.11"] -) # The python version should match the readthedocs configuration. +@nox.session(python=["3.11"]) # The python version should match the readthedocs configuration. def build(session: nox.Session): """Generate HTML files for the Ansible docsite.""" # fmt: off From 728602b3c0b7775bd8dc1aae8c3a79e02f42d93a Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 29 Feb 2024 09:14:45 +0000 Subject: [PATCH 08/24] Update noxfile.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index df23cc0d..2c33aeeb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -3,7 +3,7 @@ import nox requirements_files = list( - {path.name.replace(".in", "") for path in Path(".").glob("*in")} + {path.stem for path in Path.cwd().glob("*.in")} ) From 0f7fbeb31f33614137afda51a6d275b91be17c12 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 29 Feb 2024 09:15:05 +0000 Subject: [PATCH 09/24] Update pip-tools.in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) --- pip-tools.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pip-tools.in b/pip-tools.in index 6bbcb17b..ad815947 100644 --- a/pip-tools.in +++ b/pip-tools.in @@ -1,2 +1,2 @@ -pip-tools >= 7 # .pip-tools.toml was introduced in v7 +pip-tools >= 7 # .pip-tools.toml was introduced in v6.14 From 765d0de5bd9699bbae88b93d4eb21a6a21d4dc97 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 29 Feb 2024 09:24:55 +0000 Subject: [PATCH 10/24] move to requirements dir --- noxfile.py | 14 +++++++------- pip-tools.in => requirements/pip-tools.in | 0 pip-tools.txt => requirements/pip-tools.txt | 4 ++-- requirements.in => requirements/requirements.in | 0 requirements.txt => requirements/requirements.txt | 0 5 files changed, 9 insertions(+), 9 deletions(-) rename pip-tools.in => requirements/pip-tools.in (100%) rename pip-tools.txt => requirements/pip-tools.txt (74%) rename requirements.in => requirements/requirements.in (100%) rename requirements.txt => requirements/requirements.txt (100%) diff --git a/noxfile.py b/noxfile.py index 2c33aeeb..8c26b188 100644 --- a/noxfile.py +++ b/noxfile.py @@ -3,7 +3,7 @@ import nox requirements_files = list( - {path.stem for path in Path.cwd().glob("*.in")} + {path.stem for path in Path.cwd().glob("**/*.in")} ) @@ -13,8 +13,8 @@ def pip_compile(session: nox.Session, req: str): """Generate lock files from input files or upgrade packages in lock files.""" # fmt: off session.install( - "-r", "pip-tools.in", - "-c", "pip-tools.txt", + "-r", "requirements/pip-tools.in", + "-c", "requirements/pip-tools.txt", ) # fmt: on @@ -28,10 +28,10 @@ def pip_compile(session: nox.Session, req: str): session.run( "pip-compile", "--output-file", - f"{req}.txt", + f"requirements/{req}.txt", *session.posargs, *injected_extra_cli_args, - f"{req}.in", + f"requirements/{req}.in", ) @@ -40,8 +40,8 @@ def build(session: nox.Session): """Generate HTML files for the Ansible docsite.""" # fmt: off session.install( - "-r", "requirements.in", - "-c", "requirements.txt", + "-r", "requirements/requirements.in", + "-c", "requirements/requirements.txt", ) # fmt: on session.run("python", "-I", "build.py", *session.posargs) diff --git a/pip-tools.in b/requirements/pip-tools.in similarity index 100% rename from pip-tools.in rename to requirements/pip-tools.in diff --git a/pip-tools.txt b/requirements/pip-tools.txt similarity index 74% rename from pip-tools.txt rename to requirements/pip-tools.txt index 967d5c71..b8facf60 100644 --- a/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --allow-unsafe --output-file=pip-tools.txt --strip-extras pip-tools.in +# pip-compile --allow-unsafe --output-file=requirements/pip-tools.txt --strip-extras requirements/pip-tools.in # build==1.0.3 # via pip-tools @@ -11,7 +11,7 @@ click==8.1.7 packaging==23.2 # via build pip-tools==7.4.0 - # via -r pip-tools.in + # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via # build diff --git a/requirements.in b/requirements/requirements.in similarity index 100% rename from requirements.in rename to requirements/requirements.in diff --git a/requirements.txt b/requirements/requirements.txt similarity index 100% rename from requirements.txt rename to requirements/requirements.txt From 8f1fc87fc6d33039648ba73ffad23f2512c1c672 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Mon, 4 Mar 2024 09:27:22 +0000 Subject: [PATCH 11/24] Update requirements/pip-tools.in Co-authored-by: Maxwell G --- requirements/pip-tools.in | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements/pip-tools.in b/requirements/pip-tools.in index ad815947..ad6fdcbf 100644 --- a/requirements/pip-tools.in +++ b/requirements/pip-tools.in @@ -1,2 +1 @@ - pip-tools >= 7 # .pip-tools.toml was introduced in v6.14 From 9aeef8b04f5d03abfde14f8f8809ac5ffe8d2a9f Mon Sep 17 00:00:00 2001 From: Don Naro Date: Mon, 4 Mar 2024 09:35:40 +0000 Subject: [PATCH 12/24] Update noxfile.py Co-authored-by: Maxwell G --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 8c26b188..0ff7adfd 100644 --- a/noxfile.py +++ b/noxfile.py @@ -8,7 +8,7 @@ @nox.session(name="pip-compile", python=["3.11"]) -@nox.parametrize(["req"], requirements_files, requirements_files) +@nox.parametrize(["req"], arg_values_list=requirements_files, ids=requirements_files) def pip_compile(session: nox.Session, req: str): """Generate lock files from input files or upgrade packages in lock files.""" # fmt: off From 460e43a5cb737390342b05d00c90b1c027e29206 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Mon, 4 Mar 2024 17:23:47 +0000 Subject: [PATCH 13/24] look in requirements directory only --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 0ff7adfd..ca23f365 100644 --- a/noxfile.py +++ b/noxfile.py @@ -3,7 +3,7 @@ import nox requirements_files = list( - {path.stem for path in Path.cwd().glob("**/*.in")} + {path.stem for path in Path("requirements").glob("*.in")} ) From a1a4c8d5ed4bfab3af32ca21a3467761ea09b089 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Mon, 4 Mar 2024 17:38:04 +0000 Subject: [PATCH 14/24] add requirements directory var --- noxfile.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index ca23f365..e091d700 100644 --- a/noxfile.py +++ b/noxfile.py @@ -2,9 +2,12 @@ import nox -requirements_files = list( - {path.stem for path in Path("requirements").glob("*.in")} -) +requirements_directory = (Path("requirements")).resolve() + +requirements_files = [ + requirements_input_file_path.stem + for requirements_input_file_path in requirements_directory.glob("*.in") +] @nox.session(name="pip-compile", python=["3.11"]) From dcdd28692c1c45304d00e56f91af29fdc070228f Mon Sep 17 00:00:00 2001 From: Don Naro Date: Mon, 4 Mar 2024 17:43:12 +0000 Subject: [PATCH 15/24] use req directory var --- noxfile.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/noxfile.py b/noxfile.py index e091d700..76481741 100644 --- a/noxfile.py +++ b/noxfile.py @@ -16,8 +16,8 @@ def pip_compile(session: nox.Session, req: str): """Generate lock files from input files or upgrade packages in lock files.""" # fmt: off session.install( - "-r", "requirements/pip-tools.in", - "-c", "requirements/pip-tools.txt", + "-r", f"{requirements_directory}/pip-tools.in", + "-c", f"{requirements_directory}/pip-tools.txt", ) # fmt: on @@ -31,10 +31,10 @@ def pip_compile(session: nox.Session, req: str): session.run( "pip-compile", "--output-file", - f"requirements/{req}.txt", + f"{requirements_directory}/{req}.txt", *session.posargs, *injected_extra_cli_args, - f"requirements/{req}.in", + f"{requirements_directory}/{req}.in", ) @@ -43,8 +43,8 @@ def build(session: nox.Session): """Generate HTML files for the Ansible docsite.""" # fmt: off session.install( - "-r", "requirements/requirements.in", - "-c", "requirements/requirements.txt", + "-r", f"{requirements_directory}/requirements.in", + "-c", f"{requirements_directory}/requirements.txt", ) # fmt: on session.run("python", "-I", "build.py", *session.posargs) From 6efaff63c6114e7f361560f22be4194b4213ffc9 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Mon, 4 Mar 2024 18:59:41 +0000 Subject: [PATCH 16/24] Update noxfile.py Co-authored-by: Maxwell G --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 76481741..0f4edf91 100644 --- a/noxfile.py +++ b/noxfile.py @@ -2,7 +2,7 @@ import nox -requirements_directory = (Path("requirements")).resolve() +requirements_directory = Path("requirements").resolve() requirements_files = [ requirements_input_file_path.stem From fdfcc5be1164a51d34de929c75229a995fc46899 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Tue, 5 Mar 2024 13:50:15 +0000 Subject: [PATCH 17/24] Update noxfile.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) --- noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 0f4edf91..50163b5f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -16,8 +16,8 @@ def pip_compile(session: nox.Session, req: str): """Generate lock files from input files or upgrade packages in lock files.""" # fmt: off session.install( - "-r", f"{requirements_directory}/pip-tools.in", - "-c", f"{requirements_directory}/pip-tools.txt", + "-r", requirements_directory / "pip-tools.in", + "-c", requirements_directory / "pip-tools.txt", ) # fmt: on From 4db8e42f134c7b773d80273111fe4eab419c528d Mon Sep 17 00:00:00 2001 From: Don Naro Date: Tue, 5 Mar 2024 13:56:26 +0000 Subject: [PATCH 18/24] pathlib objects in cli args --- noxfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/noxfile.py b/noxfile.py index 50163b5f..dba0b001 100644 --- a/noxfile.py +++ b/noxfile.py @@ -31,10 +31,10 @@ def pip_compile(session: nox.Session, req: str): session.run( "pip-compile", "--output-file", - f"{requirements_directory}/{req}.txt", + requirements_directory / f"{req}.txt", *session.posargs, *injected_extra_cli_args, - f"{requirements_directory}/{req}.in", + requirements_directory / f"{req}.in", ) @@ -43,8 +43,8 @@ def build(session: nox.Session): """Generate HTML files for the Ansible docsite.""" # fmt: off session.install( - "-r", f"{requirements_directory}/requirements.in", - "-c", f"{requirements_directory}/requirements.txt", + "-r", requirements_directory / "requirements.in", + "-c", requirements_directory / "requirements.txt", ) # fmt: on session.run("python", "-I", "build.py", *session.posargs) From 6c8d48cdd1c8c15984ca3d73134615a5d3e0b8ff Mon Sep 17 00:00:00 2001 From: Don Naro Date: Tue, 5 Mar 2024 13:57:39 +0000 Subject: [PATCH 19/24] Update noxfile.py Co-authored-by: Maxwell G --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index dba0b001..cc47334a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -22,7 +22,7 @@ def pip_compile(session: nox.Session, req: str): # fmt: on # Use --upgrade by default unless a user passes -P. - upgrade_related_cli_flags = "-P", "--upgrade-package", "--no-upgrade" + upgrade_related_cli_flags = ("-P", "--upgrade-package", "--no-upgrade") has_upgrade_related_cli_flags = any( arg.startswith(upgrade_related_cli_flags) for arg in session.posargs ) From 40e955538196a1361b443996c4e97a1aae07c19f Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 6 Mar 2024 16:45:21 +0000 Subject: [PATCH 20/24] convert requirements directory var to string --- noxfile.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/noxfile.py b/noxfile.py index cc47334a..f7506b1a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,3 +1,4 @@ +import os from pathlib import Path import nox @@ -14,10 +15,11 @@ @nox.parametrize(["req"], arg_values_list=requirements_files, ids=requirements_files) def pip_compile(session: nox.Session, req: str): """Generate lock files from input files or upgrade packages in lock files.""" + requirements_directory_str = str(requirements_directory) # fmt: off session.install( - "-r", requirements_directory / "pip-tools.in", - "-c", requirements_directory / "pip-tools.txt", + "-r", os.path.join(requirements_directory_str, "pip-tools.in"), + "-c", os.path.join(requirements_directory_str, "pip-tools.txt"), ) # fmt: on @@ -31,20 +33,21 @@ def pip_compile(session: nox.Session, req: str): session.run( "pip-compile", "--output-file", - requirements_directory / f"{req}.txt", + os.path.join(requirements_directory_str, f"{req}.txt"), *session.posargs, *injected_extra_cli_args, - requirements_directory / f"{req}.in", + os.path.join(requirements_directory_str, f"{req}.in"), ) @nox.session(python=["3.11"]) # The python version should match the readthedocs configuration. def build(session: nox.Session): """Generate HTML files for the Ansible docsite.""" + requirements_directory_str = str(requirements_directory) # fmt: off session.install( - "-r", requirements_directory / "requirements.in", - "-c", requirements_directory / "requirements.txt", + "-r", os.path.join(requirements_directory_str, "requirements.in"), + "-c", os.path.join(requirements_directory_str, "requirements.txt"), ) # fmt: on session.run("python", "-I", "build.py", *session.posargs) From 7ca423337be2a09c86e04988df215c8edc2da783 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 7 Mar 2024 08:43:10 +0000 Subject: [PATCH 21/24] Update noxfile.py Co-authored-by: Maxwell G --- noxfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index f7506b1a..0ccc1fe3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -15,11 +15,10 @@ @nox.parametrize(["req"], arg_values_list=requirements_files, ids=requirements_files) def pip_compile(session: nox.Session, req: str): """Generate lock files from input files or upgrade packages in lock files.""" - requirements_directory_str = str(requirements_directory) # fmt: off session.install( - "-r", os.path.join(requirements_directory_str, "pip-tools.in"), - "-c", os.path.join(requirements_directory_str, "pip-tools.txt"), + "-r", str(requirements_directory / "pip-tools.in"), + "-c", str(requirements_directory / "pip-tools.txt"), ) # fmt: on From 6a744fa01003601fe9d3de350c2ec726886820e5 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 7 Mar 2024 08:43:23 +0000 Subject: [PATCH 22/24] Update noxfile.py Co-authored-by: Maxwell G --- noxfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 0ccc1fe3..62ace9b5 100644 --- a/noxfile.py +++ b/noxfile.py @@ -42,7 +42,6 @@ def pip_compile(session: nox.Session, req: str): @nox.session(python=["3.11"]) # The python version should match the readthedocs configuration. def build(session: nox.Session): """Generate HTML files for the Ansible docsite.""" - requirements_directory_str = str(requirements_directory) # fmt: off session.install( "-r", os.path.join(requirements_directory_str, "requirements.in"), From efb95c2de6995e87642f63859dfb57c4bd978504 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 7 Mar 2024 08:43:35 +0000 Subject: [PATCH 23/24] Update noxfile.py Co-authored-by: Maxwell G --- noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 62ace9b5..b22f27bd 100644 --- a/noxfile.py +++ b/noxfile.py @@ -44,8 +44,8 @@ def build(session: nox.Session): """Generate HTML files for the Ansible docsite.""" # fmt: off session.install( - "-r", os.path.join(requirements_directory_str, "requirements.in"), - "-c", os.path.join(requirements_directory_str, "requirements.txt"), + "-r", str(requirements_directory / "requirements.in"), + "-c", str(requirements_directory / "requirements.txt"), ) # fmt: on session.run("python", "-I", "build.py", *session.posargs) From bb558ee265a2aed70b2ebec7706e8b4887cbe0ce Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 7 Mar 2024 09:04:36 +0000 Subject: [PATCH 24/24] fix my terrible python --- noxfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index b22f27bd..dac7a7ae 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,4 +1,3 @@ -import os from pathlib import Path import nox @@ -32,10 +31,10 @@ def pip_compile(session: nox.Session, req: str): session.run( "pip-compile", "--output-file", - os.path.join(requirements_directory_str, f"{req}.txt"), + str(requirements_directory / f"{req}.txt"), *session.posargs, *injected_extra_cli_args, - os.path.join(requirements_directory_str, f"{req}.in"), + str(requirements_directory / f"{req}.in"), )