Skip to content
Merged
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
29 changes: 20 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ ci:
autoupdate_schedule: weekly
autoupdate_commit_msg: 'chore(pre-commit-deps): pre-commit autoupdate'
skip:
- check-poetry
- pylint
- pyright
- poetry-lock
- poetry-audit
- poetry-check
- markdown-link-check
- renovate-config-validator # the LTS version of node is too large for pre-commit.ci
repos:
Expand Down Expand Up @@ -87,7 +88,7 @@ repos:
additional_dependencies:
- setuptools # This is required since Python no longer installs setuptools by default in virtual environments
- mdformat-beautysh
- mdformat-footnote>=0.1.2
- mdformat-footnote
- mdformat-front-matters
- mdformat-gfm
- mdformat-gfm-alerts
Expand All @@ -102,10 +103,6 @@ repos:
hooks:
- id: markdown-link-check
args: [--quiet]
- repo: https://gitlab.com/smop/pre-commit-hooks
rev: df034f88cf92b394e6f00a78fa97a2aa4e270e60 # frozen: v1.0.0
hooks:
- id: check-poetry
- repo: https://github.com/pappasam/toml-sort
rev: 8c5db1c8081310adb476e1661c4d5d1fb6dbd96e # frozen: v0.24.3
hooks:
Expand All @@ -125,14 +122,28 @@ repos:
language: system
types: [python]
pass_filenames: false
- id: poetry-lock
name: poetry-lock
entry: poetry lock
language: system
pass_filenames: false
always_run: true
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
- id: poetry-audit
name: poetry-audit
entry: poetry
entry: poetry audit
language: system
types: [toml]
pass_filenames: false
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
always_run: true
args: [audit, --json, --ignore-code=CVE-2019-8341]
args: [--json, --ignore-code=CVE-2019-8341]
- id: poetry-check
name: poetry-check
entry: poetry check
language: system
pass_filenames: false
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
args: [--strict]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 9b1e9a33f1b33f6ecc2fdbb8d7cc894e951106e4 # frozen: v0.14.13
hooks:
Expand Down
5 changes: 3 additions & 2 deletions actions/create_unique_testpypi_version/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ certifi==2026.1.4
charset-normalizer==3.4.4
idna==3.11
mailbits==0.2.3
packaging==25.0
poetry-core==1.9.1
packaging==26.0
poetry-core==2.3.0
pydantic==2.12.5
pydantic-core==2.41.5
pypi-simple==1.8.0
Expand All @@ -15,4 +15,5 @@ soupsieve==2.8.3
tomli==2.4.0
tomli-w==1.2.0
typing-extensions==4.15.0
typing-inspection==0.4.2
urllib3==2.6.3
2 changes: 0 additions & 2 deletions actions/update_development_dependencies/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ def export_requirements_files(python_executable: str, dependency_groups: list[st
python_executable: The path to the python executable to use.
dependency_groups: The list of dependency groups to export the requirements for.
"""
run_cmd_in_subprocess(f'"{python_executable}" -m poetry config warnings.export false')

for group_output_pair in dependency_groups:
if ":" in group_output_pair:
group, output_folder = group_output_pair.split(":", maxsplit=1)
Expand Down
42 changes: 28 additions & 14 deletions actions/update_development_dependencies/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,63 +1,77 @@
annotated-types==0.7.0
anyio==4.12.1
attrs==25.4.0
beautifulsoup4==4.14.3
build==1.4.0
cachecontrol[filecache]==0.14.4
cachecontrol==0.14.4
certifi==2026.1.4
cffi==2.0.0 ; (sys_platform == "darwin" or sys_platform == "linux") and (sys_platform == "darwin" or platform_python_implementation != "PyPy")
cffi==2.0.0 ; (platform_python_implementation != "PyPy" or sys_platform == "darwin") and (sys_platform == "linux" or sys_platform == "darwin")
cfgv==3.5.0
charset-normalizer==3.4.4
cleo==2.1.0
click==8.3.1
colorama==0.4.6 ; (os_name == "nt" or platform_system == "Windows")
colorama==0.4.6 ; (os_name == "nt" or platform_system == "Windows" or sys_platform == "win32")
crashtest==0.4.1
cryptography==46.0.3 ; sys_platform == "linux"
distlib==0.4.0
distro==1.9.0
dulwich==0.21.7
dulwich==0.25.2
fastjsonschema==2.21.2
filelock==3.20.3
findpython==0.7.1
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
identify==2.6.16
idna==3.11
installer==0.7.0
jaraco-classes==3.4.0
jaraco-context==6.1.0
jaraco-functools==4.4.0
jeepney==0.9.0 ; sys_platform == "linux"
keyring==24.3.1
keyring==25.7.0
loguru==0.7.3
mailbits==0.2.3
maison==2.0.2
markdown-it-py==4.0.0
mdurl==0.1.2
more-itertools==10.8.0
msgpack==1.1.2
nodeenv==1.10.0
packaging==25.0
pexpect==4.9.0
packaging==26.0
pbs-installer==2026.1.14
pkginfo==1.12.1.2
platformdirs==4.5.1
poetry==1.8.5
poetry-core==1.9.1
poetry-plugin-export==1.8.0
poetry==2.3.1
poetry-core==2.3.0
poetry-plugin-export==1.10.0
pre-commit==4.5.1
ptyprocess==0.7.0
pycparser==2.23 ; (sys_platform == "darwin" or sys_platform == "linux") and (sys_platform == "darwin" or platform_python_implementation != "PyPy")
pycparser==3.0 ; (platform_python_implementation != "PyPy" or sys_platform == "darwin") and implementation_name != "PyPy" and (sys_platform == "linux" or sys_platform == "darwin")
pydantic==2.12.5
pydantic-core==2.41.5
pygments==2.19.2
pypi-simple==1.8.0
pyproject-hooks==1.2.0
pywin32-ctypes==0.2.3 ; sys_platform == "win32"
pyyaml==6.0.3
rapidfuzz==3.14.3
requests==2.32.5
requests-toolbelt==1.0.0
rich==14.3.1
ruyaml==0.91.0
secretstorage==3.5.0 ; sys_platform == "linux"
setuptools==80.9.0
setuptools==80.10.2
shellingham==1.5.4
soupsieve==2.8.3
toml==0.10.2
toml-sort==0.24.3
tomlkit==0.14.0
trove-classifiers==2026.1.14.14
typer==0.21.1
typing-extensions==4.15.0
typing-inspection==0.4.2
urllib3==2.6.3
virtualenv==20.36.1
win32-setctime==1.2.0 ; sys_platform == "win32"
xattr==1.3.0 ; sys_platform == "darwin"
yamlfix==1.19.1
zstandard==0.25.0
24 changes: 13 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[project]
dynamic = ["version"]
license = "Apache-2.0"
name = "python-package-ci-cd"
requires-python = "~=3.13.0" # This needs to stay in sync with all CI workflows

[tool]

[tool.coverage.report]
Expand Down Expand Up @@ -27,34 +33,30 @@ wrap-descriptions = 100
wrap-summaries = 0

[tool.poetry]
license = "Apache-2.0"
package-mode = false
version = "1.8.4"

[tool.poetry.dependencies]
python = "~3.13" # This needs to stay in sync with all CI workflows

[tool.poetry.group.actions-create_unique_testpypi_version.dependencies]
poetry-core = "1.9.1"
poetry-core = "2.3.0"
pypi-simple = "1.8.0"
tomli = "2.4.0"
tomli-w = "1.2.0"

[tool.poetry.group.actions-find_unreleased_changelog_items.dependencies]

[tool.poetry.group.actions-update_development_dependencies.dependencies]
poetry-plugin-export = "1.8.0"
poetry-plugin-export = "1.10.0"
pre-commit = "4.5.1"
pypi-simple = "1.8.0"
toml-sort = "0.24.3"
yamlfix = "1.19.1"

[tool.poetry.group.dev.dependencies]
pip = "^25.0"
poetry = "^1.8.5"
poetry-audit-plugin = "^0.4.0"
poetry-plugin-export = "1.8.0"
poetry-pre-commit-plugin = "^0.1.2"
poetry = "^2.3.1"
poetry-audit-plugin = "^1.0.0"
poetry-plugin-export = "^1.10.0"
poetry-pre-commit-plugin = "^0.2.2"
pre-commit = "4.5.1"
pylint = "4.0.4"
pyright = {extras = ["nodejs"], version = "1.1.408"}
Expand Down Expand Up @@ -290,7 +292,7 @@ setenv =
# Skip pre-commit checks that are not needed
SKIP = file-contents-sorter
commands_pre =
python -m poetry install --sync
python -m poetry sync
commands =
!tests: pre-commit run --all-files
pytest -vv -k "not test_docs" --showlocals --cov --junitxml={tox_root}/.results_{envname}/results.xml --cov-report=term --cov-report=xml:{tox_root}/.coverage_{envname}.xml --cov-report=html:{tox_root}/.results_{envname}/html --self-contained-html --html={tox_root}/.results_{envname}/results.html
Expand Down
2 changes: 1 addition & 1 deletion scripts/remove_python_version_condition_from_req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pathlib import Path

# Regular expression to match only the python_version constraints
PYTHON_VERSION_PATTERN = re.compile(r"python_version.*?(\sand\s*|$)")
PYTHON_VERSION_PATTERN = re.compile(r"python_(?:full_)?version.*?(\sand\s*|$)")

if __name__ == "__main__": # pragma: no cover
parser = argparse.ArgumentParser(
Expand Down
5 changes: 2 additions & 3 deletions tests/test_update_development_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ def test_export_requirements_files(

# Check the calls to subprocess.check_call
expected_calls = [
call([PYTHON_EXECUTABLE, "-m", "poetry", "config", "warnings.export", "false"]),
call(
[
PYTHON_EXECUTABLE,
Expand All @@ -279,7 +278,7 @@ def test_export_requirements_files(
]
),
]
assert mock_subproc_call.call_count == 2
assert mock_subproc_call.call_count == 1
mock_subproc_call.assert_has_calls(expected_calls, any_order=True)


Expand All @@ -292,7 +291,7 @@ def test_main(
# Call the main function
main()
assert mock_subproc_call.called
assert mock_subproc_call.call_count == 13
assert mock_subproc_call.call_count == 12


def test_main_no_install_dependencies(
Expand Down
Loading