diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5291d117..76b595a1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -313,3 +313,16 @@ jobs: key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }} - run: pip install tox - run: tox -e style + deptry: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + - uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: pip|${{ hashFiles('setup.py') }}|${{ hashFiles('tox.ini') }} + - run: pip install tox + - run: tox -e deptry diff --git a/CHANGELOG.md b/CHANGELOG.md index dd88ef50..c50ffd8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,13 @@ Changelogs prior to v1.2 is pruned, but available in the v1.2 release This project should adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), though some earlier releases may be incompatible with the SemVer standard. +## [Unreleased] + +### Added + +* Added deptry for dependency verification in CI +* Added python-dateutil and PyYAML as explicit dependencies (were transitive) + ## [2.2.3] - [2025-12-06] ### Fixed diff --git a/pyproject.toml b/pyproject.toml index e208207e..40a3b6e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,8 @@ dependencies = [ "icalendar>6.0.0", "icalendar-searcher>=1.0.0,<2", "dnspython", + "python-dateutil", + "PyYAML", ] dynamic = ["version"] @@ -80,6 +82,7 @@ test = [ "radicale", "pyfakefs", #"caldav_server_tester" + "deptry>=0.24.0; python_version >= '3.10'", ] [tool.setuptools_scm] write_to = "caldav/_version.py" @@ -91,3 +94,9 @@ include-package-data = true [tool.setuptools.packages.find] exclude = ["tests"] namespaces = false + +[tool.deptry] +ignore = ["DEP002"] # Test dependencies (pytest, coverage, etc.) are not imported in main code + +[tool.deptry.per_rule_ignores] +DEP001 = ["conf"] # Local test configuration file, not a package diff --git a/tox.ini b/tox.ini index 33931b93..a8131b94 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox:tox] -envlist = y39,py310,py311,py312,py313,py314,docs,style +envlist = y39,py310,py311,py312,py313,py314,docs,style,deptry [testenv] deps = --editable .[test] @@ -40,6 +40,11 @@ deps = pre-commit skip_install = true commands = pre-commit run --all-files --show-diff-on-failure +[testenv:deptry] +basepython = python3.13 +deps = --editable .[test] +commands = deptry caldav --known-first-party caldav + [build_sphinx] source-dir = docs/source build-dir = docs/build