diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9cfa00f9..55eec339 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,14 +3,14 @@ updates: - package-ecosystem: "uv" directory: "/" schedule: - interval: "daily" + interval: "weekly" time: "08:00" open-pull-requests-limit: 10 - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" + interval: "weekly" time: "08:00" open-pull-requests-limit: 10 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index d7f4ae48..4bc7be1c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -20,6 +20,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + cache-suffix: ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ccb309d..5e7115e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,10 +30,10 @@ jobs: - name: Retrieve version from tag name id: retrieve-version run: | - tag=${{ github.event.release.tag_name }} - version_number=${tag#?} - echo version: $version_number - echo "version=$version_number" >> $GITHUB_OUTPUT + tag="${{ github.event.release.tag_name }}" + version_number="${tag#?}" + echo "version: $version_number" + echo "version=$version_number" >> "$GITHUB_OUTPUT" - name: Bump project version in pyproject.toml and commit changes to current branch and tag run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 760b7766..c1a7c00d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + cache-suffix: ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5753900..ac60a34d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,6 +22,10 @@ repos: - id: no-commit-to-branch stages: [pre-commit] args: [--branch, main] +- repo: https://github.com/rhysd/actionlint + rev: v1.7.7 + hooks: + - id: actionlint - repo: local hooks: - id: mypy diff --git a/pyproject.toml b/pyproject.toml index 56d9d073..22dbf012 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ repository = "https://github.com/iMicknl/python-overkiz-api" [dependency-groups] dev = [ - "tox<5.0.0,>=4.17.1", "pytest>=8.3.2,<10.0.0", "pytest-cov>=5,<8", "pre-commit<5.0,>=3.8", @@ -44,7 +43,7 @@ select = [ # pydocstyle "D", # flake8-async - # "ASYNC", + "ASYNC", # pycodestyle "E", # Pyflakes @@ -59,9 +58,25 @@ select = [ "I", # ruff "RUF", + # flake8-bandit (security) + "S", + # flake8-print + "T", + # flake8-comprehensions + "C4", ] ignore = ["E501"] # Line too long +[tool.ruff.lint.per-file-ignores] +# Tests: S101 (assert) is expected, ASYNC230 (blocking open) is acceptable for fixtures +"tests/**/*.py" = ["S101", "ASYNC230"] +# S105: OAuth client secrets are public by design (embedded in mobile apps) +"pyoverkiz/const.py" = ["S105"] +# S105: Enum values contain "TOKEN" or "PASS" in API names, not passwords +"pyoverkiz/enums/*.py" = ["S105"] +# Utility scripts can use print +"utils/**/*.py" = ["T201"] + [tool.ruff.lint.pydocstyle] convention = "google" # Accepts: "google", "numpy", or "pep257". diff --git a/uv.lock b/uv.lock index 05f8dc40..2957f929 100644 --- a/uv.lock +++ b/uv.lock @@ -217,15 +217,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ff/d4/f2655d777eed8b069ecab3761454cb83f830f8be8b5b0d292e4b3a980d00/botocore-1.42.24-py3-none-any.whl", hash = "sha256:8fca9781d7c84f7ad070fceffaff7179c4aa7a5ffb27b43df9d1d957801e0a8d", size = 14551806, upload-time = "2026-01-07T20:30:38.103Z" }, ] -[[package]] -name = "cachetools" -version = "6.2.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bc/1d/ede8680603f6016887c062a2cf4fc8fdba905866a3ab8831aa8aa651320c/cachetools-6.2.4.tar.gz", hash = "sha256:82c5c05585e70b6ba2d3ae09ea60b79548872185d2f24ae1f2709d37299fd607", size = 31731, upload-time = "2025-12-15T18:24:53.744Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/fc/1d7b80d0eb7b714984ce40efc78859c022cd930e402f599d8ca9e39c78a4/cachetools-6.2.4-py3-none-any.whl", hash = "sha256:69a7a52634fed8b8bf6e24a050fb60bff1c9bd8f6d24572b99c32d4e71e62a51", size = 11551, upload-time = "2025-12-15T18:24:52.332Z" }, -] - [[package]] name = "certifi" version = "2025.6.15" @@ -244,15 +235,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249, upload-time = "2023-08-12T20:38:16.269Z" }, ] -[[package]] -name = "chardet" -version = "5.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7", size = 2069618, upload-time = "2023-08-01T19:23:02.662Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970", size = 199385, upload-time = "2023-08-01T19:23:00.661Z" }, -] - [[package]] name = "charset-normalizer" version = "3.4.2" @@ -1037,7 +1019,6 @@ dev = [ { name = "pytest-asyncio" }, { name = "pytest-cov" }, { name = "ruff" }, - { name = "tox" }, { name = "ty" }, ] @@ -1060,23 +1041,9 @@ dev = [ { name = "pytest-asyncio", specifier = ">=0.23.8,<1.4.0" }, { name = "pytest-cov", specifier = ">=5,<8" }, { name = "ruff", specifier = ">=0.12.0" }, - { name = "tox", specifier = ">=4.17.1,<5.0.0" }, { name = "ty", specifier = ">=0.0.8" }, ] -[[package]] -name = "pyproject-api" -version = "1.10.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "packaging" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/45/7b/c0e1333b61d41c69e59e5366e727b18c4992688caf0de1be10b3e5265f6b/pyproject_api-1.10.0.tar.gz", hash = "sha256:40c6f2d82eebdc4afee61c773ed208c04c19db4c4a60d97f8d7be3ebc0bbb330", size = 22785, upload-time = "2025-10-09T19:12:27.21Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/54/cc/cecf97be298bee2b2a37dd360618c819a2a7fd95251d8e480c1f0eb88f3b/pyproject_api-1.10.0-py3-none-any.whl", hash = "sha256:8757c41a79c0f4ab71b99abed52b97ecf66bd20b04fa59da43b5840bac105a09", size = 13218, upload-time = "2025-10-09T19:12:24.428Z" }, -] - [[package]] name = "pytest" version = "9.0.2" @@ -1316,28 +1283,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/77/b8/0135fadc89e73be292b473cb820b4f5a08197779206b33191e801feeae40/tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b", size = 14408, upload-time = "2025-10-08T22:01:46.04Z" }, ] -[[package]] -name = "tox" -version = "4.33.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cachetools" }, - { name = "chardet" }, - { name = "colorama" }, - { name = "filelock" }, - { name = "packaging" }, - { name = "platformdirs" }, - { name = "pluggy" }, - { name = "pyproject-api" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, - { name = "virtualenv" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/13/d7/ccf2f7fb162170cd5bb4ac7c682dadf1159bae3c5c6d22dae0b2d5936336/tox-4.33.0.tar.gz", hash = "sha256:a29244bce3f514f94043e173366aa191c8cf0106ec8ddd18ba53f985acd73cc4", size = 204690, upload-time = "2026-01-02T22:52:53.904Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d8/cd/dd273f8896ce51014f106d133b79bdca6c650b9281271b247db2f693061c/tox-4.33.0-py3-none-any.whl", hash = "sha256:8582ac5c3ca97095ce88ae6bcd310d22614350ea9751b0e4ad39acad7874e270", size = 176556, upload-time = "2026-01-02T22:52:52.442Z" }, -] - [[package]] name = "ty" version = "0.0.10"