From 065bf0109a7341068d2ee9bd1ae4c2659e1ce2ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:36:02 +0000 Subject: [PATCH 001/641] Bump types-requests from 2.31.0.10 to 2.31.0.20231231 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.10 to 2.31.0.20231231. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 414629242..4ba1cf4df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", "sybil==6.0.2", - "types-requests==2.31.0.10", + "types-requests==2.31.0.20231231", "vulture==2.10", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", From d63fa115d77d397d7016738d549dc8cdf214a418 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:36:10 +0000 Subject: [PATCH 002/641] Bump pyright from 1.1.343 to 1.1.344 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.343 to 1.1.344. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.343...v1.1.344) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 414629242..fe65bcc6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.3", "pyproject-fmt==1.5.3", - "pyright==1.1.343", + "pyright==1.1.344", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From 53fd23b1a7f7c5bca4bed5c71c4ef0b4ccdd18ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:36:22 +0000 Subject: [PATCH 003/641] Bump pytest from 7.4.3 to 7.4.4 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.3 to 7.4.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.3...7.4.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 414629242..de2ba17d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -238,7 +238,7 @@ dev = [ "pyproject-fmt==1.5.3", "pyright==1.1.343", "pyroma==4.2", - "pytest==7.4.3", + "pytest==7.4.4", "pytest-cov==4.1", "PyYAML==6.0.1", "ruff==0.1.9", From 3e572471450e584eca55d57ffb839bb871636efa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 10:15:06 +0000 Subject: [PATCH 004/641] Bump pdm from 2.11.1 to 2.11.2 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.11.1 to 2.11.2. - [Release notes](https://github.com/pdm-project/pdm/releases) - [Changelog](https://github.com/pdm-project/pdm/blob/main/CHANGELOG.md) - [Commits](https://github.com/pdm-project/pdm/compare/2.11.1...2.11.2) --- updated-dependencies: - dependency-name: pdm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b1f8d8728..ae18a0e67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -229,7 +229,7 @@ dev = [ "freezegun==1.4.0", "furo==2023.9.10", "mypy==1.8.0", - "pdm==2.11.1", + "pdm==2.11.2", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From c2c1ac24e0efa869f06c9c2b689fe3d27b65610c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 10:19:43 +0000 Subject: [PATCH 005/641] Bump ruff from 0.1.9 to 0.1.11 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.9 to 0.1.11. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.9...v0.1.11) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ae18a0e67..cc99817a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "pytest==7.4.4", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.9", + "ruff==0.1.11", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", From 02212938c0db6494510231e553034aa964c47325 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:05:53 +0000 Subject: [PATCH 006/641] Bump types-requests from 2.31.0.20231231 to 2.31.0.20240106 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.20231231 to 2.31.0.20240106. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cc99817a0..e377b7896 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", "sybil==6.0.2", - "types-requests==2.31.0.20231231", + "types-requests==2.31.0.20240106", "vulture==2.10", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", From 844d3d5466c1b1d13521ea4781427c7e898d47b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 10:24:09 +0000 Subject: [PATCH 007/641] Bump pyright from 1.1.344 to 1.1.345 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.344 to 1.1.345. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.344...v1.1.345) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cc99817a0..4b70fd7fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.3", "pyproject-fmt==1.5.3", - "pyright==1.1.344", + "pyright==1.1.345", "pyroma==4.2", "pytest==7.4.4", "pytest-cov==4.1", From fe59267ac05057275d4786fe5313bc16ceae8da9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:52:46 +0000 Subject: [PATCH 008/641] Bump pyproject-fmt from 1.5.3 to 1.6.0 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 1.5.3 to 1.6.0. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/1.5.3...1.6.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 99ac7348c..4a382313d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -235,7 +235,7 @@ dev = [ "pyenchant==3.2.2", "Pygments==2.17.2", "pylint==3.0.3", - "pyproject-fmt==1.5.3", + "pyproject-fmt==1.6.0", "pyright==1.1.345", "pyroma==4.2", "pytest==7.4.4", From 4294744b287a96dd396340af1e5ecf9563e793e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 10:32:50 +0000 Subject: [PATCH 009/641] Bump ruff from 0.1.11 to 0.1.12 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.11 to 0.1.12. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.11...v0.1.12) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a382313d..07e8c886a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "pytest==7.4.4", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.11", + "ruff==0.1.12", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", From 2236300e50da9e3b934c6f4f20b23bc6c56dada7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 11:00:51 +0000 Subject: [PATCH 010/641] Bump pyright from 1.1.345 to 1.1.346 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.345 to 1.1.346. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.345...v1.1.346) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 07e8c886a..28b184926 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.3", "pyproject-fmt==1.6.0", - "pyright==1.1.345", + "pyright==1.1.346", "pyroma==4.2", "pytest==7.4.4", "pytest-cov==4.1", From e3b9b19f26d5775fbee4e2a64e6e4346bcf43a64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 11:01:30 +0000 Subject: [PATCH 011/641] Bump ruff from 0.1.12 to 0.1.13 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.12 to 0.1.13. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.12...v0.1.13) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 07e8c886a..ef9d6d9e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "pytest==7.4.4", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.12", + "ruff==0.1.13", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", From b76d5e7a2889feb6982c799595e6be9615c83d1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 10:30:24 +0000 Subject: [PATCH 012/641] Bump pyright from 1.1.346 to 1.1.347 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.346 to 1.1.347. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.346...v1.1.347) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2e2ff73b0..40f5854e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.3", "pyproject-fmt==1.6.0", - "pyright==1.1.346", + "pyright==1.1.347", "pyroma==4.2", "pytest==7.4.4", "pytest-cov==4.1", From 2a97e6195cca682053583e3c76d02ed08cf612d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:23:57 +0000 Subject: [PATCH 013/641] Bump pdm from 2.11.2 to 2.12.1 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.11.2 to 2.12.1. - [Release notes](https://github.com/pdm-project/pdm/releases) - [Changelog](https://github.com/pdm-project/pdm/blob/main/CHANGELOG.md) - [Commits](https://github.com/pdm-project/pdm/compare/2.11.2...2.12.1) --- updated-dependencies: - dependency-name: pdm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 40f5854e9..1c960d30b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -229,7 +229,7 @@ dev = [ "freezegun==1.4.0", "furo==2023.9.10", "mypy==1.8.0", - "pdm==2.11.2", + "pdm==2.12.1", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From 57c0bec1806a10b6475d4c29e3339a17b6b0e68a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:00:01 +0000 Subject: [PATCH 014/641] Bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/windows-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22c5f7d90..915b97b26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index c13708757..ade6b5e71 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -29,7 +29,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~\AppData\Local\pip\Cache key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} From b0694f07bdb2783b0414e149e5bc0d493eeca82e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 11:48:12 +0000 Subject: [PATCH 015/641] Bump vws-python-mock from 2023.5.21 to 2024.1.21 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2023.5.21 to 2024.1.21. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2023.05.21...2024.01.21) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1c960d30b..ad134ba09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -250,7 +250,7 @@ dev = [ "sybil==6.0.2", "types-requests==2.31.0.20240106", "vulture==2.10", - "VWS-Python-Mock==2023.5.21", + "VWS-Python-Mock==2024.1.21", "VWS-Test-Fixtures==2023.3.5", ] [project.urls] From ef1163e19b7453ddc8bdf7a17da1878b16b11983 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 11:57:15 +0000 Subject: [PATCH 016/641] Bump pdm from 2.12.1 to 2.12.2 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.12.1 to 2.12.2. - [Release notes](https://github.com/pdm-project/pdm/releases) - [Changelog](https://github.com/pdm-project/pdm/blob/main/CHANGELOG.md) - [Commits](https://github.com/pdm-project/pdm/compare/2.12.1...2.12.2) --- updated-dependencies: - dependency-name: pdm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad134ba09..69a1f167a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -229,7 +229,7 @@ dev = [ "freezegun==1.4.0", "furo==2023.9.10", "mypy==1.8.0", - "pdm==2.12.1", + "pdm==2.12.2", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From 4caecf739d6046f070d52845b75afa85f98f9d91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 11:57:20 +0000 Subject: [PATCH 017/641] Bump vulture from 2.10 to 2.11 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.10 to 2.11. - [Release notes](https://github.com/jendrikseipp/vulture/releases) - [Changelog](https://github.com/jendrikseipp/vulture/blob/main/CHANGELOG.md) - [Commits](https://github.com/jendrikseipp/vulture/compare/v2.10...v2.11) --- updated-dependencies: - dependency-name: vulture dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad134ba09..4263e2d02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -249,7 +249,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.2", "types-requests==2.31.0.20240106", - "vulture==2.10", + "vulture==2.11", "VWS-Python-Mock==2024.1.21", "VWS-Test-Fixtures==2023.3.5", ] From 2daa6b34d87a74dbd28ebef23d6cdea253fb99c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 11:57:26 +0000 Subject: [PATCH 018/641] Bump ruff from 0.1.13 to 0.1.14 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.13 to 0.1.14. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.13...v0.1.14) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad134ba09..f1f410ef4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "pytest==7.4.4", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.13", + "ruff==0.1.14", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", From 61bc75eed090e991242498cc8527e7a3436f8e57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 10:10:32 +0000 Subject: [PATCH 019/641] Bump pyright from 1.1.347 to 1.1.348 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.347 to 1.1.348. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.347...v1.1.348) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2cc23c18c..ae088d71b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.3", "pyproject-fmt==1.6.0", - "pyright==1.1.347", + "pyright==1.1.348", "pyroma==4.2", "pytest==7.4.4", "pytest-cov==4.1", From eccc2007a3a8c9925326d6eea30f69068101ba51 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 23 Jan 2024 09:36:00 +0000 Subject: [PATCH 020/641] Use pyproject.toml configuration for pyproject-fmt --- .vscode/settings.json | 2 +- lint.mk | 4 +- pyproject.toml | 96 ++++++++++++++++++++++--------------------- 3 files changed, 53 insertions(+), 49 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a05041473..9f41e3120 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "[python]": { "editor.codeActionsOnSave": { - "source.fixAll": true + "source.fixAll": "explicit" }, "editor.defaultFormatter": "charliermarsh.ruff", "editor.formatOnSave": true diff --git a/lint.mk b/lint.mk index f0e82e1cc..61cc97d84 100644 --- a/lint.mk +++ b/lint.mk @@ -54,11 +54,11 @@ linkcheck: .PHONY: pyproject-fmt pyproject-fmt: - pyproject-fmt --keep-full-version --check --indent=4 pyproject.toml + pyproject-fmt --check pyproject.toml .PHONY: fix-pyproject-fmt fix-pyproject-fmt: - pyproject-fmt --keep-full-version --indent=4 pyproject.toml + pyproject-fmt pyproject.toml .PHONY: spelling spelling: diff --git a/pyproject.toml b/pyproject.toml index ae088d71b..c63ed67b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,10 +140,10 @@ strict = true [build-system] build-backend = "setuptools.build_meta" requires = [ - "pip", - "setuptools", - "setuptools_scm[toml]>=7.1", - "wheel", + "pip", + "setuptools", + "setuptools_scm[toml]>=7.1", + "wheel", ] [tool.distutils.bdist_wheel] @@ -198,60 +198,60 @@ name = "vws-python" description = "Interact with the Vuforia Web Services (VWS) API." readme = { file = "README.rst", content-type = "text/x-rst"} keywords = [ - "client", - "vuforia", - "vws", + "client", + "vuforia", + "vws", ] license = { file = "LICENSE" } authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com"} ] requires-python = ">=3.12" classifiers = [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "License :: OSI Approved :: MIT License", - "Operating System :: POSIX", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.12", ] dynamic = [ - "version", + "version", ] dependencies = [ - "requests", - "urllib3", - "VWS-Auth-Tools", + "requests", + "urllib3", + "VWS-Auth-Tools", ] [project.optional-dependencies] dev = [ - "check-manifest==0.49", - "doc8==1.1.1", - "dodgy==0.2.1", - "freezegun==1.4.0", - "furo==2023.9.10", - "mypy==1.8.0", - "pdm==2.12.2", - "pip_check_reqs==2.5.3", - "pydocstyle==6.3", - "pyenchant==3.2.2", - "Pygments==2.17.2", - "pylint==3.0.3", - "pyproject-fmt==1.6.0", - "pyright==1.1.348", - "pyroma==4.2", - "pytest==7.4.4", - "pytest-cov==4.1", - "PyYAML==6.0.1", - "ruff==0.1.14", - "Sphinx==7.2.6", - "sphinx-autodoc-typehints==1.25.2", - "sphinx-prompt==1.8", - "Sphinx-Substitution-Extensions==2022.2.16", - "sphinxcontrib-spelling==8", - "sybil==6.0.2", - "types-requests==2.31.0.20240106", - "vulture==2.11", - "VWS-Python-Mock==2024.1.21", - "VWS-Test-Fixtures==2023.3.5", + "check-manifest==0.49", + "doc8==1.1.1", + "dodgy==0.2.1", + "freezegun==1.4", + "furo==2023.9.10", + "mypy==1.8", + "pdm==2.12.2", + "pip_check_reqs==2.5.3", + "pydocstyle==6.3", + "pyenchant==3.2.2", + "Pygments==2.17.2", + "pylint==3.0.3", + "pyproject-fmt==1.7", + "pyright==1.1.348", + "pyroma==4.2", + "pytest==7.4.4", + "pytest-cov==4.1", + "PyYAML==6.0.1", + "ruff==0.1.14", + "Sphinx==7.2.6", + "sphinx-autodoc-typehints==1.25.2", + "sphinx-prompt==1.8", + "Sphinx-Substitution-Extensions==2022.2.16", + "sphinxcontrib-spelling==8", + "sybil==6.0.2", + "types-requests==2.31.0.20240106", + "vulture==2.11", + "VWS-Python-Mock==2024.1.21", + "VWS-Test-Fixtures==2023.3.5", ] [project.urls] Documentation = "https://vws-python.readthedocs.io/en/latest/" @@ -268,6 +268,10 @@ vws = ["py.typed"] [tool.setuptools_scm] +[tool.pyproject-fmt] +indent = 4 +keep_full_version = false + [tool.pyright] typeCheckingMode = "strict" From 312fa760ed399a00254beda6e18e59a1387e0494 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 23 Jan 2024 09:37:39 +0000 Subject: [PATCH 021/641] Fix double spacing --- Makefile | 2 +- lint.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 320a0bec8..839f037dc 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ lint: \ ruff \ pip-extra-reqs \ pip-missing-reqs \ - pyproject-fmt \ + pyproject-fmt \ pyright \ pyroma \ spelling \ diff --git a/lint.mk b/lint.mk index 61cc97d84..f837b0069 100644 --- a/lint.mk +++ b/lint.mk @@ -54,11 +54,11 @@ linkcheck: .PHONY: pyproject-fmt pyproject-fmt: - pyproject-fmt --check pyproject.toml + pyproject-fmt --check pyproject.toml .PHONY: fix-pyproject-fmt fix-pyproject-fmt: - pyproject-fmt pyproject.toml + pyproject-fmt pyproject.toml .PHONY: spelling spelling: From e33a4d0f13384836b9540665452cef37223d2975 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 23 Jan 2024 09:40:14 +0000 Subject: [PATCH 022/641] Fix double spacing --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 839f037dc..320a0bec8 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ lint: \ ruff \ pip-extra-reqs \ pip-missing-reqs \ - pyproject-fmt \ + pyproject-fmt \ pyright \ pyroma \ spelling \ From 07f56b26f12d8a3c5c3872b0fb5cc10e51eae823 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 23 Jan 2024 09:42:24 +0000 Subject: [PATCH 023/641] Use original version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c63ed67b8..4f9a2ef9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -270,7 +270,7 @@ vws = ["py.typed"] [tool.pyproject-fmt] indent = 4 -keep_full_version = false +keep_full_version = true [tool.pyright] From 9ddd70864e112cea6290c12352e9e0529304a712 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 23 Jan 2024 10:10:45 +0000 Subject: [PATCH 024/641] Bump version of pyproject-fmt --- pyproject.toml | 92 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4f9a2ef9c..4bbe56bb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,10 +140,10 @@ strict = true [build-system] build-backend = "setuptools.build_meta" requires = [ - "pip", - "setuptools", - "setuptools_scm[toml]>=7.1", - "wheel", + "pip", + "setuptools", + "setuptools_scm[toml]>=7.1", + "wheel", ] [tool.distutils.bdist_wheel] @@ -198,60 +198,60 @@ name = "vws-python" description = "Interact with the Vuforia Web Services (VWS) API." readme = { file = "README.rst", content-type = "text/x-rst"} keywords = [ - "client", - "vuforia", - "vws", + "client", + "vuforia", + "vws", ] license = { file = "LICENSE" } authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com"} ] requires-python = ">=3.12" classifiers = [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "License :: OSI Approved :: MIT License", - "Operating System :: POSIX", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.12", ] dynamic = [ - "version", + "version", ] dependencies = [ - "requests", - "urllib3", - "VWS-Auth-Tools", + "requests", + "urllib3", + "VWS-Auth-Tools", ] [project.optional-dependencies] dev = [ - "check-manifest==0.49", - "doc8==1.1.1", - "dodgy==0.2.1", - "freezegun==1.4", - "furo==2023.9.10", - "mypy==1.8", - "pdm==2.12.2", - "pip_check_reqs==2.5.3", - "pydocstyle==6.3", - "pyenchant==3.2.2", - "Pygments==2.17.2", - "pylint==3.0.3", - "pyproject-fmt==1.7", - "pyright==1.1.348", - "pyroma==4.2", - "pytest==7.4.4", - "pytest-cov==4.1", - "PyYAML==6.0.1", - "ruff==0.1.14", - "Sphinx==7.2.6", - "sphinx-autodoc-typehints==1.25.2", - "sphinx-prompt==1.8", - "Sphinx-Substitution-Extensions==2022.2.16", - "sphinxcontrib-spelling==8", - "sybil==6.0.2", - "types-requests==2.31.0.20240106", - "vulture==2.11", - "VWS-Python-Mock==2024.1.21", - "VWS-Test-Fixtures==2023.3.5", + "check-manifest==0.49", + "doc8==1.1.1", + "dodgy==0.2.1", + "freezegun==1.4.0", + "furo==2023.9.10", + "mypy==1.8.0", + "pdm==2.12.2", + "pip_check_reqs==2.5.3", + "pydocstyle==6.3", + "pyenchant==3.2.2", + "Pygments==2.17.2", + "pylint==3.0.3", + "pyproject-fmt==1.7.0", + "pyright==1.1.348", + "pyroma==4.2", + "pytest==7.4.4", + "pytest-cov==4.1", + "PyYAML==6.0.1", + "ruff==0.1.14", + "Sphinx==7.2.6", + "sphinx-autodoc-typehints==1.25.2", + "sphinx-prompt==1.8", + "Sphinx-Substitution-Extensions==2022.2.16", + "sphinxcontrib-spelling==8", + "sybil==6.0.2", + "types-requests==2.31.0.20240106", + "vulture==2.11", + "VWS-Python-Mock==2024.1.21", + "VWS-Test-Fixtures==2023.3.5", ] [project.urls] Documentation = "https://vws-python.readthedocs.io/en/latest/" From 4b450b584493e4f4bfaafd0604cbac4cbd42058a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 23 Jan 2024 11:08:55 +0000 Subject: [PATCH 025/641] Remove unnecessary pyright ignores --- conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conftest.py b/conftest.py index 9d744c035..881a76db2 100644 --- a/conftest.py +++ b/conftest.py @@ -2,14 +2,14 @@ from doctest import ELLIPSIS -from sybil import Sybil # pyright: ignore[reportMissingTypeStubs] -from sybil.parsers.rest import ( # pyright: ignore[reportMissingTypeStubs] +from sybil import Sybil +from sybil.parsers.rest import ( ClearNamespaceParser, DocTestParser, PythonCodeBlockParser, ) -pytest_collect_file = Sybil( # pyright: ignore[reportUnknownVariableType] +pytest_collect_file = Sybil( parsers=[ ClearNamespaceParser(), DocTestParser(optionflags=ELLIPSIS), From 03ad402014847e6af6bb892ab5e71deadbd6f57e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 23 Jan 2024 22:01:56 +0000 Subject: [PATCH 026/641] Report an error on unnecessary pyright ignores --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 4bbe56bb1..85b076d81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -274,4 +274,5 @@ keep_full_version = true [tool.pyright] +reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" From dcad4fb8f4f074ce69e74d7450586b74d05a3cfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:48:59 +0000 Subject: [PATCH 027/641] Bump types-requests from 2.31.0.20240106 to 2.31.0.20240125 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.20240106 to 2.31.0.20240125. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 85b076d81..2707b868f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", "sybil==6.0.2", - "types-requests==2.31.0.20240106", + "types-requests==2.31.0.20240125", "vulture==2.11", "VWS-Python-Mock==2024.1.21", "VWS-Test-Fixtures==2023.3.5", From 2b7c5b4cee050846529d64090ad570ae749aeb6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 10:42:56 +0000 Subject: [PATCH 028/641] Bump pyright from 1.1.348 to 1.1.349 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.348 to 1.1.349. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.348...v1.1.349) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2707b868f..05b98cac1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.3", "pyproject-fmt==1.7.0", - "pyright==1.1.348", + "pyright==1.1.349", "pyroma==4.2", "pytest==7.4.4", "pytest-cov==4.1", From a5dcf5a4b1ce8ceb613887ee2752a8dc971cd019 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 10:43:04 +0000 Subject: [PATCH 029/641] Bump sphinx-autodoc-typehints from 1.25.2 to 1.25.3 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.25.2 to 1.25.3. - [Release notes](https://github.com/tox-dev/sphinx-autodoc-typehints/releases) - [Changelog](https://github.com/tox-dev/sphinx-autodoc-typehints/blob/main/CHANGELOG.md) - [Commits](https://github.com/tox-dev/sphinx-autodoc-typehints/compare/1.25.2...1.25.3) --- updated-dependencies: - dependency-name: sphinx-autodoc-typehints dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2707b868f..f4a643f73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "PyYAML==6.0.1", "ruff==0.1.14", "Sphinx==7.2.6", - "sphinx-autodoc-typehints==1.25.2", + "sphinx-autodoc-typehints==1.25.3", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", From ea4ee71fd13a71287f75eeb23c08cb85d51669f5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Jan 2024 16:40:52 +0000 Subject: [PATCH 030/641] Remove unnecessary items from MANIFEST --- MANIFEST.in | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 15fe1e8bb..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include src/vws/py.typed -include pyproject.toml From d8a2f8759f6dc3a909f7cb05bd9a1f4939527ab4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:34:30 +0000 Subject: [PATCH 031/641] Bump furo from 2023.9.10 to 2024.1.29 Bumps [furo](https://github.com/pradyunsg/furo) from 2023.9.10 to 2024.1.29. - [Release notes](https://github.com/pradyunsg/furo/releases) - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md) - [Commits](https://github.com/pradyunsg/furo/compare/2023.09.10...2024.01.29) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0236bc651..3050e02b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -227,7 +227,7 @@ dev = [ "doc8==1.1.1", "dodgy==0.2.1", "freezegun==1.4.0", - "furo==2023.9.10", + "furo==2024.1.29", "mypy==1.8.0", "pdm==2.12.2", "pip_check_reqs==2.5.3", From ef07615f4c79c53100dc0e701e4c36525f5c6b35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:34:47 +0000 Subject: [PATCH 032/641] Bump ruff from 0.1.14 to 0.1.15 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.14 to 0.1.15. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.14...v0.1.15) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0236bc651..64c9510af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "pytest==7.4.4", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.14", + "ruff==0.1.15", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.3", "sphinx-prompt==1.8", From 96e188a336f3f30692a895e8e56e6f909e69c4c9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 30 Jan 2024 11:32:08 +0000 Subject: [PATCH 033/641] Ignore D413 ruff rule --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 64c9510af..21eacc736 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -170,6 +170,7 @@ ignore = [ # docstrings. "D406", "D407", + "D413", # We have an existing interface to support and so we do not want to change # exception names. "N818", From bd18c492305755d475c091348ad462fe0f40cda0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:20:57 +0000 Subject: [PATCH 034/641] Bump sybil from 6.0.2 to 6.0.3 Bumps [sybil](https://github.com/simplistix/sybil) from 6.0.2 to 6.0.3. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/6.0.2...6.0.3) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 92e4081c1..e79bae21d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", - "sybil==6.0.2", + "sybil==6.0.3", "types-requests==2.31.0.20240125", "vulture==2.11", "VWS-Python-Mock==2024.1.21", From 3a1f0e31fc6e680a48da3169f3c90b56df1d4c8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:56:20 +0000 Subject: [PATCH 035/641] Bump pytest from 7.4.4 to 8.0.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.4 to 8.0.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.4...8.0.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e79bae21d..b1461e8e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -239,7 +239,7 @@ dev = [ "pyproject-fmt==1.7.0", "pyright==1.1.349", "pyroma==4.2", - "pytest==7.4.4", + "pytest==8.0.0", "pytest-cov==4.1", "PyYAML==6.0.1", "ruff==0.1.15", From 7a878581848477ce4d28bc88996cca1967ee293c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 31 Jan 2024 17:54:31 +0000 Subject: [PATCH 036/641] Use PyPI trusted publisher rather than API token --- .github/workflows/release.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8974001cd..3f8b0002a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,17 @@ jobs: name: Publish a release runs-on: ubuntu-latest + # Specifying an environment is strongly recommended by PyPI. + # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. + environment: release + + permissions: + # This is needed for PyPI publishing. + # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. + id-token: write + # This is needed for https://github.com/stefanzweifel/git-auto-commit-action. + contents: write + strategy: matrix: python-version: ["3.12"] @@ -69,8 +80,9 @@ jobs: python -m pip install build python -m build --sdist --wheel --outdir dist/ . + # We use PyPI trusted publishing rather than a PyPI API token. + # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.PYPI_API_TOKEN }} verbose: true From 51a1a30b6dad5cab945d92d7a0fccd0ae86786ef Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 31 Jan 2024 18:28:23 +0000 Subject: [PATCH 037/641] Lint GitHub Actions workflows using actionlint --- .github/workflows/release.yml | 2 +- Makefile | 1 + lint.mk | 4 ++++ pyproject.toml | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f8b0002a..f5e9d9793 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -76,7 +76,7 @@ jobs: run: | # Checkout the latest tag - the one we just created. git fetch --tags - git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) + git checkout "$(git describe --tags "$(git rev-list --tags --max-count=1)")" python -m pip install build python -m build --sdist --wheel --outdir dist/ . diff --git a/Makefile b/Makefile index 320a0bec8..1530f4eb7 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ SPHINXOPTS := -W .PHONY: lint lint: \ + actionlint \ check-manifest \ doc8 \ linkcheck \ diff --git a/lint.mk b/lint.mk index f837b0069..3127f8a84 100644 --- a/lint.mk +++ b/lint.mk @@ -2,6 +2,10 @@ SHELL := /bin/bash -euxo pipefail +.PHONY: actionlint +actionlint: + actionlint + .PHONY: mypy mypy: mypy . diff --git a/pyproject.toml b/pyproject.toml index b1461e8e3..8070eb8ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -224,6 +224,7 @@ dependencies = [ ] [project.optional-dependencies] dev = [ + "actionlint-py==1.6.26.11", "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", From be43c414f130314ff643f0aaf82d6884a6842e6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:25:04 +0000 Subject: [PATCH 038/641] Bump codecov/codecov-action from 3 to 4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 915b97b26..50ffc9c15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,4 +55,4 @@ jobs: pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml - name: "Upload coverage to Codecov" - uses: "codecov/codecov-action@v3" + uses: "codecov/codecov-action@v4" From 4da40a507b44826b12c0ad009a28357985b4b3fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:45:43 +0000 Subject: [PATCH 039/641] Bump pdm from 2.12.2 to 2.12.3 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.12.2 to 2.12.3. - [Release notes](https://github.com/pdm-project/pdm/releases) - [Changelog](https://github.com/pdm-project/pdm/blob/main/CHANGELOG.md) - [Commits](https://github.com/pdm-project/pdm/compare/2.12.2...2.12.3) --- updated-dependencies: - dependency-name: pdm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8070eb8ec..0a5874a8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -231,7 +231,7 @@ dev = [ "freezegun==1.4.0", "furo==2024.1.29", "mypy==1.8.0", - "pdm==2.12.2", + "pdm==2.12.3", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From a06dfc4aad1a1dc4b088efb1bb19088786d691d9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 1 Feb 2024 18:24:24 +0000 Subject: [PATCH 040/641] Use strict pylint settings --- pyproject.toml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0a5874a8f..4b4186d2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,9 +10,28 @@ # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. + # See https://chezsoi.org/lucas/blog/pylint-strict-base-configuration.html. + # We do not use the plugins: + # - pylint.extensions.code_style + # - pylint.extensions.magic_value + # - pylint.extensions.while_used + # as they seemed to get in the way. load-plugins = [ + 'pylint.extensions.bad_builtin', + 'pylint.extensions.comparison_placement', + 'pylint.extensions.consider_refactoring_into_while_condition', 'pylint.extensions.docparams', + 'pylint.extensions.dunder', + 'pylint.extensions.eq_without_hash', + 'pylint.extensions.for_any_all', + 'pylint.extensions.mccabe', 'pylint.extensions.no_self_use', + 'pylint.extensions.overlapping_exceptions', + 'pylint.extensions.private_import', + 'pylint.extensions.redefined_loop_name', + 'pylint.extensions.redefined_variable_type', + 'pylint.extensions.set_membership', + 'pylint.extensions.typing', ] # Allow loading of arbitrary C extensions. Extensions are imported into the @@ -26,7 +45,11 @@ # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. enable = [ + 'bad-inline-option', + 'deprecated-pragma', + 'file-ignored', 'spelling', + 'use-symbolic-message-instead', 'useless-suppression', ] From 62db2a943f306fcf9d1c60c2d2834428139a31ad Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Feb 2024 04:10:18 +0000 Subject: [PATCH 041/641] Upgrade to ruff 0.2.0 --- pyproject.toml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4b4186d2f..8a1ad5d17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -173,14 +173,18 @@ requires = [ universal = true [tool.ruff] -select = ["ALL"] line-length = 79 +[tool.ruff.lint] +select = ["ALL"] + ignore = [ # We do not annotate the type of 'self'. "ANN101", # We are happy to manage our own "complexity". "C901", + # Ruff warns that this conflicts with the formatter. + "COM812", # Allow our chosen docstring line-style - no one-line summary. "D200", "D203", @@ -194,6 +198,8 @@ ignore = [ "D406", "D407", "D413", + # Ruff warns that this conflicts with the formatter. + "ISC001", # We have an existing interface to support and so we do not want to change # exception names. "N818", @@ -211,7 +217,7 @@ ignore = [ # is sometimes annoyingly removed. unfixable = ["ERA001"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "tests/test_*.py" = [ # Do not require tests to have a one-line summary. "D205", @@ -266,7 +272,7 @@ dev = [ "pytest==8.0.0", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.15", + "ruff==0.2.0", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.3", "sphinx-prompt==1.8", From 8f745dc188c07affd87e54ced7b424af7e377b8d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Feb 2024 13:29:51 +0000 Subject: [PATCH 042/641] Simplify coverage.py settings by switching from exclude_lines to exclude_also --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8a1ad5d17..3384b141d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -112,7 +112,7 @@ branch = true [tool.coverage.report] -exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] +exclude_also = ["if TYPE_CHECKING:"] [tool.pytest.ini_options] From 2e12b7a4cfecaa75603ccc5f381d3771c7198056 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 4 Feb 2024 01:27:39 +0000 Subject: [PATCH 043/641] Return a new error when the server returns a 5xx status code. --- CHANGELOG.rst | 2 ++ src/vws/exceptions/custom_exceptions.py | 21 +++++++++++++++++++++ src/vws/query.py | 6 ++++++ src/vws/vws.py | 6 ++++++ 4 files changed, 35 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 281270708..2233deab5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Return a new error (``vws.custom_exceptions.ServerError``) when the server returns a 5xx status code. + 2023.12.27 ------------ diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index ef88d53aa..41d13febf 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -42,3 +42,24 @@ class TargetProcessingTimeout(Exception): """ Exception raised when waiting for a target to be processed times out. """ + + +class ServerError(Exception): # pragma: no cover + """ + Exception raised when VWS returns a server error. + """ + + def __init__(self, response: Response) -> None: + """ + Args: + response: The response returned by Vuforia. + """ + super().__init__(response.text) + self._response = response + + @property + def response(self) -> Response: + """ + The response returned by Vuforia which included this error. + """ + return self._response diff --git a/src/vws/query.py b/src/vws/query.py index 5df811252..d4efa45b9 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -22,6 +22,7 @@ ) from vws.exceptions.custom_exceptions import ( RequestEntityTooLarge, + ServerError, ) from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData @@ -145,6 +146,11 @@ def query( if "Integer out of range" in response.text: raise MaxNumResultsOutOfRange(response=response) + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + result_code = response.json()["result_code"] if result_code != "Success": exception = { diff --git a/src/vws/vws.py b/src/vws/vws.py index 267f88411..2962bc6b8 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -18,6 +18,7 @@ from vws.exceptions.custom_exceptions import ( OopsAnErrorOccurredPossiblyBadName, + ServerError, TargetProcessingTimeout, ) from vws.exceptions.vws_exceptions import ( @@ -188,6 +189,11 @@ def _make_request( # The Vuforia API returns a 429 response with no JSON body. raise TooManyRequests(response=response) + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + result_code = response.json()["result_code"] if result_code == expected_result_code: From ca07d2351b576f3802d6716a9cb3ff4b49db38ad Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 4 Feb 2024 13:19:31 +0000 Subject: [PATCH 044/641] Document ServerError might be raised in functions which might raise it --- src/vws/exceptions/custom_exceptions.py | 22 +++++++++++++ src/vws/exceptions/vws_exceptions.py | 7 ----- src/vws/query.py | 2 ++ src/vws/vws.py | 42 ++++++++++++++++++++++++- 4 files changed, 65 insertions(+), 8 deletions(-) diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 41d13febf..5a7c1a9b5 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -63,3 +63,25 @@ def response(self) -> Response: The response returned by Vuforia which included this error. """ return self._response + + +class TooManyRequests(Exception): # pragma: no cover + """ + Exception raised when Vuforia returns a response with a result code + 'TooManyRequests'. + """ + + def __init__(self, response: Response) -> None: + """ + Args: + response: The response returned by Vuforia. + """ + super().__init__(response.text) + self._response = response + + @property + def response(self) -> Response: + """ + The response returned by Vuforia which included this error. + """ + return self._response diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 9ff990255..3e080faf3 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -56,13 +56,6 @@ class RequestQuotaReached(VWSException): # pragma: no cover """ -class TooManyRequests(VWSException): # pragma: no cover - """ - Exception raised when Vuforia returns a response with a result code - 'TooManyRequests'. - """ - - class TargetStatusProcessing(VWSException): """ Exception raised when Vuforia returns a response with a result code diff --git a/src/vws/query.py b/src/vws/query.py index d4efa45b9..85501a3b0 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -95,6 +95,8 @@ def query( file in the grayscale or RGB color space. ~vws.exceptions.custom_exceptions.RequestEntityTooLarge: The given image is too large. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. Returns: An ordered list of target details of matching targets. diff --git a/src/vws/vws.py b/src/vws/vws.py index 2962bc6b8..ca2f59963 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -20,6 +20,7 @@ OopsAnErrorOccurredPossiblyBadName, ServerError, TargetProcessingTimeout, + TooManyRequests, ) from vws.exceptions.vws_exceptions import ( AuthenticationFailure, @@ -37,7 +38,6 @@ TargetQuotaReached, TargetStatusNotSuccess, TargetStatusProcessing, - TooManyRequests, UnknownTarget, ) from vws.reports import ( @@ -167,6 +167,10 @@ def _make_request( an HTML page with the text "Oops, an error occurred". This has been seen to happen when the given name includes a bad character. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. json.decoder.JSONDecodeError: The server did not respond with valid JSON. This may happen if the server address is not a valid Vuforia server. @@ -274,6 +278,10 @@ def add_target( Vuforia returns an HTML page with the text "Oops, an error occurred". This has been seen to happen when the given name includes a bad character. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ image_data = _get_image_data(image=image) image_data_encoded = base64.b64encode(image_data).decode("ascii") @@ -320,6 +328,10 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: does not match a target in the database. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ response = self._make_request( method="GET", @@ -377,6 +389,10 @@ def wait_for_target_processed( does not match a target in the database. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ start_time = time.monotonic() while True: @@ -408,6 +424,10 @@ def list_targets(self) -> list[str]: known database. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ response = self._make_request( method="GET", @@ -441,6 +461,10 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: does not match a target in the database. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ response = self._make_request( method="GET", @@ -480,6 +504,10 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: known database. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ response = self._make_request( method="GET", @@ -526,6 +554,10 @@ def delete_target(self, target_id: str) -> None: target is in the processing state. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ self._make_request( method="DELETE", @@ -559,6 +591,10 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: inactive. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ response = self._make_request( method="GET", @@ -618,6 +654,10 @@ def update_target( inactive. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + limiting access. """ data: dict[str, str | bool | float | int] = {} From 26efcea291c9e129943f1d4fe48a03d3cbdf3086 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Sun, 4 Feb 2024 13:34:06 +0000 Subject: [PATCH 045/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2233deab5..dfedf99eb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.02.04 +------------ + * Return a new error (``vws.custom_exceptions.ServerError``) when the server returns a 5xx status code. 2023.12.27 From 28611d427ed1d1190d927358dbaa69b567d3ad2b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 4 Feb 2024 14:44:18 +0000 Subject: [PATCH 046/641] Move back TooManyRequests --- src/vws/exceptions/custom_exceptions.py | 22 ---------------------- src/vws/exceptions/vws_exceptions.py | 7 +++++++ src/vws/vws.py | 22 +++++++++++----------- 3 files changed, 18 insertions(+), 33 deletions(-) diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 5a7c1a9b5..41d13febf 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -63,25 +63,3 @@ def response(self) -> Response: The response returned by Vuforia which included this error. """ return self._response - - -class TooManyRequests(Exception): # pragma: no cover - """ - Exception raised when Vuforia returns a response with a result code - 'TooManyRequests'. - """ - - def __init__(self, response: Response) -> None: - """ - Args: - response: The response returned by Vuforia. - """ - super().__init__(response.text) - self._response = response - - @property - def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ - return self._response diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 3e080faf3..1eb751de5 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -164,3 +164,10 @@ def target_id(self) -> str: # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. return path.split(sep="/", maxsplit=2)[-1] + + +class TooManyRequests(VWSException): # pragma: no cover + """ + Exception raised when Vuforia returns a response with a result code + 'TooManyRequests'. + """ diff --git a/src/vws/vws.py b/src/vws/vws.py index ca2f59963..d3f19cc6a 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -20,7 +20,6 @@ OopsAnErrorOccurredPossiblyBadName, ServerError, TargetProcessingTimeout, - TooManyRequests, ) from vws.exceptions.vws_exceptions import ( AuthenticationFailure, @@ -38,6 +37,7 @@ TargetQuotaReached, TargetStatusNotSuccess, TargetStatusProcessing, + TooManyRequests, UnknownTarget, ) from vws.reports import ( @@ -169,7 +169,7 @@ def _make_request( character. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. json.decoder.JSONDecodeError: The server did not respond with valid JSON. This may happen if the server address is not a valid @@ -280,7 +280,7 @@ def add_target( includes a bad character. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ image_data = _get_image_data(image=image) @@ -330,7 +330,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ response = self._make_request( @@ -391,7 +391,7 @@ def wait_for_target_processed( error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ start_time = time.monotonic() @@ -426,7 +426,7 @@ def list_targets(self) -> list[str]: error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ response = self._make_request( @@ -463,7 +463,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ response = self._make_request( @@ -506,7 +506,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ response = self._make_request( @@ -556,7 +556,7 @@ def delete_target(self, target_id: str) -> None: error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ self._make_request( @@ -593,7 +593,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ response = self._make_request( @@ -656,7 +656,7 @@ def update_target( error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.custom_exceptions.TooManyRequests: Vuforia is rate + ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate limiting access. """ data: dict[str, str | bool | float | int] = {} From 5d60a44066efff74741e7db2998c6c2ea650ae8d Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Sun, 4 Feb 2024 14:58:16 +0000 Subject: [PATCH 047/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index dfedf99eb..2afc25f50 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.02.04.1 +------------ + 2024.02.04 ------------ From 26fccba7fc29bcaca037a72fbde0bbf5f01f657c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 02:01:35 +0000 Subject: [PATCH 048/641] Use custom response type in exceptions, to avoid needing to use requests' API to handle exceptions, and to avoid relying on requests's types which are incomplete --- Makefile | 1 + docs/source/api-reference.rst | 4 ++++ lint.mk | 4 ++++ src/vws/exceptions/base_exceptions.py | 5 +---- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/exceptions/response.py | 16 +++++++++++++++ src/vws/exceptions/vws_exceptions.py | 4 ++-- src/vws/query.py | 15 +++++++++++--- src/vws/vws.py | 27 ++++++++++++++++--------- 9 files changed, 59 insertions(+), 19 deletions(-) create mode 100644 src/vws/exceptions/response.py diff --git a/Makefile b/Makefile index 1530f4eb7..e215a0026 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ lint: \ pip-missing-reqs \ pyproject-fmt \ pyright \ + pyright-verifytypes \ pyroma \ spelling \ vulture \ diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 3ffbc13da..93b39a48e 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -5,6 +5,10 @@ API Reference :undoc-members: :members: +.. automodule:: vws.exceptions.response + :undoc-members: + :members: + .. automodule:: vws.reports :undoc-members: :members: diff --git a/lint.mk b/lint.mk index 3127f8a84..555270f4a 100644 --- a/lint.mk +++ b/lint.mk @@ -48,6 +48,10 @@ pyroma: pyright: pyright . +.PHONY: pyright-verifytypes +pyright-verifytypes: + pyright --verifytypes vws + .PHONY: vulture vulture: vulture --min-confidence 100 --exclude _vendor --exclude .eggs . diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 730d1a2a5..5c45e823a 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,10 +5,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from requests import Response +from .response import Response class CloudRecoException(Exception): diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 41d13febf..6de381f2b 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -5,7 +5,7 @@ """ -from requests import Response +from .response import Response class OopsAnErrorOccurredPossiblyBadName(Exception): diff --git a/src/vws/exceptions/response.py b/src/vws/exceptions/response.py new file mode 100644 index 000000000..89a42870b --- /dev/null +++ b/src/vws/exceptions/response.py @@ -0,0 +1,16 @@ +"""Responses for exceptions.""" + +from dataclasses import dataclass + + +@dataclass +class Response: + """ + A response from a request. + """ + + text: str + url: str + status_code: int + headers: dict[str, str] + request_body: bytes | str | None diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 1eb751de5..a43323380 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -137,8 +137,8 @@ def target_name(self) -> str: """ The target name which already exists. """ - response_body = self.response.request.body or b"" - request_json = json.loads(response_body) + response_body = self.response.request_body or b"" + request_json = json.loads(s=response_body) return str(request_json["name"]) diff --git a/src/vws/query.py b/src/vws/query.py index 85501a3b0..a30e59a9c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -5,6 +5,7 @@ from __future__ import annotations import datetime +import json from http import HTTPStatus from typing import Any, BinaryIO from urllib.parse import urljoin @@ -24,6 +25,7 @@ RequestEntityTooLarge, ServerError, ) +from vws.exceptions.response import Response from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData @@ -133,7 +135,7 @@ def query( "Content-Type": content_type_header, } - response = requests.request( + requests_response = requests.request( method=method, url=urljoin(base=self._base_vwq_url, url=request_path), headers=headers, @@ -141,6 +143,13 @@ def query( # We should make the timeout customizable. timeout=None, ) + response = Response( + text=requests_response.text, + url=requests_response.url, + status_code=requests_response.status_code, + headers=dict(requests_response.headers), + request_body=requests_response.request.body, + ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: raise RequestEntityTooLarge @@ -153,7 +162,7 @@ def query( ): # pragma: no cover raise ServerError(response=response) - result_code = response.json()["result_code"] + result_code = json.loads(s=response.text)["result_code"] if result_code != "Success": exception = { "AuthenticationFailure": AuthenticationFailure, @@ -164,7 +173,7 @@ def query( raise exception(response=response) result: list[QueryResult] = [] - result_list = list(response.json()["results"]) + result_list = list(json.loads(s=response.text)["results"]) for item in result_list: target_data: TargetData | None = None if "target_data" in item: diff --git a/src/vws/vws.py b/src/vws/vws.py index d3f19cc6a..278f3a2b2 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -13,7 +13,6 @@ from urllib.parse import urljoin import requests -from requests import Response from vws_auth_tools import authorization_header, rfc_1123_date from vws.exceptions.custom_exceptions import ( @@ -48,6 +47,8 @@ TargetSummaryReport, ) +from .exceptions.response import Response + if TYPE_CHECKING: import io @@ -107,7 +108,7 @@ def _target_api_request( url = urljoin(base=base_vws_url, url=request_path) - return requests.request( + requests_response = requests.request( method=method, url=url, headers=headers, @@ -116,6 +117,14 @@ def _target_api_request( timeout=None, ) + return Response( + text=requests_response.text, + url=requests_response.url, + status_code=requests_response.status_code, + headers=dict(requests_response.headers), + request_body=requests_response.request.body, + ) + class VWS: """ @@ -198,7 +207,7 @@ def _make_request( ): # pragma: no cover raise ServerError(response=response) - result_code = response.json()["result_code"] + result_code = json.loads(s=response.text)["result_code"] if result_code == expected_result_code: return response @@ -303,7 +312,7 @@ def add_target( expected_result_code="TargetCreated", ) - return str(response.json()["target_id"]) + return str(json.loads(response.text)["target_id"]) def get_target_record(self, target_id: str) -> TargetStatusAndRecord: """ @@ -340,7 +349,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: expected_result_code="Success", ) - result_data = response.json() + result_data = json.loads(s=response.text) status = TargetStatuses(result_data["status"]) target_record_dict = dict(result_data["target_record"]) target_record = TargetRecord( @@ -436,7 +445,7 @@ def list_targets(self) -> list[str]: expected_result_code="Success", ) - return list(response.json()["results"]) + return list(json.loads(response.text)["results"]) def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: """ @@ -473,7 +482,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: expected_result_code="Success", ) - result_data = dict(response.json()) + result_data = dict(json.loads(response.text)) return TargetSummaryReport( status=TargetStatuses(result_data["status"]), database_name=result_data["database_name"], @@ -516,7 +525,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: expected_result_code="Success", ) - response_data = dict(response.json()) + response_data = dict(json.loads(response.text)) return DatabaseSummaryReport( active_images=response_data["active_images"], current_month_recos=response_data["current_month_recos"], @@ -603,7 +612,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: expected_result_code="Success", ) - return list(response.json()["similar_targets"]) + return list(json.loads(s=response.text)["similar_targets"]) def update_target( self, From 8ec6bd0a76415c66b616bf594d73e0a2e017f9aa Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 02:11:27 +0000 Subject: [PATCH 049/641] Fix ruff --- src/vws/exceptions/base_exceptions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 5c45e823a..044c2b017 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,10 @@ from __future__ import annotations -from .response import Response +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .response import Response class CloudRecoException(Exception): From 6628c1fbd453299db0fed316276e8758a85d965f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 02:18:05 +0000 Subject: [PATCH 050/641] Remove sphinx-autodoc-typehints. This had bugs and is no longer necessary for us with the latest Sphinx. --- docs/source/conf.py | 1 - pyproject.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index c3861a1bf..37bfe5701 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,7 +15,6 @@ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", - "sphinx_autodoc_typehints", "sphinx-prompt", "sphinx_substitution_extensions", "sphinxcontrib.spelling", diff --git a/pyproject.toml b/pyproject.toml index 3384b141d..aab57307d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -274,7 +274,6 @@ dev = [ "PyYAML==6.0.1", "ruff==0.2.0", "Sphinx==7.2.6", - "sphinx-autodoc-typehints==1.25.3", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", From e687f467b70204017bf7eed93c15e3e4e38b4692 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 02:21:18 +0000 Subject: [PATCH 051/641] Remove sphinx-autodoc-typehints configuration variable. --- docs/source/conf.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 37bfe5701..0592ab540 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -86,5 +86,3 @@ .. |github-owner| replace:: VWS-Python .. |github-repository| replace:: vws-python """ - -always_document_param_types = True From 2110123cd3010bfce139f011cf2c40129277adec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:14:43 +0000 Subject: [PATCH 052/641] Bump pyright from 1.1.349 to 1.1.350 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.349 to 1.1.350. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.349...v1.1.350) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aab57307d..e3b7588b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -267,7 +267,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.3", "pyproject-fmt==1.7.0", - "pyright==1.1.349", + "pyright==1.1.350", "pyroma==4.2", "pytest==8.0.0", "pytest-cov==4.1", From ac22a7a5b7ed9095d1e5cbb8d6b507b74fd1a7f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:14:59 +0000 Subject: [PATCH 053/641] Bump ruff from 0.2.0 to 0.2.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.0 to 0.2.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.2.0...v0.2.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aab57307d..59fe21472 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -272,7 +272,7 @@ dev = [ "pytest==8.0.0", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.2.0", + "ruff==0.2.1", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", From 648ddba5882c626a4d0cba92ad1938aa388d2a20 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 10:50:39 +0000 Subject: [PATCH 054/641] Remove nitpick ignore Sphinx setting which is no longer needed --- docs/source/conf.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 0592ab540..d90db443f 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,13 +59,6 @@ } nitpicky = True warning_is_error = True -nitpick_ignore = [ - ("py:class", "_io.BytesIO"), - # Requests documentation exposes ``requests.Response``, not - # ``requests.models.response``. - ("py:class", "requests.models.Response"), -] - autoclass_content = "both" From 820944f5b4afbc718c4e015657540f0b3e39ee5a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 10:51:28 +0000 Subject: [PATCH 055/641] Remove linkcheck ignore setting which is no longer needed --- docs/source/conf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index d90db443f..21d419ce2 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -64,10 +64,6 @@ # Retry link checking to avoid transient network errors. linkcheck_retries = 5 -linkcheck_ignore = [ - # Requires login. - r"https://developer.vuforia.com/targetmanager", -] spelling_word_list_filename = "../../spelling_private_dict.txt" From feb26c31c4223920c7e993bef5ed9dc6ea308666 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 10:53:58 +0000 Subject: [PATCH 056/641] Fix link to setuptools-scm documentation about Sphinx usage --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 21d419ce2..d6ecf811c 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -32,7 +32,7 @@ # built documents. # # Use ``importlib.metadata.version`` as per -# https://github.com/pypa/setuptools_scm#usage-from-sphinx. +# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx version = importlib.metadata.version(distribution_name=project) _month, _day, _year, *_ = version.split(".") release = f"{_month}.{_day}.{_year}" From 52041be6d5088c96489e8b7aac9e90f2a892f973 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 10:59:41 +0000 Subject: [PATCH 057/641] Remove sphinx-autodoc-typehints configuration variable. --- docs/source/conf.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 0592ab540..d90db443f 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,13 +59,6 @@ } nitpicky = True warning_is_error = True -nitpick_ignore = [ - ("py:class", "_io.BytesIO"), - # Requests documentation exposes ``requests.Response``, not - # ``requests.models.response``. - ("py:class", "requests.models.Response"), -] - autoclass_content = "both" From e52b5f872759e99f000790797490302ea163b831 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 11:15:44 +0000 Subject: [PATCH 058/641] Move Response object object to exceptions documentation --- docs/source/api-reference.rst | 4 ---- docs/source/exceptions.rst | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 93b39a48e..3ffbc13da 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -5,10 +5,6 @@ API Reference :undoc-members: :members: -.. automodule:: vws.exceptions.response - :undoc-members: - :members: - .. automodule:: vws.reports :undoc-members: :members: diff --git a/docs/source/exceptions.rst b/docs/source/exceptions.rst index f48730bfd..f23ab02b8 100644 --- a/docs/source/exceptions.rst +++ b/docs/source/exceptions.rst @@ -36,3 +36,10 @@ Custom exceptions :show-inheritance: :inherited-members: Exception :exclude-members: errno, filename, filename2, strerror + +Response +-------- + +.. automodule:: vws.exceptions.response + :undoc-members: + :members: From 986a4978367e8eb19ae7d2de2e8f170755b47f74 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 6 Feb 2024 11:16:49 +0000 Subject: [PATCH 059/641] Add changelog entry for Response objects --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2afc25f50..df1018763 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Exception response attributes are now ``vws.exceptions.response.Response`` instances rather than ``requests.Response`` objects. + 2024.02.04.1 ------------ From 12aae3af4dfa4ee3e90150a38100382b784cb714 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Tue, 6 Feb 2024 11:27:40 +0000 Subject: [PATCH 060/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index df1018763..4b51aacc6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.02.06 +------------ + * Exception response attributes are now ``vws.exceptions.response.Response`` instances rather than ``requests.Response`` objects. 2024.02.04.1 From 5c50e3356a851a8420d57c020dec3ec0c41f481c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 11:47:38 +0000 Subject: [PATCH 061/641] Switch from pip to uv in main CI --- .github/workflows/ci.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50ffc9c15..a5b0ccd60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,19 +30,20 @@ jobs: python-version: ${{ matrix.python-version }} - uses: actions/cache@v4 + env: + UV_CACHE_DIR: ~/.cache/uv with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} + path: "${{ env.UV_CACHE_DIR }}" + key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-uv- - name: "Install dependencies" + env: + UV_CACHE_DIR: ~/.cache/uv run: | - python -m pip install --upgrade pip setuptools wheel - # We use '--ignore-installed' to avoid GitHub's cache which can cause - # issues - we have seen packages from this cache be cause trouble with - # pip-extra-reqs. - python -m pip install --ignore-installed --upgrade --editable .[dev] + python -m pip install --upgrade uv + python -m uv pip install --upgrade --editable .[dev] - name: "Lint" run: | From feb6b1853979065ce35f0e9660d3f60ad225a6a1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 11:56:21 +0000 Subject: [PATCH 062/641] Try using a virtualenv --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5b0ccd60..56b8bf17f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,15 +41,21 @@ jobs: - name: "Install dependencies" env: UV_CACHE_DIR: ~/.cache/uv + VIRTUAL_ENV: ./.venv run: | python -m pip install --upgrade uv + uv venv python -m uv pip install --upgrade --editable .[dev] - name: "Lint" + env: + VIRTUAL_ENV: ./.venv run: | make lint - name: "Run tests" + env: + VIRTUAL_ENV: ./.venv run: | # We run tests against "." and not the tests directory as we test the README # and documentation. From 18eacda83c6512bb72821f54801d8e12820abe9c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 11:57:57 +0000 Subject: [PATCH 063/641] No need for editable install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56b8bf17f..a0334c8ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: run: | python -m pip install --upgrade uv uv venv - python -m uv pip install --upgrade --editable .[dev] + python -m uv pip install --upgrade .[dev] - name: "Lint" env: From 378f4064a0ed7064eba073b35fe73f5cb9223a3b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 11:58:34 +0000 Subject: [PATCH 064/641] Try another way of setting virtualenv --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0334c8ce..ec8144e72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,22 +41,20 @@ jobs: - name: "Install dependencies" env: UV_CACHE_DIR: ~/.cache/uv - VIRTUAL_ENV: ./.venv run: | python -m pip install --upgrade uv uv venv + source ./.venv/bin/activate python -m uv pip install --upgrade .[dev] - name: "Lint" - env: - VIRTUAL_ENV: ./.venv run: | + source ./.venv/bin/activate make lint - name: "Run tests" - env: - VIRTUAL_ENV: ./.venv run: | + source ./.venv/bin/activate # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 86dc69a1b13950ae8fb4a8e7ff3ebf4d7b3c7f80 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 11:59:40 +0000 Subject: [PATCH 065/641] Use python -m for creating virtualenv --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec8144e72..5d5ed0c12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: UV_CACHE_DIR: ~/.cache/uv run: | python -m pip install --upgrade uv - uv venv + python -m uv venv source ./.venv/bin/activate python -m uv pip install --upgrade .[dev] From 4afd4e5209f87d00b2d4bb42a3d26af2c1ea6bd6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 12:04:37 +0000 Subject: [PATCH 066/641] Install uv without Python --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d5ed0c12..2de669304 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,10 +42,10 @@ jobs: env: UV_CACHE_DIR: ~/.cache/uv run: | - python -m pip install --upgrade uv - python -m uv venv + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv source ./.venv/bin/activate - python -m uv pip install --upgrade .[dev] + uv pip install --upgrade .[dev] - name: "Lint" run: | From 865472112b773fa3ccd86a26e14545135752dba9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 12:05:51 +0000 Subject: [PATCH 067/641] Try quoting install target --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2de669304..7bd4eeba0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh uv venv source ./.venv/bin/activate - uv pip install --upgrade .[dev] + uv pip install --upgrade ".[dev]" - name: "Lint" run: | From 58787613578222221a1ccda33dea4f1400be975f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 12:08:28 +0000 Subject: [PATCH 068/641] Go back to editable install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bd4eeba0..673efeb3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh uv venv source ./.venv/bin/activate - uv pip install --upgrade ".[dev]" + uv pip install --upgrade --editable ".[dev]" - name: "Lint" run: | From 44ec9e234d412eb2bc04b8d8f2d504b483bd5d6a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 12:18:48 +0000 Subject: [PATCH 069/641] Show ~ location --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 673efeb3e..c61ff5cdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,8 @@ jobs: env: UV_CACHE_DIR: ~/.cache/uv run: | + readlink -f ~ + echo "READLINK" curl -LsSf https://astral.sh/uv/install.sh | sh uv venv source ./.venv/bin/activate From c8622bb300781c513812093286050e1e4a9c6503 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 12:21:00 +0000 Subject: [PATCH 070/641] Try to set cache better --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c61ff5cdd..e204a1f9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,10 +40,9 @@ jobs: - name: "Install dependencies" env: - UV_CACHE_DIR: ~/.cache/uv + # `/home/runner` is the result of running `readlink -f ~` on the runner. + UV_CACHE_DIR: /home/runner/.cache/uv run: | - readlink -f ~ - echo "READLINK" curl -LsSf https://astral.sh/uv/install.sh | sh uv venv source ./.venv/bin/activate From 7f6598e210d727c81467da876887544c63f28dad Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 18:50:52 +0000 Subject: [PATCH 071/641] Put venv in /home/runner --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e204a1f9e..b8d9931df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,18 +44,18 @@ jobs: UV_CACHE_DIR: /home/runner/.cache/uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv - source ./.venv/bin/activate + uv /home/runner/.venv + source /home/runner/.venv/bin/activate uv pip install --upgrade --editable ".[dev]" - name: "Lint" run: | - source ./.venv/bin/activate + source /home/runner/.venv/bin/activate make lint - name: "Run tests" run: | - source ./.venv/bin/activate + source /home/runner/.venv/bin/activate # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 9bc7e38b57024a7cc69f2c5bc2d352f5edd19263 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 18:52:28 +0000 Subject: [PATCH 072/641] Fix venv create command --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8d9931df..32302336b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: UV_CACHE_DIR: /home/runner/.cache/uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv /home/runner/.venv + uv venv /home/runner/.venv source /home/runner/.venv/bin/activate uv pip install --upgrade --editable ".[dev]" From 1b3362c3ab185e3d37ac4c7872bd2395ad46499f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:04:09 +0000 Subject: [PATCH 073/641] Use uv in Windows --- .github/workflows/windows-ci.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index ade6b5e71..6127f62db 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -30,22 +30,26 @@ jobs: python-version: ${{ matrix.python-version }} - uses: actions/cache@v4 + env: + UV_CACHE_DIR: ~\AppData\Local\uv\Cache with: - path: ~\AppData\Local\pip\Cache - key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} + path: "${{ env.UV_CACHE_DIR }}" + key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-uv- - name: "Install dependencies" + env: + UV_CACHE_DIR: ~\AppData\Local\uv\Cache run: | - python -m pip install --upgrade pip setuptools wheel - # We use '--ignore-installed' to avoid GitHub's cache which can cause - # issues - we have seen packages from this cache be cause trouble with - # pip-extra-reqs. - python -m pip install --ignore-installed --upgrade --editable .[dev] + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv ~\AppData\Local\.venv + source ~\AppData\Local\.venv + uv pip install --upgrade --editable ".[dev]" - name: "Run tests" run: | + source ~\AppData\Local\.venv # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 0bdc1004522b5b7c8860a83b35bae9c542cf0877 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:11:40 +0000 Subject: [PATCH 074/641] Quote to avoid shellcheck worries --- .github/workflows/windows-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 6127f62db..fa9cfa8cb 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -43,13 +43,13 @@ jobs: UV_CACHE_DIR: ~\AppData\Local\uv\Cache run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv ~\AppData\Local\.venv - source ~\AppData\Local\.venv + uv venv "~\AppData\Local\.venv" + source "~\AppData\Local\.venv" uv pip install --upgrade --editable ".[dev]" - name: "Run tests" run: | - source ~\AppData\Local\.venv + source "~\AppData\Local\.venv" # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From af277bb1488d244b678d146a18d5530bbaf69149 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:13:57 +0000 Subject: [PATCH 075/641] Switch to uv install supported Windows --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index fa9cfa8cb..ca9f3a383 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -42,7 +42,7 @@ jobs: env: UV_CACHE_DIR: ~\AppData\Local\uv\Cache run: | - curl -LsSf https://astral.sh/uv/install.sh | sh + irm https://astral.sh/uv/install.ps1 | iex uv venv "~\AppData\Local\.venv" source "~\AppData\Local\.venv" uv pip install --upgrade --editable ".[dev]" From 550efba8bffc36d2aabc93918d4fd1889de21d2b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:21:45 +0000 Subject: [PATCH 076/641] Try to fix source command on Windows --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index ca9f3a383..a71160e63 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -44,7 +44,7 @@ jobs: run: | irm https://astral.sh/uv/install.ps1 | iex uv venv "~\AppData\Local\.venv" - source "~\AppData\Local\.venv" + "~\AppData\Local\.venv\Scripts\activate.ps1" uv pip install --upgrade --editable ".[dev]" - name: "Run tests" From d9d036bc0c1be0c40f01ab3a8fb161b02decd642 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:28:47 +0000 Subject: [PATCH 077/641] Try to fix source command on Windows --- .github/workflows/windows-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index a71160e63..a1f358d3b 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -41,11 +41,12 @@ jobs: - name: "Install dependencies" env: UV_CACHE_DIR: ~\AppData\Local\uv\Cache + VIRTUAL_ENV: ~\AppData\Local\.venv run: | irm https://astral.sh/uv/install.ps1 | iex - uv venv "~\AppData\Local\.venv" - "~\AppData\Local\.venv\Scripts\activate.ps1" - uv pip install --upgrade --editable ".[dev]" + uv venv ${{ env.VIRTUAL_ENV }} + "${{ env.VIRTUAL_ENV }}/Scripts\Activate.ps1" + uv pip install --upgrade --editable .[dev] - name: "Run tests" run: | From 3c44cf051309648edea65d404bc698b2249e1dc1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:30:09 +0000 Subject: [PATCH 078/641] Fix source command in Windows test stage --- .github/workflows/windows-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index a1f358d3b..1c859f2e8 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -49,8 +49,10 @@ jobs: uv pip install --upgrade --editable .[dev] - name: "Run tests" + env: + VIRTUAL_ENV: ~\AppData\Local\.venv run: | - source "~\AppData\Local\.venv" + "${{ env.VIRTUAL_ENV }}/Scripts\Activate.ps1" # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 689735c2ff36447beeda73eaaa86751bcf094b9f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:31:19 +0000 Subject: [PATCH 079/641] Remove unnecessary quotes --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32302336b..930e8f574 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh uv venv /home/runner/.venv source /home/runner/.venv/bin/activate - uv pip install --upgrade --editable ".[dev]" + uv pip install --upgrade --editable .[dev] - name: "Lint" run: | From 95501ca36e615d0bba22b18366840d89e81ca6ff Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:33:50 +0000 Subject: [PATCH 080/641] Use backslashes on Windows paths --- .github/workflows/windows-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 1c859f2e8..dcfeb7de9 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -45,14 +45,14 @@ jobs: run: | irm https://astral.sh/uv/install.ps1 | iex uv venv ${{ env.VIRTUAL_ENV }} - "${{ env.VIRTUAL_ENV }}/Scripts\Activate.ps1" + "${{ env.VIRTUAL_ENV }}\Scripts\Activate.ps1" uv pip install --upgrade --editable .[dev] - name: "Run tests" env: VIRTUAL_ENV: ~\AppData\Local\.venv run: | - "${{ env.VIRTUAL_ENV }}/Scripts\Activate.ps1" + "${{ env.VIRTUAL_ENV }}\Scripts\Activate.ps1" # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 28104b6db65141687151c06bef95e3195ffded04 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:35:24 +0000 Subject: [PATCH 081/641] Try python -m for pytest --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index dcfeb7de9..5628d4cb7 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -55,4 +55,4 @@ jobs: "${{ env.VIRTUAL_ENV }}\Scripts\Activate.ps1" # We run tests against "." and not the tests directory as we test the README # and documentation. - pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 8044dba8c981e0a2ff91bac25fdd6f020bafdc2d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:39:42 +0000 Subject: [PATCH 082/641] Try finding Python in Windows --- .github/workflows/windows-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 5628d4cb7..c37717d8a 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -45,14 +45,12 @@ jobs: run: | irm https://astral.sh/uv/install.ps1 | iex uv venv ${{ env.VIRTUAL_ENV }} - "${{ env.VIRTUAL_ENV }}\Scripts\Activate.ps1" uv pip install --upgrade --editable .[dev] - name: "Run tests" env: VIRTUAL_ENV: ~\AppData\Local\.venv run: | - "${{ env.VIRTUAL_ENV }}\Scripts\Activate.ps1" # We run tests against "." and not the tests directory as we test the README # and documentation. - python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + "${{ env.VIRTUAL_ENV }}\bin\python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml" From da175cc25377924450273ad5f69485960003028f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:48:40 +0000 Subject: [PATCH 083/641] Try to run tests --- .github/workflows/windows-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index c37717d8a..dd123abd0 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -50,7 +50,9 @@ jobs: - name: "Run tests" env: VIRTUAL_ENV: ~\AppData\Local\.venv + ACTIVATE_SCRIPT: ~\AppData\Local\.venv\Scripts\Activate.ps1 run: | + ${{ env.ACTIVATE_SCRIPT }} # We run tests against "." and not the tests directory as we test the README # and documentation. - "${{ env.VIRTUAL_ENV }}\bin\python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml" + python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml" From 38dca4563de76559d7d8bb733f852e2b0174d93c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:50:24 +0000 Subject: [PATCH 084/641] Remove unnecessary quotes --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index dd123abd0..08a784c65 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -55,4 +55,4 @@ jobs: ${{ env.ACTIVATE_SCRIPT }} # We run tests against "." and not the tests directory as we test the README # and documentation. - python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml" + python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From e30d766e416815bdb98e1375337f4e55adf63d7d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:53:26 +0000 Subject: [PATCH 085/641] Try to fix Windows activation command --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 08a784c65..665c719a5 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -52,7 +52,7 @@ jobs: VIRTUAL_ENV: ~\AppData\Local\.venv ACTIVATE_SCRIPT: ~\AppData\Local\.venv\Scripts\Activate.ps1 run: | - ${{ env.ACTIVATE_SCRIPT }} + ~/AppData/Local/.venv/Scripts/Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 8225159d66d809bd686f83ad1a541de9c03a54fe Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:56:06 +0000 Subject: [PATCH 086/641] Try double backslashes --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 665c719a5..4e07791e6 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -52,7 +52,7 @@ jobs: VIRTUAL_ENV: ~\AppData\Local\.venv ACTIVATE_SCRIPT: ~\AppData\Local\.venv\Scripts\Activate.ps1 run: | - ~/AppData/Local/.venv/Scripts/Activate.ps1 + ~\\AppData\\Local\\.venv\\Scripts\\Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 40cd685d40ff0e659c335cc8429e53620b7421d2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 19:59:25 +0000 Subject: [PATCH 087/641] Try to use just the script path --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 4e07791e6..08a784c65 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -52,7 +52,7 @@ jobs: VIRTUAL_ENV: ~\AppData\Local\.venv ACTIVATE_SCRIPT: ~\AppData\Local\.venv\Scripts\Activate.ps1 run: | - ~\\AppData\\Local\\.venv\\Scripts\\Activate.ps1 + ${{ env.ACTIVATE_SCRIPT }} # We run tests against "." and not the tests directory as we test the README # and documentation. python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 37d11d08eeef34d0361bc35c1b004ba8b398db2e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:03:11 +0000 Subject: [PATCH 088/641] Try to use just the script path --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 08a784c65..74cf7bb9d 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -52,7 +52,7 @@ jobs: VIRTUAL_ENV: ~\AppData\Local\.venv ACTIVATE_SCRIPT: ~\AppData\Local\.venv\Scripts\Activate.ps1 run: | - ${{ env.ACTIVATE_SCRIPT }} + ~\AppData\Local\.venv\Scripts\Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 4ade717b0b8a6f2454782ff2905d1a0584bc704e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:06:44 +0000 Subject: [PATCH 089/641] Try to use just the Python path --- .github/workflows/windows-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 74cf7bb9d..0378e60db 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -50,9 +50,7 @@ jobs: - name: "Run tests" env: VIRTUAL_ENV: ~\AppData\Local\.venv - ACTIVATE_SCRIPT: ~\AppData\Local\.venv\Scripts\Activate.ps1 run: | - ~\AppData\Local\.venv\Scripts\Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. - python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + ${{ env.VIRTUAL_ENV}}/bin/python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 33593b19765fbe307646a8e9374942a69a7262fc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:08:40 +0000 Subject: [PATCH 090/641] Try import-module --- .github/workflows/windows-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 0378e60db..8be5ec48b 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -51,6 +51,7 @@ jobs: env: VIRTUAL_ENV: ~\AppData\Local\.venv run: | + Import-Module ~ # We run tests against "." and not the tests directory as we test the README # and documentation. ${{ env.VIRTUAL_ENV}}/bin/python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 2ee6a3c76b87fb43bed0ea8cdf835d51068b2136 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:13:04 +0000 Subject: [PATCH 091/641] Try another way of setting virtualenv --- .github/workflows/windows-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 8be5ec48b..143b78158 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -41,17 +41,17 @@ jobs: - name: "Install dependencies" env: UV_CACHE_DIR: ~\AppData\Local\uv\Cache - VIRTUAL_ENV: ~\AppData\Local\.venv run: | irm https://astral.sh/uv/install.ps1 | iex - uv venv ${{ env.VIRTUAL_ENV }} + uv venv ${{ github.workspace }}/.venv + ${{ github.workspace }}/.venv/Scripts/Activate.ps1 uv pip install --upgrade --editable .[dev] - name: "Run tests" env: VIRTUAL_ENV: ~\AppData\Local\.venv run: | - Import-Module ~ + ${{ github.workspace }}/.venv/Scripts/Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. ${{ env.VIRTUAL_ENV}}/bin/python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From f3c01a93d61fcdc283eab720a6d0a35ee5a60344 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:15:01 +0000 Subject: [PATCH 092/641] Revert setting python path completely --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 143b78158..f3fc085fb 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -54,4 +54,4 @@ jobs: ${{ github.workspace }}/.venv/Scripts/Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. - ${{ env.VIRTUAL_ENV}}/bin/python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 21b03302fb1bc5c33d91712015fef08d6e518762 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:18:19 +0000 Subject: [PATCH 093/641] Simplify setup of virtualenvs --- .github/workflows/ci.yml | 6 +++--- .github/workflows/windows-ci.yml | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 930e8f574..8ddbb7e5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,8 @@ jobs: UV_CACHE_DIR: /home/runner/.cache/uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv /home/runner/.venv - source /home/runner/.venv/bin/activate + uv venv ${{ github.workspace }}/.venv + source ${{ github.workspace }}/.venv/bin/activate uv pip install --upgrade --editable .[dev] - name: "Lint" @@ -55,7 +55,7 @@ jobs: - name: "Run tests" run: | - source /home/runner/.venv/bin/activate + source ${{ github.workspace }}/.venv/bin/activate # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index f3fc085fb..30d9fa9ba 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -48,8 +48,6 @@ jobs: uv pip install --upgrade --editable .[dev] - name: "Run tests" - env: - VIRTUAL_ENV: ~\AppData\Local\.venv run: | ${{ github.workspace }}/.venv/Scripts/Activate.ps1 # We run tests against "." and not the tests directory as we test the README From 1d3dffa9e57e62f18c07d818b51c11cba4fc5c90 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:19:48 +0000 Subject: [PATCH 094/641] Fix source command in CI stage --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ddbb7e5e..9e622501a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: "Lint" run: | - source /home/runner/.venv/bin/activate + source ${{ github.workspace }}/.venv/bin/activate make lint - name: "Run tests" From b7c92bfffe8dce976e195a0347c25e7fe41815cb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:23:21 +0000 Subject: [PATCH 095/641] Try another way of setting virtualenv not in current directory --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/windows-ci.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e622501a..c3e4318fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,18 +44,18 @@ jobs: UV_CACHE_DIR: /home/runner/.cache/uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv ${{ github.workspace }}/.venv - source ${{ github.workspace }}/.venv/bin/activate + uv venv ${{ github.workspace }}/../.venv + source ${{ github.workspace }}/../.venv/bin/activate uv pip install --upgrade --editable .[dev] - name: "Lint" run: | - source ${{ github.workspace }}/.venv/bin/activate + source ${{ github.workspace }}/../.venv/bin/activate make lint - name: "Run tests" run: | - source ${{ github.workspace }}/.venv/bin/activate + source ${{ github.workspace }}/../.venv/bin/activate # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 30d9fa9ba..964adee0a 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -43,13 +43,13 @@ jobs: UV_CACHE_DIR: ~\AppData\Local\uv\Cache run: | irm https://astral.sh/uv/install.ps1 | iex - uv venv ${{ github.workspace }}/.venv - ${{ github.workspace }}/.venv/Scripts/Activate.ps1 + uv venv ${{ github.workspace }}/../.venv + ${{ github.workspace }}/../.venv/Scripts/Activate.ps1 uv pip install --upgrade --editable .[dev] - name: "Run tests" run: | - ${{ github.workspace }}/.venv/Scripts/Activate.ps1 + ${{ github.workspace }}/../.venv/Scripts/Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From d73f42758a79fa4abf08d9ace52409b13e7b9ccc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:30:47 +0000 Subject: [PATCH 096/641] Remove cache on Windows CI --- .github/workflows/windows-ci.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 964adee0a..0c023fb76 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -29,18 +29,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v4 - env: - UV_CACHE_DIR: ~\AppData\Local\uv\Cache - with: - path: "${{ env.UV_CACHE_DIR }}" - key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} - restore-keys: | - ${{ runner.os }}-uv- - - name: "Install dependencies" - env: - UV_CACHE_DIR: ~\AppData\Local\uv\Cache run: | irm https://astral.sh/uv/install.ps1 | iex uv venv ${{ github.workspace }}/../.venv From 4519f8d14e094cfcce88b511f49fb3a946c76c78 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 16 Feb 2024 20:34:43 +0000 Subject: [PATCH 097/641] Try hardcoding to runner path Windows --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/windows-ci.yml | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3e4318fb..930e8f574 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,18 +44,18 @@ jobs: UV_CACHE_DIR: /home/runner/.cache/uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv ${{ github.workspace }}/../.venv - source ${{ github.workspace }}/../.venv/bin/activate + uv venv /home/runner/.venv + source /home/runner/.venv/bin/activate uv pip install --upgrade --editable .[dev] - name: "Lint" run: | - source ${{ github.workspace }}/../.venv/bin/activate + source /home/runner/.venv/bin/activate make lint - name: "Run tests" run: | - source ${{ github.workspace }}/../.venv/bin/activate + source /home/runner/.venv/bin/activate # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 0c023fb76..d1b5aa939 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -29,16 +29,27 @@ jobs: with: python-version: ${{ matrix.python-version }} + - uses: actions/cache@v4 + env: + UV_CACHE_DIR: C:/Users/runner/.cache/ + with: + path: "${{ env.UV_CACHE_DIR }}" + key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-uv- + - name: "Install dependencies" + env: + UV_CACHE_DIR: C:/Users/runner/.cache/ run: | irm https://astral.sh/uv/install.ps1 | iex - uv venv ${{ github.workspace }}/../.venv - ${{ github.workspace }}/../.venv/Scripts/Activate.ps1 + uv venv C:/Users/runner/.venv + C:/Users/runner/.venv/Scripts/Activate.ps1 uv pip install --upgrade --editable .[dev] - name: "Run tests" run: | - ${{ github.workspace }}/../.venv/Scripts/Activate.ps1 + C:/Users/runner/.venv/Scripts/Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 06685e14b031c47ebd95b75c1b569bcde0d580aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:46:50 +0000 Subject: [PATCH 098/641] Bump vws-python-mock from 2024.1.21 to 2024.2.16 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2024.1.21 to 2024.2.16. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2024.01.21...2024.02.16) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2a22dfcb8..c2ebda203 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -280,7 +280,7 @@ dev = [ "sybil==6.0.3", "types-requests==2.31.0.20240125", "vulture==2.11", - "VWS-Python-Mock==2024.1.21", + "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", ] [project.urls] From 48d8c938389eba1b58e6135b7a0e6c8d3a8b08d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:47:00 +0000 Subject: [PATCH 099/641] Bump pytest from 8.0.0 to 8.0.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.0 to 8.0.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.0.0...8.0.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2a22dfcb8..6e8b06ed5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -269,7 +269,7 @@ dev = [ "pyproject-fmt==1.7.0", "pyright==1.1.350", "pyroma==4.2", - "pytest==8.0.0", + "pytest==8.0.1", "pytest-cov==4.1", "PyYAML==6.0.1", "ruff==0.2.1", From 19aef0c6a7e3bb62eee38e8dd783f5e71c2d400a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 17 Feb 2024 02:12:13 +0000 Subject: [PATCH 100/641] Avoid cache for uv requirements - it doesn't make the build faster --- .github/workflows/windows-ci.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index d1b5aa939..a9ad24e79 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -29,18 +29,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v4 - env: - UV_CACHE_DIR: C:/Users/runner/.cache/ - with: - path: "${{ env.UV_CACHE_DIR }}" - key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} - restore-keys: | - ${{ runner.os }}-uv- - + # We do not use the cache action as uv is faster than the cache action. - name: "Install dependencies" - env: - UV_CACHE_DIR: C:/Users/runner/.cache/ run: | irm https://astral.sh/uv/install.ps1 | iex uv venv C:/Users/runner/.venv From 4928f1969b49c220f4a53ac7a89549856467cacf Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 17 Feb 2024 02:13:27 +0000 Subject: [PATCH 101/641] Avoid cache for uv requirements - it doesn't make the build faster --- .github/workflows/ci.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 930e8f574..307175e8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,19 +29,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v4 - env: - UV_CACHE_DIR: ~/.cache/uv - with: - path: "${{ env.UV_CACHE_DIR }}" - key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} - restore-keys: | - ${{ runner.os }}-uv- - + # We do not use the cache action as uv is faster than the cache action. - name: "Install dependencies" - env: - # `/home/runner` is the result of running `readlink -f ~` on the runner. - UV_CACHE_DIR: /home/runner/.cache/uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh uv venv /home/runner/.venv From 7f6cf21ffcc6cbaa1693d3a243829e91836fffeb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 17 Feb 2024 04:41:35 +0000 Subject: [PATCH 102/641] Fail on Codecov failure, and use token to fix upload --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 307175e8a..2024ed932 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,3 +51,6 @@ jobs: - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v4" + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} From 136685533171b7a075ef5d547df3e6ed369e317a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 17 Feb 2024 12:32:46 +0000 Subject: [PATCH 103/641] Switch from pdm to uv for pip-check-reqs --- lint.mk | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lint.mk b/lint.mk index 555270f4a..24c99b3e4 100644 --- a/lint.mk +++ b/lint.mk @@ -30,11 +30,11 @@ fix-ruff: .PHONY: pip-extra-reqs pip-extra-reqs: - pip-extra-reqs --requirements-file=<(pdm export --pyproject) src/ + pip-extra-reqs --requirements-file=<(uv pip compile --no-deps pyproject.toml) src/ .PHONY: pip-missing-reqs pip-missing-reqs: - pip-missing-reqs --requirements-file=<(pdm export --pyproject) src/ + pip-missing-reqs --requirements-file=<(uv pip compile --no-deps pyproject.toml) src/ .PHONY: pylint pylint: diff --git a/pyproject.toml b/pyproject.toml index 3c10afa40..f11493609 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -260,7 +260,6 @@ dev = [ "freezegun==1.4.0", "furo==2024.1.29", "mypy==1.8.0", - "pdm==2.12.3", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", @@ -279,6 +278,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240125", + "uv==0.1.3", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 3c69d3c2aa2c8e4970e0bf916a343ebfc9933043 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 18 Feb 2024 18:56:07 +0000 Subject: [PATCH 104/641] Remove dodgy dependency --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f11493609..c646a0356 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,6 @@ dev = [ "actionlint-py==1.6.26.11", "check-manifest==0.49", "doc8==1.1.1", - "dodgy==0.2.1", "freezegun==1.4.0", "furo==2024.1.29", "mypy==1.8.0", From fe5cb2bd9beb041db76932a37b645736e659da74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:51:13 +0000 Subject: [PATCH 105/641] Bump ruff from 0.2.1 to 0.2.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.1 to 0.2.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.2.1...v0.2.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c646a0356..db71a71e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -270,7 +270,7 @@ dev = [ "pytest==8.0.1", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.2.1", + "ruff==0.2.2", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", From e2f074f4300d0088b7741a53bf07bd9c25bbd30d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 18:21:26 +0000 Subject: [PATCH 106/641] Bump uv from 0.1.3 to 0.1.5 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.3 to 0.1.5. - [Release notes](https://github.com/astral-sh/uv/releases) - [Commits](https://github.com/astral-sh/uv/compare/0.1.3...0.1.5) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index db71a71e2..f535da795 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240125", - "uv==0.1.3", + "uv==0.1.5", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From c9aca9ca4044ed4d24f92df59cf2dc095691f9ff Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 19 Feb 2024 19:18:49 +0000 Subject: [PATCH 107/641] Include response in RequestEntityTooLarge exception Useful in testing our mock --- src/vws/exceptions/custom_exceptions.py | 15 +++++++++++++++ src/vws/query.py | 2 +- tests/test_cloud_reco_exceptions.py | 6 +++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 6de381f2b..dfc0cf575 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -37,6 +37,21 @@ class RequestEntityTooLarge(Exception): Exception raised when the given image is too large. """ + def __init__(self, response: Response) -> None: + """ + Args: + response: The response returned by Vuforia. + """ + super().__init__(response.text) + self._response = response + + @property + def response(self) -> Response: + """ + The response returned by Vuforia which included this error. + """ + return self._response + class TargetProcessingTimeout(Exception): """ diff --git a/src/vws/query.py b/src/vws/query.py index a30e59a9c..ffeedfc12 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -152,7 +152,7 @@ def query( ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: - raise RequestEntityTooLarge + raise RequestEntityTooLarge(response=response) if "Integer out of range" in response.text: raise MaxNumResultsOutOfRange(response=response) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 7e7261599..ba063dece 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -58,9 +58,13 @@ def test_image_too_large( A ``RequestEntityTooLarge`` exception is raised if an image which is too large is given. """ - with pytest.raises(RequestEntityTooLarge): + with pytest.raises(RequestEntityTooLarge) as exc: cloud_reco_client.query(image=png_too_large) + assert ( + exc.value.response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE + ) + def test_cloudrecoexception_inheritance() -> None: """ From acf218c75c52d670245167eb1fee304b5db602ea Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Mon, 19 Feb 2024 19:36:40 +0000 Subject: [PATCH 108/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4b51aacc6..53069ad42 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.02.19 +------------ + 2024.02.06 ------------ From eedeb06d0c5bb8be58d5f32280117328d4072338 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 19:37:41 +0000 Subject: [PATCH 109/641] Bump types-requests from 2.31.0.20240125 to 2.31.0.20240218 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.20240125 to 2.31.0.20240218. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f535da795..c534a1700 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -276,7 +276,7 @@ dev = [ "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", "sybil==6.0.3", - "types-requests==2.31.0.20240125", + "types-requests==2.31.0.20240218", "uv==0.1.5", "vulture==2.11", "VWS-Python-Mock==2024.2.16", From 2b156a7e8b6d3ed286ad6a6c954c44d32bc218ac Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 19 Feb 2024 21:39:31 +0000 Subject: [PATCH 110/641] Add CHANGELOG entry for previous release --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 53069ad42..ddd3ed91a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,8 @@ Next 2024.02.19 ------------ +* Add exception response attribute to ``vws.exceptions.custom_exceptions.RequestEntityTooLarge``. + 2024.02.06 ------------ From 5ccfa47de06e7fd41670e6b2508a156052b1345a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 10:43:01 +0000 Subject: [PATCH 111/641] Bump pyright from 1.1.350 to 1.1.351 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.350 to 1.1.351. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.350...v1.1.351) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f535da795..f5cd96eb0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,7 +265,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.3", "pyproject-fmt==1.7.0", - "pyright==1.1.350", + "pyright==1.1.351", "pyroma==4.2", "pytest==8.0.1", "pytest-cov==4.1", From 80d8eb7232bb389425cc80a182dfbd5c6b153c00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:58:15 +0000 Subject: [PATCH 112/641] Bump uv from 0.1.5 to 0.1.6 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.5 to 0.1.6. - [Release notes](https://github.com/astral-sh/uv/releases) - [Commits](https://github.com/astral-sh/uv/compare/0.1.5...0.1.6) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dca024a78..282640eae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.5", + "uv==0.1.6", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 8f11a953947d0b61ae135efe8c0207c6262b58ed Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 21 Feb 2024 14:58:17 +0000 Subject: [PATCH 113/641] Switch from pip-check-reqs to deptry --- Makefile | 3 +-- lint.mk | 15 ++++++++------- pyproject.toml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index e215a0026..71db4ef0b 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,11 @@ SPHINXOPTS := -W lint: \ actionlint \ check-manifest \ + deptry \ doc8 \ linkcheck \ mypy \ ruff \ - pip-extra-reqs \ - pip-missing-reqs \ pyproject-fmt \ pyright \ pyright-verifytypes \ diff --git a/lint.mk b/lint.mk index 24c99b3e4..568acb340 100644 --- a/lint.mk +++ b/lint.mk @@ -28,13 +28,14 @@ fix-ruff: ruff --fix . ruff format . -.PHONY: pip-extra-reqs -pip-extra-reqs: - pip-extra-reqs --requirements-file=<(uv pip compile --no-deps pyproject.toml) src/ - -.PHONY: pip-missing-reqs -pip-missing-reqs: - pip-missing-reqs --requirements-file=<(uv pip compile --no-deps pyproject.toml) src/ +TEMPFILE:= $(shell mktemp) + +.PHONY: deptry +deptry: + uv pip compile --no-deps pyproject.toml > $(TEMPFILE) + mv pyproject.toml pyproject.bak.toml + deptry --requirements-txt=$(TEMPFILE) src/ || (mv pyproject.bak.toml pyproject.toml && exit 1) + mv pyproject.bak.toml pyproject.toml .PHONY: pylint pylint: diff --git a/pyproject.toml b/pyproject.toml index 282640eae..c0a444cf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,11 +255,11 @@ dependencies = [ dev = [ "actionlint-py==1.6.26.11", "check-manifest==0.49", + "deptry==0.12.0", "doc8==1.1.1", "freezegun==1.4.0", "furo==2024.1.29", "mypy==1.8.0", - "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", "Pygments==2.17.2", From df86d121fba6f700541f53ef55e362541159193d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:30:27 +0000 Subject: [PATCH 114/641] Bump uv from 0.1.6 to 0.1.7 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.6 to 0.1.7. - [Release notes](https://github.com/astral-sh/uv/releases) - [Commits](https://github.com/astral-sh/uv/compare/0.1.6...0.1.7) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c0a444cf2..a08e606a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.6", + "uv==0.1.7", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 9b5bcc39386abf72cadec16312ac94438577f551 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 22 Feb 2024 11:04:16 +0000 Subject: [PATCH 115/641] Automatically merge dependabot PRs once status checks pass --- .github/workflows/dependabot-merge.yml | 24 ++++++++++++++++++++++++ .github/workflows/release.yml | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/dependabot-merge.yml diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml new file mode 100644 index 000000000..0f484eebe --- /dev/null +++ b/.github/workflows/dependabot-merge.yml @@ -0,0 +1,24 @@ +--- + +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5e9d9793..80877b4bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,10 @@ jobs: steps: - uses: actions/checkout@v4 + with: + # See + # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches + token: ${{ secrets.RELEASE_PAT }} - name: "Set up Python" uses: actions/setup-python@v5 From 626662973f1c2055dad806f80c5140efedf833a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 10:37:04 +0000 Subject: [PATCH 116/641] Bump uv from 0.1.7 to 0.1.9 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.7 to 0.1.9. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.7...0.1.9) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a08e606a5..31efa5f7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.7", + "uv==0.1.9", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 01fd96723e7d52f49f5569161a7ffd370f8dc1dc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 24 Feb 2024 11:51:02 +0000 Subject: [PATCH 117/641] Change ruff invocations to use the new syntax --- lint.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lint.mk b/lint.mk index 568acb340..f4d98eab8 100644 --- a/lint.mk +++ b/lint.mk @@ -20,12 +20,12 @@ doc8: .PHONY: ruff ruff: - ruff . + ruff check . ruff format --check . .PHONY: fix-ruff fix-ruff: - ruff --fix . + ruff check --fix . ruff format . TEMPFILE:= $(shell mktemp) From d705ad9ffa9792762185846629df708b6ec821ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:53:41 +0000 Subject: [PATCH 118/641] Bump pytest from 8.0.1 to 8.0.2 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.1 to 8.0.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.0.1...8.0.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 31efa5f7d..e099cd114 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -267,7 +267,7 @@ dev = [ "pyproject-fmt==1.7.0", "pyright==1.1.351", "pyroma==4.2", - "pytest==8.0.1", + "pytest==8.0.2", "pytest-cov==4.1", "PyYAML==6.0.1", "ruff==0.2.2", From d0b0ee21be7c2e89eaa454cf744c57804d1c6ddb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:58:10 +0000 Subject: [PATCH 119/641] Bump pylint from 3.0.3 to 3.1.0 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.3 to 3.1.0. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.3...v3.1.0) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e099cd114..0f71a706f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -263,7 +263,7 @@ dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "Pygments==2.17.2", - "pylint==3.0.3", + "pylint==3.1.0", "pyproject-fmt==1.7.0", "pyright==1.1.351", "pyroma==4.2", From f4e78823292decab7cd68f1b0a90bdd491a1c8d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 11:02:59 +0000 Subject: [PATCH 120/641] Bump uv from 0.1.9 to 0.1.10 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.9 to 0.1.10. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.9...0.1.10) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0f71a706f..3da446e5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.9", + "uv==0.1.10", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 121a08b0adc2dde530fbfff92b6e35402e5f8be2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 11:07:42 +0000 Subject: [PATCH 121/641] Bump sphinx-substitution-extensions from 2022.2.16 to 2024.2.25 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2022.2.16 to 2024.2.25. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2022.02.16...2024.02.25) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3da446e5f..8fb681c76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -273,7 +273,7 @@ dev = [ "ruff==0.2.2", "Sphinx==7.2.6", "sphinx-prompt==1.8", - "Sphinx-Substitution-Extensions==2022.2.16", + "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", From 016193f3a725f4d74528bec9dfe40a06fcd1d037 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:22:06 +0000 Subject: [PATCH 122/641] Bump uv from 0.1.10 to 0.1.11 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.10 to 0.1.11. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.10...0.1.11) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8fb681c76..3b099deae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.10", + "uv==0.1.11", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From f7e065951f8f2ec6c6735785f71dcd4a7e2d39b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 10:22:29 +0000 Subject: [PATCH 123/641] Bump pyright from 1.1.351 to 1.1.352 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.351 to 1.1.352. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.351...v1.1.352) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b099deae..d51c1fda5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,7 +265,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.7.0", - "pyright==1.1.351", + "pyright==1.1.352", "pyroma==4.2", "pytest==8.0.2", "pytest-cov==4.1", From 2893688389f3d87027b76643b56a474e233cf82d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 10:51:42 +0000 Subject: [PATCH 124/641] Bump uv from 0.1.11 to 0.1.12 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.11 to 0.1.12. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.11...0.1.12) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d51c1fda5..196f1725c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.11", + "uv==0.1.12", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 140858fa9d1b1af35914bfda75f4a36f179e9bc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:18:54 +0000 Subject: [PATCH 125/641] Bump uv from 0.1.12 to 0.1.13 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.12 to 0.1.13. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.12...0.1.13) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 196f1725c..9fdcd6474 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.12", + "uv==0.1.13", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From dbff2f0d890cf66d2cb3a18f32ceace578ca1a49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:23:25 +0000 Subject: [PATCH 126/641] Bump ruff from 0.2.2 to 0.3.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.2 to 0.3.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.2.2...v0.3.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9fdcd6474..1b8395a19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -270,7 +270,7 @@ dev = [ "pytest==8.0.2", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.2.2", + "ruff==0.3.0", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From 17d8a7de58bea6c48b968586170e9c89b141de3c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 1 Mar 2024 11:07:02 +0000 Subject: [PATCH 127/641] Run ruff format . --- src/vws/exceptions/cloud_reco_exceptions.py | 1 - src/vws/exceptions/custom_exceptions.py | 1 - src/vws/include_target_data.py | 1 - 3 files changed, 3 deletions(-) diff --git a/src/vws/exceptions/cloud_reco_exceptions.py b/src/vws/exceptions/cloud_reco_exceptions.py index 625f91c1d..ef5ab3218 100644 --- a/src/vws/exceptions/cloud_reco_exceptions.py +++ b/src/vws/exceptions/cloud_reco_exceptions.py @@ -2,7 +2,6 @@ Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs. """ - from vws.exceptions.base_exceptions import CloudRecoException diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index dfc0cf575..5a1868b5a 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -4,7 +4,6 @@ or simple errors given by the cloud recognition service. """ - from .response import Response diff --git a/src/vws/include_target_data.py b/src/vws/include_target_data.py index bff82c926..0083ceeed 100644 --- a/src/vws/include_target_data.py +++ b/src/vws/include_target_data.py @@ -2,7 +2,6 @@ Tools for managing ``CloudRecoService.query``'s ``include_target_data``. """ - from enum import StrEnum, auto From 26b5d4246f52a1af69782991109a6e0c81009886 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 3 Mar 2024 08:22:35 +0000 Subject: [PATCH 128/641] Use HTTPMethod constants in more places --- src/vws/query.py | 4 ++-- src/vws/vws.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index ffeedfc12..8baaaa5a0 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -6,7 +6,7 @@ import datetime import json -from http import HTTPStatus +from http import HTTPMethod, HTTPStatus from typing import Any, BinaryIO from urllib.parse import urljoin @@ -116,7 +116,7 @@ def query( date = rfc_1123_date() request_path = "/v1/query" content, content_type_header = encode_multipart_formdata(fields=body) - method = "POST" + method = HTTPMethod.POST authorization_string = authorization_header( access_key=self._client_access_key, diff --git a/src/vws/vws.py b/src/vws/vws.py index 278f3a2b2..c99e7bef8 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -8,7 +8,7 @@ import json import time from datetime import date -from http import HTTPStatus +from http import HTTPMethod, HTTPStatus from typing import TYPE_CHECKING, BinaryIO from urllib.parse import urljoin @@ -306,7 +306,7 @@ def add_target( content = bytes(json.dumps(data), encoding="utf-8") response = self._make_request( - method="POST", + method=HTTPMethod.POST, content=content, request_path="/targets", expected_result_code="TargetCreated", @@ -343,7 +343,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: limiting access. """ response = self._make_request( - method="GET", + method=HTTPMethod.GET, content=b"", request_path=f"/targets/{target_id}", expected_result_code="Success", @@ -439,7 +439,7 @@ def list_targets(self) -> list[str]: limiting access. """ response = self._make_request( - method="GET", + method=HTTPMethod.GET, content=b"", request_path="/targets", expected_result_code="Success", @@ -476,7 +476,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: limiting access. """ response = self._make_request( - method="GET", + method=HTTPMethod.GET, content=b"", request_path=f"/summary/{target_id}", expected_result_code="Success", @@ -519,7 +519,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: limiting access. """ response = self._make_request( - method="GET", + method=HTTPMethod.GET, content=b"", request_path="/summary", expected_result_code="Success", @@ -569,7 +569,7 @@ def delete_target(self, target_id: str) -> None: limiting access. """ self._make_request( - method="DELETE", + method=HTTPMethod.DELETE, content=b"", request_path=f"/targets/{target_id}", expected_result_code="Success", @@ -606,7 +606,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: limiting access. """ response = self._make_request( - method="GET", + method=HTTPMethod.GET, content=b"", request_path=f"/duplicates/{target_id}", expected_result_code="Success", @@ -690,7 +690,7 @@ def update_target( content = bytes(json.dumps(data), encoding="utf-8") self._make_request( - method="PUT", + method=HTTPMethod.PUT, content=content, request_path=f"/targets/{target_id}", expected_result_code="Success", From e541fd047c3acbd209102deeceb1f02321b6a94b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 3 Mar 2024 10:16:01 +0000 Subject: [PATCH 129/641] Use new uv --system flag for simpler GitHub Actions --- .github/workflows/ci.yml | 6 +----- .github/workflows/windows-ci.yml | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2024ed932..2a1fd129d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,18 +33,14 @@ jobs: - name: "Install dependencies" run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv /home/runner/.venv - source /home/runner/.venv/bin/activate - uv pip install --upgrade --editable .[dev] + uv pip install --system --upgrade --editable .[dev] - name: "Lint" run: | - source /home/runner/.venv/bin/activate make lint - name: "Run tests" run: | - source /home/runner/.venv/bin/activate # We run tests against "." and not the tests directory as we test the README # and documentation. pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index a9ad24e79..16bf4706a 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -33,13 +33,10 @@ jobs: - name: "Install dependencies" run: | irm https://astral.sh/uv/install.ps1 | iex - uv venv C:/Users/runner/.venv - C:/Users/runner/.venv/Scripts/Activate.ps1 - uv pip install --upgrade --editable .[dev] + uv pip install --system --upgrade --editable .[dev] - name: "Run tests" run: | - C:/Users/runner/.venv/Scripts/Activate.ps1 # We run tests against "." and not the tests directory as we test the README # and documentation. python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 61da3e24f7f51119794623232741bf060295f122 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:41:18 +0000 Subject: [PATCH 130/641] Bump pytest from 8.0.2 to 8.1.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.2 to 8.1.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.0.2...8.1.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1b8395a19..910a58190 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -267,7 +267,7 @@ dev = [ "pyproject-fmt==1.7.0", "pyright==1.1.352", "pyroma==4.2", - "pytest==8.0.2", + "pytest==8.1.0", "pytest-cov==4.1", "PyYAML==6.0.1", "ruff==0.3.0", From 2bdb3d8f4ef2cb4d015698c1b17a7960001d3655 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 5 Mar 2024 12:16:26 +0000 Subject: [PATCH 131/641] Revert "Bump pytest from 8.0.2 to 8.1.0" --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 910a58190..1b8395a19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -267,7 +267,7 @@ dev = [ "pyproject-fmt==1.7.0", "pyright==1.1.352", "pyroma==4.2", - "pytest==8.1.0", + "pytest==8.0.2", "pytest-cov==4.1", "PyYAML==6.0.1", "ruff==0.3.0", From 503d58d5089105812b6f4e6e92545121726a1ead Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:23:49 +0000 Subject: [PATCH 132/641] Bump uv from 0.1.13 to 0.1.14 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.13 to 0.1.14. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.13...0.1.14) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1b8395a19..59ce73b8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.13", + "uv==0.1.14", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From ca5dca748b7fdfe371a5851223500d5c764a8729 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 10:55:16 +0000 Subject: [PATCH 133/641] Bump uv from 0.1.14 to 0.1.15 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.14 to 0.1.15. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.14...0.1.15) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 59ce73b8a..8ba07c0b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.14", + "uv==0.1.15", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 50b13972d709f55d00ea94f84a6317d0afbe8958 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:36:13 +0000 Subject: [PATCH 134/641] Bump ruff from 0.3.0 to 0.3.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.0 to 0.3.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.0...v0.3.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8ba07c0b4..772a6739d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -270,7 +270,7 @@ dev = [ "pytest==8.0.2", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.3.0", + "ruff==0.3.1", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From e8691657fd019ed9d055653e5a4974ad5aea9439 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:23:32 +0000 Subject: [PATCH 135/641] Bump pyright from 1.1.352 to 1.1.353 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.352 to 1.1.353. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.352...v1.1.353) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 772a6739d..61a2da9d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,7 +265,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.7.0", - "pyright==1.1.352", + "pyright==1.1.353", "pyroma==4.2", "pytest==8.0.2", "pytest-cov==4.1", From cdd29d2a663f80dd995c11bdd990602b01fba8a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:28:11 +0000 Subject: [PATCH 136/641] Bump uv from 0.1.15 to 0.1.16 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.15 to 0.1.16. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.15...0.1.16) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 61a2da9d4..f7c30204e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240218", - "uv==0.1.15", + "uv==0.1.16", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From d6bd5410e97fcf3baf295b12a8a6b2f8d247bf2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:49:05 +0000 Subject: [PATCH 137/641] Bump types-requests from 2.31.0.20240218 to 2.31.0.20240311 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.20240218 to 2.31.0.20240311. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f7c30204e..7dd531f89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -276,7 +276,7 @@ dev = [ "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.0.3", - "types-requests==2.31.0.20240218", + "types-requests==2.31.0.20240311", "uv==0.1.16", "vulture==2.11", "VWS-Python-Mock==2024.2.16", From 3e658f648943ca9ed2295b5c721ad6c0c3bd3c29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:53:38 +0000 Subject: [PATCH 138/641] Bump mypy from 1.8.0 to 1.9.0 Bumps [mypy](https://github.com/python/mypy) from 1.8.0 to 1.9.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.8.0...1.9.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7dd531f89..e3ce6ff6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -259,7 +259,7 @@ dev = [ "doc8==1.1.1", "freezegun==1.4.0", "furo==2024.1.29", - "mypy==1.8.0", + "mypy==1.9.0", "pydocstyle==6.3", "pyenchant==3.2.2", "Pygments==2.17.2", From 2a69b9db7b089109661ec8a78908bde24c1e4daf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:58:11 +0000 Subject: [PATCH 139/641] Bump ruff from 0.3.1 to 0.3.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.1 to 0.3.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.1...v0.3.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e3ce6ff6f..2134c2218 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -270,7 +270,7 @@ dev = [ "pytest==8.0.2", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.3.1", + "ruff==0.3.2", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From 75f36cef8ed83f1bb5eacf220077795c305de3a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:01:57 +0000 Subject: [PATCH 140/641] Bump mathieudutour/github-tag-action from 6.1 to 6.2 Bumps [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action) from 6.1 to 6.2. - [Release notes](https://github.com/mathieudutour/github-tag-action/releases) - [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.1...v6.2) --- updated-dependencies: - dependency-name: mathieudutour/github-tag-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80877b4bd..3f9a139a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,7 +62,7 @@ jobs: - name: Bump version and push tag id: tag_version - uses: mathieudutour/github-tag-action@v6.1 + uses: mathieudutour/github-tag-action@v6.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} custom_tag: ${{ steps.calver.outputs.release }} From 6649b96bdf54986e92a478a5a4b25b2511972bd3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:02:52 +0000 Subject: [PATCH 141/641] Bump pytest from 8.0.2 to 8.1.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.2 to 8.1.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.0.2...8.1.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2134c2218..e06729275 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -267,7 +267,7 @@ dev = [ "pyproject-fmt==1.7.0", "pyright==1.1.353", "pyroma==4.2", - "pytest==8.0.2", + "pytest==8.1.1", "pytest-cov==4.1", "PyYAML==6.0.1", "ruff==0.3.2", From bca90b688123a4824dbe3a134cd64664ec4f3f2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:07:33 +0000 Subject: [PATCH 142/641] Bump uv from 0.1.16 to 0.1.17 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.16 to 0.1.17. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.16...0.1.17) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e06729275..78d124c36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240311", - "uv==0.1.16", + "uv==0.1.17", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 577d560e8c27a5e373bb01ab8eb64d55869e9bb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:02:25 +0000 Subject: [PATCH 143/641] Bump uv from 0.1.17 to 0.1.18 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.17 to 0.1.18. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.17...0.1.18) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 78d124c36..1e4b48ae2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240311", - "uv==0.1.17", + "uv==0.1.18", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From c5ac9d56f23c468062defeb13a5d93ed1b7ba94b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:06:57 +0000 Subject: [PATCH 144/641] Bump deptry from 0.12.0 to 0.13.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.12.0 to 0.13.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.12.0...0.13.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1e4b48ae2..1d5d4f3f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,7 +255,7 @@ dependencies = [ dev = [ "actionlint-py==1.6.26.11", "check-manifest==0.49", - "deptry==0.12.0", + "deptry==0.13.0", "doc8==1.1.1", "freezegun==1.4.0", "furo==2024.1.29", From cc2ab1ff134bf8f32ac9280104b5347a52e9a795 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:35:34 +0000 Subject: [PATCH 145/641] Bump pyright from 1.1.353 to 1.1.354 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.353 to 1.1.354. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.353...v1.1.354) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d5d4f3f8..41c9e95c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,7 +265,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.7.0", - "pyright==1.1.353", + "pyright==1.1.354", "pyroma==4.2", "pytest==8.1.1", "pytest-cov==4.1", From 23a52f5c7d6ab950ae6e14aa0f89446017ea98b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:40:14 +0000 Subject: [PATCH 146/641] Bump uv from 0.1.18 to 0.1.20 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.18 to 0.1.20. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.18...0.1.20) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 41c9e95c1..a711e3a0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240311", - "uv==0.1.18", + "uv==0.1.20", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From be3263ecdd1037a9502b61f1e50d7b157e6e57ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:38:35 +0000 Subject: [PATCH 147/641] Bump deptry from 0.13.0 to 0.14.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.13.0...0.14.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a711e3a0f..af632811f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,7 +255,7 @@ dependencies = [ dev = [ "actionlint-py==1.6.26.11", "check-manifest==0.49", - "deptry==0.13.0", + "deptry==0.14.0", "doc8==1.1.1", "freezegun==1.4.0", "furo==2024.1.29", From 4150fbc3cc10efc8f5febb046cf735c737635c19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:43:38 +0000 Subject: [PATCH 148/641] Bump uv from 0.1.20 to 0.1.21 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.20 to 0.1.21. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.20...0.1.21) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index af632811f..df86ce135 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240311", - "uv==0.1.20", + "uv==0.1.21", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From c887f9de66a4977cad06ca63c8b3f50734e111ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 10:33:53 +0000 Subject: [PATCH 149/641] Bump ruff from 0.3.2 to 0.3.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.2 to 0.3.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.2...v0.3.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index df86ce135..86b76b07b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -270,7 +270,7 @@ dev = [ "pytest==8.1.1", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.3.2", + "ruff==0.3.3", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From 2e30602a7d7f5d018f08c48db647c3f33270d9c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:59:47 +0000 Subject: [PATCH 150/641] Bump deptry from 0.14.0 to 0.14.2 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.14.0 to 0.14.2. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/0.14.2/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.14.0...0.14.2) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 86b76b07b..77349ca15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,7 +255,7 @@ dependencies = [ dev = [ "actionlint-py==1.6.26.11", "check-manifest==0.49", - "deptry==0.14.0", + "deptry==0.14.2", "doc8==1.1.1", "freezegun==1.4.0", "furo==2024.1.29", From bd9d4f25ddb20d40eef4bc7161d6b0a5a3b4edfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:06:03 +0000 Subject: [PATCH 151/641] Bump uv from 0.1.21 to 0.1.22 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.21 to 0.1.22. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.21...0.1.22) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 77349ca15..228c5c670 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240311", - "uv==0.1.21", + "uv==0.1.22", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 1f077e9d2b46d838dd746f9c3a606ff36b8b17bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:00:18 +0000 Subject: [PATCH 152/641] Bump pyright from 1.1.354 to 1.1.355 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.354 to 1.1.355. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.354...v1.1.355) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 228c5c670..4e6d9b9ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,7 +265,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.7.0", - "pyright==1.1.354", + "pyright==1.1.355", "pyroma==4.2", "pytest==8.1.1", "pytest-cov==4.1", From 2e8e8380c2e5be42b652af497551f00ad1088776 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:10:44 +0000 Subject: [PATCH 153/641] Bump actionlint-py from 1.6.26.11 to 1.6.27.12 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.6.26.11 to 1.6.27.12. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.6.26.11...v1.6.27.12) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4e6d9b9ba..53d13c662 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -253,7 +253,7 @@ dependencies = [ ] [project.optional-dependencies] dev = [ - "actionlint-py==1.6.26.11", + "actionlint-py==1.6.27.12", "check-manifest==0.49", "deptry==0.14.2", "doc8==1.1.1", From 44ee48bac4ba62a6ce883a56591070ae4f452db3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:15:36 +0000 Subject: [PATCH 154/641] Bump uv from 0.1.22 to 0.1.23 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.22 to 0.1.23. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.22...0.1.23) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 53d13c662..593a08860 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240311", - "uv==0.1.22", + "uv==0.1.23", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 3ba003468a755725027dafc3ae7d3f8ce9ce755a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:34:46 +0000 Subject: [PATCH 155/641] Bump dependabot/fetch-metadata from 1 to 2 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1 to 2. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v1...v2) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml index 0f484eebe..1c75ca282 100644 --- a/.github/workflows/dependabot-merge.yml +++ b/.github/workflows/dependabot-merge.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1 + uses: dependabot/fetch-metadata@v2 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Enable auto-merge for Dependabot PRs From 67b983eb14b104cb60a88e2cdef16102a9bcd0ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:05:23 +0000 Subject: [PATCH 156/641] Bump ruff from 0.3.3 to 0.3.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.3 to 0.3.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.3...v0.3.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 593a08860..6ecd90137 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -270,7 +270,7 @@ dev = [ "pytest==8.1.1", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.3.3", + "ruff==0.3.4", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From ede86fa791ea634b06fb3f6d4d6a9a493246414b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:06:26 +0000 Subject: [PATCH 157/641] Bump deptry from 0.14.2 to 0.15.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.14.2 to 0.15.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.14.2...0.15.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6ecd90137..c7c94acd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,7 +255,7 @@ dependencies = [ dev = [ "actionlint-py==1.6.27.12", "check-manifest==0.49", - "deptry==0.14.2", + "deptry==0.15.0", "doc8==1.1.1", "freezegun==1.4.0", "furo==2024.1.29", From fcc5d12bc1d0caa7c54cf3daf5a60f17355c595f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:10:48 +0000 Subject: [PATCH 158/641] Bump pytest-cov from 4.1 to 5.0.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 4.1 to 5.0.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v4.1.0...v5.0.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c7c94acd5..a2360a4b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -268,7 +268,7 @@ dev = [ "pyright==1.1.355", "pyroma==4.2", "pytest==8.1.1", - "pytest-cov==4.1", + "pytest-cov==5.0.0", "PyYAML==6.0.1", "ruff==0.3.4", "Sphinx==7.2.6", From 497fd8ac3454ee6e27a86b157c3431152b79f1e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:19:06 +0000 Subject: [PATCH 159/641] Bump uv from 0.1.23 to 0.1.24 Bumps [uv](https://github.com/astral-sh/uv) from 0.1.23 to 0.1.24. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/uv/compare/0.1.23...0.1.24) --- updated-dependencies: - dependency-name: uv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a2360a4b6..c3d1e3a34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240311", - "uv==0.1.23", + "uv==0.1.24", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 2d127d0b8fd88d7c43da84ed7f02ee1fb4ee462e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 26 Mar 2024 10:29:58 +0000 Subject: [PATCH 160/641] Simplify deptry setup by using new pep621_dev_dependency_groups option --- lint.mk | 5 +---- pyproject.toml | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lint.mk b/lint.mk index f4d98eab8..90f69bc62 100644 --- a/lint.mk +++ b/lint.mk @@ -32,10 +32,7 @@ TEMPFILE:= $(shell mktemp) .PHONY: deptry deptry: - uv pip compile --no-deps pyproject.toml > $(TEMPFILE) - mv pyproject.toml pyproject.bak.toml - deptry --requirements-txt=$(TEMPFILE) src/ || (mv pyproject.bak.toml pyproject.toml && exit 1) - mv pyproject.bak.toml pyproject.toml + deptry src/ .PHONY: pylint pylint: diff --git a/pyproject.toml b/pyproject.toml index c3d1e3a34..a8a218900 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,6 @@ dev = [ "sphinxcontrib-spelling==8", "sybil==6.0.3", "types-requests==2.31.0.20240311", - "uv==0.1.24", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", @@ -305,3 +304,6 @@ keep_full_version = true reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" + +[tool.deptry] +pep621_dev_dependency_groups = ["dev"] From b532172bc81519411663aabcac082f9baaf7c046 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 10:59:39 +0000 Subject: [PATCH 161/641] Bump pyright from 1.1.355 to 1.1.356 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.355 to 1.1.356. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.355...v1.1.356) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a8a218900..1411d2cd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,7 +265,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.7.0", - "pyright==1.1.355", + "pyright==1.1.356", "pyroma==4.2", "pytest==8.1.1", "pytest-cov==5.0.0", From c3e69ce62def5b21c3686b2d42ded047c6f10dd7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 30 Mar 2024 06:14:12 +0000 Subject: [PATCH 162/641] Check wheel contents after creation --- .github/workflows/release.yml | 1 + lint.mk | 2 -- pyproject.toml | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f9a139a9..2d92b7124 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,6 +83,7 @@ jobs: git checkout "$(git describe --tags "$(git rev-list --tags --max-count=1)")" python -m pip install build python -m build --sdist --wheel --outdir dist/ . + check-wheel-contents dist/*.whl # We use PyPI trusted publishing rather than a PyPI API token. # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. diff --git a/lint.mk b/lint.mk index 90f69bc62..afd33149f 100644 --- a/lint.mk +++ b/lint.mk @@ -28,8 +28,6 @@ fix-ruff: ruff check --fix . ruff format . -TEMPFILE:= $(shell mktemp) - .PHONY: deptry deptry: deptry src/ diff --git a/pyproject.toml b/pyproject.toml index a8a218900..a7ee2b519 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,6 +255,7 @@ dependencies = [ dev = [ "actionlint-py==1.6.27.12", "check-manifest==0.49", + "check-wheel-contents==0.6.0", "deptry==0.15.0", "doc8==1.1.1", "freezegun==1.4.0", From 528bd5cfc825b16759a5219981d54f20acd734b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:33:17 +0000 Subject: [PATCH 163/641] Bump ruff from 0.3.4 to 0.3.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.4 to 0.3.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.4...v0.3.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a4a8fcddc..bfb0fa66b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -271,7 +271,7 @@ dev = [ "pytest==8.1.1", "pytest-cov==5.0.0", "PyYAML==6.0.1", - "ruff==0.3.4", + "ruff==0.3.5", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From 0ecb22b6441cc59a00861a00a46d9d81df0927f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:38:10 +0000 Subject: [PATCH 164/641] Bump types-requests from 2.31.0.20240311 to 2.31.0.20240402 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.20240311 to 2.31.0.20240402. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bfb0fa66b..4755bde34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.0.3", - "types-requests==2.31.0.20240311", + "types-requests==2.31.0.20240402", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 7c9cb7d8254b1af5a83c78c5f95064d66732dac8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:18:29 +0000 Subject: [PATCH 165/641] Bump types-requests from 2.31.0.20240402 to 2.31.0.20240403 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.20240402 to 2.31.0.20240403. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4755bde34..ae33c9580 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.0.3", - "types-requests==2.31.0.20240402", + "types-requests==2.31.0.20240403", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From b24d800de702c59b87396de82fa7d5d5aae8d9d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:50:01 +0000 Subject: [PATCH 166/641] Bump pyright from 1.1.356 to 1.1.357 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.356 to 1.1.357. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.356...v1.1.357) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ae33c9580..9502aec05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -266,7 +266,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.7.0", - "pyright==1.1.356", + "pyright==1.1.357", "pyroma==4.2", "pytest==8.1.1", "pytest-cov==5.0.0", From 8f6993236c7732743f9d39d92ef2c4634dd51e09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:59:29 +0000 Subject: [PATCH 167/641] Bump deptry from 0.15.0 to 0.16.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.15.0 to 0.16.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.15.0...0.16.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9502aec05..ace926272 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "actionlint-py==1.6.27.12", "check-manifest==0.49", "check-wheel-contents==0.6.0", - "deptry==0.15.0", + "deptry==0.16.0", "doc8==1.1.1", "freezegun==1.4.0", "furo==2024.1.29", From e8eae1082ece4519d49bd9a25dab6af3d14a0e2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 10:57:34 +0000 Subject: [PATCH 168/641] Bump actionlint-py from 1.6.27.12 to 1.6.27.13 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.6.27.12 to 1.6.27.13. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.6.27.12...v1.6.27.13) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ace926272..7801de827 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -253,7 +253,7 @@ dependencies = [ ] [project.optional-dependencies] dev = [ - "actionlint-py==1.6.27.12", + "actionlint-py==1.6.27.13", "check-manifest==0.49", "check-wheel-contents==0.6.0", "deptry==0.16.0", From ec599db87ff975d9d31b25dbf323fd21af311867 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:02:07 +0000 Subject: [PATCH 169/641] Bump types-requests from 2.31.0.20240403 to 2.31.0.20240406 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.20240403 to 2.31.0.20240406. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7801de827..47c41555a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,7 +277,7 @@ dev = [ "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.0.3", - "types-requests==2.31.0.20240403", + "types-requests==2.31.0.20240406", "vulture==2.11", "VWS-Python-Mock==2024.2.16", "VWS-Test-Fixtures==2023.3.5", From 6dd51c2fbad2f9e9233d4471c6528a16b04bcfea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:06:52 +0000 Subject: [PATCH 170/641] Bump deptry from 0.16.0 to 0.16.1 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.16.0 to 0.16.1. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.16.0...0.16.1) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 47c41555a..55d77f556 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "actionlint-py==1.6.27.13", "check-manifest==0.49", "check-wheel-contents==0.6.0", - "deptry==0.16.0", + "deptry==0.16.1", "doc8==1.1.1", "freezegun==1.4.0", "furo==2024.1.29", From ff81b735ff56cf786e85e61e1c916cac65d43de5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 10:25:24 +0000 Subject: [PATCH 171/641] Bump pyright from 1.1.357 to 1.1.358 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.357 to 1.1.358. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.357...v1.1.358) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 55d77f556..058268710 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -266,7 +266,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.7.0", - "pyright==1.1.357", + "pyright==1.1.358", "pyroma==4.2", "pytest==8.1.1", "pytest-cov==5.0.0", From fc8dd66dd0c89e93ee0854511ffe44b526078b8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:11:56 +0000 Subject: [PATCH 172/641] Bump ruff from 0.3.5 to 0.3.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.5 to 0.3.7. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.5...v0.3.7) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 058268710..a2c7ff437 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -271,7 +271,7 @@ dev = [ "pytest==8.1.1", "pytest-cov==5.0.0", "PyYAML==6.0.1", - "ruff==0.3.5", + "ruff==0.3.7", "Sphinx==7.2.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From 8c753b5fde3fc6faf2fa95a8a594c5fa3f1b848e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:29:05 +0000 Subject: [PATCH 173/641] Bump sphinx from 7.2.6 to 7.3.5 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.6 to 7.3.5. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.6...v7.3.5) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a2c7ff437..006b32c52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -272,7 +272,7 @@ dev = [ "pytest-cov==5.0.0", "PyYAML==6.0.1", "ruff==0.3.7", - "Sphinx==7.2.6", + "Sphinx==7.3.5", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", From cf35345e1c6182000bcc1027f746b1f6ec518c61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:28:52 +0000 Subject: [PATCH 174/641] Bump sphinx from 7.3.5 to 7.3.6 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.3.5 to 7.3.6. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.3.5...v7.3.6) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 006b32c52..4c3835aa7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -272,7 +272,7 @@ dev = [ "pytest-cov==5.0.0", "PyYAML==6.0.1", "ruff==0.3.7", - "Sphinx==7.3.5", + "Sphinx==7.3.6", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", From 20f974ab9b497aaf79db6851bda3449b32916444 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:33:33 +0000 Subject: [PATCH 175/641] Bump pyproject-fmt from 1.7.0 to 1.8.0 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/1.7.0...1.8.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4c3835aa7..3538eb580 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,7 +265,7 @@ dev = [ "pyenchant==3.2.2", "Pygments==2.17.2", "pylint==3.1.0", - "pyproject-fmt==1.7.0", + "pyproject-fmt==1.8.0", "pyright==1.1.358", "pyroma==4.2", "pytest==8.1.1", From c517f8d5f202d2f9f92242849fca1b23ab8146f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:38:16 +0000 Subject: [PATCH 176/641] Bump pyright from 1.1.358 to 1.1.359 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.358 to 1.1.359. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.358...v1.1.359) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3538eb580..17dbd5c6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -266,7 +266,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.8.0", - "pyright==1.1.358", + "pyright==1.1.359", "pyroma==4.2", "pytest==8.1.1", "pytest-cov==5.0.0", From ae5073448000ec3a98c3eae3554278250ea26da4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 19 Apr 2024 11:22:38 +0100 Subject: [PATCH 177/641] Enforce Google style docstrings with ruff --- pyproject.toml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 17dbd5c6a..1869814cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -187,17 +187,9 @@ ignore = [ "COM812", # Allow our chosen docstring line-style - no one-line summary. "D200", - "D203", "D205", "D212", - "D213", - # It is too much work to make every docstring imperative. - "D401", - # We ignore some docstyle errors which do not apply to Google style - # docstrings. - "D406", - "D407", - "D413", + "D415", # Ruff warns that this conflicts with the formatter. "ISC001", # We have an existing interface to support and so we do not want to change @@ -217,6 +209,9 @@ ignore = [ # is sometimes annoyingly removed. unfixable = ["ERA001"] +[tool.ruff.lint.pydocstyle] +convention = "google" + [tool.ruff.lint.per-file-ignores] "tests/test_*.py" = [ # Do not require tests to have a one-line summary. From f400cc251c4bcde7baa47cb4499087f9b72c0204 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:50:00 +0000 Subject: [PATCH 178/641] Bump sphinx from 7.3.6 to 7.3.7 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.3.6 to 7.3.7. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.3.6...v7.3.7) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1869814cf..0d2d9ebe7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -267,7 +267,7 @@ dev = [ "pytest-cov==5.0.0", "PyYAML==6.0.1", "ruff==0.3.7", - "Sphinx==7.3.6", + "Sphinx==7.3.7", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", From d89582204c811b3b38b03c1db84bf13502433c1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:55:15 +0000 Subject: [PATCH 179/641] Bump ruff from 0.3.7 to 0.4.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.7 to 0.4.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.7...v0.4.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0d2d9ebe7..1fef38a8c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -266,7 +266,7 @@ dev = [ "pytest==8.1.1", "pytest-cov==5.0.0", "PyYAML==6.0.1", - "ruff==0.3.7", + "ruff==0.4.0", "Sphinx==7.3.7", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From 19b6bbf7de26c749e11102f9c87b6a75d4c751fa Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 19 Apr 2024 13:26:42 +0100 Subject: [PATCH 180/641] Check for and resolve Ruff S311 --- pyproject.toml | 2 -- tests/test_vws.py | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1fef38a8c..261358721 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -200,8 +200,6 @@ ignore = [ "PLR0913", # Allow 'assert' as we use it for tests. "S101", - # Allow simple random numbers as we are not using them for cryptography. - "S311", ] # Do not automatically remove commented out code. diff --git a/tests/test_vws.py b/tests/test_vws.py index 7c148cf29..b49cc42a1 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -6,7 +6,7 @@ import base64 import datetime -import random +import secrets import uuid from typing import TYPE_CHECKING, BinaryIO @@ -506,7 +506,7 @@ def test_update_target( It is possible to update a target. """ old_name = uuid.uuid4().hex - old_width = random.uniform(a=0.01, b=50) + old_width = secrets.choice(seq=range(1, 5000)) / 100 target_id = vws_client.add_target( name=old_name, width=old_width, @@ -523,7 +523,7 @@ def test_update_target( assert query_metadata is None new_name = uuid.uuid4().hex - new_width = random.uniform(a=0.01, b=50) + new_width = secrets.choice(seq=range(1, 5000)) / 100 new_application_metadata = base64.b64encode(b"a").decode("ascii") vws_client.update_target( target_id=target_id, From 5714d894de3ce6b75ba42d07634d0a70c299b7c8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 19 Apr 2024 13:37:38 +0100 Subject: [PATCH 181/641] Check for and resolve Ruff N818 --- CHANGELOG.rst | 2 + pyproject.toml | 3 - src/vws/exceptions/base_exceptions.py | 4 +- src/vws/exceptions/cloud_reco_exceptions.py | 12 +-- src/vws/exceptions/custom_exceptions.py | 6 +- src/vws/exceptions/vws_exceptions.py | 36 ++++---- src/vws/query.py | 52 ++++++------ src/vws/vws.py | 94 ++++++++++----------- tests/test_cloud_reco_exceptions.py | 34 ++++---- tests/test_vws.py | 4 +- tests/test_vws_exceptions.py | 94 +++++++++++---------- 11 files changed, 171 insertions(+), 170 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ddd3ed91a..de5765df6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Breaking change: Exception names now end with ``Error``. + 2024.02.19 ------------ diff --git a/pyproject.toml b/pyproject.toml index 1fef38a8c..c4d7fa8a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -192,9 +192,6 @@ ignore = [ "D415", # Ruff warns that this conflicts with the formatter. "ISC001", - # We have an existing interface to support and so we do not want to change - # exception names. - "N818", # Ignore "too-many-*" errors as they seem to get in the way more than # helping. "PLR0913", diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 044c2b017..6558242c5 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -11,7 +11,7 @@ from .response import Response -class CloudRecoException(Exception): +class CloudRecoError(Exception): """ Base class for Vuforia Cloud Recognition Web API exceptions. """ @@ -32,7 +32,7 @@ def response(self) -> Response: return self._response -class VWSException(Exception): +class VWSError(Exception): """ Base class for Vuforia Web Services errors. diff --git a/src/vws/exceptions/cloud_reco_exceptions.py b/src/vws/exceptions/cloud_reco_exceptions.py index ef5ab3218..26c6fb097 100644 --- a/src/vws/exceptions/cloud_reco_exceptions.py +++ b/src/vws/exceptions/cloud_reco_exceptions.py @@ -2,38 +2,38 @@ Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs. """ -from vws.exceptions.base_exceptions import CloudRecoException +from vws.exceptions.base_exceptions import CloudRecoError -class MaxNumResultsOutOfRange(CloudRecoException): +class MaxNumResultsOutOfRangeError(CloudRecoError): """ Exception raised when the ``max_num_results`` given to the Cloud Recognition Web API query endpoint is out of range. """ -class InactiveProject(CloudRecoException): +class InactiveProjectError(CloudRecoError): """ Exception raised when Vuforia returns a response with a result code 'InactiveProject'. """ -class BadImage(CloudRecoException): +class BadImageError(CloudRecoError): """ Exception raised when Vuforia returns a response with a result code 'BadImage'. """ -class AuthenticationFailure(CloudRecoException): +class AuthenticationFailureError(CloudRecoError): """ Exception raised when Vuforia returns a response with a result code 'AuthenticationFailure'. """ -class RequestTimeTooSkewed(CloudRecoException): +class RequestTimeTooSkewedError(CloudRecoError): """ Exception raised when Vuforia returns a response with a result code 'RequestTimeTooSkewed'. diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 5a1868b5a..1c7790cbf 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -7,7 +7,7 @@ from .response import Response -class OopsAnErrorOccurredPossiblyBadName(Exception): +class OopsAnErrorOccurredPossiblyBadNameError(Exception): """ Exception raised when VWS returns an HTML page which says "Oops, an error occurred". @@ -31,7 +31,7 @@ def response(self) -> Response: return self._response -class RequestEntityTooLarge(Exception): +class RequestEntityTooLargeError(Exception): """ Exception raised when the given image is too large. """ @@ -52,7 +52,7 @@ def response(self) -> Response: return self._response -class TargetProcessingTimeout(Exception): +class TargetProcessingTimeoutError(Exception): """ Exception raised when waiting for a target to be processed times out. """ diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index a43323380..9d00d7518 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -7,10 +7,10 @@ import json from urllib.parse import urlparse -from vws.exceptions.base_exceptions import VWSException +from vws.exceptions.base_exceptions import VWSError -class UnknownTarget(VWSException): +class UnknownTargetError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'UnknownTarget'. @@ -27,21 +27,21 @@ def target_id(self) -> str: return path.split(sep="/", maxsplit=2)[-1] -class Fail(VWSException): +class FailError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'Fail'. """ -class BadImage(VWSException): +class BadImageError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'BadImage'. """ -class AuthenticationFailure(VWSException): +class AuthenticationFailureError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'AuthenticationFailure'. @@ -49,14 +49,14 @@ class AuthenticationFailure(VWSException): # See https://github.com/VWS-Python/vws-python/issues/822. -class RequestQuotaReached(VWSException): # pragma: no cover +class RequestQuotaReachedError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code 'RequestQuotaReached'. """ -class TargetStatusProcessing(VWSException): +class TargetStatusProcessingError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'TargetStatusProcessing'. @@ -74,7 +74,7 @@ def target_id(self) -> str: # This is not simulated by the mock. -class DateRangeError(VWSException): # pragma: no cover +class DateRangeError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code 'DateRangeError'. @@ -82,7 +82,7 @@ class DateRangeError(VWSException): # pragma: no cover # This is not simulated by the mock. -class TargetQuotaReached(VWSException): # pragma: no cover +class TargetQuotaReachedError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code 'TargetQuotaReached'. @@ -90,7 +90,7 @@ class TargetQuotaReached(VWSException): # pragma: no cover # This is not simulated by the mock. -class ProjectSuspended(VWSException): # pragma: no cover +class ProjectSuspendedError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code 'ProjectSuspended'. @@ -98,35 +98,35 @@ class ProjectSuspended(VWSException): # pragma: no cover # This is not simulated by the mock. -class ProjectHasNoAPIAccess(VWSException): # pragma: no cover +class ProjectHasNoAPIAccessError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code 'ProjectHasNoAPIAccess'. """ -class ProjectInactive(VWSException): +class ProjectInactiveError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'ProjectInactive'. """ -class MetadataTooLarge(VWSException): +class MetadataTooLargeError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'MetadataTooLarge'. """ -class RequestTimeTooSkewed(VWSException): +class RequestTimeTooSkewedError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'RequestTimeTooSkewed'. """ -class TargetNameExist(VWSException): +class TargetNameExistError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'TargetNameExist'. @@ -142,14 +142,14 @@ def target_name(self) -> str: return str(request_json["name"]) -class ImageTooLarge(VWSException): +class ImageTooLargeError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'ImageTooLarge'. """ -class TargetStatusNotSuccess(VWSException): +class TargetStatusNotSuccessError(VWSError): """ Exception raised when Vuforia returns a response with a result code 'TargetStatusNotSuccess'. @@ -166,7 +166,7 @@ def target_id(self) -> str: return path.split(sep="/", maxsplit=2)[-1] -class TooManyRequests(VWSException): # pragma: no cover +class TooManyRequestsError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code 'TooManyRequests'. diff --git a/src/vws/query.py b/src/vws/query.py index 8baaaa5a0..ab04781da 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -15,14 +15,14 @@ from vws_auth_tools import authorization_header, rfc_1123_date from vws.exceptions.cloud_reco_exceptions import ( - AuthenticationFailure, - BadImage, - InactiveProject, - MaxNumResultsOutOfRange, - RequestTimeTooSkewed, + AuthenticationFailureError, + BadImageError, + InactiveProjectError, + MaxNumResultsOutOfRangeError, + RequestTimeTooSkewedError, ) from vws.exceptions.custom_exceptions import ( - RequestEntityTooLarge, + RequestEntityTooLargeError, ServerError, ) from vws.exceptions.response import Response @@ -84,21 +84,21 @@ def query( none (return no target_data), all (for all matched targets). Raises: - ~vws.exceptions.cloud_reco_exceptions.AuthenticationFailure: The - client access key pair is not correct. - ~vws.exceptions.cloud_reco_exceptions.MaxNumResultsOutOfRange: + ~vws.exceptions.cloud_reco_exceptions.AuthenticationFailureError: + The client access key pair is not correct. + ~vws.exceptions.cloud_reco_exceptions.MaxNumResultsOutOfRangeError: ``max_num_results`` is not within the range (1, 50). - ~vws.exceptions.cloud_reco_exceptions.InactiveProject: The project - is inactive. - ~vws.exceptions.cloud_reco_exceptions.RequestTimeTooSkewed: There - is an error with the time sent to Vuforia. - ~vws.exceptions.cloud_reco_exceptions.BadImage: There is a problem - with the given image. For example, it must be a JPEG or PNG - file in the grayscale or RGB color space. - ~vws.exceptions.custom_exceptions.RequestEntityTooLarge: The given - image is too large. - ~vws.exceptions.custom_exceptions.ServerError: There is an error - with Vuforia's servers. + ~vws.exceptions.cloud_reco_exceptions.InactiveProjectError: The + project is inactive. + ~vws.exceptions.cloud_reco_exceptions.RequestTimeTooSkewedError: + There is an error with the time sent to Vuforia. + ~vws.exceptions.cloud_reco_exceptions.BadImageError: There is a + problem with the given image. For example, it must be a JPEG or + PNG file in the grayscale or RGB color space. + ~vws.exceptions.custom_exceptions.RequestEntityTooLargeError: The + given image is too large. + ~vws.exceptions.custom_exceptions.ServerError: There is an + error with Vuforia's servers. Returns: An ordered list of target details of matching targets. @@ -152,10 +152,10 @@ def query( ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: - raise RequestEntityTooLarge(response=response) + raise RequestEntityTooLargeError(response=response) if "Integer out of range" in response.text: - raise MaxNumResultsOutOfRange(response=response) + raise MaxNumResultsOutOfRangeError(response=response) if ( response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR @@ -165,10 +165,10 @@ def query( result_code = json.loads(s=response.text)["result_code"] if result_code != "Success": exception = { - "AuthenticationFailure": AuthenticationFailure, - "BadImage": BadImage, - "InactiveProject": InactiveProject, - "RequestTimeTooSkewed": RequestTimeTooSkewed, + "AuthenticationFailure": AuthenticationFailureError, + "BadImage": BadImageError, + "InactiveProject": InactiveProjectError, + "RequestTimeTooSkewed": RequestTimeTooSkewedError, }[result_code] raise exception(response=response) diff --git a/src/vws/vws.py b/src/vws/vws.py index c99e7bef8..082767780 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -16,28 +16,28 @@ from vws_auth_tools import authorization_header, rfc_1123_date from vws.exceptions.custom_exceptions import ( - OopsAnErrorOccurredPossiblyBadName, + OopsAnErrorOccurredPossiblyBadNameError, ServerError, - TargetProcessingTimeout, + TargetProcessingTimeoutError, ) from vws.exceptions.vws_exceptions import ( - AuthenticationFailure, - BadImage, + AuthenticationFailureError, + BadImageError, DateRangeError, - Fail, - ImageTooLarge, - MetadataTooLarge, - ProjectHasNoAPIAccess, - ProjectInactive, - ProjectSuspended, - RequestQuotaReached, - RequestTimeTooSkewed, - TargetNameExist, - TargetQuotaReached, - TargetStatusNotSuccess, - TargetStatusProcessing, - TooManyRequests, - UnknownTarget, + FailError, + ImageTooLargeError, + MetadataTooLargeError, + ProjectHasNoAPIAccessError, + ProjectInactiveError, + ProjectSuspendedError, + RequestQuotaReachedError, + RequestTimeTooSkewedError, + TargetNameExistError, + TargetQuotaReachedError, + TargetStatusNotSuccessError, + TargetStatusProcessingError, + TooManyRequestsError, + UnknownTargetError, ) from vws.reports import ( DatabaseSummaryReport, @@ -194,13 +194,13 @@ def _make_request( ) if "Oops, an error occurred" in response.text: - raise OopsAnErrorOccurredPossiblyBadName(response=response) + raise OopsAnErrorOccurredPossiblyBadNameError(response=response) if ( response.status_code == HTTPStatus.TOO_MANY_REQUESTS ): # pragma: no cover # The Vuforia API returns a 429 response with no JSON body. - raise TooManyRequests(response=response) + raise TooManyRequestsError(response=response) if ( response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR @@ -213,22 +213,22 @@ def _make_request( return response exception = { - "AuthenticationFailure": AuthenticationFailure, - "BadImage": BadImage, + "AuthenticationFailure": AuthenticationFailureError, + "BadImage": BadImageError, "DateRangeError": DateRangeError, - "Fail": Fail, - "ImageTooLarge": ImageTooLarge, - "MetadataTooLarge": MetadataTooLarge, - "ProjectHasNoAPIAccess": ProjectHasNoAPIAccess, - "ProjectInactive": ProjectInactive, - "ProjectSuspended": ProjectSuspended, - "RequestQuotaReached": RequestQuotaReached, - "RequestTimeTooSkewed": RequestTimeTooSkewed, - "TargetNameExist": TargetNameExist, - "TargetQuotaReached": TargetQuotaReached, - "TargetStatusNotSuccess": TargetStatusNotSuccess, - "TargetStatusProcessing": TargetStatusProcessing, - "UnknownTarget": UnknownTarget, + "Fail": FailError, + "ImageTooLarge": ImageTooLargeError, + "MetadataTooLarge": MetadataTooLargeError, + "ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError, + "ProjectInactive": ProjectInactiveError, + "ProjectSuspended": ProjectSuspendedError, + "RequestQuotaReached": RequestQuotaReachedError, + "RequestTimeTooSkewed": RequestTimeTooSkewedError, + "TargetNameExist": TargetNameExistError, + "TargetQuotaReached": TargetQuotaReachedError, + "TargetStatusNotSuccess": TargetStatusNotSuccessError, + "TargetStatusProcessing": TargetStatusProcessingError, + "UnknownTarget": UnknownTargetError, }[result_code] raise exception(response=response) @@ -386,22 +386,22 @@ def wait_for_target_processed( target to be processed. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.custom_exceptions.TargetProcessingTimeout: The + ~vws.exceptions.custom_exceptions.TargetProcessingTimeoutError: The target remained in the processing stage for more than ``timeout_seconds`` seconds. - ~vws.exceptions.vws_exceptions.UnknownTarget: The given target ID - does not match a target in the database. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target + ID does not match a target in the database. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ start_time = time.monotonic() while True: @@ -411,7 +411,7 @@ def wait_for_target_processed( elapsed_time = time.monotonic() - start_time if elapsed_time > timeout_seconds: # pragma: no cover - raise TargetProcessingTimeout + raise TargetProcessingTimeoutError time.sleep(seconds_between_requests) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index ba063dece..4e8a70895 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -13,16 +13,16 @@ from mock_vws.database import VuforiaDatabase from mock_vws.states import States from vws import CloudRecoService -from vws.exceptions.base_exceptions import CloudRecoException +from vws.exceptions.base_exceptions import CloudRecoError from vws.exceptions.cloud_reco_exceptions import ( - AuthenticationFailure, - BadImage, - InactiveProject, - MaxNumResultsOutOfRange, - RequestTimeTooSkewed, + AuthenticationFailureError, + BadImageError, + InactiveProjectError, + MaxNumResultsOutOfRangeError, + RequestTimeTooSkewedError, ) from vws.exceptions.custom_exceptions import ( - RequestEntityTooLarge, + RequestEntityTooLargeError, ) if TYPE_CHECKING: @@ -37,7 +37,7 @@ def test_too_many_max_results( A ``MaxNumResultsOutOfRange`` error is raised if the given ``max_num_results`` is out of range. """ - with pytest.raises(MaxNumResultsOutOfRange) as exc: + with pytest.raises(MaxNumResultsOutOfRangeError) as exc: cloud_reco_client.query( image=high_quality_image, max_num_results=51, @@ -58,7 +58,7 @@ def test_image_too_large( A ``RequestEntityTooLarge`` exception is raised if an image which is too large is given. """ - with pytest.raises(RequestEntityTooLarge) as exc: + with pytest.raises(RequestEntityTooLargeError) as exc: cloud_reco_client.query(image=png_too_large) assert ( @@ -71,14 +71,14 @@ def test_cloudrecoexception_inheritance() -> None: CloudRecoService-specific exceptions inherit from CloudRecoException. """ subclasses = [ - MaxNumResultsOutOfRange, - InactiveProject, - BadImage, - AuthenticationFailure, - RequestTimeTooSkewed, + MaxNumResultsOutOfRangeError, + InactiveProjectError, + BadImageError, + AuthenticationFailureError, + RequestTimeTooSkewedError, ] for subclass in subclasses: - assert issubclass(subclass, CloudRecoException) + assert issubclass(subclass, CloudRecoError) def test_authentication_failure(high_quality_image: io.BytesIO) -> None: @@ -94,7 +94,7 @@ def test_authentication_failure(high_quality_image: io.BytesIO) -> None: with MockVWS() as mock: mock.add_database(database=database) - with pytest.raises(AuthenticationFailure) as exc: + with pytest.raises(AuthenticationFailureError) as exc: cloud_reco_client.query(image=high_quality_image) assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED @@ -113,7 +113,7 @@ def test_inactive_project(high_quality_image: io.BytesIO) -> None: client_secret_key=database.client_secret_key, ) - with pytest.raises(InactiveProject) as exc: + with pytest.raises(InactiveProjectError) as exc: cloud_reco_client.query(image=high_quality_image) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN diff --git a/tests/test_vws.py b/tests/test_vws.py index 7c148cf29..bfc1b7250 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -15,7 +15,7 @@ from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase from vws import VWS, CloudRecoService -from vws.exceptions.custom_exceptions import TargetProcessingTimeout +from vws.exceptions.custom_exceptions import TargetProcessingTimeoutError from vws.reports import ( DatabaseSummaryReport, TargetRecord, @@ -442,7 +442,7 @@ def test_custom_timeout(image: io.BytesIO) -> None: report = vws_client.get_target_summary_report(target_id=target_id) assert report.status == TargetStatuses.PROCESSING - with pytest.raises(TargetProcessingTimeout): + with pytest.raises(TargetProcessingTimeoutError): vws_client.wait_for_target_processed( target_id=target_id, timeout_seconds=0.1, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 469683f6c..b433c2754 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -12,25 +12,27 @@ from mock_vws.database import VuforiaDatabase from mock_vws.states import States from vws import VWS -from vws.exceptions.base_exceptions import VWSException -from vws.exceptions.custom_exceptions import OopsAnErrorOccurredPossiblyBadName +from vws.exceptions.base_exceptions import VWSError +from vws.exceptions.custom_exceptions import ( + OopsAnErrorOccurredPossiblyBadNameError, +) from vws.exceptions.vws_exceptions import ( - AuthenticationFailure, - BadImage, + AuthenticationFailureError, + BadImageError, DateRangeError, - Fail, - ImageTooLarge, - MetadataTooLarge, - ProjectHasNoAPIAccess, - ProjectInactive, - ProjectSuspended, - RequestQuotaReached, - RequestTimeTooSkewed, - TargetNameExist, - TargetQuotaReached, - TargetStatusNotSuccess, - TargetStatusProcessing, - UnknownTarget, + FailError, + ImageTooLargeError, + MetadataTooLargeError, + ProjectHasNoAPIAccessError, + ProjectInactiveError, + ProjectSuspendedError, + RequestQuotaReachedError, + RequestTimeTooSkewedError, + TargetNameExistError, + TargetQuotaReachedError, + TargetStatusNotSuccessError, + TargetStatusProcessingError, + UnknownTargetError, ) @@ -42,7 +44,7 @@ def test_image_too_large( When giving an image which is too large, an ``ImageTooLarge`` exception is raised. """ - with pytest.raises(ImageTooLarge) as exc: + with pytest.raises(ImageTooLargeError) as exc: vws_client.add_target( name="x", width=1, @@ -60,7 +62,7 @@ def test_invalid_given_id(vws_client: VWS) -> None: causes an ``UnknownTarget`` exception to be raised. """ target_id = "12345abc" - with pytest.raises(UnknownTarget) as exc: + with pytest.raises(UnknownTargetError) as exc: vws_client.delete_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.NOT_FOUND assert exc.value.target_id == target_id @@ -73,7 +75,7 @@ def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ max_char_value = 65535 bad_name = chr(max_char_value + 1) - with pytest.raises(OopsAnErrorOccurredPossiblyBadName) as exc: + with pytest.raises(OopsAnErrorOccurredPossiblyBadNameError) as exc: vws_client.add_target( name=bad_name, width=1, @@ -102,7 +104,7 @@ def test_fail(high_quality_image: io.BytesIO) -> None: server_secret_key=uuid.uuid4().hex, ) - with pytest.raises(Fail) as exc: + with pytest.raises(FailError) as exc: vws_client.add_target( name="x", width=1, @@ -119,7 +121,7 @@ def test_bad_image(vws_client: VWS) -> None: A ``BadImage`` exception is raised when a non-image is given. """ not_an_image = io.BytesIO(b"Not an image") - with pytest.raises(BadImage) as exc: + with pytest.raises(BadImageError) as exc: vws_client.add_target( name="x", width=1, @@ -146,7 +148,7 @@ def test_target_name_exist( active_flag=True, application_metadata=None, ) - with pytest.raises(TargetNameExist) as exc: + with pytest.raises(TargetNameExistError) as exc: vws_client.add_target( name="x", width=1, @@ -172,7 +174,7 @@ def test_project_inactive(high_quality_image: io.BytesIO) -> None: server_secret_key=database.server_secret_key, ) - with pytest.raises(ProjectInactive) as exc: + with pytest.raises(ProjectInactiveError) as exc: vws_client.add_target( name="x", width=1, @@ -200,7 +202,7 @@ def test_target_status_processing( application_metadata=None, ) - with pytest.raises(TargetStatusProcessing) as exc: + with pytest.raises(TargetStatusProcessingError) as exc: vws_client.delete_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN @@ -215,7 +217,7 @@ def test_metadata_too_large( A ``MetadataTooLarge`` exception is raised if the metadata given is too large. """ - with pytest.raises(MetadataTooLarge) as exc: + with pytest.raises(MetadataTooLargeError) as exc: vws_client.add_target( name="x", width=1, @@ -255,7 +257,7 @@ def test_request_time_too_skewed( # >= 1 ticks are acceptable. with ( freeze_time(auto_tick_seconds=time_difference_from_now), - pytest.raises(RequestTimeTooSkewed) as exc, + pytest.raises(RequestTimeTooSkewedError) as exc, ): vws_client.get_target_record(target_id=target_id) @@ -278,7 +280,7 @@ def test_authentication_failure(high_quality_image: io.BytesIO) -> None: with MockVWS() as mock: mock.add_database(database=database) - with pytest.raises(AuthenticationFailure) as exc: + with pytest.raises(AuthenticationFailureError) as exc: vws_client.add_target( name="x", width=1, @@ -306,7 +308,7 @@ def test_target_status_not_success( application_metadata=None, ) - with pytest.raises(TargetStatusNotSuccess) as exc: + with pytest.raises(TargetStatusNotSuccessError) as exc: vws_client.update_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN @@ -318,25 +320,25 @@ def test_vwsexception_inheritance() -> None: VWS-related exceptions should inherit from VWSException. """ subclasses = [ - AuthenticationFailure, - BadImage, + AuthenticationFailureError, + BadImageError, DateRangeError, - Fail, - ImageTooLarge, - MetadataTooLarge, - ProjectInactive, - ProjectHasNoAPIAccess, - ProjectSuspended, - RequestQuotaReached, - RequestTimeTooSkewed, - TargetNameExist, - TargetQuotaReached, - TargetStatusNotSuccess, - TargetStatusProcessing, - UnknownTarget, + FailError, + ImageTooLargeError, + MetadataTooLargeError, + ProjectInactiveError, + ProjectHasNoAPIAccessError, + ProjectSuspendedError, + RequestQuotaReachedError, + RequestTimeTooSkewedError, + TargetNameExistError, + TargetQuotaReachedError, + TargetStatusNotSuccessError, + TargetStatusProcessingError, + UnknownTargetError, ] for subclass in subclasses: - assert issubclass(subclass, VWSException) + assert issubclass(subclass, VWSError) def test_base_exception( @@ -346,7 +348,7 @@ def test_base_exception( """ ``VWSException``s has a response property. """ - with pytest.raises(VWSException) as exc: + with pytest.raises(VWSError) as exc: vws_client.get_target_record(target_id="a") assert exc.value.response.status_code == HTTPStatus.NOT_FOUND From 2bdf3b8a5623d02170d6a93db416b997bbce872e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 19 Apr 2024 13:49:51 +0100 Subject: [PATCH 182/641] Fix docs references --- spelling_private_dict.txt | 1 + src/vws/vws.py | 207 +++++++++++++++++++------------------- 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index a11d546a6..43f9fd5b1 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -23,6 +23,7 @@ TooManyRequests Ubuntu UnknownTarget OopsAnErrorOccurredPossiblyBadName +OopsAnErrorOccurredPossiblyBadNameError admin api args diff --git a/src/vws/vws.py b/src/vws/vws.py index 082767780..1fdc6465a 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -172,14 +172,14 @@ def _make_request( The response to the request made by `requests`. Raises: - ~vws.exceptions.OopsAnErrorOccurredPossiblyBadName: Vuforia returns - an HTML page with the text "Oops, an error occurred". This has - been seen to happen when the given name includes a bad + ~vws.exceptions.OopsAnErrorOccurredPossiblyBadNameError: Vuforia + returns an HTML page with the text "Oops, an error occurred". + This has been seen to happen when the given name includes a bad character. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. json.decoder.JSONDecodeError: The server did not respond with valid JSON. This may happen if the server address is not a valid Vuforia server. @@ -263,34 +263,33 @@ def add_target( The target ID of the new target. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.BadImage: There is a problem with - the given image. - For example, it must be a JPEG or PNG file in the grayscale or - RGB color space. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.BadImageError: There is a problem + with the given image. For example, it must be a JPEG or PNG + file in the grayscale or RGB color space. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.vws_exceptions.MetadataTooLarge: The given metadata - is too large. The maximum size is 1 MB of data when Base64 - encoded. - ~vws.exceptions.vws_exceptions.ImageTooLarge: The given image is - too large. - ~vws.exceptions.vws_exceptions.TargetNameExist: A target with the - given ``name`` already exists. - ~vws.exceptions.vws_exceptions.ProjectInactive: The project is + ~vws.exceptions.vws_exceptions.MetadataTooLargeError: The given + metadata is too large. The maximum size is 1 MB of data when + Base64 encoded. + ~vws.exceptions.vws_exceptions.ImageTooLargeError: The given image + is too large. + ~vws.exceptions.vws_exceptions.TargetNameExistError: A target with + the given ``name`` already exists. + ~vws.exceptions.vws_exceptions.ProjectInactiveError: The project is inactive. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. - ~vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName: + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadNameError: Vuforia returns an HTML page with the text "Oops, an error occurred". This has been seen to happen when the given name includes a bad character. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ image_data = _get_image_data(image=image) image_data_encoded = base64.b64encode(image_data).decode("ascii") @@ -328,19 +327,19 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: Response details of a target from Vuforia. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.vws_exceptions.UnknownTarget: The given target ID - does not match a target in the database. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target + ID does not match a target in the database. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ response = self._make_request( method=HTTPMethod.GET, @@ -426,17 +425,17 @@ def list_targets(self) -> list[str]: The IDs of all targets in the database. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ response = self._make_request( method=HTTPMethod.GET, @@ -461,19 +460,19 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: Details of the target. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.vws_exceptions.UnknownTarget: The given target ID - does not match a target in the database. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target + ID does not match a target in the database. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ response = self._make_request( method=HTTPMethod.GET, @@ -506,17 +505,17 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: Details of the database. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ response = self._make_request( method=HTTPMethod.GET, @@ -552,21 +551,21 @@ def delete_target(self, target_id: str) -> None: target_id: The ID of the target to delete. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.vws_exceptions.UnknownTarget: The given target ID - does not match a target in the database. - ~vws.exceptions.vws_exceptions.TargetStatusProcessing: The given - target is in the processing state. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target + ID does not match a target in the database. + ~vws.exceptions.vws_exceptions.TargetStatusProcessingError: The + given target is in the processing state. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ self._make_request( method=HTTPMethod.DELETE, @@ -589,21 +588,21 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: The target IDs of duplicate targets. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.vws_exceptions.UnknownTarget: The given target ID - does not match a target in the database. - ~vws.exceptions.vws_exceptions.ProjectInactive: The project is + ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target + ID does not match a target in the database. + ~vws.exceptions.vws_exceptions.ProjectInactiveError: The project is inactive. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ response = self._make_request( method=HTTPMethod.GET, @@ -644,29 +643,29 @@ def update_target( Giving ``None`` will not change the application metadata. Raises: - ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret - key is not correct. - ~vws.exceptions.vws_exceptions.BadImage: There is a problem with - the given image. For example, it must be a JPEG or PNG file in - the grayscale or RGB color space. - ~vws.exceptions.vws_exceptions.Fail: There was an error with the - request. For example, the given access key does not match a + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct. + ~vws.exceptions.vws_exceptions.BadImageError: There is a problem + with the given image. For example, it must be a JPEG or PNG + file in the grayscale or RGB color space. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given access key does not match a known database. - ~vws.exceptions.vws_exceptions.MetadataTooLarge: The given metadata - is too large. The maximum size is 1 MB of data when Base64 - encoded. - ~vws.exceptions.vws_exceptions.ImageTooLarge: The given image is - too large. - ~vws.exceptions.vws_exceptions.TargetNameExist: A target with the - given ``name`` already exists. - ~vws.exceptions.vws_exceptions.ProjectInactive: The project is + ~vws.exceptions.vws_exceptions.MetadataTooLargeError: The given + metadata is too large. The maximum size is 1 MB of data when + Base64 encoded. + ~vws.exceptions.vws_exceptions.ImageTooLargeError: The given image + is too large. + ~vws.exceptions.vws_exceptions.TargetNameExistError: A target with + the given ``name`` already exists. + ~vws.exceptions.vws_exceptions.ProjectInactiveError: The project is inactive. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an - error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequests: Vuforia is rate - limiting access. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ data: dict[str, str | bool | float | int] = {} From 40733b1fda19f4596848d5b31d22d688d58e1bee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 10:21:55 +0000 Subject: [PATCH 183/641] Bump ruff from 0.4.0 to 0.4.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.0 to 0.4.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.0...v0.4.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f11861395..7c2a796d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -261,7 +261,7 @@ dev = [ "pytest==8.1.1", "pytest-cov==5.0.0", "PyYAML==6.0.1", - "ruff==0.4.0", + "ruff==0.4.1", "Sphinx==7.3.7", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From 98aa5e40e7f9fa3b42f7c35a647a40e0ae39f227 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 10:19:07 +0000 Subject: [PATCH 184/641] Bump sybil from 6.0.3 to 6.1.0 Bumps [sybil](https://github.com/simplistix/sybil) from 6.0.3 to 6.1.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/6.0.3...6.1.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7c2a796d1..8d6bf37a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -266,7 +266,7 @@ dev = [ "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", - "sybil==6.0.3", + "sybil==6.1.0", "types-requests==2.31.0.20240406", "vulture==2.11", "VWS-Python-Mock==2024.2.16", From 4f8576377aed938d6629b67c83b8f4e0c9b8b49f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:15:18 +0000 Subject: [PATCH 185/641] Bump freezegun from 1.4.0 to 1.5.0 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/spulec/freezegun/releases) - [Changelog](https://github.com/spulec/freezegun/blob/master/CHANGELOG) - [Commits](https://github.com/spulec/freezegun/compare/1.4.0...1.5.0) --- updated-dependencies: - dependency-name: freezegun dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8d6bf37a5..be73babf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "check-wheel-contents==0.6.0", "deptry==0.16.1", "doc8==1.1.1", - "freezegun==1.4.0", + "freezegun==1.5.0", "furo==2024.1.29", "mypy==1.9.0", "pydocstyle==6.3", From 303d0d614524aecff0694321ec0b26e63c606717 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:55:59 +0000 Subject: [PATCH 186/641] Bump mypy from 1.9.0 to 1.10.0 Bumps [mypy](https://github.com/python/mypy) from 1.9.0 to 1.10.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index be73babf2..1789fc261 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -250,7 +250,7 @@ dev = [ "doc8==1.1.1", "freezegun==1.5.0", "furo==2024.1.29", - "mypy==1.9.0", + "mypy==1.10.0", "pydocstyle==6.3", "pyenchant==3.2.2", "Pygments==2.17.2", From 61e6cbef4a5f2726579cb5878c3364f9eb9bdba0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:00:17 +0000 Subject: [PATCH 187/641] Bump pyright from 1.1.359 to 1.1.360 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.359 to 1.1.360. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.359...v1.1.360) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1789fc261..20eb9e42c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.8.0", - "pyright==1.1.359", + "pyright==1.1.360", "pyroma==4.2", "pytest==8.1.1", "pytest-cov==5.0.0", From ac156dcff2ae29bcc8c7c4a34407468d5003e79b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:36:47 +0000 Subject: [PATCH 188/641] Bump ruff from 0.4.1 to 0.4.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.1 to 0.4.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.1...v0.4.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 20eb9e42c..4717832b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -261,7 +261,7 @@ dev = [ "pytest==8.1.1", "pytest-cov==5.0.0", "PyYAML==6.0.1", - "ruff==0.4.1", + "ruff==0.4.2", "Sphinx==7.3.7", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From bad4568fd71d74031c4bfb4bd4cdbc8c8f3cd92a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 10:28:09 +0000 Subject: [PATCH 189/641] Bump furo from 2024.1.29 to 2024.4.27 Bumps [furo](https://github.com/pradyunsg/furo) from 2024.1.29 to 2024.4.27. - [Release notes](https://github.com/pradyunsg/furo/releases) - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md) - [Commits](https://github.com/pradyunsg/furo/compare/2024.01.29...2024.04.27) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4717832b3..b0d0f1d96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -249,7 +249,7 @@ dev = [ "deptry==0.16.1", "doc8==1.1.1", "freezegun==1.5.0", - "furo==2024.1.29", + "furo==2024.4.27", "mypy==1.10.0", "pydocstyle==6.3", "pyenchant==3.2.2", From cda530e81bc3716fa4e52694594bb90c1f7b9c17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 10:32:49 +0000 Subject: [PATCH 190/641] Bump pytest from 8.1.1 to 8.2.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.1.1...8.2.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b0d0f1d96..8ff9a83c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,7 +258,7 @@ dev = [ "pyproject-fmt==1.8.0", "pyright==1.1.360", "pyroma==4.2", - "pytest==8.1.1", + "pytest==8.2.0", "pytest-cov==5.0.0", "PyYAML==6.0.1", "ruff==0.4.2", From 07aecb2a0a003ef1ba8fa83512233c37b0fa55be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 10:28:38 +0000 Subject: [PATCH 191/641] Bump pyright from 1.1.360 to 1.1.361 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.360 to 1.1.361. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.360...v1.1.361) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8ff9a83c7..08d96dc5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.1.0", "pyproject-fmt==1.8.0", - "pyright==1.1.360", + "pyright==1.1.361", "pyroma==4.2", "pytest==8.2.0", "pytest-cov==5.0.0", From 208d3892db3ce7e54c2d55f14513167a0cff488b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 10:21:09 +0000 Subject: [PATCH 192/641] Bump pygments from 2.17.2 to 2.18.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.17.2 to 2.18.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.17.2...2.18.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 08d96dc5a..d03fc8d5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -253,7 +253,7 @@ dev = [ "mypy==1.10.0", "pydocstyle==6.3", "pyenchant==3.2.2", - "Pygments==2.17.2", + "Pygments==2.18.0", "pylint==3.1.0", "pyproject-fmt==1.8.0", "pyright==1.1.361", From 751787afcd8cc29ab86386eb1dca8eefc1b139fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 10:27:18 +0000 Subject: [PATCH 193/641] Bump ruff from 0.4.2 to 0.4.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.2 to 0.4.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.2...v0.4.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d03fc8d5b..9ee5c1b01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -261,7 +261,7 @@ dev = [ "pytest==8.2.0", "pytest-cov==5.0.0", "PyYAML==6.0.1", - "ruff==0.4.2", + "ruff==0.4.3", "Sphinx==7.3.7", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From be49571e6a5460608a91f550cb8ee626e86fc685 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 10:13:47 +0000 Subject: [PATCH 194/641] Bump furo from 2024.4.27 to 2024.5.6 Bumps [furo](https://github.com/pradyunsg/furo) from 2024.4.27 to 2024.5.6. - [Release notes](https://github.com/pradyunsg/furo/releases) - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md) - [Commits](https://github.com/pradyunsg/furo/compare/2024.04.27...2024.05.06) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9ee5c1b01..fd8f6c876 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -249,7 +249,7 @@ dev = [ "deptry==0.16.1", "doc8==1.1.1", "freezegun==1.5.0", - "furo==2024.4.27", + "furo==2024.5.6", "mypy==1.10.0", "pydocstyle==6.3", "pyenchant==3.2.2", From 537593b432e64cfa7c18b0dc21887574f2d902af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 10:06:48 +0000 Subject: [PATCH 195/641] Bump pyright from 1.1.361 to 1.1.362 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.361 to 1.1.362. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.361...v1.1.362) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fd8f6c876..6d684b470 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "Pygments==2.18.0", "pylint==3.1.0", "pyproject-fmt==1.8.0", - "pyright==1.1.361", + "pyright==1.1.362", "pyroma==4.2", "pytest==8.2.0", "pytest-cov==5.0.0", From 8fcffa31889b1cf69b4d8fbce10b7abda4fa0c39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 10:30:26 +0000 Subject: [PATCH 196/641] Bump sybil from 6.1.0 to 6.1.1 Bumps [sybil](https://github.com/simplistix/sybil) from 6.1.0 to 6.1.1. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/6.1.0...6.1.1) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6d684b470..a20d01f4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -266,7 +266,7 @@ dev = [ "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", "sphinxcontrib-spelling==8", - "sybil==6.1.0", + "sybil==6.1.1", "types-requests==2.31.0.20240406", "vulture==2.11", "VWS-Python-Mock==2024.2.16", From 9c800e8832adc4c4e7a52c40eff9b454fde8c9d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 10:30:07 +0000 Subject: [PATCH 197/641] Bump ruff from 0.4.3 to 0.4.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.3 to 0.4.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.3...v0.4.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a20d01f4f..1f4b3059e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -261,7 +261,7 @@ dev = [ "pytest==8.2.0", "pytest-cov==5.0.0", "PyYAML==6.0.1", - "ruff==0.4.3", + "ruff==0.4.4", "Sphinx==7.3.7", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2024.2.25", From 87fe3ed0a7512aa4bcef0c0135a6a6be18917b4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 11:03:37 +0000 Subject: [PATCH 198/641] Bump freezegun from 1.5.0 to 1.5.1 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/spulec/freezegun/releases) - [Changelog](https://github.com/spulec/freezegun/blob/master/CHANGELOG) - [Commits](https://github.com/spulec/freezegun/compare/1.5.0...1.5.1) --- updated-dependencies: - dependency-name: freezegun dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1f4b3059e..92487d3fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "check-wheel-contents==0.6.0", "deptry==0.16.1", "doc8==1.1.1", - "freezegun==1.5.0", + "freezegun==1.5.1", "furo==2024.5.6", "mypy==1.10.0", "pydocstyle==6.3", From cde8a0815f1b208eca6007181a586582dfa1e029 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 19:55:51 +0000 Subject: [PATCH 199/641] Bump pylint from 3.1.0 to 3.2.0 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 92487d3fb..146476a0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -254,7 +254,7 @@ dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "Pygments==2.18.0", - "pylint==3.1.0", + "pylint==3.2.0", "pyproject-fmt==1.8.0", "pyright==1.1.362", "pyroma==4.2", From 039e3487bf2a58492819ef2687c2f5afdcc2ef47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 10:59:25 +0000 Subject: [PATCH 200/641] Bump pyright from 1.1.362 to 1.1.363 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.362 to 1.1.363. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.362...v1.1.363) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 146476a0e..20d9c3044 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "Pygments==2.18.0", "pylint==3.2.0", "pyproject-fmt==1.8.0", - "pyright==1.1.362", + "pyright==1.1.363", "pyroma==4.2", "pytest==8.2.0", "pytest-cov==5.0.0", From 3931579463726f311a7ef555f650e89c5dfd87ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 11:10:12 +0000 Subject: [PATCH 201/641] Bump pyproject-fmt from 1.8.0 to 2.1.1 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 1.8.0 to 2.1.1. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/1.8.0...2.1.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 20d9c3044..994a66162 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,7 +255,7 @@ dev = [ "pyenchant==3.2.2", "Pygments==2.18.0", "pylint==3.2.0", - "pyproject-fmt==1.8.0", + "pyproject-fmt==2.1.1", "pyright==1.1.363", "pyroma==4.2", "pytest==8.2.0", From 2a250c0deed516d2633ceb09e4c8eb47307f1d89 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 16 May 2024 09:35:49 +0100 Subject: [PATCH 202/641] Use pyproject-fmt v2 formatting --- pyproject.toml | 456 +++++++++++++++++++++++++------------------------ 1 file changed, 231 insertions(+), 225 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 994a66162..25ecfe5e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,229 +1,25 @@ -[tool.pylint] - - [tool.pylint.'MASTER'] - - # Pickle collected data for later comparisons. - persistent = true - - # Use multiple processes to speed up Pylint. - jobs = 0 - - # List of plugins (as comma separated values of python modules names) to load, - # usually to register additional checkers. - # See https://chezsoi.org/lucas/blog/pylint-strict-base-configuration.html. - # We do not use the plugins: - # - pylint.extensions.code_style - # - pylint.extensions.magic_value - # - pylint.extensions.while_used - # as they seemed to get in the way. - load-plugins = [ - 'pylint.extensions.bad_builtin', - 'pylint.extensions.comparison_placement', - 'pylint.extensions.consider_refactoring_into_while_condition', - 'pylint.extensions.docparams', - 'pylint.extensions.dunder', - 'pylint.extensions.eq_without_hash', - 'pylint.extensions.for_any_all', - 'pylint.extensions.mccabe', - 'pylint.extensions.no_self_use', - 'pylint.extensions.overlapping_exceptions', - 'pylint.extensions.private_import', - 'pylint.extensions.redefined_loop_name', - 'pylint.extensions.redefined_variable_type', - 'pylint.extensions.set_membership', - 'pylint.extensions.typing', - ] - - # Allow loading of arbitrary C extensions. Extensions are imported into the - # active Python interpreter and may run arbitrary code. - unsafe-load-any-extension = false - - [tool.pylint.'MESSAGES CONTROL'] - - # Enable the message, report, category or checker with the given id(s). You can - # either give multiple identifier separated by comma (,) or put this option - # multiple time (only on the command line, not in the configuration file where - # it should appear only once). See also the "--disable" option for examples. - enable = [ - 'bad-inline-option', - 'deprecated-pragma', - 'file-ignored', - 'spelling', - 'use-symbolic-message-instead', - 'useless-suppression', - ] - - # Disable the message, report, category or checker with the given id(s). You - # can either give multiple identifiers separated by comma (,) or put this - # option multiple times (only on the command line, not in the configuration - # file where it should appear only once).You can also use "--disable=all" to - # disable everything first and then reenable specific checks. For example, if - # you want to run only the similarities checker, you can use "--disable=all - # --enable=similarities". If you want to run only the classes checker, but have - # no Warning level messages displayed, use"--disable=all --enable=classes - # --disable=W" - - disable = [ - 'too-few-public-methods', - 'too-many-locals', - 'too-many-arguments', - 'too-many-instance-attributes', - 'too-many-return-statements', - 'too-many-lines', - 'locally-disabled', - # Let ruff handle long lines - 'line-too-long', - # Let ruff handle unused imports - 'unused-import', - # Let ruff deal with sorting - 'ungrouped-imports', - # We don't need everything to be documented because of mypy - 'missing-type-doc', - 'missing-return-type-doc', - # Too difficult to please - 'duplicate-code', - # Let ruff handle imports - 'wrong-import-order', - # mypy does not want untyped parameters. - 'useless-type-doc', - ] - - [tool.pylint.'FORMAT'] - - # Allow the body of an if to be on the same line as the test if there is no - # else. - single-line-if-stmt = false - - [tool.pylint.'SPELLING'] - - # Spelling dictionary name. Available dictionaries: none. To make it working - # install python-enchant package. - spelling-dict = 'en_US' - - # A path to a file that contains private dictionary; one word per line. - spelling-private-dict-file = 'spelling_private_dict.txt' - - # Tells whether to store unknown words to indicated private dictionary in - # --spelling-private-dict-file option instead of raising a message. - spelling-store-unknown-words = 'no' - -[tool.coverage.run] - -branch = true - -[tool.coverage.report] -exclude_also = ["if TYPE_CHECKING:"] - -[tool.pytest.ini_options] - -xfail_strict = true -log_cli = true - -[tool.check-manifest] - -ignore = [ - "*.enc", - "readthedocs.yaml", - "CHANGELOG.rst", - "CODE_OF_CONDUCT.rst", - "CONTRIBUTING.rst", - "LICENSE", - "Makefile", - "ci", - "ci/**", - "codecov.yaml", - "doc8.ini", - "docs", - "docs/**", - ".git_archival.txt", - "spelling_private_dict.txt", - "tests", - "tests-pylintrc", - "tests/**", - "vuforia_secrets.env.example", - "lint.mk", -] - -[tool.doc8] - -max_line_length = 2000 -ignore_path = [ - "./.eggs", - "./docs/build", - "./docs/build/spelling/output.txt", - "./node_modules", - "./src/*.egg-info/", - "./src/*/_setuptools_scm_version.txt", -] - -[tool.mypy] - -strict = true - [build-system] build-backend = "setuptools.build_meta" requires = [ "pip", "setuptools", - "setuptools_scm[toml]>=7.1", + "setuptools-scm[toml]>=7.1", "wheel", ] -[tool.distutils.bdist_wheel] -universal = true - -[tool.ruff] -line-length = 79 - -[tool.ruff.lint] -select = ["ALL"] - -ignore = [ - # We do not annotate the type of 'self'. - "ANN101", - # We are happy to manage our own "complexity". - "C901", - # Ruff warns that this conflicts with the formatter. - "COM812", - # Allow our chosen docstring line-style - no one-line summary. - "D200", - "D205", - "D212", - "D415", - # Ruff warns that this conflicts with the formatter. - "ISC001", - # Ignore "too-many-*" errors as they seem to get in the way more than - # helping. - "PLR0913", - # Allow 'assert' as we use it for tests. - "S101", -] - -# Do not automatically remove commented out code. -# We comment out code during development, and with VSCode auto-save, this code -# is sometimes annoyingly removed. -unfixable = ["ERA001"] - -[tool.ruff.lint.pydocstyle] -convention = "google" - -[tool.ruff.lint.per-file-ignores] -"tests/test_*.py" = [ - # Do not require tests to have a one-line summary. - "D205", -] - [project] name = "vws-python" description = "Interact with the Vuforia Web Services (VWS) API." -readme = { file = "README.rst", content-type = "text/x-rst"} +readme = { file = "README.rst", content-type = "text/x-rst" } keywords = [ "client", "vuforia", "vws", ] license = { file = "LICENSE" } -authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com"} ] +authors = [ + { name = "Adam Dangoor", email = "adamdangoor@gmail.com" }, +] requires-python = ">=3.12" classifiers = [ "Development Status :: 5 - Production/Stable", @@ -239,10 +35,9 @@ dynamic = [ dependencies = [ "requests", "urllib3", - "VWS-Auth-Tools", + "vws-auth-tools", ] -[project.optional-dependencies] -dev = [ +optional-dependencies.dev = [ "actionlint-py==1.6.27.13", "check-manifest==0.49", "check-wheel-contents==0.6.0", @@ -253,48 +48,259 @@ dev = [ "mypy==1.10.0", "pydocstyle==6.3", "pyenchant==3.2.2", - "Pygments==2.18.0", + "pygments==2.18.0", "pylint==3.2.0", "pyproject-fmt==2.1.1", "pyright==1.1.363", "pyroma==4.2", "pytest==8.2.0", "pytest-cov==5.0.0", - "PyYAML==6.0.1", + "pyyaml==6.0.1", "ruff==0.4.4", - "Sphinx==7.3.7", + "sphinx==7.3.7", "sphinx-prompt==1.8", - "Sphinx-Substitution-Extensions==2024.2.25", + "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.1.1", "types-requests==2.31.0.20240406", "vulture==2.11", - "VWS-Python-Mock==2024.2.16", - "VWS-Test-Fixtures==2023.3.5", + "vws-python-mock==2024.2.16", + "vws-test-fixtures==2023.3.5", ] -[project.urls] -Documentation = "https://vws-python.readthedocs.io/en/latest/" -Source = "https://github.com/VWS-Python/vws-python" +urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" +urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] zip-safe = false [tool.setuptools.packages.find] -where = ["src"] +where = [ + "src", +] [tool.setuptools.package-data] -vws = ["py.typed"] +vws = [ + "py.typed", +] + +[tool.distutils.bdist_wheel] +universal = true [tool.setuptools_scm] +[tool.ruff] +line-length = 79 + +lint.select = [ + "ALL", +] +lint.per-file-ignores."tests/test_*.py" = [ + # Do not require tests to have a one-line summary. + "D205", +] + +# Do not automatically remove commented out code. +# We comment out code during development, and with VSCode auto-save, this code +# is sometimes annoyingly removed. +lint.unfixable = [ + "ERA001", +] +lint.pydocstyle.convention = "google" +lint.ignore = [ + # We do not annotate the type of 'self'. + "ANN101", + # We are happy to manage our own "complexity". + "C901", + # Ruff warns that this conflicts with the formatter. + "COM812", + # Allow our chosen docstring line-style - no one-line summary. + "D200", + "D205", + "D212", + "D415", + # Ruff warns that this conflicts with the formatter. + "ISC001", + # Ignore "too-many-*" errors as they seem to get in the way more than + # helping. + "PLR0913", + # Allow 'assert' as we use it for tests. + "S101", +] + +[tool.pylint] + +[tool.pylint.'MASTER'] + +# Pickle collected data for later comparisons. +persistent = true + +# Use multiple processes to speed up Pylint. +jobs = 0 + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +# See https://chezsoi.org/lucas/blog/pylint-strict-base-configuration.html. +# We do not use the plugins: +# - pylint.extensions.code_style +# - pylint.extensions.magic_value +# - pylint.extensions.while_used +# as they seemed to get in the way. +load-plugins = [ + 'pylint.extensions.bad_builtin', + 'pylint.extensions.comparison_placement', + 'pylint.extensions.consider_refactoring_into_while_condition', + 'pylint.extensions.docparams', + 'pylint.extensions.dunder', + 'pylint.extensions.eq_without_hash', + 'pylint.extensions.for_any_all', + 'pylint.extensions.mccabe', + 'pylint.extensions.no_self_use', + 'pylint.extensions.overlapping_exceptions', + 'pylint.extensions.private_import', + 'pylint.extensions.redefined_loop_name', + 'pylint.extensions.redefined_variable_type', + 'pylint.extensions.set_membership', + 'pylint.extensions.typing', +] + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension = false + +[tool.pylint.'MESSAGES CONTROL'] + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable = [ + 'bad-inline-option', + 'deprecated-pragma', + 'file-ignored', + 'spelling', + 'use-symbolic-message-instead', + 'useless-suppression', +] + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once).You can also use "--disable=all" to +# disable everything first and then reenable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use"--disable=all --enable=classes +# --disable=W" + +disable = [ + 'too-few-public-methods', + 'too-many-locals', + 'too-many-arguments', + 'too-many-instance-attributes', + 'too-many-return-statements', + 'too-many-lines', + 'locally-disabled', + # Let ruff handle long lines + 'line-too-long', + # Let ruff handle unused imports + 'unused-import', + # Let ruff deal with sorting + 'ungrouped-imports', + # We don't need everything to be documented because of mypy + 'missing-type-doc', + 'missing-return-type-doc', + # Too difficult to please + 'duplicate-code', + # Let ruff handle imports + 'wrong-import-order', + # mypy does not want untyped parameters. + 'useless-type-doc', +] + +[tool.pylint.'FORMAT'] + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt = false + +[tool.pylint.'SPELLING'] + +# Spelling dictionary name. Available dictionaries: none. To make it working +# install python-enchant package. +spelling-dict = 'en_US' + +# A path to a file that contains private dictionary; one word per line. +spelling-private-dict-file = 'spelling_private_dict.txt' + +# Tells whether to store unknown words to indicated private dictionary in +# --spelling-private-dict-file option instead of raising a message. +spelling-store-unknown-words = 'no' + +[tool.check-manifest] + +ignore = [ + "*.enc", + "readthedocs.yaml", + "CHANGELOG.rst", + "CODE_OF_CONDUCT.rst", + "CONTRIBUTING.rst", + "LICENSE", + "Makefile", + "ci", + "ci/**", + "codecov.yaml", + "doc8.ini", + "docs", + "docs/**", + ".git_archival.txt", + "spelling_private_dict.txt", + "tests", + "tests-pylintrc", + "tests/**", + "vuforia_secrets.env.example", + "lint.mk", +] + +[tool.deptry] +pep621_dev_dependency_groups = [ + "dev", +] + [tool.pyproject-fmt] indent = 4 keep_full_version = true +[tool.pytest.ini_options] + +xfail_strict = true +log_cli = true + +[tool.coverage.run] + +branch = true + +[tool.coverage.report] +exclude_also = [ + "if TYPE_CHECKING:", +] + +[tool.mypy] + +strict = true + [tool.pyright] reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" -[tool.deptry] -pep621_dev_dependency_groups = ["dev"] +[tool.doc8] + +max_line_length = 2000 +ignore_path = [ + "./.eggs", + "./docs/build", + "./docs/build/spelling/output.txt", + "./node_modules", + "./src/*.egg-info/", + "./src/*/_setuptools_scm_version.txt", +] From 4d72103507aa693c097cccb918ff58cafe70ee35 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 19 May 2024 20:02:31 +0100 Subject: [PATCH 203/641] Switch from custom lint setup with Make to pre-commit --- .github/workflows/ci.yml | 7 +- .pre-commit-config.yaml | 142 +++++++++++++++++++++++++++++++++++ Makefile | 24 ------ docs/source/contributing.rst | 21 ++++-- lint.mk | 69 ----------------- pyproject.toml | 2 + 6 files changed, 163 insertions(+), 102 deletions(-) create mode 100644 .pre-commit-config.yaml delete mode 100644 lint.mk diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a1fd129d..ad86deb1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,9 @@ jobs: - name: "Lint" run: | - make lint + pre-commit run --all-files --hook-stage commit --verbose + pre-commit run --all-files --hook-stage push --verbose + pre-commit run --all-files --hook-stage manual --verbose - name: "Run tests" run: | @@ -50,3 +52,6 @@ jobs: with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + + - uses: pre-commit-ci/lite-action@v1.0.2 + if: always() diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..ac3dab718 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,142 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: local + hooks: + - id: actionlint + name: actionlint + entry: actionlint + language: system + pass_filenames: false + types: [yaml] + + - id: mypy + name: mypy + stages: [push] + entry: mypy . + language: system + types: [python, toml] + pass_filenames: false + + - id: check-manifest + name: check-manifest + stages: [push] + entry: check-manifest . + language: system + pass_filenames: false + + - id: pyright + name: pyright + stages: [push] + entry: pyright . + language: system + types: [python, toml] + pass_filenames: false + + - id: vulture + name: vulture + entry: vulture --min-confidence 100 --exclude .eggs + language: system + types: [python] + + - id: pyroma + name: pyroma + entry: pyroma --min 10 . + language: system + pass_filenames: false + types: [toml] + + - id: deptry + name: deptry + entry: deptry src/ + language: system + pass_filenames: false + + - id: pylint + name: pylint + entry: pylint *.py src/ tests/ docs/ + language: system + stages: [manual] + pass_filenames: false + + - id: ruff-check + name: Ruff check + entry: ruff check + language: system + types: [python] + + - id: ruff-format-check + name: Ruff format check + entry: ruff format --check + language: system + types: [python] + + - id: ruff-check-fix + name: Ruff check fix + entry: ruff check --fix + language: system + types: [python] + + - id: ruff-format-fix + name: Ruff format + entry: ruff format + language: system + types: [python] + + - id: doc8 + name: doc8 + entry: doc8 + language: system + types: [rst] + + - id: pyproject-fmt-check + name: pyproject-fmt check + entry: pyproject-fmt --check + language: system + types: [toml] + files: pyproject.toml + + - id: pyproject-fmt-fix + name: pyproject-fmt + entry: pyproject-fmt + language: system + types: [toml] + files: pyproject.toml + + - id: linkcheck + name: linkcheck + entry: make -C docs/ linkcheck SPHINXOPTS=-W + language: system + types: [rst] + stages: [manual] + pass_filenames: false + + - id: spelling + name: spelling + entry: make -C docs/ spelling SPHINXOPTS=-W + language: system + types: [rst] + stages: [manual] + pass_filenames: false + + - id: docs + name: Build Documentation + entry: make docs + language: system + stages: [manual] + pass_filenames: false + + - id: pyright-verifytypes + name: pyright-verifytypes + stages: [push] + entry: pyright --verifytypes vws + language: system + pass_filenames: false + types: [python] diff --git a/Makefile b/Makefile index 71db4ef0b..216a25740 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,8 @@ SHELL := /bin/bash -euxo pipefail -include lint.mk - # Treat Sphinx warnings as errors SPHINXOPTS := -W -.PHONY: lint -lint: \ - actionlint \ - check-manifest \ - deptry \ - doc8 \ - linkcheck \ - mypy \ - ruff \ - pyproject-fmt \ - pyright \ - pyright-verifytypes \ - pyroma \ - spelling \ - vulture \ - pylint - -.PHONY: fix-lint -fix-lint: \ - fix-pyproject-fmt \ - fix-ruff - .PHONY: docs docs: make -C docs clean html SPHINXOPTS=$(SPHINXOPTS) diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index ca559e843..2fa6203ce 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -15,7 +15,7 @@ Install Python dependencies in a virtual environment. pip install --editable '.[dev]' Spell checking requires ``enchant``. -This can be installed on macOS, for example, with `Homebrew `__: +This can be installed on macOS, for example, with `Homebrew`_: .. prompt:: bash @@ -27,20 +27,25 @@ and on Ubuntu with ``apt``: apt-get install -y enchant -Linting -------- - -Run lint tools: +Install ``pre-commit`` hooks: .. prompt:: bash - make lint + pre-commit install + pre-commit install --hook-type pre-push -To fix some lint errors, run the following: +Linting +------- + +Run lint tools either by committing, or with: .. prompt:: bash - make fix-lint + pre-commit run --all-files --hook-stage commit --verbose + pre-commit run --all-files --hook-stage push --verbose + pre-commit run --all-files --hook-stage manual --verbose + +.. _Homebrew: https://brew.sh Running tests ------------- diff --git a/lint.mk b/lint.mk deleted file mode 100644 index afd33149f..000000000 --- a/lint.mk +++ /dev/null @@ -1,69 +0,0 @@ -# Make commands for linting - -SHELL := /bin/bash -euxo pipefail - -.PHONY: actionlint -actionlint: - actionlint - -.PHONY: mypy -mypy: - mypy . - -.PHONY: check-manifest -check-manifest: - check-manifest . - -.PHONY: doc8 -doc8: - doc8 . - -.PHONY: ruff -ruff: - ruff check . - ruff format --check . - -.PHONY: fix-ruff -fix-ruff: - ruff check --fix . - ruff format . - -.PHONY: deptry -deptry: - deptry src/ - -.PHONY: pylint -pylint: - pylint *.py src/ tests/ docs/ - -.PHONY: pyroma -pyroma: - pyroma --min 10 . - -.PHONY: pyright -pyright: - pyright . - -.PHONY: pyright-verifytypes -pyright-verifytypes: - pyright --verifytypes vws - -.PHONY: vulture -vulture: - vulture --min-confidence 100 --exclude _vendor --exclude .eggs . - -.PHONY: linkcheck -linkcheck: - $(MAKE) -C docs/ linkcheck SPHINXOPTS=$(SPHINXOPTS) - -.PHONY: pyproject-fmt - pyproject-fmt: - pyproject-fmt --check pyproject.toml - - .PHONY: fix-pyproject-fmt - fix-pyproject-fmt: - pyproject-fmt pyproject.toml - -.PHONY: spelling -spelling: - $(MAKE) -C docs/ spelling SPHINXOPTS=$(SPHINXOPTS) diff --git a/pyproject.toml b/pyproject.toml index 25ecfe5e9..9b725d034 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.5.6", "mypy==1.10.0", + "pre-commit==3.7.1", "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", @@ -240,6 +241,7 @@ spelling-store-unknown-words = 'no' ignore = [ "*.enc", + ".pre-commit-config.yaml", "readthedocs.yaml", "CHANGELOG.rst", "CODE_OF_CONDUCT.rst", From 5ea56a72c5c30ca46343e857979cc4a55aa78a22 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 19 May 2024 19:07:11 +0000 Subject: [PATCH 204/641] [pre-commit.ci lite] apply automatic fixes --- LICENSE | 1 - 1 file changed, 1 deletion(-) diff --git a/LICENSE b/LICENSE index 69f733fdf..ef26969f8 100644 --- a/LICENSE +++ b/LICENSE @@ -17,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - From a0b0bc26033e09f76df80fc3b790525a192a9cdc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 10:26:02 +0000 Subject: [PATCH 205/641] Bump pytest from 8.2.0 to 8.2.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.0 to 8.2.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.0...8.2.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9b725d034..cd39e2fa5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.1.1", "pyright==1.1.363", "pyroma==4.2", - "pytest==8.2.0", + "pytest==8.2.1", "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.4.4", From 13bfaad9ebb3084effbcd7300cd2f8ad71736a80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 10:30:04 +0000 Subject: [PATCH 206/641] Bump pylint from 3.2.0 to 3.2.2 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.0 to 3.2.2. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.0...v3.2.2) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cd39e2fa5..1f6f2d80f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.2.0", + "pylint==3.2.2", "pyproject-fmt==2.1.1", "pyright==1.1.363", "pyroma==4.2", From 61d5fc7acbd52eefc8d8624e7bfc8d390778f9f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 10:34:30 +0000 Subject: [PATCH 207/641] Bump actionlint-py from 1.6.27.13 to 1.7.0.14 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.6.27.13 to 1.7.0.14. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.6.27.13...v1.7.0.14) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1f6f2d80f..d8f780ccc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ "vws-auth-tools", ] optional-dependencies.dev = [ - "actionlint-py==1.6.27.13", + "actionlint-py==1.7.0.14", "check-manifest==0.49", "check-wheel-contents==0.6.0", "deptry==0.16.1", From cc1f7db3d4a0a41ca1b5692332e88f8a07f199b0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 21 May 2024 06:05:18 +0100 Subject: [PATCH 208/641] Empty for CI From 2137b0220643620f272d6aaf958629976c378794 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 21 May 2024 07:39:31 +0100 Subject: [PATCH 209/641] Empty for CI From eb3871f268157904ca45a3b0871fd8d938a30a50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 10:37:28 +0000 Subject: [PATCH 210/641] --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d8f780ccc..344f59cc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.31.0.20240406", + "types-requests==2.32.0.20240521", "vulture==2.11", "vws-python-mock==2024.2.16", "vws-test-fixtures==2023.3.5", From 1c0078e7507bc96ae5614fd1294e03ff8ff5f890 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 10:42:16 +0000 Subject: [PATCH 211/641] --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 344f59cc2..3fba084ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pyenchant==3.2.2", "pygments==2.18.0", "pylint==3.2.2", - "pyproject-fmt==2.1.1", + "pyproject-fmt==2.1.3", "pyright==1.1.363", "pyroma==4.2", "pytest==8.2.1", From 4f008d9a16926bb11dc84d51de767533d3a72905 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 22 May 2024 09:38:19 +0100 Subject: [PATCH 212/641] Empty for CI From cb8f065a3626377c7207a7bc173cfd6feddd4c38 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 08:39:24 +0000 Subject: [PATCH 213/641] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3fba084ef..b0ca1d1cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,18 +95,6 @@ line-length = 79 lint.select = [ "ALL", ] -lint.per-file-ignores."tests/test_*.py" = [ - # Do not require tests to have a one-line summary. - "D205", -] - -# Do not automatically remove commented out code. -# We comment out code during development, and with VSCode auto-save, this code -# is sometimes annoyingly removed. -lint.unfixable = [ - "ERA001", -] -lint.pydocstyle.convention = "google" lint.ignore = [ # We do not annotate the type of 'self'. "ANN101", @@ -128,6 +116,19 @@ lint.ignore = [ "S101", ] +lint.per-file-ignores."tests/test_*.py" = [ + # Do not require tests to have a one-line summary. + "D205", +] + +# Do not automatically remove commented out code. +# We comment out code during development, and with VSCode auto-save, this code +# is sometimes annoyingly removed. +lint.unfixable = [ + "ERA001", +] +lint.pydocstyle.convention = "google" + [tool.pylint] [tool.pylint.'MASTER'] From 24b5475f30dfd0c8726c3beaebf77d88e38a9846 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 11:03:54 +0000 Subject: [PATCH 214/641] --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b0ca1d1cc..d59edc077 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.2", "pyproject-fmt==2.1.3", - "pyright==1.1.363", + "pyright==1.1.364", "pyroma==4.2", "pytest==8.2.1", "pytest-cov==5.0.0", From 75ce789202311b621bd3ed5b8673bb57e85ac59d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 10:35:23 +0000 Subject: [PATCH 215/641] Bump types-requests from 2.32.0.20240521 to 2.32.0.20240523 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240521 to 2.32.0.20240523. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d59edc077..61e1c54b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.32.0.20240521", + "types-requests==2.32.0.20240523", "vulture==2.11", "vws-python-mock==2024.2.16", "vws-test-fixtures==2023.3.5", From cb5746f93d301554d93bc418e1c9f48d7b9a0a96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 10:40:41 +0000 Subject: [PATCH 216/641] Bump ruff from 0.4.4 to 0.4.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.4 to 0.4.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.4...v0.4.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 61e1c54b0..4f7e572eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.2.1", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.4.4", + "ruff==0.4.5", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From c4fa0fadd6397cf34544ec9618f0c29d8bd67309 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 24 May 2024 20:45:32 +0100 Subject: [PATCH 217/641] Use types_or for better pre-commit matching --- .pre-commit-config.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac3dab718..e1e1459b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,14 +15,14 @@ repos: entry: actionlint language: system pass_filenames: false - types: [yaml] + types_or: [yaml] - id: mypy name: mypy stages: [push] entry: mypy . language: system - types: [python, toml] + types_or: [python, toml] pass_filenames: false - id: check-manifest @@ -37,21 +37,21 @@ repos: stages: [push] entry: pyright . language: system - types: [python, toml] + types_or: [python, toml] pass_filenames: false - id: vulture name: vulture entry: vulture --min-confidence 100 --exclude .eggs language: system - types: [python] + types_or: [python] - id: pyroma name: pyroma entry: pyroma --min 10 . language: system pass_filenames: false - types: [toml] + types_or: [toml] - id: deptry name: deptry @@ -70,51 +70,51 @@ repos: name: Ruff check entry: ruff check language: system - types: [python] + types_or: [python] - id: ruff-format-check name: Ruff format check entry: ruff format --check language: system - types: [python] + types_or: [python] - id: ruff-check-fix name: Ruff check fix entry: ruff check --fix language: system - types: [python] + types_or: [python] - id: ruff-format-fix name: Ruff format entry: ruff format language: system - types: [python] + types_or: [python] - id: doc8 name: doc8 entry: doc8 language: system - types: [rst] + types_or: [rst] - id: pyproject-fmt-check name: pyproject-fmt check entry: pyproject-fmt --check language: system - types: [toml] + types_or: [toml] files: pyproject.toml - id: pyproject-fmt-fix name: pyproject-fmt entry: pyproject-fmt language: system - types: [toml] + types_or: [toml] files: pyproject.toml - id: linkcheck name: linkcheck entry: make -C docs/ linkcheck SPHINXOPTS=-W language: system - types: [rst] + types_or: [rst] stages: [manual] pass_filenames: false @@ -122,7 +122,7 @@ repos: name: spelling entry: make -C docs/ spelling SPHINXOPTS=-W language: system - types: [rst] + types_or: [rst] stages: [manual] pass_filenames: false @@ -139,4 +139,4 @@ repos: entry: pyright --verifytypes vws language: system pass_filenames: false - types: [python] + types_or: [python] From eefd21b97cb551e93255ef0177932dda88ada16c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 May 2024 11:14:15 +0100 Subject: [PATCH 218/641] Add more pre-commit hooks --- .pre-commit-config.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e1e1459b8..5bc8f6fa5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,12 +2,21 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v4.6.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - id: check-added-large-files + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-toml + - id: check-vcs-permalinks + - id: check-yaml + - id: end-of-file-fixer + - id: file-contents-sorter + files: spelling_private_dict\.txt$ + - id: trailing-whitespace - repo: local hooks: - id: actionlint From 4d3da9aa83bd2d991d8c23dbbe1c505b609a12ab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 10:15:32 +0000 Subject: [PATCH 219/641] [pre-commit.ci lite] apply automatic fixes --- spelling_private_dict.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 43f9fd5b1..cdec61d5d 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -1,4 +1,3 @@ - AuthenticationFailure BadImage ConnectionErrorPossiblyImageTooLarge @@ -9,6 +8,8 @@ JSONDecodeError MatchProcessing MaxNumResultsOutOfRange MetadataTooLarge +OopsAnErrorOccurredPossiblyBadName +OopsAnErrorOccurredPossiblyBadNameError ProjectHasNoAPIAccess ProjectInactive ProjectSuspended @@ -22,8 +23,6 @@ TargetStatusProcessing TooManyRequests Ubuntu UnknownTarget -OopsAnErrorOccurredPossiblyBadName -OopsAnErrorOccurredPossiblyBadNameError admin api args From eb4ef71c39095515251584d072083a76d58e3c5c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 May 2024 16:42:20 +0100 Subject: [PATCH 220/641] Simplify pre-commit install process --- .pre-commit-config.yaml | 1 + docs/source/contributing.rst | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5bc8f6fa5..ab6ded914 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,6 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks +default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 2fa6203ce..d8e8b5af9 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -32,7 +32,6 @@ Install ``pre-commit`` hooks: .. prompt:: bash pre-commit install - pre-commit install --hook-type pre-push Linting ------- From de339c96dc635113f599886a74d90d597eb47bc8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 May 2024 17:13:07 +0100 Subject: [PATCH 221/641] Add interrogate tool --- .pre-commit-config.yaml | 6 ++++++ pyproject.toml | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ab6ded914..7a1b35bfa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -106,6 +106,12 @@ repos: language: system types_or: [rst] + - id: interrogate + name: interrogate + entry: interrogate src/ tests/ ci/ + language: system + types_or: [python] + - id: pyproject-fmt-check name: pyproject-fmt check entry: pyproject-fmt --check diff --git a/pyproject.toml b/pyproject.toml index 4f7e572eb..7463c48c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -296,6 +296,11 @@ strict = true reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" +[tool.interrogate] +fail-under = 100 +omit-covered-files = true +verbose = 2 + [tool.doc8] max_line_length = 2000 From 27d2e6fdbe4644e281f5aeae5fd2d0195e0f0590 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 May 2024 17:19:06 +0100 Subject: [PATCH 222/641] Add interrogate tool requirement --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 7463c48c4..81ff8b2c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,7 @@ optional-dependencies.dev = [ "doc8==1.1.1", "freezegun==1.5.1", "furo==2024.5.6", + "interrogate==1.7.0", "mypy==1.10.0", "pre-commit==3.7.1", "pydocstyle==6.3", From 30d1a9b8b9059153882d9941732a8d13f424ae13 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 May 2024 17:23:49 +0100 Subject: [PATCH 223/641] Add interrogate tool requirement --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a1b35bfa..dcd811506 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -108,7 +108,7 @@ repos: - id: interrogate name: interrogate - entry: interrogate src/ tests/ ci/ + entry: interrogate src/ tests/ language: system types_or: [python] From 7bb858aa33cdae1d12f564cec6d8c5a1c5f8773c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 May 2024 17:32:29 +0100 Subject: [PATCH 224/641] Add missing docstrings --- src/vws/query.py | 1 + src/vws/vws.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/vws/query.py b/src/vws/query.py index ab04781da..91e3eff9d 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -31,6 +31,7 @@ def _get_image_data(image: BinaryIO) -> bytes: + """Get the data of an image file.""" original_tell = image.tell() image.seek(0) image_data = image.read() diff --git a/src/vws/vws.py b/src/vws/vws.py index 1fdc6465a..2d76b0f88 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -54,6 +54,7 @@ def _get_image_data(image: BinaryIO) -> bytes: + """Get the data of an image file.""" original_tell = image.tell() image.seek(0) image_data = image.read() From 190688d46aea516866ecdb009ff4c2ef1415af04 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 May 2024 17:36:09 +0100 Subject: [PATCH 225/641] Limit interrogate files run against in pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dcd811506..40e612a80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -108,7 +108,7 @@ repos: - id: interrogate name: interrogate - entry: interrogate src/ tests/ + entry: interrogate language: system types_or: [python] From 41fb2ef76da3aafac303ad69e93b157fb49288f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 10:26:07 +0000 Subject: [PATCH 226/641] Bump actionlint-py from 1.7.0.14 to 1.7.1.15 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.0.14 to 1.7.1.15. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.0.14...v1.7.1.15) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 81ff8b2c1..af14aea91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ "vws-auth-tools", ] optional-dependencies.dev = [ - "actionlint-py==1.7.0.14", + "actionlint-py==1.7.1.15", "check-manifest==0.49", "check-wheel-contents==0.6.0", "deptry==0.16.1", From b630c114a4dd83e7097d77de0c65801ce0272834 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 10:31:12 +0000 Subject: [PATCH 227/641] Bump pyright from 1.1.364 to 1.1.365 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.364 to 1.1.365. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.364...v1.1.365) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index af14aea91..0a7b98dc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.2", "pyproject-fmt==2.1.3", - "pyright==1.1.364", + "pyright==1.1.365", "pyroma==4.2", "pytest==8.2.1", "pytest-cov==5.0.0", From fe57be120ae23b7773598c8774ae3dc85539f1eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 10:36:14 +0000 Subject: [PATCH 228/641] Bump ruff from 0.4.5 to 0.4.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.5 to 0.4.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.5...v0.4.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0a7b98dc1..492bb5484 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.2.1", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.4.5", + "ruff==0.4.6", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From dd119f487bdb8ea2479c9cbd52bbae83e8001ae0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 29 May 2024 18:03:15 +0100 Subject: [PATCH 229/641] Use a timeout when making a request to the VWS API --- CHANGELOG.rst | 1 + src/vws/query.py | 2 +- src/vws/vws.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index de5765df6..c628649be 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,7 @@ Next ---- * Breaking change: Exception names now end with ``Error``. +* Use a timeout (30 seconds) when making requests to the VWS API. 2024.02.19 ------------ diff --git a/src/vws/query.py b/src/vws/query.py index 91e3eff9d..db05fd7f5 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -142,7 +142,7 @@ def query( headers=headers, data=content, # We should make the timeout customizable. - timeout=None, + timeout=30, ) response = Response( text=requests_response.text, diff --git a/src/vws/vws.py b/src/vws/vws.py index 2d76b0f88..54a1d51cc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -115,7 +115,7 @@ def _target_api_request( headers=headers, data=content, # We should make the timeout customizable. - timeout=None, + timeout=30, ) return Response( From 581b5a3b06169f4e205ffb0ee7c16ac3274a6225 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 10:05:56 +0000 Subject: [PATCH 230/641] Bump ruff from 0.4.6 to 0.4.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.6 to 0.4.7. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.6...v0.4.7) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 492bb5484..fd185c8c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.2.1", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.4.6", + "ruff==0.4.7", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From bec3a8f679542a86acb213b5a6820de079eb7a51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 10:10:49 +0000 Subject: [PATCH 231/641] Bump types-requests from 2.32.0.20240523 to 2.32.0.20240602 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240523 to 2.32.0.20240602. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fd185c8c2..9f04ba048 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.32.0.20240523", + "types-requests==2.32.0.20240602", "vulture==2.11", "vws-python-mock==2024.2.16", "vws-test-fixtures==2023.3.5", From 838d651fe8163ce0605434bed1e3ee616c8d872f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:09:01 +0000 Subject: [PATCH 232/641] Bump pytest from 8.2.1 to 8.2.2 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.1 to 8.2.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.1...8.2.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9f04ba048..99a09d070 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.1.3", "pyright==1.1.365", "pyroma==4.2", - "pytest==8.2.1", + "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.4.7", From 3cb3dad15199ecc0a33b8f12792e33fc1d4bcccb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:37:02 +0000 Subject: [PATCH 233/641] Bump ruff from 0.4.7 to 0.4.8 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.7 to 0.4.8. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.7...v0.4.8) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 99a09d070..4b4a33037 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.4.7", + "ruff==0.4.8", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From 00524ea14ca8850f4c55dd0c619da6f7736cab4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:42:29 +0000 Subject: [PATCH 234/641] Bump pyright from 1.1.365 to 1.1.366 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.365 to 1.1.366. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.365...v1.1.366) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4b4a33037..b03e458f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.2", "pyproject-fmt==2.1.3", - "pyright==1.1.365", + "pyright==1.1.366", "pyroma==4.2", "pytest==8.2.2", "pytest-cov==5.0.0", From c356487d131cf2d357234426fd727c87ad235358 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 10:23:08 +0000 Subject: [PATCH 235/641] Bump pylint from 3.2.2 to 3.2.3 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.2 to 3.2.3. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.2...v3.2.3) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b03e458f7..97cc44b06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.2.2", + "pylint==3.2.3", "pyproject-fmt==2.1.3", "pyright==1.1.366", "pyroma==4.2", From b10ed85595fd3eb4cce902f8eea117af7e80d187 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 11 Jun 2024 09:13:57 +0100 Subject: [PATCH 236/641] Update VWS links to work again --- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/exceptions/vws_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/reports.py | 12 ++++++------ src/vws/vws.py | 18 +++++++++--------- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 6558242c5..13a995fbd 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -37,7 +37,7 @@ class VWSError(Exception): Base class for Vuforia Web Services errors. These errors are defined at - https://library.vuforia.com/web-api/cloud-targets-web-services-api#result-codes. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes. """ def __init__(self, response: Response) -> None: diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 1c7790cbf..33f98187c 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -1,6 +1,6 @@ """ Exceptions which do not map to errors at -https://library.vuforia.com/web-api/cloud-targets-web-services-api#result-codes +https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes or simple errors given by the cloud recognition service. """ diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 9d00d7518..f626aeee6 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -1,7 +1,7 @@ """ Exception raised when Vuforia returns a response with a result code matching one of those documented at -https://library.vuforia.com/web-api/cloud-targets-web-services-api#result-codes. +https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes. """ import json diff --git a/src/vws/query.py b/src/vws/query.py index db05fd7f5..cb86373da 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -72,7 +72,7 @@ def query( Use the Vuforia Web Query API to make an Image Recognition Query. See - https://library.vuforia.com/web-api/vuforia-query-web-api + https://developer.vuforia.com/library/web-api/vuforia-query-web-api for parameter details. Args: diff --git a/src/vws/reports.py b/src/vws/reports.py index 479690cdd..2784ff078 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -13,7 +13,7 @@ class DatabaseSummaryReport: A database summary report. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#summary-report. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. """ active_images: int @@ -34,7 +34,7 @@ class TargetStatuses(Enum): """Constants representing VWS target statuses. See the 'status' field in - https://library.vuforia.com/web-api/cloud-targets-web-services-api#target-record + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record """ PROCESSING = "processing" @@ -48,7 +48,7 @@ class TargetSummaryReport: A target summary report. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#summary-report. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. """ status: TargetStatuses @@ -68,7 +68,7 @@ class TargetRecord: A target record. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#target-record. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. """ target_id: str @@ -96,7 +96,7 @@ class QueryResult: One query match result. See - https://library.vuforia.com/web-api/vuforia-query-web-api. + https://developer.vuforia.com/library/web-api/vuforia-query-web-api. """ target_id: str @@ -109,7 +109,7 @@ class TargetStatusAndRecord: The target status and a target record. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#target-record. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. """ status: TargetStatuses diff --git a/src/vws/vws.py b/src/vws/vws.py index 54a1d51cc..30d2638b9 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -167,7 +167,7 @@ def _make_request( request_path: The path to the endpoint which will be used in the request. expected_result_code: See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#result-codes + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes Returns: The response to the request made by `requests`. @@ -247,7 +247,7 @@ def add_target( Add a target to a Vuforia Web Services database. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#add + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#add for parameter details. Args: @@ -319,7 +319,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: Get a given target's target record from the Target Management System. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#target-record. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. Args: target_id: The ID of the target to get details of. @@ -420,7 +420,7 @@ def list_targets(self) -> list[str]: List target IDs. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#details-list. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#details-list. Returns: The IDs of all targets in the database. @@ -452,7 +452,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: Get a summary report for a target. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#summary-report. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. Args: target_id: The ID of the target to get a summary report for. @@ -500,7 +500,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: Get a summary report for the database. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#summary-report. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. Returns: Details of the database. @@ -546,7 +546,7 @@ def delete_target(self, target_id: str) -> None: Delete a given target. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#delete. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#delete. Args: target_id: The ID of the target to delete. @@ -580,7 +580,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: Get targets which may be considered duplicates of a given target. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#check. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#check. Args: target_id: The ID of the target to delete. @@ -627,7 +627,7 @@ def update_target( Add a target to a Vuforia Web Services database. See - https://library.vuforia.com/web-api/cloud-targets-web-services-api#add + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#add for parameter details. Args: From d5e13932e943aa184edd2dfd8ecf1f176234f70b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:37:14 +0000 Subject: [PATCH 237/641] Bump pyright from 1.1.366 to 1.1.367 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.366 to 1.1.367. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.366...v1.1.367) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 97cc44b06..2aaaab0f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.3", "pyproject-fmt==2.1.3", - "pyright==1.1.366", + "pyright==1.1.367", "pyroma==4.2", "pytest==8.2.2", "pytest-cov==5.0.0", From 9e9a93edf2277b5b4deb9520cc2e8015709a1b28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:25:20 +0000 Subject: [PATCH 238/641] Bump ruff from 0.4.8 to 0.4.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.8 to 0.4.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.8...v0.4.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2aaaab0f9..ae1210943 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.4.8", + "ruff==0.4.9", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From 5e039c659abc08901b3afc743e952753bb8232bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 10:29:42 +0000 Subject: [PATCH 239/641] Bump pyright from 1.1.367 to 1.1.368 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.367 to 1.1.368. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.367...v1.1.368) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ae1210943..aee9c6133 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.3", "pyproject-fmt==2.1.3", - "pyright==1.1.367", + "pyright==1.1.368", "pyroma==4.2", "pytest==8.2.2", "pytest-cov==5.0.0", From e52331013d9034514b10dfc4294f3f731254d897 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:13:16 +0000 Subject: [PATCH 240/641] Bump ruff from 0.4.9 to 0.4.10 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.9 to 0.4.10. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.9...v0.4.10) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aee9c6133..2ea433be4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.4.9", + "ruff==0.4.10", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From 1fea6b64c0d353349df9d8c1beff9aefc16fdfa3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:55:46 +0000 Subject: [PATCH 241/641] Bump types-requests from 2.32.0.20240602 to 2.32.0.20240622 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240602 to 2.32.0.20240622. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2ea433be4..5ce6e4829 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.32.0.20240602", + "types-requests==2.32.0.20240622", "vulture==2.11", "vws-python-mock==2024.2.16", "vws-test-fixtures==2023.3.5", From d2a9698f0ca0d95deab8aeaffb66f76184e2ff3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:25:52 +0000 Subject: [PATCH 242/641] Bump mypy from 1.10.0 to 1.10.1 Bumps [mypy](https://github.com/python/mypy) from 1.10.0 to 1.10.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.10.0...v1.10.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5ce6e4829..0d834bdff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.5.6", "interrogate==1.7.0", - "mypy==1.10.0", + "mypy==1.10.1", "pre-commit==3.7.1", "pydocstyle==6.3", "pyenchant==3.2.2", From b5330d91339f535724d6caa6e0804815ec39470d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:53:11 +0000 Subject: [PATCH 243/641] Bump pylint from 3.2.3 to 3.2.4 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.3 to 3.2.4. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.3...v3.2.4) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0d834bdff..4587f38b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.2.3", + "pylint==3.2.4", "pyproject-fmt==2.1.3", "pyright==1.1.368", "pyroma==4.2", From 65576690297a0024dd3d5fed4bddc20ad7cecdeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 10:39:33 +0000 Subject: [PATCH 244/641] Bump ruff from 0.4.10 to 0.5.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.10 to 0.5.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.10...0.5.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4587f38b9..2c23d4acd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.4.10", + "ruff==0.5.0", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From 62575fa03f36cd8ac131475e1184a4f595e92604 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:20:17 +0000 Subject: [PATCH 245/641] Bump pyright from 1.1.368 to 1.1.369 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.368 to 1.1.369. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.368...v1.1.369) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2c23d4acd..549f372bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.4", "pyproject-fmt==2.1.3", - "pyright==1.1.368", + "pyright==1.1.369", "pyroma==4.2", "pytest==8.2.2", "pytest-cov==5.0.0", From 05d69fc22ea6873a954824172409d23cb516dbbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 10:26:02 +0000 Subject: [PATCH 246/641] Bump pylint from 3.2.4 to 3.2.5 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.4 to 3.2.5. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.4...v3.2.5) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 549f372bc..fc89a68e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.2.4", + "pylint==3.2.5", "pyproject-fmt==2.1.3", "pyright==1.1.369", "pyroma==4.2", From 75feb5a5a6bb4806573a49be43d9c792f098fac7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 2 Jul 2024 14:15:02 +0100 Subject: [PATCH 247/641] Install check-wheel-contents before attempting to use it in release process --- .github/workflows/release.yml | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d92b7124..237858d8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,7 +81,7 @@ jobs: # Checkout the latest tag - the one we just created. git fetch --tags git checkout "$(git describe --tags "$(git rev-list --tags --max-count=1)")" - python -m pip install build + python -m pip install build check-wheel-contents python -m build --sdist --wheel --outdir dist/ . check-wheel-contents dist/*.whl diff --git a/pyproject.toml b/pyproject.toml index fc89a68e7..f9805b24b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,6 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.1.15", "check-manifest==0.49", - "check-wheel-contents==0.6.0", "deptry==0.16.1", "doc8==1.1.1", "freezegun==1.5.1", From c805b4a99608a84483ff313fac9dc76eec293a47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 13:28:34 +0000 Subject: [PATCH 248/641] Bump vws-python-mock from 2024.2.16 to 2024.7.2.1 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2024.2.16 to 2024.7.2.1. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2024.02.16...2024.07.02.1) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f9805b24b..d15ae4691 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ optional-dependencies.dev = [ "sybil==6.1.1", "types-requests==2.32.0.20240622", "vulture==2.11", - "vws-python-mock==2024.2.16", + "vws-python-mock==2024.7.2.1", "vws-test-fixtures==2023.3.5", ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" From 84f7028075f72774c46770769ab48ec63b3853e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:03:34 +0000 Subject: [PATCH 249/641] Bump pyright from 1.1.369 to 1.1.370 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.369 to 1.1.370. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.369...v1.1.370) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d15ae4691..e5b31bf2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.5", "pyproject-fmt==2.1.3", - "pyright==1.1.369", + "pyright==1.1.370", "pyroma==4.2", "pytest==8.2.2", "pytest-cov==5.0.0", From 85e8a7c8c8b1fe4869a98f38059bb158c17cff51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:07:56 +0000 Subject: [PATCH 250/641] Bump pyproject-fmt from 2.1.3 to 2.1.4 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.1.3 to 2.1.4. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.1.3...2.1.4) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5b31bf2b..a21209cb7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pyenchant==3.2.2", "pygments==2.18.0", "pylint==3.2.5", - "pyproject-fmt==2.1.3", + "pyproject-fmt==2.1.4", "pyright==1.1.370", "pyroma==4.2", "pytest==8.2.2", From f0b363641794219ee86e8941d715d9589da04abf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:58:46 +0000 Subject: [PATCH 251/641] Bump deptry from 0.16.1 to 0.16.2 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.16.1 to 0.16.2. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.16.1...0.16.2) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a21209cb7..6f17b9faa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.1.15", "check-manifest==0.49", - "deptry==0.16.1", + "deptry==0.16.2", "doc8==1.1.1", "freezegun==1.5.1", "furo==2024.5.6", From 4b4c2286d831b3bb7e6c35e94c9467856f577007 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:03:38 +0000 Subject: [PATCH 252/641] Bump ruff from 0.5.0 to 0.5.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.0 to 0.5.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.0...0.5.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6f17b9faa..73010680c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.5.0", + "ruff==0.5.1", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From 12d5b47eb6369d842c972970ac849a171d21e63e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:08:52 +0000 Subject: [PATCH 253/641] Bump pyright from 1.1.370 to 1.1.371 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.370 to 1.1.371. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.370...v1.1.371) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 73010680c..fab59ba58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.5", "pyproject-fmt==2.1.4", - "pyright==1.1.370", + "pyright==1.1.371", "pyroma==4.2", "pytest==8.2.2", "pytest-cov==5.0.0", From 8dacba61aa71a58f10dddfe14b4b64778bbaf443 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:30:49 +0000 Subject: [PATCH 254/641] Bump types-requests from 2.32.0.20240622 to 2.32.0.20240712 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240622 to 2.32.0.20240712. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fab59ba58..5285b75ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.32.0.20240622", + "types-requests==2.32.0.20240712", "vulture==2.11", "vws-python-mock==2024.7.2.1", "vws-test-fixtures==2023.3.5", From 5543b810235628557bec10e29100060ac32dbf65 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 13 Jul 2024 17:14:02 +0100 Subject: [PATCH 255/641] Use more common way of encoding bytes - for readability --- src/vws/vws.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 30d2638b9..dd3bbf239 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -293,7 +293,9 @@ def add_target( rate limiting access. """ image_data = _get_image_data(image=image) - image_data_encoded = base64.b64encode(image_data).decode("ascii") + image_data_encoded = base64.b64encode(s=image_data).decode( + encoding="ascii", + ) data = { "name": name, @@ -303,7 +305,7 @@ def add_target( "application_metadata": application_metadata, } - content = bytes(json.dumps(data), encoding="utf-8") + content = json.dumps(obj=data).encode(encoding="utf-8") response = self._make_request( method=HTTPMethod.POST, @@ -687,7 +689,7 @@ def update_target( if application_metadata is not None: data["application_metadata"] = application_metadata - content = bytes(json.dumps(data), encoding="utf-8") + content = json.dumps(obj=data).encode(encoding="utf-8") self._make_request( method=HTTPMethod.PUT, From 8b916a92734309e9b70521d25114017c714bbf78 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 13 Jul 2024 21:57:56 +0100 Subject: [PATCH 256/641] Fix reference errors in update_target docs --- src/vws/vws.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index dd3bbf239..03a23f5c1 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -626,14 +626,14 @@ def update_target( application_metadata: str | None = None, ) -> None: """ - Add a target to a Vuforia Web Services database. + Update a target in a Vuforia Web Services database. See - https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#add + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#update for parameter details. Args: - target_id: The ID of the target to get details of. + target_id: The ID of the target to update. name: The name of the target. width: The width of the target. image: The image of the target. From d1eb5570c1be3cbe396fb7c81196941eb79fc858 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:37:03 +0000 Subject: [PATCH 257/641] Bump ruff from 0.5.1 to 0.5.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.1 to 0.5.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.1...0.5.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5285b75ba..cbb05e19a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.5.1", + "ruff==0.5.2", "sphinx==7.3.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From 73bb66ef4a5227a365bce1e826db18769df108ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:41:45 +0000 Subject: [PATCH 258/641] Bump sphinx from 7.3.7 to 7.4.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.3.7 to 7.4.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.3.7...v7.4.1) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cbb05e19a..d865924e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.5.2", - "sphinx==7.3.7", + "sphinx==7.4.1", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", From 3f2e5ec2e6c1ac34697e88afbb3000ac4e69e8ea Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 15 Jul 2024 18:15:45 +0100 Subject: [PATCH 259/641] Rename internal 'content' argument name to match requests --- src/vws/vws.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 03a23f5c1..8b1c3b7fc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -66,7 +66,7 @@ def _target_api_request( server_access_key: str, server_secret_key: str, method: str, - content: bytes, + data: bytes, request_path: str, base_vws_url: str, ) -> Response: @@ -80,7 +80,7 @@ def _target_api_request( server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. method: The HTTP method which will be used in the request. - content: The request body which will be used in the request. + data: The request body which will be used in the request. request_path: The path to the endpoint which will be used in the request. base_vws_url: The base URL for the VWS API. @@ -95,7 +95,7 @@ def _target_api_request( access_key=server_access_key, secret_key=server_secret_key, method=method, - content=content, + content=data, content_type=content_type, date=date_string, request_path=request_path, @@ -113,7 +113,7 @@ def _target_api_request( method=method, url=url, headers=headers, - data=content, + data=data, # We should make the timeout customizable. timeout=30, ) @@ -151,7 +151,7 @@ def __init__( def _make_request( self, method: str, - content: bytes, + data: bytes, request_path: str, expected_result_code: str, ) -> Response: @@ -163,7 +163,7 @@ def _make_request( Args: method: The HTTP method which will be used in the request. - content: The request body which will be used in the request. + data: The request body which will be used in the request. request_path: The path to the endpoint which will be used in the request. expected_result_code: See @@ -189,7 +189,7 @@ def _make_request( server_access_key=self._server_access_key, server_secret_key=self._server_secret_key, method=method, - content=content, + data=data, request_path=request_path, base_vws_url=self._base_vws_url, ) @@ -309,7 +309,7 @@ def add_target( response = self._make_request( method=HTTPMethod.POST, - content=content, + data=content, request_path="/targets", expected_result_code="TargetCreated", ) @@ -346,7 +346,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: """ response = self._make_request( method=HTTPMethod.GET, - content=b"", + data=b"", request_path=f"/targets/{target_id}", expected_result_code="Success", ) @@ -442,7 +442,7 @@ def list_targets(self) -> list[str]: """ response = self._make_request( method=HTTPMethod.GET, - content=b"", + data=b"", request_path="/targets", expected_result_code="Success", ) @@ -479,7 +479,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: """ response = self._make_request( method=HTTPMethod.GET, - content=b"", + data=b"", request_path=f"/summary/{target_id}", expected_result_code="Success", ) @@ -522,7 +522,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: """ response = self._make_request( method=HTTPMethod.GET, - content=b"", + data=b"", request_path="/summary", expected_result_code="Success", ) @@ -572,7 +572,7 @@ def delete_target(self, target_id: str) -> None: """ self._make_request( method=HTTPMethod.DELETE, - content=b"", + data=b"", request_path=f"/targets/{target_id}", expected_result_code="Success", ) @@ -609,7 +609,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: """ response = self._make_request( method=HTTPMethod.GET, - content=b"", + data=b"", request_path=f"/duplicates/{target_id}", expected_result_code="Success", ) @@ -693,7 +693,7 @@ def update_target( self._make_request( method=HTTPMethod.PUT, - content=content, + data=content, request_path=f"/targets/{target_id}", expected_result_code="Success", ) From 4766111942ff5cd95b4e5c19f450d62e14ce2da7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:39:15 +0000 Subject: [PATCH 260/641] Bump sphinx from 7.4.1 to 7.4.4 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.1 to 7.4.4. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.1...v7.4.4) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d865924e6..efc783a17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.5.2", - "sphinx==7.4.1", + "sphinx==7.4.4", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", From d9cd52c0cae1de82fdf8df7a520ae6d9d77fcb3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:43:57 +0000 Subject: [PATCH 261/641] Bump vws-python-mock from 2024.7.2.1 to 2024.7.15 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2024.7.2.1 to 2024.7.15. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2024.07.02.1...2024.07.15) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index efc783a17..7d63025c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ optional-dependencies.dev = [ "sybil==6.1.1", "types-requests==2.32.0.20240712", "vulture==2.11", - "vws-python-mock==2024.7.2.1", + "vws-python-mock==2024.7.15", "vws-test-fixtures==2023.3.5", ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" From 416795d6dd668060c72079d041a1c2113f15f2e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 11:03:08 +0000 Subject: [PATCH 262/641] Bump sphinx from 7.4.4 to 7.4.5 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.4 to 7.4.5. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.4...v7.4.5) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7d63025c7..860450181 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.5.2", - "sphinx==7.4.4", + "sphinx==7.4.5", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", From e83040c5c8e8c3b2dc539b9e685a9723bc92d18f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 11:07:44 +0000 Subject: [PATCH 263/641] Bump pyright from 1.1.371 to 1.1.372 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.371 to 1.1.372. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.371...v1.1.372) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 860450181..e29c23c6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.5", "pyproject-fmt==2.1.4", - "pyright==1.1.371", + "pyright==1.1.372", "pyroma==4.2", "pytest==8.2.2", "pytest-cov==5.0.0", From 16ab55dedab73e36c242569cbe66b7022388da5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 10:53:41 +0000 Subject: [PATCH 264/641] Bump furo from 2024.5.6 to 2024.7.18 Bumps [furo](https://github.com/pradyunsg/furo) from 2024.5.6 to 2024.7.18. - [Release notes](https://github.com/pradyunsg/furo/releases) - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md) - [Commits](https://github.com/pradyunsg/furo/compare/2024.05.06...2024.07.18) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e29c23c6d..dcaeaaf88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "deptry==0.16.2", "doc8==1.1.1", "freezegun==1.5.1", - "furo==2024.5.6", + "furo==2024.7.18", "interrogate==1.7.0", "mypy==1.10.1", "pre-commit==3.7.1", From 0f885f0ef06faee757336565fa7322e75c9c483c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 10:14:20 +0000 Subject: [PATCH 265/641] Bump sphinx from 7.4.5 to 7.4.6 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.5 to 7.4.6. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.5...v7.4.6) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dcaeaaf88..01aeb4576 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.5.2", - "sphinx==7.4.5", + "sphinx==7.4.6", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", From fcfebe8ecac40fafdcd207409cd48bb7c6e8ac9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 10:19:07 +0000 Subject: [PATCH 266/641] Bump ruff from 0.5.2 to 0.5.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.2 to 0.5.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.2...0.5.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 01aeb4576..177ecd24a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.5.2", + "ruff==0.5.3", "sphinx==7.4.6", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From 1dcfc2a49a09b5a98e3e05186dc2567fc3cb3162 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:42:30 +0000 Subject: [PATCH 267/641] Bump ruff from 0.5.3 to 0.5.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.3 to 0.5.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.3...0.5.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 177ecd24a..611713390 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.2.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.5.3", + "ruff==0.5.4", "sphinx==7.4.6", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From 5569e8367692a2959e70648a10591383c3393b54 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:46:54 +0000 Subject: [PATCH 268/641] Bump deptry from 0.16.2 to 0.17.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.16.2 to 0.17.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.16.2...0.17.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 611713390..31603d3b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.1.15", "check-manifest==0.49", - "deptry==0.16.2", + "deptry==0.17.0", "doc8==1.1.1", "freezegun==1.5.1", "furo==2024.7.18", From ba2f5675b233193b2ee7e67e7106df32ad812832 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:51:37 +0000 Subject: [PATCH 269/641] Bump pylint from 3.2.5 to 3.2.6 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.5 to 3.2.6. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.5...v3.2.6) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 31603d3b7..4124a8348 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.2.5", + "pylint==3.2.6", "pyproject-fmt==2.1.4", "pyright==1.1.372", "pyroma==4.2", From 5196a9c42d8d84807ed73a7d3d6fd2701f78c9c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:56:03 +0000 Subject: [PATCH 270/641] Bump sphinx from 7.4.6 to 7.4.7 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.6 to 7.4.7. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.6...v7.4.7) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4124a8348..f0eab5e80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.5.4", - "sphinx==7.4.6", + "sphinx==7.4.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", From b9f3959290f7a5916d4cc8c63df0537670196320 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:00:42 +0000 Subject: [PATCH 271/641] Bump pytest from 8.2.2 to 8.3.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.2 to 8.3.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.2...8.3.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f0eab5e80..9041c88c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.1.4", "pyright==1.1.372", "pyroma==4.2", - "pytest==8.2.2", + "pytest==8.3.1", "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.5.4", From 9212bf7dfacfbf7496e0b9b1c82e99485bc0297e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:05:44 +0000 Subject: [PATCH 272/641] Bump mypy from 1.10.1 to 1.11.0 Bumps [mypy](https://github.com/python/mypy) from 1.10.1 to 1.11.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.10.1...v1.11) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9041c88c6..4a58bc6b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.7.18", "interrogate==1.7.0", - "mypy==1.10.1", + "mypy==1.11.0", "pre-commit==3.7.1", "pydocstyle==6.3", "pyenchant==3.2.2", From 340c7c7dd5e135102362c66b419f3db2bfc887f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:25:05 +0000 Subject: [PATCH 273/641] Bump pyright from 1.1.372 to 1.1.373 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.372 to 1.1.373. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.372...v1.1.373) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a58bc6b7..d5713249d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.6", "pyproject-fmt==2.1.4", - "pyright==1.1.372", + "pyright==1.1.373", "pyroma==4.2", "pytest==8.3.1", "pytest-cov==5.0.0", From ce2a1e65962d0c64195eb1f136c4dbe06a337c7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 10:25:07 +0000 Subject: [PATCH 274/641] Bump ruff from 0.5.4 to 0.5.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.4 to 0.5.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.4...0.5.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d5713249d..35abcd163 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.3.1", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.5.4", + "ruff==0.5.5", "sphinx==7.4.7", "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", From aff714381dab2ac484cb6488faca306734f6895f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 10:30:09 +0000 Subject: [PATCH 275/641] Bump pytest from 8.3.1 to 8.3.2 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.1 to 8.3.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.1...8.3.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 35abcd163..c247c1798 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.1.4", "pyright==1.1.373", "pyroma==4.2", - "pytest==8.3.1", + "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.5.5", From 225b0dc955484152108b6e153b09a8876cb7829e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:37:26 +0000 Subject: [PATCH 276/641] Bump pre-commit from 3.7.1 to 3.8.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.7.1 to 3.8.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.7.1...v3.8.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c247c1798..2c5fa9a76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ optional-dependencies.dev = [ "furo==2024.7.18", "interrogate==1.7.0", "mypy==1.11.0", - "pre-commit==3.7.1", + "pre-commit==3.8.0", "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", From 110c352670a72381bb9e8b3f9b312b41bf616c5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:30:43 +0000 Subject: [PATCH 277/641] Bump mypy from 1.11.0 to 1.11.1 Bumps [mypy](https://github.com/python/mypy) from 1.11.0 to 1.11.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11...v1.11.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2c5fa9a76..4adea5f26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.7.18", "interrogate==1.7.0", - "mypy==1.11.0", + "mypy==1.11.1", "pre-commit==3.8.0", "pydocstyle==6.3", "pyenchant==3.2.2", From 9912cee7106246de8f4e7b942d1f92e0724a2ab4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:35:35 +0000 Subject: [PATCH 278/641] Bump deptry from 0.17.0 to 0.18.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.17.0 to 0.18.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.17.0...0.18.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4adea5f26..ab38adbe3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.1.15", "check-manifest==0.49", - "deptry==0.17.0", + "deptry==0.18.0", "doc8==1.1.1", "freezegun==1.5.1", "furo==2024.7.18", From 804cb86c6fba4207724f27365a75d76fc043bd77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:40:00 +0000 Subject: [PATCH 279/641] Bump pyright from 1.1.373 to 1.1.374 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.373 to 1.1.374. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.373...v1.1.374) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ab38adbe3..40a25ee5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.6", "pyproject-fmt==2.1.4", - "pyright==1.1.373", + "pyright==1.1.374", "pyroma==4.2", "pytest==8.3.2", "pytest-cov==5.0.0", From c980e85adeb7f5d21c1c86ac5529fd2b6491821f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:45:10 +0000 Subject: [PATCH 280/641] Bump pyproject-fmt from 2.1.4 to 2.2.0 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.1.4 to 2.2.0. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.1.4...2.2.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 40a25ee5d..eb737fd7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pyenchant==3.2.2", "pygments==2.18.0", "pylint==3.2.6", - "pyproject-fmt==2.1.4", + "pyproject-fmt==2.2.0", "pyright==1.1.374", "pyroma==4.2", "pytest==8.3.2", From 18e306a4aae363914f8a4b7efd7f4d29b3daab59 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 31 Jul 2024 15:30:56 +0100 Subject: [PATCH 281/641] Skip system Python checks in pre-commit CI --- .pre-commit-config.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40e612a80..81166ec44 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,31 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks + +ci: + # We use system Python, with required dependencies specified in pyproject.toml. + # We therefore cannot use those dependencies in pre-commit CI. + skip: + - actionlint + - mypy + - check-manifest + - pyright + - vulture + - pyroma + - deptry + - pylint + - ruff-check + - ruff-format-check + - ruff-check-fix + - ruff-format-fix + - doc8 + - interrogate + - pyproject-fmt-check + - pyproject-fmt-fix + - linkcheck + - spelling + - docs + - pyright-verifytypes + default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: - repo: https://github.com/pre-commit/pre-commit-hooks From 39b0fe6127c4128da2956693b7f8fecc5e2c59dc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 1 Aug 2024 11:18:59 +0100 Subject: [PATCH 282/641] Remove sphinx-prompt dependency It is no longer needed for my purposes, and it is not yet supported on Sphinx 8. --- docs/source/conf.py | 1 - docs/source/contributing.rst | 34 ++++++++++++++++----------------- docs/source/index.rst | 8 ++++---- docs/source/release-process.rst | 4 ++-- pyproject.toml | 1 - 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index d6ecf811c..99e3e3b85 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,7 +15,6 @@ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", - "sphinx-prompt", "sphinx_substitution_extensions", "sphinxcontrib.spelling", ] diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index d8e8b5af9..2a61da727 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -10,39 +10,39 @@ Install contribution dependencies Install Python dependencies in a virtual environment. -.. prompt:: bash +.. code-block:: console - pip install --editable '.[dev]' + $ pip install --editable '.[dev]' Spell checking requires ``enchant``. This can be installed on macOS, for example, with `Homebrew`_: -.. prompt:: bash +.. code-block:: console - brew install enchant + $ brew install enchant and on Ubuntu with ``apt``: -.. prompt:: bash +.. code-block:: console - apt-get install -y enchant + $ apt-get install -y enchant Install ``pre-commit`` hooks: -.. prompt:: bash +.. code-block:: console - pre-commit install + $ pre-commit install Linting ------- Run lint tools either by committing, or with: -.. prompt:: bash +.. code-block:: console - pre-commit run --all-files --hook-stage commit --verbose - pre-commit run --all-files --hook-stage push --verbose - pre-commit run --all-files --hook-stage manual --verbose + $ pre-commit run --all-files --hook-stage commit --verbose + $ pre-commit run --all-files --hook-stage push --verbose + $ pre-commit run --all-files --hook-stage manual --verbose .. _Homebrew: https://brew.sh @@ -51,9 +51,9 @@ Running tests Run ``pytest``: -.. prompt:: bash +.. code-block:: console - pytest + $ pytest Documentation ------------- @@ -62,10 +62,10 @@ Documentation is built on Read the Docs. Run the following commands to build and view documentation locally: -.. prompt:: bash +.. code-block:: console - make docs - make open-docs + $ make docs + $ make open-docs Continuous integration ---------------------- diff --git a/docs/source/index.rst b/docs/source/index.rst index 630355629..287ce7df1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -4,9 +4,9 @@ Installation ------------ -.. prompt:: bash +.. code-block:: console - pip3 install vws-python + $ pip install vws-python This is tested on Python 3.8+. Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. @@ -90,9 +90,9 @@ Testing To write unit tests for code which uses this library, without using your Vuforia quota, you can use the `VWS Python Mock`_ tool: -.. prompt:: bash +.. code-block:: console - pip3 install vws-python-mock + $ pip install vws-python-mock .. clear-namespace diff --git a/docs/source/release-process.rst b/docs/source/release-process.rst index d947f9fd3..0c662f553 100644 --- a/docs/source/release-process.rst +++ b/docs/source/release-process.rst @@ -14,9 +14,9 @@ Perform a Release #. Perform a release: - .. prompt:: bash + .. code-block:: console :substitutions: - gh workflow run release.yml --repo |github-owner|/|github-repository| + $ gh workflow run release.yml --repo |github-owner|/|github-repository| .. _Install GitHub CLI: https://cli.github.com/ diff --git a/pyproject.toml b/pyproject.toml index eb737fd7b..50839b4e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,6 @@ optional-dependencies.dev = [ "pyyaml==6.0.1", "ruff==0.5.5", "sphinx==7.4.7", - "sphinx-prompt==1.8", "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.1.1", From 35252f6a74eecac9ad3f167849680f599c617218 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:03:54 +0000 Subject: [PATCH 283/641] Bump pyproject-fmt from 2.2.0 to 2.2.1 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.2.0...2.2.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 50839b4e9..9a77de7e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pyenchant==3.2.2", "pygments==2.18.0", "pylint==3.2.6", - "pyproject-fmt==2.2.0", + "pyproject-fmt==2.2.1", "pyright==1.1.374", "pyroma==4.2", "pytest==8.3.2", From 4f4ece131405e0a7b4a767497906d4692612a8a7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 1 Aug 2024 13:42:39 +0100 Subject: [PATCH 284/641] Use sphinx-copybutton to add a copy button to documentation code blocks --- docs/source/conf.py | 5 +++++ pyproject.toml | 1 + 2 files changed, 6 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 99e3e3b85..3d3152128 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,6 +12,7 @@ author = "Adam Dangoor" extensions = [ + "sphinx_copybutton", "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", @@ -26,6 +27,10 @@ year = datetime.datetime.now(tz=datetime.UTC).year project_copyright = f"{year}, {author}" +# Exclude the prompt from copied code with sphinx_copybutton. + # https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies. + copybutton_exclude = ".linenos, .gp" + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. diff --git a/pyproject.toml b/pyproject.toml index 9a77de7e1..4a54bcafa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,7 @@ optional-dependencies.dev = [ "pyyaml==6.0.1", "ruff==0.5.5", "sphinx==7.4.7", + "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.2.25", "sphinxcontrib-spelling==8", "sybil==6.1.1", From f6eec6ef5f4281306e10ab1b61114cc7bed5bf66 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 1 Aug 2024 13:46:08 +0100 Subject: [PATCH 285/641] Fix indentation issue --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 3d3152128..70ad3a80b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,8 +28,8 @@ project_copyright = f"{year}, {author}" # Exclude the prompt from copied code with sphinx_copybutton. - # https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies. - copybutton_exclude = ".linenos, .gp" +# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies. +copybutton_exclude = ".linenos, .gp" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the From fa54b422b58dfddf9d0eff091eda63b6a0083aee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:21:20 +0000 Subject: [PATCH 286/641] Bump ruff from 0.5.5 to 0.5.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.5...0.5.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a54bcafa..2b14a75ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.1", - "ruff==0.5.5", + "ruff==0.5.6", "sphinx==7.4.7", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.2.25", From 6ec53a7fdea138210e8c0b4785e08c7d810e2f83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:35:06 +0000 Subject: [PATCH 287/641] Bump furo from 2024.7.18 to 2024.8.6 Bumps [furo](https://github.com/pradyunsg/furo) from 2024.7.18 to 2024.8.6. - [Release notes](https://github.com/pradyunsg/furo/releases) - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md) - [Commits](https://github.com/pradyunsg/furo/compare/2024.07.18...2024.08.06) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2b14a75ee..e72d6e295 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "deptry==0.18.0", "doc8==1.1.1", "freezegun==1.5.1", - "furo==2024.7.18", + "furo==2024.8.6", "interrogate==1.7.0", "mypy==1.11.1", "pre-commit==3.8.0", From 00415a9541b81c25f5d8971b22c44d8d2704c3fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:30:05 +0000 Subject: [PATCH 288/641] Bump sphinx-substitution-extensions from 2024.2.25 to 2024.8.6 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2024.2.25 to 2024.8.6. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2024.02.25...2024.08.06) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e72d6e295..edf95fe21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "ruff==0.5.6", "sphinx==7.4.7", "sphinx-copybutton==0.5.2", - "sphinx-substitution-extensions==2024.2.25", + "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==6.1.1", "types-requests==2.32.0.20240712", From c31a01ac4beaa596e3c2259e44b782237e039dde Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:37:40 +0000 Subject: [PATCH 289/641] Bump sphinx from 7.4.7 to 8.0.2 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.7 to 8.0.2. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.7...v8.0.2) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index edf95fe21..71356a1b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest-cov==5.0.0", "pyyaml==6.0.1", "ruff==0.5.6", - "sphinx==7.4.7", + "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", From 31150f72406a65f8e12da2ec54e757a44d0aeb8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 10:12:12 +0000 Subject: [PATCH 290/641] Bump pyright from 1.1.374 to 1.1.375 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.374 to 1.1.375. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.374...v1.1.375) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 71356a1b0..4c2b1abbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.6", "pyproject-fmt==2.2.1", - "pyright==1.1.374", + "pyright==1.1.375", "pyroma==4.2", "pytest==8.3.2", "pytest-cov==5.0.0", From 6ca3b8871a0680b4df71f665a9375ee40d50fa6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 10:21:00 +0000 Subject: [PATCH 291/641] Bump pyyaml from 6.0.1 to 6.0.2 Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/main/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2) --- updated-dependencies: - dependency-name: pyyaml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4c2b1abbe..dd75a9301 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pyroma==4.2", "pytest==8.3.2", "pytest-cov==5.0.0", - "pyyaml==6.0.1", + "pyyaml==6.0.2", "ruff==0.5.6", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", From 5d5218572d5a398f418e17b957fffb69f7e547b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:03:54 +0000 Subject: [PATCH 292/641] Bump deptry from 0.18.0 to 0.19.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.18.0 to 0.19.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.18.0...0.19.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dd75a9301..79145926b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.1.15", "check-manifest==0.49", - "deptry==0.18.0", + "deptry==0.19.0", "doc8==1.1.1", "freezegun==1.5.1", "furo==2024.8.6", From 48469d1f619d2308ece9642edf68374d9d93f543 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:57:16 +0000 Subject: [PATCH 293/641] Bump ruff from 0.5.6 to 0.5.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.6 to 0.5.7. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.6...0.5.7) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 79145926b..0738f15a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.5.6", + "ruff==0.5.7", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From 365c18b06df5bb5ab5c4a5402f01e5ccf70ac103 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 10:35:17 +0000 Subject: [PATCH 294/641] Bump deptry from 0.19.0 to 0.19.1 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.19.0 to 0.19.1. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.19.0...0.19.1) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0738f15a0..d8a12eeb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.1.15", "check-manifest==0.49", - "deptry==0.19.0", + "deptry==0.19.1", "doc8==1.1.1", "freezegun==1.5.1", "furo==2024.8.6", From 9763c2a4d2da01623ccfa1263acdb65897f7a9ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:10:23 +0000 Subject: [PATCH 295/641] Bump pyright from 1.1.375 to 1.1.376 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.375 to 1.1.376. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.375...v1.1.376) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d8a12eeb9..85c838fa9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.6", "pyproject-fmt==2.2.1", - "pyright==1.1.375", + "pyright==1.1.376", "pyroma==4.2", "pytest==8.3.2", "pytest-cov==5.0.0", From cadd1334dca93ba43b8db449f81a677c86ae696c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:23:46 +0000 Subject: [PATCH 296/641] Bump ruff from 0.5.7 to 0.6.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.7 to 0.6.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.7...0.6.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 85c838fa9..362df3f48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.5.7", + "ruff==0.6.0", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From 6e371f5529b644ce6e93c676d5c92d55cbc80ab0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sat, 17 Aug 2024 07:03:29 +0000 Subject: [PATCH 297/641] [pre-commit.ci lite] apply automatic fixes --- tests/conftest.py | 7 ++++--- tests/test_cloud_reco_exceptions.py | 1 + tests/test_query.py | 1 + tests/test_vws.py | 1 + tests/test_vws_exceptions.py | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index ac8181bd7..c9498943f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,6 +10,7 @@ import pytest from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase + from vws import VWS, CloudRecoService if TYPE_CHECKING: @@ -28,7 +29,7 @@ def mock_database() -> Generator[VuforiaDatabase, None, None]: yield database -@pytest.fixture() +@pytest.fixture def vws_client(_mock_database: VuforiaDatabase) -> VWS: """ A VWS client which connects to a mock database. @@ -39,7 +40,7 @@ def vws_client(_mock_database: VuforiaDatabase) -> VWS: ) -@pytest.fixture() +@pytest.fixture def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: """ A ``CloudRecoService`` client which connects to a mock database. @@ -50,7 +51,7 @@ def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: ) -@pytest.fixture() +@pytest.fixture def image_file( high_quality_image: io.BytesIO, tmp_path: Path, diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 4e8a70895..69c4e49a4 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -12,6 +12,7 @@ from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase from mock_vws.states import States + from vws import CloudRecoService from vws.exceptions.base_exceptions import CloudRecoError from vws.exceptions.cloud_reco_exceptions import ( diff --git a/tests/test_query.py b/tests/test_query.py index 0a4357db5..50bf39d98 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -9,6 +9,7 @@ from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase + from vws import VWS, CloudRecoService from vws.include_target_data import CloudRecoIncludeTargetData diff --git a/tests/test_vws.py b/tests/test_vws.py index 28363c77e..28c026bf7 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -14,6 +14,7 @@ from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase + from vws import VWS, CloudRecoService from vws.exceptions.custom_exceptions import TargetProcessingTimeoutError from vws.reports import ( diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index b433c2754..65bea0ab2 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -11,6 +11,7 @@ from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase from mock_vws.states import States + from vws import VWS from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ( From de8830108ecc4c5f33916a2085831f2c38024432 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:10:22 +0000 Subject: [PATCH 298/641] Bump ruff from 0.6.0 to 0.6.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.0 to 0.6.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.0...0.6.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 362df3f48..c9982c925 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.0", + "ruff==0.6.1", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From 0c9aac792007eb5d51529e66c1219c3cf5bc7e90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:16:19 +0000 Subject: [PATCH 299/641] Bump pyright from 1.1.376 to 1.1.377 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.376 to 1.1.377. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.376...v1.1.377) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c9982c925..e861c370b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.6", "pyproject-fmt==2.2.1", - "pyright==1.1.376", + "pyright==1.1.377", "pyroma==4.2", "pytest==8.3.2", "pytest-cov==5.0.0", From 32bfbac257178a720777bbd0fc5c3c3628ff1c29 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 21 Aug 2024 21:24:12 +0100 Subject: [PATCH 300/641] Use typeguard to check pytest fixture/parametrization types --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e861c370b..6ba171204 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,6 +67,7 @@ optional-dependencies.dev = [ "vulture==2.11", "vws-python-mock==2024.7.15", "vws-test-fixtures==2023.3.5", + "typeguard==4.3.0", ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" urls.Source = "https://github.com/VWS-Python/vws-python" @@ -277,6 +278,9 @@ keep_full_version = true xfail_strict = true log_cli = true +typeguard-packages = """ +tests +""" [tool.coverage.run] From 3f18f33a5a51b5e569c11c6248064e2e11f23672 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 20:25:19 +0000 Subject: [PATCH 301/641] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6ba171204..9cd6e9cbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,11 +63,11 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==6.1.1", + "typeguard==4.3.0", "types-requests==2.32.0.20240712", "vulture==2.11", "vws-python-mock==2024.7.15", "vws-test-fixtures==2023.3.5", - "typeguard==4.3.0", ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" urls.Source = "https://github.com/VWS-Python/vws-python" From e1f3152cfe51d46d43e4881b032747f9b9d0b3c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:41:10 +0000 Subject: [PATCH 302/641] Bump ruff from 0.6.1 to 0.6.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.1 to 0.6.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.1...0.6.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9cd6e9cbb..663ebadb0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.1", + "ruff==0.6.2", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From dab3a2b7e57ffcd6e502cab332b6b9f9ebb3e52a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:45:09 +0000 Subject: [PATCH 303/641] Bump mypy from 1.11.1 to 1.11.2 Bumps [mypy](https://github.com/python/mypy) from 1.11.1 to 1.11.2. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11.1...v1.11.2) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 663ebadb0..1422b7bf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy==1.11.1", + "mypy==1.11.2", "pre-commit==3.8.0", "pydocstyle==6.3", "pyenchant==3.2.2", From 008971880a7cbc8fdc6d28975443a53295722fe4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:44:27 +0000 Subject: [PATCH 304/641] Bump deptry from 0.19.1 to 0.20.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.19.1 to 0.20.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.19.1...0.20.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1422b7bf2..00805221c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.1.15", "check-manifest==0.49", - "deptry==0.19.1", + "deptry==0.20.0", "doc8==1.1.1", "freezegun==1.5.1", "furo==2024.8.6", From 58909f876b9622c36afad293c2f1fe1e1cfbd9cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:10:26 +0000 Subject: [PATCH 305/641] Bump pyright from 1.1.377 to 1.1.378 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.377 to 1.1.378. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.377...v1.1.378) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 00805221c..46e4e3fff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.6", "pyproject-fmt==2.2.1", - "pyright==1.1.377", + "pyright==1.1.378", "pyroma==4.2", "pytest==8.3.2", "pytest-cov==5.0.0", From f1189c89de014a4be26309f540036f5dce3297e6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 29 Aug 2024 13:53:56 +0100 Subject: [PATCH 306/641] Run beartype on all tests --- conftest.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/conftest.py b/conftest.py index 881a76db2..1bbad0e64 100644 --- a/conftest.py +++ b/conftest.py @@ -2,6 +2,8 @@ from doctest import ELLIPSIS +import pytest +from beartype import beartype from sybil import Sybil from sybil.parsers.rest import ( ClearNamespaceParser, @@ -9,6 +11,16 @@ PythonCodeBlockParser, ) + +def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: + """ + Apply the beartype decorator to all collected test functions. + """ + for item in items: + if isinstance(item, pytest.Function): + item.obj = beartype(obj=item.obj) + + pytest_collect_file = Sybil( parsers=[ ClearNamespaceParser(), From bdd5c8e953a56c754d874bf23995d0f951c381d7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 29 Aug 2024 14:29:08 +0100 Subject: [PATCH 307/641] Update image type to reflect reality --- CHANGELOG.rst | 1 + src/vws/query.py | 9 +++++--- src/vws/vws.py | 9 ++++---- tests/conftest.py | 4 ++-- tests/test_cloud_reco_exceptions.py | 12 +++++++---- tests/test_query.py | 18 ++++++++-------- tests/test_vws.py | 32 ++++++++++++++--------------- tests/test_vws_exceptions.py | 28 +++++++++++++++---------- 8 files changed, 64 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c628649be..883b5f4e3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ Next * Breaking change: Exception names now end with ``Error``. * Use a timeout (30 seconds) when making requests to the VWS API. +* Type hint changes: images are now ``io.BytesIO`` instances or ``io.BufferedRandom``. 2024.02.19 ------------ diff --git a/src/vws/query.py b/src/vws/query.py index cb86373da..aeba29922 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -7,7 +7,7 @@ import datetime import json from http import HTTPMethod, HTTPStatus -from typing import Any, BinaryIO +from typing import TYPE_CHECKING, Any from urllib.parse import urljoin import requests @@ -29,8 +29,11 @@ from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData +if TYPE_CHECKING: + from io import BufferedRandom, BytesIO -def _get_image_data(image: BinaryIO) -> bytes: + +def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: """Get the data of an image file.""" original_tell = image.tell() image.seek(0) @@ -62,7 +65,7 @@ def __init__( def query( self, - image: BinaryIO, + image: BytesIO | BufferedRandom, max_num_results: int = 1, include_target_data: CloudRecoIncludeTargetData = ( CloudRecoIncludeTargetData.TOP diff --git a/src/vws/vws.py b/src/vws/vws.py index 8b1c3b7fc..52bd4b577 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -9,7 +9,7 @@ import time from datetime import date from http import HTTPMethod, HTTPStatus -from typing import TYPE_CHECKING, BinaryIO +from typing import TYPE_CHECKING from urllib.parse import urljoin import requests @@ -51,9 +51,10 @@ if TYPE_CHECKING: import io + from io import BufferedRandom, BytesIO -def _get_image_data(image: BinaryIO) -> bytes: +def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: """Get the data of an image file.""" original_tell = image.tell() image.seek(0) @@ -238,7 +239,7 @@ def add_target( self, name: str, width: float, - image: BinaryIO, + image: BytesIO | BufferedRandom, application_metadata: str | None, *, active_flag: bool, @@ -621,7 +622,7 @@ def update_target( target_id: str, name: str | None = None, width: float | None = None, - image: io.BytesIO | None = None, + image: io.BytesIO | io.BufferedRandom | None = None, active_flag: bool | None = None, application_metadata: str | None = None, ) -> None: diff --git a/tests/conftest.py b/tests/conftest.py index c9498943f..81c976346 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,7 @@ from __future__ import annotations import io -from typing import TYPE_CHECKING, BinaryIO +from typing import TYPE_CHECKING import pytest from mock_vws import MockVWS @@ -68,7 +68,7 @@ def image_file( @pytest.fixture(params=["high_quality_image", "image_file"]) def image( request: pytest.FixtureRequest, -) -> BinaryIO: +) -> io.BytesIO | io.BufferedRandom: """An image in any of the types that the API accepts.""" result = request.getfixturevalue(request.param) assert isinstance(result, io.BytesIO | io.BufferedRandom) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 69c4e49a4..cb5263c19 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -32,7 +32,7 @@ def test_too_many_max_results( cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + high_quality_image: io.BytesIO | io.BufferedRandom, ) -> None: """ A ``MaxNumResultsOutOfRange`` error is raised if the given @@ -53,7 +53,7 @@ def test_too_many_max_results( def test_image_too_large( cloud_reco_client: CloudRecoService, - png_too_large: io.BytesIO, + png_too_large: io.BytesIO | io.BufferedRandom, ) -> None: """ A ``RequestEntityTooLarge`` exception is raised if an image which is too @@ -82,7 +82,9 @@ def test_cloudrecoexception_inheritance() -> None: assert issubclass(subclass, CloudRecoError) -def test_authentication_failure(high_quality_image: io.BytesIO) -> None: +def test_authentication_failure( + high_quality_image: io.BytesIO | io.BufferedRandom, +) -> None: """ An ``AuthenticationFailure`` exception is raised when the client access key exists but the client secret key is incorrect. @@ -101,7 +103,9 @@ def test_authentication_failure(high_quality_image: io.BytesIO) -> None: assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED -def test_inactive_project(high_quality_image: io.BytesIO) -> None: +def test_inactive_project( + high_quality_image: io.BytesIO | io.BufferedRandom, +) -> None: """ An ``InactiveProject`` exception is raised when querying an inactive database. diff --git a/tests/test_query.py b/tests/test_query.py index 50bf39d98..fadebda20 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -25,7 +25,7 @@ class TestQuery: @staticmethod def test_no_matches( cloud_reco_client: CloudRecoService, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ An empty list is returned if there are no matches. @@ -37,7 +37,7 @@ def test_no_matches( def test_match( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ Details of matching targets are returned. @@ -60,7 +60,7 @@ class TestCustomBaseVWQURL: """ @staticmethod - def test_custom_base_url(image: io.BytesIO) -> None: + def test_custom_base_url(image: io.BytesIO | io.BufferedRandom) -> None: """ It is possible to use query a target to a database under a custom VWQ URL. @@ -105,7 +105,7 @@ class TestMaxNumResults: def test_default( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ By default the maximum number of results is 1. @@ -133,7 +133,7 @@ def test_default( def test_custom( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ It is possible to set a custom ``max_num_results``. @@ -179,7 +179,7 @@ class TestIncludeTargetData: def test_default( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ By default, target data is only returned in the top match. @@ -211,7 +211,7 @@ def test_default( def test_top( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ When ``CloudRecoIncludeTargetData.TOP`` is given, target data is only @@ -245,7 +245,7 @@ def test_top( def test_none( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ When ``CloudRecoIncludeTargetData.NONE`` is given, target data is not @@ -279,7 +279,7 @@ def test_none( def test_all( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ When ``CloudRecoIncludeTargetData.ALL`` is given, target data is diff --git a/tests/test_vws.py b/tests/test_vws.py index 28c026bf7..7d430d824 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -8,7 +8,7 @@ import datetime import secrets import uuid -from typing import TYPE_CHECKING, BinaryIO +from typing import TYPE_CHECKING import pytest from freezegun import freeze_time @@ -38,7 +38,7 @@ class TestAddTarget: @pytest.mark.parametrize("active_flag", [True, False]) def test_add_target( vws_client: VWS, - image: BinaryIO, + image: io.BytesIO | io.BufferedRandom, application_metadata: bytes | None, cloud_reco_client: CloudRecoService, *, @@ -82,7 +82,7 @@ def test_add_target( @staticmethod def test_add_two_targets( vws_client: VWS, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ No exception is raised when adding two targets with different names. @@ -105,7 +105,7 @@ class TestCustomBaseVWSURL: """ @staticmethod - def test_custom_base_url(image: io.BytesIO) -> None: + def test_custom_base_url(image: io.BytesIO | io.BufferedRandom) -> None: """ It is possible to use add a target to a database under a custom VWS URL. @@ -137,7 +137,7 @@ class TestListTargets: @staticmethod def test_list_targets( vws_client: VWS, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ It is possible to get a list of target IDs. @@ -167,7 +167,7 @@ class TestDelete: @staticmethod def test_delete_target( vws_client: VWS, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ It is possible to delete a target. @@ -194,7 +194,7 @@ class TestGetTargetSummaryReport: @staticmethod def test_get_target_summary_report( vws_client: VWS, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ Details of a target are returned by ``get_target_summary_report``. @@ -263,7 +263,7 @@ class TestGetTargetRecord: @staticmethod def test_get_target_record( vws_client: VWS, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ Details of a target are returned by ``get_target_record``. @@ -298,7 +298,7 @@ class TestWaitForTargetProcessed: @staticmethod def test_wait_for_target_processed( vws_client: VWS, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ It is possible to wait until a target is processed. @@ -318,7 +318,7 @@ def test_wait_for_target_processed( @staticmethod def test_default_seconds_between_requests( - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ By default, 0.2 seconds are waited between polling requests. @@ -370,7 +370,7 @@ def test_default_seconds_between_requests( @staticmethod def test_custom_seconds_between_requests( - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ It is possible to customize the time waited between polling requests. @@ -421,7 +421,7 @@ def test_custom_seconds_between_requests( assert report.request_usage == expected_requests @staticmethod - def test_custom_timeout(image: io.BytesIO) -> None: + def test_custom_timeout(image: io.BytesIO | io.BufferedRandom) -> None: """ It is possible to set a maximum timeout. """ @@ -465,7 +465,7 @@ class TestGetDuplicateTargets: @staticmethod def test_get_duplicate_targets( vws_client: VWS, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ It is possible to get the IDs of similar targets. @@ -499,8 +499,8 @@ class TestUpdateTarget: @staticmethod def test_update_target( vws_client: VWS, - image: io.BytesIO, - different_high_quality_image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, + different_high_quality_image: io.BytesIO | io.BufferedRandom, cloud_reco_client: CloudRecoService, ) -> None: """ @@ -558,7 +558,7 @@ def test_update_target( @staticmethod def test_no_fields_given( vws_client: VWS, - image: io.BytesIO, + image: io.BytesIO | io.BufferedRandom, ) -> None: """ It is possible to give no update fields. diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 65bea0ab2..4f5e15ef2 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -39,7 +39,7 @@ def test_image_too_large( vws_client: VWS, - png_too_large: io.BytesIO, + png_too_large: io.BytesIO | io.BufferedRandom, ) -> None: """ When giving an image which is too large, an ``ImageTooLarge`` exception is @@ -69,7 +69,9 @@ def test_invalid_given_id(vws_client: VWS) -> None: assert exc.value.target_id == target_id -def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: +def test_add_bad_name( + vws_client: VWS, high_quality_image: io.BytesIO | io.BufferedRandom +) -> None: """ When a name with a bad character is given, an ``OopsAnErrorOccurredPossiblyBadName`` exception is raised. @@ -95,7 +97,7 @@ def test_request_quota_reached() -> None: """ -def test_fail(high_quality_image: io.BytesIO) -> None: +def test_fail(high_quality_image: io.BytesIO | io.BufferedRandom) -> None: """ A ``Fail`` exception is raised when the server access key does not exist. """ @@ -136,7 +138,7 @@ def test_bad_image(vws_client: VWS) -> None: def test_target_name_exist( vws_client: VWS, - high_quality_image: io.BytesIO, + high_quality_image: io.BytesIO | io.BufferedRandom, ) -> None: """ A ``TargetNameExist`` exception is raised after adding two targets with @@ -162,7 +164,9 @@ def test_target_name_exist( assert exc.value.target_name == "x" -def test_project_inactive(high_quality_image: io.BytesIO) -> None: +def test_project_inactive( + high_quality_image: io.BytesIO | io.BufferedRandom, +) -> None: """ A ``ProjectInactive`` exception is raised if adding a target to an inactive database. @@ -189,7 +193,7 @@ def test_project_inactive(high_quality_image: io.BytesIO) -> None: def test_target_status_processing( vws_client: VWS, - high_quality_image: io.BytesIO, + high_quality_image: io.BytesIO | io.BufferedRandom, ) -> None: """ A ``TargetStatusProcessing`` exception is raised if trying to delete a @@ -212,7 +216,7 @@ def test_target_status_processing( def test_metadata_too_large( vws_client: VWS, - high_quality_image: io.BytesIO, + high_quality_image: io.BytesIO | io.BufferedRandom, ) -> None: """ A ``MetadataTooLarge`` exception is raised if the metadata given is too @@ -232,7 +236,7 @@ def test_metadata_too_large( def test_request_time_too_skewed( vws_client: VWS, - high_quality_image: io.BytesIO, + high_quality_image: io.BytesIO | io.BufferedRandom, ) -> None: """ A ``RequestTimeTooSkewed`` exception is raised when the request time is @@ -265,7 +269,9 @@ def test_request_time_too_skewed( assert exc.value.response.status_code == HTTPStatus.FORBIDDEN -def test_authentication_failure(high_quality_image: io.BytesIO) -> None: +def test_authentication_failure( + high_quality_image: io.BytesIO | io.BufferedRandom, +) -> None: """ An ``AuthenticationFailure`` exception is raised when the server access key exists but the server secret key is incorrect, or when a client key is @@ -295,7 +301,7 @@ def test_authentication_failure(high_quality_image: io.BytesIO) -> None: def test_target_status_not_success( vws_client: VWS, - high_quality_image: io.BytesIO, + high_quality_image: io.BytesIO | io.BufferedRandom, ) -> None: """ A ``TargetStatusNotSuccess`` exception is raised when updating a target @@ -344,7 +350,7 @@ def test_vwsexception_inheritance() -> None: def test_base_exception( vws_client: VWS, - high_quality_image: io.BytesIO, + high_quality_image: io.BytesIO | io.BufferedRandom, ) -> None: """ ``VWSException``s has a response property. From a263257ff1214df17e75d29a89d5eac0930f21c1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 29 Aug 2024 14:39:53 +0100 Subject: [PATCH 308/641] Ignore missing intersphinx references --- docs/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 70ad3a80b..18c4a0e78 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -62,6 +62,7 @@ "python": ("https://docs.python.org/3.12", None), } nitpicky = True +nitpick_ignore = (("py:class", "BytesIO"), ("py:class", "BufferedRandom")) warning_is_error = True autoclass_content = "both" From 76e4aaa3fabd7662d1de2a303d0ab0a985d0180e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 29 Aug 2024 22:19:53 +0100 Subject: [PATCH 309/641] Remove from __future__ import annotations This conflicts with beartype and just isn't necessary. --- docs/source/conf.py | 7 ++++++- src/vws/exceptions/base_exceptions.py | 7 +------ src/vws/query.py | 8 ++------ src/vws/vws.py | 9 ++------- tests/conftest.py | 9 ++------- tests/test_cloud_reco_exceptions.py | 7 +------ tests/test_query.py | 7 +------ tests/test_vws.py | 7 +------ 8 files changed, 16 insertions(+), 45 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 18c4a0e78..c18eb170d 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -62,7 +62,12 @@ "python": ("https://docs.python.org/3.12", None), } nitpicky = True -nitpick_ignore = (("py:class", "BytesIO"), ("py:class", "BufferedRandom")) +nitpick_ignore = ( + ("py:class", "BytesIO"), + ("py:class", "BufferedRandom"), + ("py:class", "_io.BytesIO"), + ("py:class", "_io.BufferedRandom"), +) warning_is_error = True autoclass_content = "both" diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 13a995fbd..907d74731 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -3,12 +3,7 @@ Cloud Recognition Web API. """ -from __future__ import annotations - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from .response import Response +from .response import Response class CloudRecoError(Exception): diff --git a/src/vws/query.py b/src/vws/query.py index aeba29922..c0e6b89bd 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -2,12 +2,11 @@ Tools for interacting with the Vuforia Cloud Recognition Web APIs. """ -from __future__ import annotations - import datetime import json from http import HTTPMethod, HTTPStatus -from typing import TYPE_CHECKING, Any +from io import BufferedRandom, BytesIO +from typing import Any from urllib.parse import urljoin import requests @@ -29,9 +28,6 @@ from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -if TYPE_CHECKING: - from io import BufferedRandom, BytesIO - def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: """Get the data of an image file.""" diff --git a/src/vws/vws.py b/src/vws/vws.py index 52bd4b577..1ec660253 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -2,14 +2,13 @@ Tools for interacting with Vuforia APIs. """ -from __future__ import annotations - import base64 +import io import json import time from datetime import date from http import HTTPMethod, HTTPStatus -from typing import TYPE_CHECKING +from io import BufferedRandom, BytesIO from urllib.parse import urljoin import requests @@ -49,10 +48,6 @@ from .exceptions.response import Response -if TYPE_CHECKING: - import io - from io import BufferedRandom, BytesIO - def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: """Get the data of an image file.""" diff --git a/tests/conftest.py b/tests/conftest.py index 81c976346..e359e4a82 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,10 +2,9 @@ Configuration, plugins and fixtures for `pytest`. """ -from __future__ import annotations - import io -from typing import TYPE_CHECKING +from collections.abc import Generator +from pathlib import Path import pytest from mock_vws import MockVWS @@ -13,10 +12,6 @@ from vws import VWS, CloudRecoService -if TYPE_CHECKING: - from collections.abc import Generator - from pathlib import Path - @pytest.fixture(name="_mock_database") def mock_database() -> Generator[VuforiaDatabase, None, None]: diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index cb5263c19..1de69180e 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -2,11 +2,9 @@ Tests for exceptions raised when using the CloudRecoService. """ -from __future__ import annotations - +import io import uuid from http import HTTPStatus -from typing import TYPE_CHECKING import pytest from mock_vws import MockVWS @@ -26,9 +24,6 @@ RequestEntityTooLargeError, ) -if TYPE_CHECKING: - import io - def test_too_many_max_results( cloud_reco_client: CloudRecoService, diff --git a/tests/test_query.py b/tests/test_query.py index fadebda20..4a3df25cb 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -2,10 +2,8 @@ Tests for the ``CloudRecoService`` querying functionality. """ -from __future__ import annotations - +import io import uuid -from typing import TYPE_CHECKING from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase @@ -13,9 +11,6 @@ from vws import VWS, CloudRecoService from vws.include_target_data import CloudRecoIncludeTargetData -if TYPE_CHECKING: - import io - class TestQuery: """ diff --git a/tests/test_vws.py b/tests/test_vws.py index 7d430d824..15df57494 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -2,13 +2,11 @@ Tests for helper functions for managing a Vuforia database. """ -from __future__ import annotations - import base64 import datetime +import io import secrets import uuid -from typing import TYPE_CHECKING import pytest from freezegun import freeze_time @@ -24,9 +22,6 @@ TargetSummaryReport, ) -if TYPE_CHECKING: - import io - class TestAddTarget: """ From 8b51775c190c512a2b0348e3968f34180c9256b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:15:36 +0000 Subject: [PATCH 310/641] Bump ruff from 0.6.2 to 0.6.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.2 to 0.6.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.2...0.6.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b33fe51d8..8da3849e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.2", + "ruff==0.6.3", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From 4eecd9c5fb8c9ae81965fef6c0a1b4e44be9c3cb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 16:29:51 +0100 Subject: [PATCH 311/641] Do runtime type checking --- pyproject.toml | 2 +- src/vws/exceptions/base_exceptions.py | 10 ++++++++-- src/vws/exceptions/cloud_reco_exceptions.py | 7 +++++++ src/vws/exceptions/custom_exceptions.py | 6 ++++++ src/vws/exceptions/response.py | 3 +++ src/vws/exceptions/vws_exceptions.py | 19 +++++++++++++++++++ src/vws/include_target_data.py | 3 +++ src/vws/query.py | 3 +++ src/vws/reports.py | 9 +++++++++ src/vws/vws.py | 4 ++++ 10 files changed, 63 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8da3849e1..08620c806 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,13 +33,13 @@ dynamic = [ "version", ] dependencies = [ + "beartype>=0.18.5", "requests", "urllib3", "vws-auth-tools", ] optional-dependencies.dev = [ "actionlint-py==1.7.1.15", - "beartype==0.18.5", "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.1", diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 907d74731..6747de823 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -3,12 +3,16 @@ Cloud Recognition Web API. """ +from beartype import beartype + from .response import Response +@beartype class CloudRecoError(Exception): """ - Base class for Vuforia Cloud Recognition Web API exceptions. + Base @beartype + class for Vuforia Cloud Recognition Web API exceptions. """ def __init__(self, response: Response) -> None: @@ -27,9 +31,11 @@ def response(self) -> Response: return self._response +@beartype class VWSError(Exception): """ - Base class for Vuforia Web Services errors. + Base @beartype + class for Vuforia Web Services errors. These errors are defined at https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes. diff --git a/src/vws/exceptions/cloud_reco_exceptions.py b/src/vws/exceptions/cloud_reco_exceptions.py index 26c6fb097..ff5dde209 100644 --- a/src/vws/exceptions/cloud_reco_exceptions.py +++ b/src/vws/exceptions/cloud_reco_exceptions.py @@ -2,9 +2,12 @@ Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs. """ +from beartype import beartype + from vws.exceptions.base_exceptions import CloudRecoError +@beartype class MaxNumResultsOutOfRangeError(CloudRecoError): """ Exception raised when the ``max_num_results`` given to the Cloud @@ -12,6 +15,7 @@ class MaxNumResultsOutOfRangeError(CloudRecoError): """ +@beartype class InactiveProjectError(CloudRecoError): """ Exception raised when Vuforia returns a response with a result code @@ -19,6 +23,7 @@ class InactiveProjectError(CloudRecoError): """ +@beartype class BadImageError(CloudRecoError): """ Exception raised when Vuforia returns a response with a result code @@ -26,6 +31,7 @@ class BadImageError(CloudRecoError): """ +@beartype class AuthenticationFailureError(CloudRecoError): """ Exception raised when Vuforia returns a response with a result code @@ -33,6 +39,7 @@ class AuthenticationFailureError(CloudRecoError): """ +@beartype class RequestTimeTooSkewedError(CloudRecoError): """ Exception raised when Vuforia returns a response with a result code diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 33f98187c..d036d8750 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -4,9 +4,12 @@ or simple errors given by the cloud recognition service. """ +from beartype import beartype + from .response import Response +@beartype class OopsAnErrorOccurredPossiblyBadNameError(Exception): """ Exception raised when VWS returns an HTML page which says "Oops, an error @@ -31,6 +34,7 @@ def response(self) -> Response: return self._response +@beartype class RequestEntityTooLargeError(Exception): """ Exception raised when the given image is too large. @@ -52,12 +56,14 @@ def response(self) -> Response: return self._response +@beartype class TargetProcessingTimeoutError(Exception): """ Exception raised when waiting for a target to be processed times out. """ +@beartype class ServerError(Exception): # pragma: no cover """ Exception raised when VWS returns a server error. diff --git a/src/vws/exceptions/response.py b/src/vws/exceptions/response.py index 89a42870b..0b3eced88 100644 --- a/src/vws/exceptions/response.py +++ b/src/vws/exceptions/response.py @@ -2,8 +2,11 @@ from dataclasses import dataclass +from beartype import beartype + @dataclass +@beartype class Response: """ A response from a request. diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index f626aeee6..ae9a4e0e4 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -7,9 +7,12 @@ import json from urllib.parse import urlparse +from beartype import beartype + from vws.exceptions.base_exceptions import VWSError +@beartype class UnknownTargetError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -27,6 +30,7 @@ def target_id(self) -> str: return path.split(sep="/", maxsplit=2)[-1] +@beartype class FailError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -34,6 +38,7 @@ class FailError(VWSError): """ +@beartype class BadImageError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -41,6 +46,7 @@ class BadImageError(VWSError): """ +@beartype class AuthenticationFailureError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -49,6 +55,7 @@ class AuthenticationFailureError(VWSError): # See https://github.com/VWS-Python/vws-python/issues/822. +@beartype class RequestQuotaReachedError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code @@ -56,6 +63,7 @@ class RequestQuotaReachedError(VWSError): # pragma: no cover """ +@beartype class TargetStatusProcessingError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -74,6 +82,7 @@ def target_id(self) -> str: # This is not simulated by the mock. +@beartype class DateRangeError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code @@ -82,6 +91,7 @@ class DateRangeError(VWSError): # pragma: no cover # This is not simulated by the mock. +@beartype class TargetQuotaReachedError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code @@ -90,6 +100,7 @@ class TargetQuotaReachedError(VWSError): # pragma: no cover # This is not simulated by the mock. +@beartype class ProjectSuspendedError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code @@ -98,6 +109,7 @@ class ProjectSuspendedError(VWSError): # pragma: no cover # This is not simulated by the mock. +@beartype class ProjectHasNoAPIAccessError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code @@ -105,6 +117,7 @@ class ProjectHasNoAPIAccessError(VWSError): # pragma: no cover """ +@beartype class ProjectInactiveError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -112,6 +125,7 @@ class ProjectInactiveError(VWSError): """ +@beartype class MetadataTooLargeError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -119,6 +133,7 @@ class MetadataTooLargeError(VWSError): """ +@beartype class RequestTimeTooSkewedError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -126,6 +141,7 @@ class RequestTimeTooSkewedError(VWSError): """ +@beartype class TargetNameExistError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -142,6 +158,7 @@ def target_name(self) -> str: return str(request_json["name"]) +@beartype class ImageTooLargeError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -149,6 +166,7 @@ class ImageTooLargeError(VWSError): """ +@beartype class TargetStatusNotSuccessError(VWSError): """ Exception raised when Vuforia returns a response with a result code @@ -166,6 +184,7 @@ def target_id(self) -> str: return path.split(sep="/", maxsplit=2)[-1] +@beartype class TooManyRequestsError(VWSError): # pragma: no cover """ Exception raised when Vuforia returns a response with a result code diff --git a/src/vws/include_target_data.py b/src/vws/include_target_data.py index 0083ceeed..e259f654a 100644 --- a/src/vws/include_target_data.py +++ b/src/vws/include_target_data.py @@ -4,7 +4,10 @@ from enum import StrEnum, auto +from beartype import beartype + +@beartype class CloudRecoIncludeTargetData(StrEnum): """ Options for the ``include_target_data`` parameter of diff --git a/src/vws/query.py b/src/vws/query.py index c0e6b89bd..ce64f9455 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -10,6 +10,7 @@ from urllib.parse import urljoin import requests +from beartype import beartype from urllib3.filepost import encode_multipart_formdata from vws_auth_tools import authorization_header, rfc_1123_date @@ -29,6 +30,7 @@ from vws.reports import QueryResult, TargetData +@beartype def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: """Get the data of an image file.""" original_tell = image.tell() @@ -38,6 +40,7 @@ def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: return image_data +@beartype class CloudRecoService: """ An interface to the Vuforia Cloud Recognition Web APIs. diff --git a/src/vws/reports.py b/src/vws/reports.py index 2784ff078..3d157a783 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -6,7 +6,10 @@ from dataclasses import dataclass from enum import Enum +from beartype import BeartypeConf, beartype + +@beartype @dataclass class DatabaseSummaryReport: """ @@ -30,6 +33,7 @@ class DatabaseSummaryReport: total_recos: int +@beartype class TargetStatuses(Enum): """Constants representing VWS target statuses. @@ -42,6 +46,7 @@ class TargetStatuses(Enum): FAILED = "failed" +@beartype @dataclass class TargetSummaryReport: """ @@ -62,6 +67,7 @@ class TargetSummaryReport: previous_month_recos: int +@beartype(conf=BeartypeConf(is_pep484_tower=True)) @dataclass class TargetRecord: """ @@ -79,6 +85,7 @@ class TargetRecord: reco_rating: str +@beartype @dataclass class TargetData: """ @@ -90,6 +97,7 @@ class TargetData: target_timestamp: datetime.datetime +@beartype @dataclass class QueryResult: """ @@ -103,6 +111,7 @@ class QueryResult: target_data: TargetData | None +@beartype @dataclass class TargetStatusAndRecord: """ diff --git a/src/vws/vws.py b/src/vws/vws.py index 1ec660253..8d15fc2fb 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -12,6 +12,7 @@ from urllib.parse import urljoin import requests +from beartype import BeartypeConf, beartype from vws_auth_tools import authorization_header, rfc_1123_date from vws.exceptions.custom_exceptions import ( @@ -49,6 +50,7 @@ from .exceptions.response import Response +@beartype def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: """Get the data of an image file.""" original_tell = image.tell() @@ -58,6 +60,7 @@ def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: return image_data +@beartype def _target_api_request( server_access_key: str, server_secret_key: str, @@ -123,6 +126,7 @@ def _target_api_request( ) +@beartype(conf=BeartypeConf(is_pep484_tower=True)) class VWS: """ An interface to Vuforia Web Services APIs. From 885c7eb08b83540a239ff0d0b862539d96585bea Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 16:38:16 +0100 Subject: [PATCH 312/641] Make tests run faster by configuring mock --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index e359e4a82..417879ae2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -18,7 +18,8 @@ def mock_database() -> Generator[VuforiaDatabase, None, None]: """ Yield a mock ``VuforiaDatabase``. """ - with MockVWS() as mock: + # We use a low processing time so that tests run quickly. + with MockVWS(processing_time_seconds=0.2) as mock: database = VuforiaDatabase() mock.add_database(database=database) yield database From 664f1504849ff0be04c650757cdb9ce39294a886 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 16:41:45 +0100 Subject: [PATCH 313/641] Use consistent way of setting image type --- src/vws/query.py | 6 +++--- src/vws/vws.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index c0e6b89bd..01cfae14f 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -3,9 +3,9 @@ """ import datetime +import io import json from http import HTTPMethod, HTTPStatus -from io import BufferedRandom, BytesIO from typing import Any from urllib.parse import urljoin @@ -29,7 +29,7 @@ from vws.reports import QueryResult, TargetData -def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: +def _get_image_data(image: io.BytesIO | io.BufferedRandom) -> bytes: """Get the data of an image file.""" original_tell = image.tell() image.seek(0) @@ -61,7 +61,7 @@ def __init__( def query( self, - image: BytesIO | BufferedRandom, + image: io.BytesIO | io.BufferedRandom, max_num_results: int = 1, include_target_data: CloudRecoIncludeTargetData = ( CloudRecoIncludeTargetData.TOP diff --git a/src/vws/vws.py b/src/vws/vws.py index 1ec660253..31375613a 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -8,7 +8,7 @@ import time from datetime import date from http import HTTPMethod, HTTPStatus -from io import BufferedRandom, BytesIO +from io import BufferedRandom from urllib.parse import urljoin import requests @@ -49,7 +49,7 @@ from .exceptions.response import Response -def _get_image_data(image: BytesIO | BufferedRandom) -> bytes: +def _get_image_data(image: io.BytesIO | BufferedRandom) -> bytes: """Get the data of an image file.""" original_tell = image.tell() image.seek(0) @@ -234,7 +234,7 @@ def add_target( self, name: str, width: float, - image: BytesIO | BufferedRandom, + image: io.BytesIO | io.BufferedRandom, application_metadata: str | None, *, active_flag: bool, From ecc66af629b48cc7310becc4fdd326e53a66e62f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 17:19:57 +0100 Subject: [PATCH 314/641] Make README test run faster --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index b1fee9e29..455b1ea5d 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,8 @@ Getting Started from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase - mock = MockVWS(real_http=False) + # We use a low processing time so that tests run quickly. + mock = MockVWS(processing_time_seconds=0.2) database = VuforiaDatabase( server_access_key='[server-access-key]', server_secret_key='[server-secret-key]', From c7b4302e980b8ac91111d19df593838bc9b446d3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 20:42:15 +0100 Subject: [PATCH 315/641] Neaten image_file fixture - dedent the main work --- tests/conftest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 417879ae2..9fbb57d23 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -54,11 +54,10 @@ def image_file( ) -> Generator[io.BufferedRandom, None, None]: """An image file object.""" file = tmp_path / "image.jpg" - file.touch() - with file.open("r+b") as fileobj: - buffer = high_quality_image.getvalue() - fileobj.write(buffer) - yield fileobj + buffer = high_quality_image.getvalue() + file.write_bytes(data=buffer) + with file.open("r+b") as file_obj: + yield file_obj @pytest.fixture(params=["high_quality_image", "image_file"]) From 8dac60378e1c335fa3a30d0797b74d90ae65182b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 20:42:55 +0100 Subject: [PATCH 316/641] Use kwarg on mode --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 9fbb57d23..ac733ecaf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -56,7 +56,7 @@ def image_file( file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() file.write_bytes(data=buffer) - with file.open("r+b") as file_obj: + with file.open(mode="r+b") as file_obj: yield file_obj From 20ab18f2c0610cd871f2ed0b43d123e6da17d879 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 20:54:17 +0100 Subject: [PATCH 317/641] Use a variable for image type in src/ --- src/vws/query.py | 6 ++++-- src/vws/vws.py | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index 01cfae14f..9c0f35120 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -28,8 +28,10 @@ from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData +_ImageType = io.BytesIO | io.BufferedRandom -def _get_image_data(image: io.BytesIO | io.BufferedRandom) -> bytes: + +def _get_image_data(image: _ImageType) -> bytes: """Get the data of an image file.""" original_tell = image.tell() image.seek(0) @@ -61,7 +63,7 @@ def __init__( def query( self, - image: io.BytesIO | io.BufferedRandom, + image: _ImageType, max_num_results: int = 1, include_target_data: CloudRecoIncludeTargetData = ( CloudRecoIncludeTargetData.TOP diff --git a/src/vws/vws.py b/src/vws/vws.py index 31375613a..412cf8a3a 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -8,7 +8,6 @@ import time from datetime import date from http import HTTPMethod, HTTPStatus -from io import BufferedRandom from urllib.parse import urljoin import requests @@ -48,8 +47,10 @@ from .exceptions.response import Response +_ImageType = io.BytesIO | io.BufferedRandom -def _get_image_data(image: io.BytesIO | BufferedRandom) -> bytes: + +def _get_image_data(image: _ImageType) -> bytes: """Get the data of an image file.""" original_tell = image.tell() image.seek(0) @@ -234,7 +235,7 @@ def add_target( self, name: str, width: float, - image: io.BytesIO | io.BufferedRandom, + image: _ImageType, application_metadata: str | None, *, active_flag: bool, @@ -617,7 +618,7 @@ def update_target( target_id: str, name: str | None = None, width: float | None = None, - image: io.BytesIO | io.BufferedRandom | None = None, + image: _ImageType | None = None, active_flag: bool | None = None, application_metadata: str | None = None, ) -> None: From 601295394be7bf30b20eae0e9e5d5428ee45d5e0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 21:05:13 +0100 Subject: [PATCH 318/641] Simplify high_quality_image type --- tests/test_cloud_reco_exceptions.py | 6 +++--- tests/test_vws.py | 2 +- tests/test_vws_exceptions.py | 22 ++++++++++------------ 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 1de69180e..5c0a89cd2 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -27,7 +27,7 @@ def test_too_many_max_results( cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ A ``MaxNumResultsOutOfRange`` error is raised if the given @@ -78,7 +78,7 @@ def test_cloudrecoexception_inheritance() -> None: def test_authentication_failure( - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ An ``AuthenticationFailure`` exception is raised when the client access key @@ -99,7 +99,7 @@ def test_authentication_failure( def test_inactive_project( - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ An ``InactiveProject`` exception is raised when querying an inactive diff --git a/tests/test_vws.py b/tests/test_vws.py index 15df57494..6636c4f9a 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -495,7 +495,7 @@ class TestUpdateTarget: def test_update_target( vws_client: VWS, image: io.BytesIO | io.BufferedRandom, - different_high_quality_image: io.BytesIO | io.BufferedRandom, + different_high_quality_image: io.BytesIO, cloud_reco_client: CloudRecoService, ) -> None: """ diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 4f5e15ef2..ef105f7da 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -69,9 +69,7 @@ def test_invalid_given_id(vws_client: VWS) -> None: assert exc.value.target_id == target_id -def test_add_bad_name( - vws_client: VWS, high_quality_image: io.BytesIO | io.BufferedRandom -) -> None: +def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ When a name with a bad character is given, an ``OopsAnErrorOccurredPossiblyBadName`` exception is raised. @@ -97,7 +95,7 @@ def test_request_quota_reached() -> None: """ -def test_fail(high_quality_image: io.BytesIO | io.BufferedRandom) -> None: +def test_fail(high_quality_image: io.BytesIO) -> None: """ A ``Fail`` exception is raised when the server access key does not exist. """ @@ -138,7 +136,7 @@ def test_bad_image(vws_client: VWS) -> None: def test_target_name_exist( vws_client: VWS, - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ A ``TargetNameExist`` exception is raised after adding two targets with @@ -165,7 +163,7 @@ def test_target_name_exist( def test_project_inactive( - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ A ``ProjectInactive`` exception is raised if adding a target to an @@ -193,7 +191,7 @@ def test_project_inactive( def test_target_status_processing( vws_client: VWS, - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ A ``TargetStatusProcessing`` exception is raised if trying to delete a @@ -216,7 +214,7 @@ def test_target_status_processing( def test_metadata_too_large( vws_client: VWS, - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ A ``MetadataTooLarge`` exception is raised if the metadata given is too @@ -236,7 +234,7 @@ def test_metadata_too_large( def test_request_time_too_skewed( vws_client: VWS, - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ A ``RequestTimeTooSkewed`` exception is raised when the request time is @@ -270,7 +268,7 @@ def test_request_time_too_skewed( def test_authentication_failure( - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ An ``AuthenticationFailure`` exception is raised when the server access key @@ -301,7 +299,7 @@ def test_authentication_failure( def test_target_status_not_success( vws_client: VWS, - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ A ``TargetStatusNotSuccess`` exception is raised when updating a target @@ -350,7 +348,7 @@ def test_vwsexception_inheritance() -> None: def test_base_exception( vws_client: VWS, - high_quality_image: io.BytesIO | io.BufferedRandom, + high_quality_image: io.BytesIO, ) -> None: """ ``VWSException``s has a response property. From b36b236fbcfa82d52004954f112f94a5347db9d4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 21:09:58 +0100 Subject: [PATCH 319/641] Remove an isinstance check --- tests/conftest.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index ac733ecaf..0180455a4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -47,8 +47,8 @@ def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: ) -@pytest.fixture -def image_file( +@pytest.fixture(name="image_file") +def image_file_fixture( high_quality_image: io.BytesIO, tmp_path: Path, ) -> Generator[io.BufferedRandom, None, None]: @@ -63,8 +63,10 @@ def image_file( @pytest.fixture(params=["high_quality_image", "image_file"]) def image( request: pytest.FixtureRequest, + high_quality_image: io.BytesIO, + image_file: io.BufferedRandom, ) -> io.BytesIO | io.BufferedRandom: """An image in any of the types that the API accepts.""" - result = request.getfixturevalue(request.param) - assert isinstance(result, io.BytesIO | io.BufferedRandom) - return result + if request.param == "high_quality_image": + return high_quality_image + return image_file From 4480f9760f8ef9fae424c4156774ed46eb420da7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 30 Aug 2024 21:17:21 +0100 Subject: [PATCH 320/641] Support more ways of passing in an image --- src/vws/query.py | 4 ++-- src/vws/vws.py | 3 ++- tests/conftest.py | 13 ++++++++----- tests/test_query.py | 19 ++++++++++--------- tests/test_vws.py | 29 +++++++++++++++-------------- 5 files changed, 37 insertions(+), 31 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index 9c0f35120..8bddbb16b 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -6,7 +6,7 @@ import io import json from http import HTTPMethod, HTTPStatus -from typing import Any +from typing import Any, BinaryIO from urllib.parse import urljoin import requests @@ -28,7 +28,7 @@ from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -_ImageType = io.BytesIO | io.BufferedRandom +_ImageType = io.BytesIO | BinaryIO def _get_image_data(image: _ImageType) -> bytes: diff --git a/src/vws/vws.py b/src/vws/vws.py index 412cf8a3a..89462cdd2 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -8,6 +8,7 @@ import time from datetime import date from http import HTTPMethod, HTTPStatus +from typing import BinaryIO from urllib.parse import urljoin import requests @@ -47,7 +48,7 @@ from .exceptions.response import Response -_ImageType = io.BytesIO | io.BufferedRandom +_ImageType = io.BytesIO | BinaryIO def _get_image_data(image: _ImageType) -> bytes: diff --git a/tests/conftest.py b/tests/conftest.py index 0180455a4..0ec595e31 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,6 +5,7 @@ import io from collections.abc import Generator from pathlib import Path +from typing import BinaryIO, Literal import pytest from mock_vws import MockVWS @@ -47,16 +48,18 @@ def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: ) -@pytest.fixture(name="image_file") +@pytest.fixture(name="image_file", params=["r+b", "rb"]) def image_file_fixture( high_quality_image: io.BytesIO, tmp_path: Path, -) -> Generator[io.BufferedRandom, None, None]: + request: pytest.FixtureRequest, +) -> Generator[BinaryIO, None, None]: """An image file object.""" file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() file.write_bytes(data=buffer) - with file.open(mode="r+b") as file_obj: + mode: Literal["r+b", "rb"] = request.param + with file.open(mode=mode) as file_obj: yield file_obj @@ -64,8 +67,8 @@ def image_file_fixture( def image( request: pytest.FixtureRequest, high_quality_image: io.BytesIO, - image_file: io.BufferedRandom, -) -> io.BytesIO | io.BufferedRandom: + image_file: BinaryIO, +) -> io.BytesIO | BinaryIO: """An image in any of the types that the API accepts.""" if request.param == "high_quality_image": return high_quality_image diff --git a/tests/test_query.py b/tests/test_query.py index 4a3df25cb..e229cf95d 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -4,6 +4,7 @@ import io import uuid +from typing import BinaryIO from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase @@ -20,7 +21,7 @@ class TestQuery: @staticmethod def test_no_matches( cloud_reco_client: CloudRecoService, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ An empty list is returned if there are no matches. @@ -32,7 +33,7 @@ def test_no_matches( def test_match( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ Details of matching targets are returned. @@ -55,7 +56,7 @@ class TestCustomBaseVWQURL: """ @staticmethod - def test_custom_base_url(image: io.BytesIO | io.BufferedRandom) -> None: + def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: """ It is possible to use query a target to a database under a custom VWQ URL. @@ -100,7 +101,7 @@ class TestMaxNumResults: def test_default( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ By default the maximum number of results is 1. @@ -128,7 +129,7 @@ def test_default( def test_custom( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to set a custom ``max_num_results``. @@ -174,7 +175,7 @@ class TestIncludeTargetData: def test_default( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ By default, target data is only returned in the top match. @@ -206,7 +207,7 @@ def test_default( def test_top( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ When ``CloudRecoIncludeTargetData.TOP`` is given, target data is only @@ -240,7 +241,7 @@ def test_top( def test_none( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ When ``CloudRecoIncludeTargetData.NONE`` is given, target data is not @@ -274,7 +275,7 @@ def test_none( def test_all( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ When ``CloudRecoIncludeTargetData.ALL`` is given, target data is diff --git a/tests/test_vws.py b/tests/test_vws.py index 6636c4f9a..ab8cd079e 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -7,6 +7,7 @@ import io import secrets import uuid +from typing import BinaryIO import pytest from freezegun import freeze_time @@ -33,7 +34,7 @@ class TestAddTarget: @pytest.mark.parametrize("active_flag", [True, False]) def test_add_target( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, application_metadata: bytes | None, cloud_reco_client: CloudRecoService, *, @@ -77,7 +78,7 @@ def test_add_target( @staticmethod def test_add_two_targets( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ No exception is raised when adding two targets with different names. @@ -100,7 +101,7 @@ class TestCustomBaseVWSURL: """ @staticmethod - def test_custom_base_url(image: io.BytesIO | io.BufferedRandom) -> None: + def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: """ It is possible to use add a target to a database under a custom VWS URL. @@ -132,7 +133,7 @@ class TestListTargets: @staticmethod def test_list_targets( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to get a list of target IDs. @@ -162,7 +163,7 @@ class TestDelete: @staticmethod def test_delete_target( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to delete a target. @@ -189,7 +190,7 @@ class TestGetTargetSummaryReport: @staticmethod def test_get_target_summary_report( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ Details of a target are returned by ``get_target_summary_report``. @@ -258,7 +259,7 @@ class TestGetTargetRecord: @staticmethod def test_get_target_record( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ Details of a target are returned by ``get_target_record``. @@ -293,7 +294,7 @@ class TestWaitForTargetProcessed: @staticmethod def test_wait_for_target_processed( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to wait until a target is processed. @@ -313,7 +314,7 @@ def test_wait_for_target_processed( @staticmethod def test_default_seconds_between_requests( - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ By default, 0.2 seconds are waited between polling requests. @@ -365,7 +366,7 @@ def test_default_seconds_between_requests( @staticmethod def test_custom_seconds_between_requests( - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to customize the time waited between polling requests. @@ -416,7 +417,7 @@ def test_custom_seconds_between_requests( assert report.request_usage == expected_requests @staticmethod - def test_custom_timeout(image: io.BytesIO | io.BufferedRandom) -> None: + def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: """ It is possible to set a maximum timeout. """ @@ -460,7 +461,7 @@ class TestGetDuplicateTargets: @staticmethod def test_get_duplicate_targets( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to get the IDs of similar targets. @@ -494,7 +495,7 @@ class TestUpdateTarget: @staticmethod def test_update_target( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, different_high_quality_image: io.BytesIO, cloud_reco_client: CloudRecoService, ) -> None: @@ -553,7 +554,7 @@ def test_update_target( @staticmethod def test_no_fields_given( vws_client: VWS, - image: io.BytesIO | io.BufferedRandom, + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to give no update fields. From ef312200495addbd32039582239e4935a9cba30e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 31 Aug 2024 07:18:31 +0100 Subject: [PATCH 321/641] Use newline for better highlighting --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 455b1ea5d..4feb4c62d 100644 --- a/README.rst +++ b/README.rst @@ -85,6 +85,7 @@ Getting Started assert matching_targets[0].target_id == target_id .. invisible-code-block: python + new_image = pathlib.Path('high_quality_image.jpg') new_image.unlink() stack.close() From 2b4071f6bf363ef24570005aa6f9915cdb412a05 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 31 Aug 2024 07:59:33 +0100 Subject: [PATCH 322/641] Make it possible to run all tests in parallel --- README.rst | 35 --------------------------- conftest.py | 40 +++++++++++++++++++++++++++++++ docs/source/index.rst | 55 ++----------------------------------------- pyproject.toml | 7 +++++- 4 files changed, 48 insertions(+), 89 deletions(-) diff --git a/README.rst b/README.rst index 4feb4c62d..cb5f4b116 100644 --- a/README.rst +++ b/README.rst @@ -20,35 +20,6 @@ language. Getting Started --------------- -.. invisible-code-block: python - - import contextlib - import pathlib - import shutil - - import vws_test_fixtures - from mock_vws import MockVWS - from mock_vws.database import VuforiaDatabase - - # We use a low processing time so that tests run quickly. - mock = MockVWS(processing_time_seconds=0.2) - database = VuforiaDatabase( - server_access_key='[server-access-key]', - server_secret_key='[server-secret-key]', - client_access_key='[client-access-key]', - client_secret_key='[client-secret-key]', - ) - mock.add_database(database=database) - stack = contextlib.ExitStack() - stack.enter_context(mock) - - # We rely on implementation details of the fixtures package. - image = pathlib.Path(vws_test_fixtures.__path__[0]) / 'high_quality_image.jpg' - assert image.exists(), image.resolve() - new_image = pathlib.Path('high_quality_image.jpg') - shutil.copy(image, new_image) - - .. code-block:: python import pathlib @@ -84,12 +55,6 @@ Getting Started assert matching_targets[0].target_id == target_id -.. invisible-code-block: python - - new_image = pathlib.Path('high_quality_image.jpg') - new_image.unlink() - stack.close() - Full Documentation ------------------ diff --git a/conftest.py b/conftest.py index 1bbad0e64..059fd0968 100644 --- a/conftest.py +++ b/conftest.py @@ -1,9 +1,14 @@ """Setup for Sybil.""" +import io +from collections.abc import Generator from doctest import ELLIPSIS +from pathlib import Path import pytest from beartype import beartype +from mock_vws import MockVWS +from mock_vws.database import VuforiaDatabase from sybil import Sybil from sybil.parsers.rest import ( ClearNamespaceParser, @@ -21,6 +26,40 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: item.obj = beartype(obj=item.obj) +@pytest.fixture +def make_image_file( + high_quality_image: io.BytesIO, +) -> Generator[None, None, None]: + """ + Make an image file available in the test directory. + The path of this file matches the path in the documentation. + """ + new_image = Path("high_quality_image.jpg") + buffer = high_quality_image.getvalue() + new_image.write_bytes(data=buffer) + yield + new_image.unlink() + + +@pytest.fixture +def mock_vws() -> Generator[None, None, None]: + """ + Yield a mock VWS. + + The keys used here match the keys in the documentation. + """ + database = VuforiaDatabase( + server_access_key="[server-access-key]", + server_secret_key="[server-secret-key]", + client_access_key="[client-access-key]", + client_secret_key="[client-secret-key]", + ) + # We use a low processing time so that tests run quickly. + with MockVWS(processing_time_seconds=0.2) as mock: + mock.add_database(database=database) + yield + + pytest_collect_file = Sybil( parsers=[ ClearNamespaceParser(), @@ -28,4 +67,5 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: PythonCodeBlockParser(), ], patterns=["*.rst", "*.py"], + fixtures=["make_image_file", "mock_vws"], ).pytest() diff --git a/docs/source/index.rst b/docs/source/index.rst index 287ce7df1..907096d1d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,33 +16,6 @@ Usage See the :doc:`api-reference` for full usage details. -.. invisible-code-block: python - - import contextlib - import pathlib - import shutil - - import vws_test_fixtures - from mock_vws import MockVWS - from mock_vws.database import VuforiaDatabase - - mock = MockVWS(real_http=False) - database = VuforiaDatabase( - server_access_key='[server-access-key]', - server_secret_key='[server-secret-key]', - client_access_key='[client-access-key]', - client_secret_key='[client-secret-key]', - ) - mock.add_database(database=database) - stack = contextlib.ExitStack() - stack.enter_context(mock) - - # We rely on implementation details of the fixtures package. - image = pathlib.Path(vws_test_fixtures.__path__[0]) / 'high_quality_image.jpg' - assert image.exists(), image.resolve() - new_image = pathlib.Path('high_quality_image.jpg') - shutil.copy(image, new_image) - .. code-block:: python import pathlib @@ -62,7 +35,8 @@ See the :doc:`api-reference` for full usage details. client_access_key=client_access_key, client_secret_key=client_secret_key, ) - name = 'my_image_name' + import uuid + name = 'my_image_name' + uuid.uuid4().hex image = pathlib.Path('high_quality_image.jpg') with image.open(mode='rb') as my_image_file: @@ -79,12 +53,6 @@ See the :doc:`api-reference` for full usage details. assert matching_targets[0].target_id == target_id a = 1 -.. invisible-code-block: python - - new_image = pathlib.Path('high_quality_image.jpg') - new_image.unlink() - stack.close() - Testing ------- @@ -96,19 +64,6 @@ To write unit tests for code which uses this library, without using your Vuforia .. clear-namespace -.. invisible-code-block: python - - import pathlib - import shutil - - import vws_test_fixtures - - # We rely on implementation details of the fixtures package. - image = pathlib.Path(vws_test_fixtures.__path__[0]) / 'high_quality_image.jpg' - assert image.exists(), image.resolve() - new_image = pathlib.Path('high_quality_image.jpg') - shutil.copy(image, new_image) - .. code-block:: python import pathlib @@ -129,7 +84,6 @@ To write unit tests for code which uses this library, without using your Vuforia client_secret_key=database.client_secret_key, ) - image = pathlib.Path('high_quality_image.jpg') with image.open(mode='rb') as my_image_file: target_id = vws_client.add_target( @@ -140,11 +94,6 @@ To write unit tests for code which uses this library, without using your Vuforia active_flag=True, ) -.. invisible-code-block: python - - new_image = pathlib.Path('high_quality_image.jpg') - new_image.unlink() - There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. diff --git a/pyproject.toml b/pyproject.toml index 08620c806..d62d8bf02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,7 +117,12 @@ lint.ignore = [ "S101", ] -lint.per-file-ignores."tests/test_*.py" = [ +lint.per-file-ignores."conftest.py" = [ + # Allow hardcoded secrets in tests. + "S106", +] + +lint.per-file-ignores."tests/*.py" = [ # Do not require tests to have a one-line summary. "D205", ] From d2e753516023fee9f5a2eb760f7953de7bf3a06b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:15:07 +0000 Subject: [PATCH 323/641] Bump pylint from 3.2.6 to 3.2.7 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.6 to 3.2.7. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.6...v3.2.7) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d62d8bf02..9d5ce3b2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.2.6", + "pylint==3.2.7", "pyproject-fmt==2.2.1", "pyright==1.1.378", "pyroma==4.2", From b5ddce194e65f6419ea97b89d8abb389710c3342 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:19:51 +0000 Subject: [PATCH 324/641] Bump vws-python-mock from 2024.7.15 to 2024.8.30 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2024.7.15 to 2024.8.30. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2024.07.15...2024.08.30) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d5ce3b2d..081784af9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ optional-dependencies.dev = [ "sybil==6.1.1", "types-requests==2.32.0.20240712", "vulture==2.11", - "vws-python-mock==2024.7.15", + "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" From 8f2c74aeb65fe7c7c67e335307672e89d32509b7 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Mon, 2 Sep 2024 10:47:08 +0000 Subject: [PATCH 325/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 883b5f4e3..ad76c9902 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.02 +------------ + * Breaking change: Exception names now end with ``Error``. * Use a timeout (30 seconds) when making requests to the VWS API. * Type hint changes: images are now ``io.BytesIO`` instances or ``io.BufferedRandom``. From 565b1d920f2f40bd38b9475270170f806fd5b73d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:27:49 +0000 Subject: [PATCH 326/641] Bump doc8 from 1.1.1 to 1.1.2 Bumps [doc8](https://github.com/pycqa/doc8) from 1.1.1 to 1.1.2. - [Release notes](https://github.com/pycqa/doc8/releases) - [Commits](https://github.com/pycqa/doc8/compare/v1.1.1...v1.1.2) --- updated-dependencies: - dependency-name: doc8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 081784af9..ebabd99e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ optional-dependencies.dev = [ "actionlint-py==1.7.1.15", "check-manifest==0.49", "deptry==0.20.0", - "doc8==1.1.1", + "doc8==1.1.2", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From bbae55213f29c32dc91eb496c14828f3310f5aa2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 3 Sep 2024 15:04:42 +0100 Subject: [PATCH 327/641] Use more keyword arguments - better errors from type checkers --- src/vws/exceptions/vws_exceptions.py | 6 +++--- src/vws/query.py | 2 +- src/vws/vws.py | 16 +++++++++------- tests/test_vws.py | 10 ++++++---- tests/test_vws_exceptions.py | 2 +- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index ae9a4e0e4..bf6d5fc4d 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -24,7 +24,7 @@ def target_id(self) -> str: """ The unknown target ID. """ - path = urlparse(self.response.url).path + path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. return path.split(sep="/", maxsplit=2)[-1] @@ -75,7 +75,7 @@ def target_id(self) -> str: """ The processing target ID. """ - path = urlparse(self.response.url).path + path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. return path.split(sep="/", maxsplit=2)[-1] @@ -178,7 +178,7 @@ def target_id(self) -> str: """ The unknown target ID. """ - path = urlparse(self.response.url).path + path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. return path.split(sep="/", maxsplit=2)[-1] diff --git a/src/vws/query.py b/src/vws/query.py index 9bc372f2b..fc42a3ff5 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -186,7 +186,7 @@ def query( metadata = target_data_dict["application_metadata"] timestamp_string = target_data_dict["target_timestamp"] target_timestamp = datetime.datetime.fromtimestamp( - timestamp_string, + timestamp=timestamp_string, tz=datetime.UTC, ) target_data = TargetData( diff --git a/src/vws/vws.py b/src/vws/vws.py index b55b3d23d..5982981f6 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -316,7 +316,7 @@ def add_target( expected_result_code="TargetCreated", ) - return str(json.loads(response.text)["target_id"]) + return str(json.loads(s=response.text)["target_id"]) def get_target_record(self, target_id: str) -> TargetStatusAndRecord: """ @@ -354,7 +354,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - status = TargetStatuses(result_data["status"]) + status = TargetStatuses(value=result_data["status"]) target_record_dict = dict(result_data["target_record"]) target_record = TargetRecord( target_id=target_record_dict["target_id"], @@ -449,7 +449,7 @@ def list_targets(self) -> list[str]: expected_result_code="Success", ) - return list(json.loads(response.text)["results"]) + return list(json.loads(s=response.text)["results"]) def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: """ @@ -486,9 +486,9 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: expected_result_code="Success", ) - result_data = dict(json.loads(response.text)) + result_data = dict(json.loads(s=response.text)) return TargetSummaryReport( - status=TargetStatuses(result_data["status"]), + status=TargetStatuses(value=result_data["status"]), database_name=result_data["database_name"], target_name=result_data["target_name"], upload_date=date.fromisoformat(result_data["upload_date"]), @@ -529,7 +529,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: expected_result_code="Success", ) - response_data = dict(json.loads(response.text)) + response_data = dict(json.loads(s=response.text)) return DatabaseSummaryReport( active_images=response_data["active_images"], current_month_recos=response_data["current_month_recos"], @@ -682,7 +682,9 @@ def update_target( if image is not None: image_data = _get_image_data(image=image) - image_data_encoded = base64.b64encode(image_data).decode("ascii") + image_data_encoded = base64.b64encode(s=image_data).decode( + encoding="ascii", + ) data["image"] = image_data_encoded if active_flag is not None: diff --git a/tests/test_vws.py b/tests/test_vws.py index ab8cd079e..c5761b78a 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -48,8 +48,8 @@ def test_add_target( if application_metadata is None: encoded_metadata = None else: - encoded_metadata_bytes = base64.b64encode(application_metadata) - encoded_metadata = encoded_metadata_bytes.decode("utf-8") + encoded_metadata_bytes = base64.b64encode(s=application_metadata) + encoded_metadata = encoded_metadata_bytes.decode(encoding="utf-8") target_id = vws_client.add_target( name=name, @@ -197,7 +197,7 @@ def test_get_target_summary_report( """ date = "2018-04-25" target_name = uuid.uuid4().hex - with freeze_time(date): + with freeze_time(time_to_freeze=date): target_id = vws_client.add_target( name=target_name, width=1, @@ -521,7 +521,9 @@ def test_update_target( new_name = uuid.uuid4().hex new_width = secrets.choice(seq=range(1, 5000)) / 100 - new_application_metadata = base64.b64encode(b"a").decode("ascii") + new_application_metadata = base64.b64encode(s=b"a").decode( + encoding="ascii", + ) vws_client.update_target( target_id=target_id, name=new_name, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index ef105f7da..0c9de2d29 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -121,7 +121,7 @@ def test_bad_image(vws_client: VWS) -> None: """ A ``BadImage`` exception is raised when a non-image is given. """ - not_an_image = io.BytesIO(b"Not an image") + not_an_image = io.BytesIO(initial_bytes=b"Not an image") with pytest.raises(BadImageError) as exc: vws_client.add_target( name="x", From 4a785e5d6caf43f2ba88422e0e803b20f61a2de1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 3 Sep 2024 15:30:38 +0100 Subject: [PATCH 328/641] Make 'VWS.make_request' a public method --- CHANGELOG.rst | 2 ++ src/vws/vws.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ad76c9902..64a9f70a9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Make ``VWS.make_request`` a public method. + 2024.09.02 ------------ diff --git a/src/vws/vws.py b/src/vws/vws.py index 5982981f6..c14b76087 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -150,7 +150,7 @@ def __init__( self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url - def _make_request( + def make_request( self, method: str, data: bytes, @@ -309,7 +309,7 @@ def add_target( content = json.dumps(obj=data).encode(encoding="utf-8") - response = self._make_request( + response = self.make_request( method=HTTPMethod.POST, data=content, request_path="/targets", @@ -346,7 +346,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. """ - response = self._make_request( + response = self.make_request( method=HTTPMethod.GET, data=b"", request_path=f"/targets/{target_id}", @@ -442,7 +442,7 @@ def list_targets(self) -> list[str]: ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. """ - response = self._make_request( + response = self.make_request( method=HTTPMethod.GET, data=b"", request_path="/targets", @@ -479,7 +479,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. """ - response = self._make_request( + response = self.make_request( method=HTTPMethod.GET, data=b"", request_path=f"/summary/{target_id}", @@ -522,7 +522,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. """ - response = self._make_request( + response = self.make_request( method=HTTPMethod.GET, data=b"", request_path="/summary", @@ -572,7 +572,7 @@ def delete_target(self, target_id: str) -> None: ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. """ - self._make_request( + self.make_request( method=HTTPMethod.DELETE, data=b"", request_path=f"/targets/{target_id}", @@ -609,7 +609,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. """ - response = self._make_request( + response = self.make_request( method=HTTPMethod.GET, data=b"", request_path=f"/duplicates/{target_id}", @@ -695,7 +695,7 @@ def update_target( content = json.dumps(obj=data).encode(encoding="utf-8") - self._make_request( + self.make_request( method=HTTPMethod.PUT, data=content, request_path=f"/targets/{target_id}", From 1ab0e7c0546dd4f45773a72a57a8a37fca190d73 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 3 Sep 2024 15:37:11 +0100 Subject: [PATCH 329/641] Fix API doc references --- src/vws/vws.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index c14b76087..6cbab706e 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -175,17 +175,19 @@ def make_request( The response to the request made by `requests`. Raises: - ~vws.exceptions.OopsAnErrorOccurredPossiblyBadNameError: Vuforia - returns an HTML page with the text "Oops, an error occurred". + ~vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadNameError: + Vuforia returns an HTML page with the text "Oops, an error + occurred". + This has been seen to happen when the given name includes a bad character. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. - json.decoder.JSONDecodeError: The server did not respond with valid - JSON. This may happen if the server address is not a valid - Vuforia server. + json.JSONDecodeError: The server did not respond with valid JSON. + This may happen if the server address is not a valid Vuforia + server. """ response = _target_api_request( server_access_key=self._server_access_key, From 252435c3a081a2837afdf35cb821d902ac5d75d8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 3 Sep 2024 15:44:37 +0100 Subject: [PATCH 330/641] Fix linkcheck builder --- src/vws/vws.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 6cbab706e..9879102cf 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -160,7 +160,7 @@ def make_request( """ Make a request to the Vuforia Target API. - This uses `requests` to make a request against https://vws.vuforia.com. + This uses `requests` to make a request against Vuforia. The content type of the request will be `application/json`. Args: @@ -168,8 +168,8 @@ def make_request( data: The request body which will be used in the request. request_path: The path to the endpoint which will be used in the request. - expected_result_code: See - https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes + expected_result_code: See "VWS API Result Codes" on + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api. Returns: The response to the request made by `requests`. From e7d37e91d2c633a5ae2687c8892f2eb58efad94c Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Tue, 3 Sep 2024 14:50:17 +0000 Subject: [PATCH 331/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 64a9f70a9..82663c55a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.03 +------------ + * Make ``VWS.make_request`` a public method. 2024.09.02 From 26603a60cab9add1d65faa19e10a8ba6a2654970 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 3 Sep 2024 15:59:13 +0100 Subject: [PATCH 332/641] Expose content type parameter on VWS.make_request --- src/vws/vws.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 9879102cf..6f622773f 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -64,6 +64,8 @@ def _get_image_data(image: _ImageType) -> bytes: @beartype def _target_api_request( + *, + content_type: str, server_access_key: str, server_secret_key: str, method: str, @@ -75,9 +77,9 @@ def _target_api_request( Make a request to the Vuforia Target API. This uses `requests` to make a request against https://vws.vuforia.com. - The content type of the request will be `application/json`. Args: + content_type: The content type of the request. server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. method: The HTTP method which will be used in the request. @@ -90,7 +92,6 @@ def _target_api_request( The response to the request made by `requests`. """ date_string = rfc_1123_date() - content_type = "application/json" signature_string = authorization_header( access_key=server_access_key, @@ -152,16 +153,17 @@ def __init__( def make_request( self, + *, method: str, data: bytes, request_path: str, expected_result_code: str, + content_type: str, ) -> Response: """ Make a request to the Vuforia Target API. This uses `requests` to make a request against Vuforia. - The content type of the request will be `application/json`. Args: method: The HTTP method which will be used in the request. @@ -170,6 +172,7 @@ def make_request( request. expected_result_code: See "VWS API Result Codes" on https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api. + content_type: The content type of the request. Returns: The response to the request made by `requests`. @@ -190,6 +193,7 @@ def make_request( server. """ response = _target_api_request( + content_type=content_type, server_access_key=self._server_access_key, server_secret_key=self._server_secret_key, method=method, @@ -316,6 +320,7 @@ def add_target( data=content, request_path="/targets", expected_result_code="TargetCreated", + content_type="application/json", ) return str(json.loads(s=response.text)["target_id"]) @@ -353,6 +358,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: data=b"", request_path=f"/targets/{target_id}", expected_result_code="Success", + content_type="application/json", ) result_data = json.loads(s=response.text) @@ -449,6 +455,7 @@ def list_targets(self) -> list[str]: data=b"", request_path="/targets", expected_result_code="Success", + content_type="application/json", ) return list(json.loads(s=response.text)["results"]) @@ -486,6 +493,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: data=b"", request_path=f"/summary/{target_id}", expected_result_code="Success", + content_type="application/json", ) result_data = dict(json.loads(s=response.text)) @@ -529,6 +537,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: data=b"", request_path="/summary", expected_result_code="Success", + content_type="application/json", ) response_data = dict(json.loads(s=response.text)) @@ -579,6 +588,7 @@ def delete_target(self, target_id: str) -> None: data=b"", request_path=f"/targets/{target_id}", expected_result_code="Success", + content_type="application/json", ) def get_duplicate_targets(self, target_id: str) -> list[str]: @@ -616,6 +626,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: data=b"", request_path=f"/duplicates/{target_id}", expected_result_code="Success", + content_type="application/json", ) return list(json.loads(s=response.text)["similar_targets"]) @@ -702,4 +713,5 @@ def update_target( data=content, request_path=f"/targets/{target_id}", expected_result_code="Success", + content_type="application/json", ) From 2cdfc2fefc456b747e94234a14b93c74cc589a45 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Tue, 3 Sep 2024 15:06:22 +0000 Subject: [PATCH 333/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 82663c55a..00008ff61 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.03.1 +------------ + 2024.09.03 ------------ From f063db055e722616d30cbcfe43bb5ae434fa4783 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 04:15:07 +0100 Subject: [PATCH 334/641] Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. --- CHANGELOG.rst | 3 +-- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/{exceptions/response.py => types.py} | 2 +- src/vws/vws.py | 3 +-- 6 files changed, 6 insertions(+), 8 deletions(-) rename src/vws/{exceptions/response.py => types.py} (85%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 00008ff61..913584a1f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,8 +4,7 @@ Changelog Next ---- -2024.09.03.1 ------------- +* Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. 2024.09.03 ------------ diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 9dde05ee2..ad1116708 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,7 @@ from beartype import beartype -from .response import Response +from vws.types import Response @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index d036d8750..cb237abd8 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from .response import Response +from vws.types import Response @beartype diff --git a/src/vws/query.py b/src/vws/query.py index fc42a3ff5..dfa0504f2 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -25,9 +25,9 @@ RequestEntityTooLargeError, ServerError, ) -from vws.exceptions.response import Response from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData +from vws.types import Response _ImageType = io.BytesIO | BinaryIO diff --git a/src/vws/exceptions/response.py b/src/vws/types.py similarity index 85% rename from src/vws/exceptions/response.py rename to src/vws/types.py index 0b3eced88..b3b941e24 100644 --- a/src/vws/exceptions/response.py +++ b/src/vws/types.py @@ -1,4 +1,4 @@ -"""Responses for exceptions.""" +"""Responses for requests to VWS and VWQ.""" from dataclasses import dataclass diff --git a/src/vws/vws.py b/src/vws/vws.py index 6f622773f..987d94fcc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -46,8 +46,7 @@ TargetStatuses, TargetSummaryReport, ) - -from .exceptions.response import Response +from vws.types import Response _ImageType = io.BytesIO | BinaryIO From 4800e8c56bdfee5537b414f0d5b9312e8995b6ce Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 04:16:45 +0100 Subject: [PATCH 335/641] Add `raw` to Response --- CHANGELOG.rst | 1 + docs/source/api-reference.rst | 4 ++++ docs/source/exceptions.rst | 7 ------- src/vws/query.py | 1 + src/vws/types.py | 1 + src/vws/vws.py | 1 + 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 913584a1f..b30b9a4d0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,7 @@ Next ---- * Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. +* Add ``raw`` field to ``Response``. 2024.09.03 ------------ diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 3ffbc13da..5b7027550 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -12,3 +12,7 @@ API Reference .. automodule:: vws.include_target_data :undoc-members: :members: + +.. automodule:: vws.types + :undoc-members: + :members: diff --git a/docs/source/exceptions.rst b/docs/source/exceptions.rst index f23ab02b8..f48730bfd 100644 --- a/docs/source/exceptions.rst +++ b/docs/source/exceptions.rst @@ -36,10 +36,3 @@ Custom exceptions :show-inheritance: :inherited-members: Exception :exclude-members: errno, filename, filename2, strerror - -Response --------- - -.. automodule:: vws.exceptions.response - :undoc-members: - :members: diff --git a/src/vws/query.py b/src/vws/query.py index dfa0504f2..17382d600 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -154,6 +154,7 @@ def query( status_code=requests_response.status_code, headers=dict(requests_response.headers), request_body=requests_response.request.body, + raw=requests_response.raw, ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: diff --git a/src/vws/types.py b/src/vws/types.py index b3b941e24..3e5e49aaa 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -17,3 +17,4 @@ class Response: status_code: int headers: dict[str, str] request_body: bytes | str | None + raw: bytes diff --git a/src/vws/vws.py b/src/vws/vws.py index 987d94fcc..2acc2ca07 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -125,6 +125,7 @@ def _target_api_request( status_code=requests_response.status_code, headers=dict(requests_response.headers), request_body=requests_response.request.body, + raw=requests_response.raw, ) From ad7991d099064519a76e6f1b7b8a787ff2078602 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Wed, 4 Sep 2024 03:29:24 +0000 Subject: [PATCH 336/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b30b9a4d0..288081e00 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.04 +------------ + * Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. * Add ``raw`` field to ``Response``. From 878eff203e5beea150136e15e9c940dda1b1874b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 05:18:42 +0100 Subject: [PATCH 337/641] Improve `raw` type --- src/vws/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vws/types.py b/src/vws/types.py index 3e5e49aaa..711da851e 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -1,6 +1,7 @@ """Responses for requests to VWS and VWQ.""" from dataclasses import dataclass +from io import IOBase from beartype import beartype @@ -17,4 +18,4 @@ class Response: status_code: int headers: dict[str, str] request_body: bytes | str | None - raw: bytes + raw: IOBase From abbbb708b5a71f25ae8bb04fbc0e9db51bd759f3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 05:33:10 +0100 Subject: [PATCH 338/641] Save tell-position in Response --- src/vws/types.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vws/types.py b/src/vws/types.py index 711da851e..e6f59145a 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -1,7 +1,6 @@ """Responses for requests to VWS and VWQ.""" from dataclasses import dataclass -from io import IOBase from beartype import beartype @@ -18,4 +17,4 @@ class Response: status_code: int headers: dict[str, str] request_body: bytes | str | None - raw: IOBase + tell_position: int From 943b215882fa0fff3e11da091dc449d7ca3d36ab Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 05:34:18 +0100 Subject: [PATCH 339/641] Update Response callers --- src/vws/query.py | 2 +- src/vws/vws.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index 17382d600..2380ba962 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -154,7 +154,7 @@ def query( status_code=requests_response.status_code, headers=dict(requests_response.headers), request_body=requests_response.request.body, - raw=requests_response.raw, + tell_position=requests_response.raw.tell(), ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: diff --git a/src/vws/vws.py b/src/vws/vws.py index 2acc2ca07..185af1178 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -125,7 +125,7 @@ def _target_api_request( status_code=requests_response.status_code, headers=dict(requests_response.headers), request_body=requests_response.request.body, - raw=requests_response.raw, + tell_position=requests_response.raw.tell(), ) From 43635b24f4ec169cf220e369d0dd8a4b40cc09a5 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Wed, 4 Sep 2024 04:42:23 +0000 Subject: [PATCH 340/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 288081e00..2eb9d9a05 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.04.1 +------------ + 2024.09.04 ------------ From 10d94680e0999ede070b87d62644c280831ca025 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:04:06 +0000 Subject: [PATCH 341/641] Bump pyright from 1.1.378 to 1.1.379 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.378 to 1.1.379. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.378...v1.1.379) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ebabd99e3..9d9b9118e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.7", "pyproject-fmt==2.2.1", - "pyright==1.1.378", + "pyright==1.1.379", "pyroma==4.2", "pytest==8.3.2", "pytest-cov==5.0.0", From d9e88a68be9393590e5738f8b2daf74ca6efeb05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:11:26 +0000 Subject: [PATCH 342/641] Bump types-requests from 2.32.0.20240712 to 2.32.0.20240905 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240712 to 2.32.0.20240905. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d9b9118e..19ea0d5c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.32.0.20240712", + "types-requests==2.32.0.20240905", "vulture==2.11", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", From 9444c4ad23be801d27f955d20ee8a1796da239dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 10:24:36 +0000 Subject: [PATCH 343/641] Bump ruff from 0.6.3 to 0.6.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.3 to 0.6.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.3...0.6.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19ea0d5c6..29927ba42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.3", + "ruff==0.6.4", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From 72ba608650e49ed85852bc19808bcf5d19aafecf Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 6 Sep 2024 18:51:28 +0100 Subject: [PATCH 344/641] Show diff on ruff format errors --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 81166ec44..9a88cd81a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ ci: - deptry - pylint - ruff-check - - ruff-format-check + - ruff-format-diff - ruff-check-fix - ruff-format-fix - doc8 @@ -108,9 +108,9 @@ repos: language: system types_or: [python] - - id: ruff-format-check - name: Ruff format check - entry: ruff format --check + - id: ruff-format-diff + name: Ruff format diff + entry: ruff format --diff language: system types_or: [python] From 834e96259fc5e992aca30289511c2f9dbe468b4d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 8 Sep 2024 02:00:03 +0100 Subject: [PATCH 345/641] Add shellcheck pre-commit hook --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9a88cd81a..21aefd9c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,6 +44,11 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace +- repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + args: ["--shell", "bash"] - repo: local hooks: - id: actionlint From 9b8932963a59fa8b1a94d8ef872dddfcd2c3b36b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:15:23 +0100 Subject: [PATCH 346/641] Fix the GitHub workflow badge to refer to the right branch --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index cb5f4b116..68af180c6 100644 --- a/README.rst +++ b/README.rst @@ -61,7 +61,7 @@ Full Documentation See the `full documentation `__. -.. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg +.. |Build Status| image:: https://github.com/VWS-Python/vws-python/actions/workflows/ci.yml/badge.svg?branch=main :target: https://github.com/VWS-Python/vws-python/actions .. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/main/graph/badge.svg :target: https://codecov.io/gh/VWS-Python/vws-python From c5ad34df5781a29203a9af2c3a1901c335fbfc83 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:34:08 +0100 Subject: [PATCH 347/641] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 21aefd9c6..dcb18efd9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: hooks: - id: actionlint name: actionlint - entry: actionlint + entry: python -m actionlint language: system pass_filenames: false types_or: [yaml] @@ -61,7 +61,7 @@ repos: - id: mypy name: mypy stages: [push] - entry: mypy . + entry: python -m mypy . language: system types_or: [python, toml] pass_filenames: false @@ -69,90 +69,90 @@ repos: - id: check-manifest name: check-manifest stages: [push] - entry: check-manifest . + entry: python -m check-manifest . language: system pass_filenames: false - id: pyright name: pyright stages: [push] - entry: pyright . + entry: python -m pyright . language: system types_or: [python, toml] pass_filenames: false - id: vulture name: vulture - entry: vulture --min-confidence 100 --exclude .eggs + entry: python -m vulture --min-confidence 100 --exclude .eggs language: system types_or: [python] - id: pyroma name: pyroma - entry: pyroma --min 10 . + entry: python -m pyroma --min 10 . language: system pass_filenames: false types_or: [toml] - id: deptry name: deptry - entry: deptry src/ + entry: python -m deptry src/ language: system pass_filenames: false - id: pylint name: pylint - entry: pylint *.py src/ tests/ docs/ + entry: python -m pylint *.py src/ tests/ docs/ language: system stages: [manual] pass_filenames: false - id: ruff-check name: Ruff check - entry: ruff check + entry: python -m ruff check language: system types_or: [python] - id: ruff-format-diff name: Ruff format diff - entry: ruff format --diff + entry: python -m ruff format --diff language: system types_or: [python] - id: ruff-check-fix name: Ruff check fix - entry: ruff check --fix + entry: python -m ruff check --fix language: system types_or: [python] - id: ruff-format-fix name: Ruff format - entry: ruff format + entry: python -m ruff format language: system types_or: [python] - id: doc8 name: doc8 - entry: doc8 + entry: python -m doc8 language: system types_or: [rst] - id: interrogate name: interrogate - entry: interrogate + entry: python -m interrogate language: system types_or: [python] - id: pyproject-fmt-check name: pyproject-fmt check - entry: pyproject-fmt --check + entry: python -m pyproject-fmt --check language: system types_or: [toml] files: pyproject.toml - id: pyproject-fmt-fix name: pyproject-fmt - entry: pyproject-fmt + entry: python -m pyproject-fmt language: system types_or: [toml] files: pyproject.toml @@ -183,7 +183,7 @@ repos: - id: pyright-verifytypes name: pyright-verifytypes stages: [push] - entry: pyright --verifytypes vws + entry: python -m pyright --verifytypes vws language: system pass_filenames: false types_or: [python] From f480c467967a0135610e5a231795b2e1d1f4de7d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:36:32 +0100 Subject: [PATCH 348/641] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dcb18efd9..eeddd9cfd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: hooks: - id: actionlint name: actionlint - entry: python -m actionlint + entry: actionlint language: system pass_filenames: false types_or: [yaml] @@ -145,14 +145,14 @@ repos: - id: pyproject-fmt-check name: pyproject-fmt check - entry: python -m pyproject-fmt --check + entry: pyproject-fmt --check language: system types_or: [toml] files: pyproject.toml - id: pyproject-fmt-fix name: pyproject-fmt - entry: python -m pyproject-fmt + entry: pyproject-fmt language: system types_or: [toml] files: pyproject.toml From dd4345095a1d4e3d1776cf8fffaeac7154da41fe Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:40:23 +0100 Subject: [PATCH 349/641] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eeddd9cfd..55d22db37 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,7 @@ repos: - id: check-manifest name: check-manifest stages: [push] - entry: python -m check-manifest . + entry: python -m check_manifest . language: system pass_filenames: false From 0afbed237dff456adc863bc36f63c922f66cc498 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:26:39 +0000 Subject: [PATCH 350/641] Bump types-requests from 2.32.0.20240905 to 2.32.0.20240907 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240905 to 2.32.0.20240907. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 29927ba42..3aa6e4fe1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.32.0.20240905", + "types-requests==2.32.0.20240907", "vulture==2.11", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", From cd35906d0c3e89ee9e3bd568ebe1c983e5bf22c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:33:08 +0000 Subject: [PATCH 351/641] Bump pyproject-fmt from 2.2.1 to 2.2.3 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.2.1...2.2.3) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3aa6e4fe1..6b2a0861e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pyenchant==3.2.2", "pygments==2.18.0", "pylint==3.2.7", - "pyproject-fmt==2.2.1", + "pyproject-fmt==2.2.3", "pyright==1.1.379", "pyroma==4.2", "pytest==8.3.2", From be9353fdb07788d6785099875e8438b33228550a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 11 Sep 2024 02:42:45 +0100 Subject: [PATCH 352/641] Switch from code to code-block, for consistency --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 68af180c6..336acd97e 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ Web Query API. Installation ------------ -.. code:: sh +.. code-block:: sh pip install vws-python From 293a15875c3778b6e9f63841e56c4047494e8c43 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 11 Sep 2024 10:37:03 +0100 Subject: [PATCH 353/641] Switch from code-block: sh to code-block: shell - get syntax highlighting --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 336acd97e..0f54838e3 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ Web Query API. Installation ------------ -.. code-block:: sh +.. code-block:: shell pip install vws-python From 9f8791567e6b6fda2798cb81a775f5a446a53f8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:42:45 +0000 Subject: [PATCH 354/641] Bump pytest from 8.3.2 to 8.3.3 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.2 to 8.3.3. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.2...8.3.3) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6b2a0861e..e13748891 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.2.3", "pyright==1.1.379", "pyroma==4.2", - "pytest==8.3.2", + "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", "ruff==0.6.4", From d563dec5f035b10450dd5af02b93aab10c71aa6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:51:22 +0000 Subject: [PATCH 355/641] Bump pyright from 1.1.379 to 1.1.380 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.379 to 1.1.380. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.379...v1.1.380) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e13748891..5a1d96913 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.7", "pyproject-fmt==2.2.3", - "pyright==1.1.379", + "pyright==1.1.380", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 58b9d87dfc228b95280b02187f2847086fb50775 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:28:36 +0000 Subject: [PATCH 356/641] Bump pre-commit-ci/lite-action from 1.0.2 to 1.0.3 Bumps [pre-commit-ci/lite-action](https://github.com/pre-commit-ci/lite-action) from 1.0.2 to 1.0.3. - [Release notes](https://github.com/pre-commit-ci/lite-action/releases) - [Commits](https://github.com/pre-commit-ci/lite-action/compare/v1.0.2...v1.0.3) --- updated-dependencies: - dependency-name: pre-commit-ci/lite-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad86deb1b..6f424e7a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,5 +53,5 @@ jobs: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - - uses: pre-commit-ci/lite-action@v1.0.2 + - uses: pre-commit-ci/lite-action@v1.0.3 if: always() From 52d970969303fa83d29a8dfa8766942fb7068c3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:49:00 +0000 Subject: [PATCH 357/641] Bump sybil from 6.1.1 to 7.0.0 Bumps [sybil](https://github.com/simplistix/sybil) from 6.1.1 to 7.0.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/6.1.1...7.0.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5a1d96913..0b6da1652 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", - "sybil==6.1.1", + "sybil==7.0.0", "types-requests==2.32.0.20240907", "vulture==2.11", "vws-python-mock==2024.8.30", From 1fcec8ca6fbe3b3f5d301773e6fd974f85840387 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 14 Sep 2024 09:07:10 +0100 Subject: [PATCH 358/641] Be careful when releasing to not accidentally commit to a file --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 237858d8b..64761eefa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,6 +59,7 @@ jobs: id: commit with: commit_message: Bump CHANGELOG + file_pattern: CHANGELOG.rst - name: Bump version and push tag id: tag_version From b277d65abd5f3f2df85240e8f6ed1413f4308e0f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 10:03:34 +0100 Subject: [PATCH 359/641] Add docrun dependency --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 0b6da1652..26c57fb17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", + "doccmd==2024.9.14.5", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From ab10547df4ee01e8d84f774009d418dcd00aa844 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 10:22:41 +0100 Subject: [PATCH 360/641] Add docrun pre-commit hooks --- .pre-commit-config.yaml | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 55d22db37..f82140622 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,6 +66,13 @@ repos: types_or: [python, toml] pass_filenames: false + - id: mypy-docs + name: mypy-docs + stages: [push] + entry: doccmd --language=python --command="mypy" + language: system + types_or: [markdown, rst, python, toml] + - id: check-manifest name: check-manifest stages: [push] @@ -81,6 +88,13 @@ repos: types_or: [python, toml] pass_filenames: false + - id: pyright-docs + name: pyright-docs + stages: [push] + entry: doccmd --language=python --command="pyright" + language: system + types_or: [markdown, rst, python, toml] + - id: vulture name: vulture entry: python -m vulture --min-confidence 100 --exclude .eggs @@ -107,30 +121,61 @@ repos: stages: [manual] pass_filenames: false + - id: pylint-docs + name: pylint-docs + entry: doccmd --language=python --command="pylint" --lowercase-file-name + language: system + stages: [manual] + types_or: [markdown, rst, python, toml] + - id: ruff-check name: Ruff check entry: python -m ruff check language: system types_or: [python] + - id: ruff-check-docs + name: Ruff check docs + entry: doccmd --language=python --command="ruff check" + language: system + types_or: [markdown, rst] + - id: ruff-format-diff name: Ruff format diff entry: python -m ruff format --diff language: system types_or: [python] + - id: ruff-format-diff-docs + name: Ruff format diff docs + entry: doccmd --language=python --no-pad-file --command="ruff format --diff" + language: system + types_or: [markdown, rst] + - id: ruff-check-fix name: Ruff check fix entry: python -m ruff check --fix language: system types_or: [python] + - id: ruff-check-fix-docs + name: Ruff check fix docs + entry: doccmd --language=python --command="ruff check --fix" + language: system + types_or: [markdown, rst] + - id: ruff-format-fix name: Ruff format entry: python -m ruff format language: system types_or: [python] + - id: ruff-format-fix-docs + name: Ruff format docs + entry: doccmd --language=python --no-pad-file --command="ruff format" + language: system + types_or: [markdown, rst] + - id: doc8 name: doc8 entry: python -m doc8 @@ -143,6 +188,12 @@ repos: language: system types_or: [python] + - id: interrogate-docs + name: interrogate docs + entry: doccmd --language=python --command="interrogate" + language: system + types_or: [markdown, rst] + - id: pyproject-fmt-check name: pyproject-fmt check entry: pyproject-fmt --check From 1ed7e80562a03183dc9aad9d8c6a115486fe757e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 10:24:10 +0100 Subject: [PATCH 361/641] Ignore docs items in pre-commit config --- .pre-commit-config.yaml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f82140622..9dbe7b746 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,25 +6,32 @@ ci: # We therefore cannot use those dependencies in pre-commit CI. skip: - actionlint - - mypy - check-manifest - - pyright - - vulture - - pyroma - deptry - - pylint - - ruff-check - - ruff-format-diff - - ruff-check-fix - - ruff-format-fix - doc8 + - docs - interrogate + - interrogate-docs + - linkcheck + - mypy + - mypy-docs + - pylint - pyproject-fmt-check - pyproject-fmt-fix - - linkcheck - - spelling - - docs + - pyright + - pyright-docs - pyright-verifytypes + - pyroma + - ruff-check + - ruff-check-docs + - ruff-check-fix + - ruff-check-fix-docs + - ruff-format-diff + - ruff-format-diff-docs + - ruff-format-fix + - ruff-format-fix-docs + - spelling + - vulture default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: From 5113f9d641926c5a249bf2a8c0695e0476b71bad Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 09:24:38 +0000 Subject: [PATCH 362/641] [pre-commit.ci lite] apply automatic fixes --- README.rst | 14 ++++++------ docs/source/index.rst | 53 ++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/README.rst b/README.rst index 0f54838e3..aca061a06 100644 --- a/README.rst +++ b/README.rst @@ -26,10 +26,10 @@ Getting Started from vws import VWS, CloudRecoService - server_access_key = '[server-access-key]' - server_secret_key = '[server-secret-key]' - client_access_key = '[client-access-key]' - client_secret_key = '[client-secret-key]' + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" vws_client = VWS( server_access_key=server_access_key, @@ -39,10 +39,10 @@ Getting Started client_access_key=client_access_key, client_secret_key=client_secret_key, ) - name = 'my_image_name' + name = "my_image_name" - image = pathlib.Path('high_quality_image.jpg') - with image.open(mode='rb') as my_image_file: + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: target_id = vws_client.add_target( name=name, width=1, diff --git a/docs/source/index.rst b/docs/source/index.rst index 907096d1d..b81c4c9bb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -22,10 +22,10 @@ See the :doc:`api-reference` for full usage details. from vws import VWS, CloudRecoService - server_access_key = '[server-access-key]' - server_secret_key = '[server-secret-key]' - client_access_key = '[client-access-key]' - client_secret_key = '[client-secret-key]' + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" vws_client = VWS( server_access_key=server_access_key, @@ -36,19 +36,20 @@ See the :doc:`api-reference` for full usage details. client_secret_key=client_secret_key, ) import uuid - name = 'my_image_name' + uuid.uuid4().hex - - image = pathlib.Path('high_quality_image.jpg') - with image.open(mode='rb') as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) + + name = "my_image_name" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) assert matching_targets[0].target_id == target_id a = 1 @@ -84,15 +85,15 @@ To write unit tests for code which uses this library, without using your Vuforia client_secret_key=database.client_secret_key, ) - image = pathlib.Path('high_quality_image.jpg') - with image.open(mode='rb') as my_image_file: - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image_file, - application_metadata=None, - active_flag=True, - ) + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, + ) There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. From a97247ce488dad4376435cc421c375bb4a66bd4c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 10:37:44 +0100 Subject: [PATCH 363/641] Fix many lint issues --- .pre-commit-config.yaml | 2 ++ README.rst | 7 ++++++- docs/source/index.rst | 13 +++++++++---- pyproject.toml | 5 +++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9dbe7b746..77321e831 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +fail_fast: true + # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks diff --git a/README.rst b/README.rst index aca061a06..b82abf663 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,10 @@ Getting Started .. code-block:: python + """Add a target to VWS and then query it.""" + import pathlib + import uuid from vws import VWS, CloudRecoService @@ -39,7 +42,8 @@ Getting Started client_access_key=client_access_key, client_secret_key=client_secret_key, ) - name = "my_image_name" + + name = "my_image_name_" + uuid.uuid4().hex image = pathlib.Path("high_quality_image.jpg") with image.open(mode="rb") as my_image_file: @@ -54,6 +58,7 @@ Getting Started matching_targets = cloud_reco_client.query(image=my_image_file) assert matching_targets[0].target_id == target_id + a = 1 Full Documentation ------------------ diff --git a/docs/source/index.rst b/docs/source/index.rst index b81c4c9bb..d085bcc84 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,7 +18,10 @@ See the :doc:`api-reference` for full usage details. .. code-block:: python + """Add a target to VWS and then query it.""" + import pathlib + import uuid from vws import VWS, CloudRecoService @@ -35,9 +38,8 @@ See the :doc:`api-reference` for full usage details. client_access_key=client_access_key, client_secret_key=client_secret_key, ) - import uuid - name = "my_image_name" + uuid.uuid4().hex + name = "my_image_name_" + uuid.uuid4().hex image = pathlib.Path("high_quality_image.jpg") with image.open(mode="rb") as my_image_file: @@ -67,11 +69,14 @@ To write unit tests for code which uses this library, without using your Vuforia .. code-block:: python + """Test adding a target to VWS.""" + import pathlib - from mock_vws.database import VuforiaDatabase from mock_vws import MockVWS - from vws import CloudRecoService, VWS + from mock_vws.database import VuforiaDatabase + + from vws import VWS, CloudRecoService with MockVWS() as mock: database = VuforiaDatabase() diff --git a/pyproject.toml b/pyproject.toml index 26c57fb17..4e152e40b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,6 +123,11 @@ lint.per-file-ignores."conftest.py" = [ "S106", ] +lint.per-file-ignores."doccmd_*.py" = [ + # Allow hardcoded secrets in documentation. + "S105", +] + lint.per-file-ignores."tests/*.py" = [ # Do not require tests to have a one-line summary. "D205", From 74c05e06da166cc3855956669f2e36af16f0b581 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 11:00:04 +0100 Subject: [PATCH 364/641] Progress towards passing lint --- README.rst | 70 +++++++++++++++---------- conftest.py | 33 +++++++++++- docs/source/index.rst | 115 +++++++++++++++++++++++++----------------- 3 files changed, 142 insertions(+), 76 deletions(-) diff --git a/README.rst b/README.rst index b82abf663..9e008dc33 100644 --- a/README.rst +++ b/README.rst @@ -28,37 +28,51 @@ Getting Started import uuid from vws import VWS, CloudRecoService + from vws.reports import QueryResult - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" - - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, - ) - - name = "my_image_name_" + uuid.uuid4().hex - - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, + + def add_target() -> str: + """Add a target to VWS and return its ID.""" + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + name = "my_image_name_" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + + return target_id + + + def get_matching_targets() -> list[QueryResult]: + """Query VWS for matching targets.""" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" + + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - assert matching_targets[0].target_id == target_id - a = 1 + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + return cloud_reco_client.query(image=my_image_file) + + + TARGET_ID = add_target() + MATCHING_TARGETS = get_matching_targets() + assert MATCHING_TARGETS[0].target_id == TARGET_ID Full Documentation ------------------ diff --git a/conftest.py b/conftest.py index 059fd0968..8b12e9d09 100644 --- a/conftest.py +++ b/conftest.py @@ -1,6 +1,7 @@ """Setup for Sybil.""" import io +import sys from collections.abc import Generator from doctest import ELLIPSIS from pathlib import Path @@ -12,9 +13,11 @@ from sybil import Sybil from sybil.parsers.rest import ( ClearNamespaceParser, + CodeBlockParser, DocTestParser, PythonCodeBlockParser, ) +from sybil_extras.evaluators.shell_evaluator import ShellCommandEvaluator def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @@ -67,5 +70,33 @@ def mock_vws() -> Generator[None, None, None]: PythonCodeBlockParser(), ], patterns=["*.rst", "*.py"], - fixtures=["make_image_file", "mock_vws"], ).pytest() + +run_code_sybil = Sybil( + parsers=[ + DocTestParser(optionflags=ELLIPSIS), + PythonCodeBlockParser(), + ], + patterns=["*.rst", "*.py"], + fixtures=["make_image_file", "mock_vws"], +) + +pytest_sybil = Sybil( + parsers=[ + CodeBlockParser( + language="python", + evaluator=ShellCommandEvaluator( + args=[sys.executable, "-m", "pytest"], + tempfile_suffixes=[".py"], + pad_file=True, + write_to_file=False, + ), + ), + ], + patterns=["*.rst"], + fixtures=["make_image_file"], +) + +sybils = run_code_sybil + pytest_sybil + +pytest_collect_file = sybils.pytest() diff --git a/docs/source/index.rst b/docs/source/index.rst index d085bcc84..1861a3de0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -24,37 +24,51 @@ See the :doc:`api-reference` for full usage details. import uuid from vws import VWS, CloudRecoService + from vws.reports import QueryResult - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" - - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, - ) - - name = "my_image_name_" + uuid.uuid4().hex - - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, + + def add_target() -> str: + """Add a target to VWS and return its ID.""" + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + name = "my_image_name_" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + + return target_id + + + def get_matching_targets() -> list[QueryResult]: + """Query VWS for matching targets.""" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" + + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - assert matching_targets[0].target_id == target_id - a = 1 + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + return cloud_reco_client.query(image=my_image_file) + + + TARGET_ID = add_target() + MATCHING_TARGETS = get_matching_targets() + assert MATCHING_TARGETS[0].target_id == TARGET_ID Testing ------- @@ -78,27 +92,34 @@ To write unit tests for code which uses this library, without using your Vuforia from vws import VWS, CloudRecoService - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, - ) - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image_file, - application_metadata=None, - active_flag=True, + def test_add_target() -> None: + """Test adding a target to VWS.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, + ) + + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) + assert matching_targets[0].target_id == target_id There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. From 0f41e176a32450fabd4e73ce1fa98b677e9be4e5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 11:38:01 +0100 Subject: [PATCH 365/641] Progress towards passing lint --- conftest.py | 33 +--------------------- docs/source/index.rst | 66 +++++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 63 deletions(-) diff --git a/conftest.py b/conftest.py index 8b12e9d09..059fd0968 100644 --- a/conftest.py +++ b/conftest.py @@ -1,7 +1,6 @@ """Setup for Sybil.""" import io -import sys from collections.abc import Generator from doctest import ELLIPSIS from pathlib import Path @@ -13,11 +12,9 @@ from sybil import Sybil from sybil.parsers.rest import ( ClearNamespaceParser, - CodeBlockParser, DocTestParser, PythonCodeBlockParser, ) -from sybil_extras.evaluators.shell_evaluator import ShellCommandEvaluator def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @@ -70,33 +67,5 @@ def mock_vws() -> Generator[None, None, None]: PythonCodeBlockParser(), ], patterns=["*.rst", "*.py"], -).pytest() - -run_code_sybil = Sybil( - parsers=[ - DocTestParser(optionflags=ELLIPSIS), - PythonCodeBlockParser(), - ], - patterns=["*.rst", "*.py"], fixtures=["make_image_file", "mock_vws"], -) - -pytest_sybil = Sybil( - parsers=[ - CodeBlockParser( - language="python", - evaluator=ShellCommandEvaluator( - args=[sys.executable, "-m", "pytest"], - tempfile_suffixes=[".py"], - pad_file=True, - write_to_file=False, - ), - ), - ], - patterns=["*.rst"], - fixtures=["make_image_file"], -) - -sybils = run_code_sybil + pytest_sybil - -pytest_collect_file = sybils.pytest() +).pytest() diff --git a/docs/source/index.rst b/docs/source/index.rst index 1861a3de0..912cddc14 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -83,43 +83,47 @@ To write unit tests for code which uses this library, without using your Vuforia .. code-block:: python - """Test adding a target to VWS.""" + """Add a target to VWS and then query it.""" - import pathlib + import pathlib - from mock_vws import MockVWS - from mock_vws.database import VuforiaDatabase + from mock_vws import MockVWS + from mock_vws.database import VuforiaDatabase - from vws import VWS, CloudRecoService + from vws import VWS, CloudRecoService - def test_add_target() -> None: - """Test adding a target to VWS.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, - ) + def test_add_target() -> None: + """Test adding a target to VWS.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, + ) + + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) + + assert matching_targets[0].target_id == target_id + - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image_file, - application_metadata=None, - active_flag=True, - ) - - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - assert matching_targets[0].target_id == target_id + test_add_target() There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. From 3cc9ddbfebca03e3f4fa5fab2183e2968bc9a27f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 16:04:36 +0100 Subject: [PATCH 366/641] Get pylint passing --- README.rst | 69 ++++++++++-------------- docs/source/index.rst | 121 ++++++++++++++++++------------------------ pyproject.toml | 6 +++ 3 files changed, 87 insertions(+), 109 deletions(-) diff --git a/README.rst b/README.rst index 9e008dc33..ffccbc916 100644 --- a/README.rst +++ b/README.rst @@ -28,51 +28,40 @@ Getting Started import uuid from vws import VWS, CloudRecoService - from vws.reports import QueryResult - - def add_target() -> str: - """Add a target to VWS and return its ID.""" - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - name = "my_image_name_" + uuid.uuid4().hex - - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - - return target_id - - - def get_matching_targets() -> list[QueryResult]: - """Query VWS for matching targets.""" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" - - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" + + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, + ) + + name = "my_image_name_" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, ) - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - return cloud_reco_client.query(image=my_image_file) + vws_client.wait_for_target_processed(target_id=target_id) + with image.open(mode="rb") as my_image_file: + matching_targets = cloud_reco_client.query(image=my_image_file) - TARGET_ID = add_target() - MATCHING_TARGETS = get_matching_targets() - assert MATCHING_TARGETS[0].target_id == TARGET_ID + assert matching_targets[0].target_id == target_id Full Documentation ------------------ diff --git a/docs/source/index.rst b/docs/source/index.rst index 912cddc14..fe1ee9a9e 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -24,51 +24,40 @@ See the :doc:`api-reference` for full usage details. import uuid from vws import VWS, CloudRecoService - from vws.reports import QueryResult - - def add_target() -> str: - """Add a target to VWS and return its ID.""" - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - name = "my_image_name_" + uuid.uuid4().hex - - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - - return target_id - - - def get_matching_targets() -> list[QueryResult]: - """Query VWS for matching targets.""" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" - - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" + + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, + ) + + name = "my_image_name_" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, ) - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - return cloud_reco_client.query(image=my_image_file) + vws_client.wait_for_target_processed(target_id=target_id) + with image.open(mode="rb") as my_image_file: + matching_targets = cloud_reco_client.query(image=my_image_file) - TARGET_ID = add_target() - MATCHING_TARGETS = get_matching_targets() - assert MATCHING_TARGETS[0].target_id == TARGET_ID + assert matching_targets[0].target_id == target_id Testing ------- @@ -92,38 +81,32 @@ To write unit tests for code which uses this library, without using your Vuforia from vws import VWS, CloudRecoService - - def test_add_target() -> None: - """Test adding a target to VWS.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, ) - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image_file, - application_metadata=None, - active_flag=True, - ) - - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - - assert matching_targets[0].target_id == target_id - + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) - test_add_target() + assert matching_targets[0].target_id == target_id There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. diff --git a/pyproject.toml b/pyproject.toml index 4e152e40b..1251725a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ optional-dependencies.dev = [ "pyenchant==3.2.2", "pygments==2.18.0", "pylint==3.2.7", + "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.3", "pyright==1.1.380", "pyroma==4.2", @@ -154,12 +155,14 @@ jobs = 0 # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. # See https://chezsoi.org/lucas/blog/pylint-strict-base-configuration.html. +# and we also add `pylint_per_file_ignores` to allow per-file ignores. # We do not use the plugins: # - pylint.extensions.code_style # - pylint.extensions.magic_value # - pylint.extensions.while_used # as they seemed to get in the way. load-plugins = [ + "pylint_per_file_ignores", 'pylint.extensions.bad_builtin', 'pylint.extensions.comparison_placement', 'pylint.extensions.consider_refactoring_into_while_condition', @@ -231,6 +234,9 @@ disable = [ 'useless-type-doc', ] +# per-file-ignores = "docs/source/doccmd*.py:invalid-name, \ndoccmd_README:invalid-name" +per-file-ignores = "docs/:invalid-name,\ndoccmd_README_rst.*.py:invalid-name" + [tool.pylint.'FORMAT'] # Allow the body of an if to be on the same line as the test if there is no From 91719e3658fc7955145234e81cd5eac1151d6b85 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 16:19:07 +0100 Subject: [PATCH 367/641] Neater per-file-ignores --- pyproject.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1251725a1..da36341d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -234,8 +234,12 @@ disable = [ 'useless-type-doc', ] -# per-file-ignores = "docs/source/doccmd*.py:invalid-name, \ndoccmd_README:invalid-name" -per-file-ignores = "docs/:invalid-name,\ndoccmd_README_rst.*.py:invalid-name" +# This format is described in the following issue: +# https://github.com/christopherpickering/pylint-per-file-ignores/issues/160 +per-file-ignores = """ +docs/:invalid-name +doccmd_README_rst.*.py:invalid-name +""" [tool.pylint.'FORMAT'] From fd3d1ad49bf5aaa0085f5055b19fd21c2224755e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 16:25:16 +0100 Subject: [PATCH 368/641] Explain ignores --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index da36341d3..e15800730 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,6 +236,10 @@ disable = [ # This format is described in the following issue: # https://github.com/christopherpickering/pylint-per-file-ignores/issues/160 +# +# We ignore invalid names because: +# - We want to use generated module names, which may not be valid, but are never seen. +# - We want to use global variables in documentation, which may not be uppercase per-file-ignores = """ docs/:invalid-name doccmd_README_rst.*.py:invalid-name From fdcd4730ec7285f36736c701069312c38da5f281 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 16:32:49 +0100 Subject: [PATCH 369/641] Remove lowercase option --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 77321e831..a7bfd2ff4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -132,7 +132,7 @@ repos: - id: pylint-docs name: pylint-docs - entry: doccmd --language=python --command="pylint" --lowercase-file-name + entry: doccmd --language=python --command="pylint" language: system stages: [manual] types_or: [markdown, rst, python, toml] From 236a276b22ccc4c86b26648b5c61a25f72e765cb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 17:41:45 +0100 Subject: [PATCH 370/641] Reformat some of pre-commit config to be more like others --- .pre-commit-config.yaml | 420 ++++++++++++++++++++-------------------- 1 file changed, 210 insertions(+), 210 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a7bfd2ff4..36a8ffb12 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,213 +37,213 @@ ci: default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 - hooks: - - id: check-added-large-files - - id: check-case-conflict - - id: check-executables-have-shebangs - - id: check-merge-conflict - - id: check-shebang-scripts-are-executable - - id: check-symlinks - - id: check-toml - - id: check-vcs-permalinks - - id: check-yaml - - id: end-of-file-fixer - - id: file-contents-sorter - files: spelling_private_dict\.txt$ - - id: trailing-whitespace -- repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 - hooks: - - id: shellcheck - args: ["--shell", "bash"] -- repo: local - hooks: - - id: actionlint - name: actionlint - entry: actionlint - language: system - pass_filenames: false - types_or: [yaml] - - - id: mypy - name: mypy - stages: [push] - entry: python -m mypy . - language: system - types_or: [python, toml] - pass_filenames: false - - - id: mypy-docs - name: mypy-docs - stages: [push] - entry: doccmd --language=python --command="mypy" - language: system - types_or: [markdown, rst, python, toml] - - - id: check-manifest - name: check-manifest - stages: [push] - entry: python -m check_manifest . - language: system - pass_filenames: false - - - id: pyright - name: pyright - stages: [push] - entry: python -m pyright . - language: system - types_or: [python, toml] - pass_filenames: false - - - id: pyright-docs - name: pyright-docs - stages: [push] - entry: doccmd --language=python --command="pyright" - language: system - types_or: [markdown, rst, python, toml] - - - id: vulture - name: vulture - entry: python -m vulture --min-confidence 100 --exclude .eggs - language: system - types_or: [python] - - - id: pyroma - name: pyroma - entry: python -m pyroma --min 10 . - language: system - pass_filenames: false - types_or: [toml] - - - id: deptry - name: deptry - entry: python -m deptry src/ - language: system - pass_filenames: false - - - id: pylint - name: pylint - entry: python -m pylint *.py src/ tests/ docs/ - language: system - stages: [manual] - pass_filenames: false - - - id: pylint-docs - name: pylint-docs - entry: doccmd --language=python --command="pylint" - language: system - stages: [manual] - types_or: [markdown, rst, python, toml] - - - id: ruff-check - name: Ruff check - entry: python -m ruff check - language: system - types_or: [python] - - - id: ruff-check-docs - name: Ruff check docs - entry: doccmd --language=python --command="ruff check" - language: system - types_or: [markdown, rst] - - - id: ruff-format-diff - name: Ruff format diff - entry: python -m ruff format --diff - language: system - types_or: [python] - - - id: ruff-format-diff-docs - name: Ruff format diff docs - entry: doccmd --language=python --no-pad-file --command="ruff format --diff" - language: system - types_or: [markdown, rst] - - - id: ruff-check-fix - name: Ruff check fix - entry: python -m ruff check --fix - language: system - types_or: [python] - - - id: ruff-check-fix-docs - name: Ruff check fix docs - entry: doccmd --language=python --command="ruff check --fix" - language: system - types_or: [markdown, rst] - - - id: ruff-format-fix - name: Ruff format - entry: python -m ruff format - language: system - types_or: [python] - - - id: ruff-format-fix-docs - name: Ruff format docs - entry: doccmd --language=python --no-pad-file --command="ruff format" - language: system - types_or: [markdown, rst] - - - id: doc8 - name: doc8 - entry: python -m doc8 - language: system - types_or: [rst] - - - id: interrogate - name: interrogate - entry: python -m interrogate - language: system - types_or: [python] - - - id: interrogate-docs - name: interrogate docs - entry: doccmd --language=python --command="interrogate" - language: system - types_or: [markdown, rst] - - - id: pyproject-fmt-check - name: pyproject-fmt check - entry: pyproject-fmt --check - language: system - types_or: [toml] - files: pyproject.toml - - - id: pyproject-fmt-fix - name: pyproject-fmt - entry: pyproject-fmt - language: system - types_or: [toml] - files: pyproject.toml - - - id: linkcheck - name: linkcheck - entry: make -C docs/ linkcheck SPHINXOPTS=-W - language: system - types_or: [rst] - stages: [manual] - pass_filenames: false - - - id: spelling - name: spelling - entry: make -C docs/ spelling SPHINXOPTS=-W - language: system - types_or: [rst] - stages: [manual] - pass_filenames: false - - - id: docs - name: Build Documentation - entry: make docs - language: system - stages: [manual] - pass_filenames: false - - - id: pyright-verifytypes - name: pyright-verifytypes - stages: [push] - entry: python -m pyright --verifytypes vws - language: system - pass_filenames: false - types_or: [python] +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-toml + - id: check-vcs-permalinks + - id: check-yaml + - id: end-of-file-fixer + - id: file-contents-sorter + files: spelling_private_dict\.txt$ + - id: trailing-whitespace +- repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + args: ["--shell", "bash"] +- repo: local + hooks: + - id: actionlint + name: actionlint + entry: actionlint + language: system + pass_filenames: false + types_or: [yaml] + + - id: mypy + name: mypy + stages: [push] + entry: python -m mypy . + language: system + types_or: [python, toml] + pass_filenames: false + + - id: mypy-docs + name: mypy-docs + stages: [push] + entry: doccmd --language=python --command="mypy" + language: system + types_or: [markdown, rst, python, toml] + + - id: check-manifest + name: check-manifest + stages: [push] + entry: python -m check_manifest . + language: system + pass_filenames: false + + - id: pyright + name: pyright + stages: [push] + entry: python -m pyright . + language: system + types_or: [python, toml] + pass_filenames: false + + - id: pyright-docs + name: pyright-docs + stages: [push] + entry: doccmd --language=python --command="pyright" + language: system + types_or: [markdown, rst, python, toml] + + - id: vulture + name: vulture + entry: python -m vulture --min-confidence 100 --exclude .eggs + language: system + types_or: [python] + + - id: pyroma + name: pyroma + entry: python -m pyroma --min 10 . + language: system + pass_filenames: false + types_or: [toml] + + - id: deptry + name: deptry + entry: python -m deptry src/ + language: system + pass_filenames: false + + - id: pylint + name: pylint + entry: python -m pylint *.py src/ tests/ docs/ + language: system + stages: [manual] + pass_filenames: false + + - id: pylint-docs + name: pylint-docs + entry: doccmd --language=python --command="pylint" + language: system + stages: [manual] + types_or: [markdown, rst, python, toml] + + - id: ruff-check + name: Ruff check + entry: python -m ruff check + language: system + types_or: [python] + + - id: ruff-check-docs + name: Ruff check docs + entry: doccmd --language=python --command="ruff check" + language: system + types_or: [markdown, rst] + + - id: ruff-format-diff + name: Ruff format diff + entry: python -m ruff format --diff + language: system + types_or: [python] + + - id: ruff-format-diff-docs + name: Ruff format diff docs + entry: doccmd --language=python --no-pad-file --command="ruff format --diff" + language: system + types_or: [markdown, rst] + + - id: ruff-check-fix + name: Ruff check fix + entry: python -m ruff check --fix + language: system + types_or: [python] + + - id: ruff-check-fix-docs + name: Ruff check fix docs + entry: doccmd --language=python --command="ruff check --fix" + language: system + types_or: [markdown, rst] + + - id: ruff-format-fix + name: Ruff format + entry: python -m ruff format + language: system + types_or: [python] + + - id: ruff-format-fix-docs + name: Ruff format docs + entry: doccmd --language=python --no-pad-file --command="ruff format" + language: system + types_or: [markdown, rst] + + - id: doc8 + name: doc8 + entry: python -m doc8 + language: system + types_or: [rst] + + - id: interrogate + name: interrogate + entry: python -m interrogate + language: system + types_or: [python] + + - id: interrogate-docs + name: interrogate docs + entry: doccmd --language=python --command="interrogate" + language: system + types_or: [markdown, rst] + + - id: pyproject-fmt-check + name: pyproject-fmt check + entry: pyproject-fmt --check + language: system + types_or: [toml] + files: pyproject.toml + + - id: pyproject-fmt-fix + name: pyproject-fmt + entry: pyproject-fmt + language: system + types_or: [toml] + files: pyproject.toml + + - id: linkcheck + name: linkcheck + entry: make -C docs/ linkcheck SPHINXOPTS=-W + language: system + types_or: [rst] + stages: [manual] + pass_filenames: false + + - id: spelling + name: spelling + entry: make -C docs/ spelling SPHINXOPTS=-W + language: system + types_or: [rst] + stages: [manual] + pass_filenames: false + + - id: docs + name: Build Documentation + entry: make docs + language: system + stages: [manual] + pass_filenames: false + + - id: pyright-verifytypes + name: pyright-verifytypes + stages: [push] + entry: python -m pyright --verifytypes vws + language: system + pass_filenames: false + types_or: [python] From 0160f2952192d3cc6fd9d9080fc3d0b482c66b46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:20:04 +0000 Subject: [PATCH 371/641] Bump sybil from 7.0.0 to 7.1.0 Bumps [sybil](https://github.com/simplistix/sybil) from 7.0.0 to 7.1.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/7.0.0...7.1.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e15800730..5a967212c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", - "sybil==7.0.0", + "sybil==7.1.0", "types-requests==2.32.0.20240907", "vulture==2.11", "vws-python-mock==2024.8.30", From b4203687eb9b50f014f1594863a66bef3a5b3796 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:24:58 +0000 Subject: [PATCH 372/641] Bump types-requests from 2.32.0.20240907 to 2.32.0.20240914 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240907 to 2.32.0.20240914. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5a967212c..e2c71fd57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==7.1.0", - "types-requests==2.32.0.20240907", + "types-requests==2.32.0.20240914", "vulture==2.11", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", From 60f5560d362dbccee065a09d0b6b70010de8d9eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:29:59 +0000 Subject: [PATCH 373/641] Bump ruff from 0.6.4 to 0.6.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.4 to 0.6.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.4...0.6.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2c71fd57..e11295038 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.4", + "ruff==0.6.5", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From b8c7a1bcc7a673fb1c5f0efce23608fbd096340f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:41:55 +0000 Subject: [PATCH 374/641] Bump doccmd from 2024.9.14.5 to 2024.9.16 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.14.5 to 2024.9.16. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.14.5...2024.09.16) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e11295038..e148e17b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.14.5", + "doccmd==2024.9.16", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 2bb033d5e3a271eb1e1bfacc14d55bcdd3ec74d2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 16 Sep 2024 22:39:04 +0100 Subject: [PATCH 375/641] Remove pre-commit hooks for which we have a duplicate with an auto-fix --- .pre-commit-config.yaml | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 36a8ffb12..ddda103be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,18 +18,13 @@ ci: - mypy - mypy-docs - pylint - - pyproject-fmt-check - pyproject-fmt-fix - pyright - pyright-docs - pyright-verifytypes - pyroma - - ruff-check - - ruff-check-docs - ruff-check-fix - ruff-check-fix-docs - - ruff-format-diff - - ruff-format-diff-docs - ruff-format-fix - ruff-format-fix-docs - spelling @@ -137,30 +132,6 @@ repos: stages: [manual] types_or: [markdown, rst, python, toml] - - id: ruff-check - name: Ruff check - entry: python -m ruff check - language: system - types_or: [python] - - - id: ruff-check-docs - name: Ruff check docs - entry: doccmd --language=python --command="ruff check" - language: system - types_or: [markdown, rst] - - - id: ruff-format-diff - name: Ruff format diff - entry: python -m ruff format --diff - language: system - types_or: [python] - - - id: ruff-format-diff-docs - name: Ruff format diff docs - entry: doccmd --language=python --no-pad-file --command="ruff format --diff" - language: system - types_or: [markdown, rst] - - id: ruff-check-fix name: Ruff check fix entry: python -m ruff check --fix @@ -203,13 +174,6 @@ repos: language: system types_or: [markdown, rst] - - id: pyproject-fmt-check - name: pyproject-fmt check - entry: pyproject-fmt --check - language: system - types_or: [toml] - files: pyproject.toml - - id: pyproject-fmt-fix name: pyproject-fmt entry: pyproject-fmt From ccd56a3b38cfc9cc08e05856252b619d5d3738bf Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 16 Sep 2024 23:59:37 +0100 Subject: [PATCH 376/641] Add shellcheck-py so that GitHub workflow files get linted for shell issues --- .gitignore | 2 ++ pyproject.toml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index ec1645423..0a4d3ec0c 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,5 @@ secrets.tar # setuptools_scm src/*/_setuptools_scm_version.txt + +uv.lock diff --git a/pyproject.toml b/pyproject.toml index e148e17b2..2546fbd92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,10 @@ optional-dependencies.dev = [ "pytest-cov==5.0.0", "pyyaml==6.0.2", "ruff==0.6.5", + # We add shellcheck-py not only for shell scripts and shell code blocks, + # but also because having it installed means that ``actionlint-py`` will + # use it to lint shell commands in GitHub workflow files. + "shellcheck-py==0.10.0.1", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From f026fbc245c1e9ea592cdd786fc95ffc47ab87b3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 10:44:07 +0100 Subject: [PATCH 377/641] Remove no-longer-needed handling of .eggs directory in Vulture --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ddda103be..b158d66eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -101,7 +101,7 @@ repos: - id: vulture name: vulture - entry: python -m vulture --min-confidence 100 --exclude .eggs + entry: python -m vulture --min-confidence 100 language: system types_or: [python] From f5d9ed6423bfe7ab7317733feb6aadb2b21ad52a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 10:58:07 +0100 Subject: [PATCH 378/641] Remove requirement to have 100% confidence that code is dead to report it --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b158d66eb..a8fa23a33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -101,7 +101,7 @@ repos: - id: vulture name: vulture - entry: python -m vulture --min-confidence 100 + entry: python -m vulture language: system types_or: [python] From 81aee0888a923cc34f8c3abd03a1dd84cb984e5d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 11:48:27 +0100 Subject: [PATCH 379/641] Progress towards satisfying vulture --- .pre-commit-config.yaml | 3 ++- conftest.py | 8 ++++---- docs/source/conf.py | 7 +------ pyproject.toml | 42 +++++++++++++++++++++++++++++++++++++++++ tests/conftest.py | 2 +- 5 files changed, 50 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8fa23a33..d5ebb2c33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -101,9 +101,10 @@ repos: - id: vulture name: vulture - entry: python -m vulture + entry: python -m vulture . language: system types_or: [python] + pass_filenames: false - id: pyroma name: pyroma diff --git a/conftest.py b/conftest.py index 059fd0968..02f059890 100644 --- a/conftest.py +++ b/conftest.py @@ -26,8 +26,8 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: item.obj = beartype(obj=item.obj) -@pytest.fixture -def make_image_file( +@pytest.fixture(name="make_image_file") +def fixture_make_image_file( high_quality_image: io.BytesIO, ) -> Generator[None, None, None]: """ @@ -41,8 +41,8 @@ def make_image_file( new_image.unlink() -@pytest.fixture -def mock_vws() -> Generator[None, None, None]: +@pytest.fixture(name="mock_vws") +def fixture_mock_vws() -> Generator[None, None, None]: """ Yield a mock VWS. diff --git a/docs/source/conf.py b/docs/source/conf.py index c18eb170d..5e3a67830 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -62,12 +62,7 @@ "python": ("https://docs.python.org/3.12", None), } nitpicky = True -nitpick_ignore = ( - ("py:class", "BytesIO"), - ("py:class", "BufferedRandom"), - ("py:class", "_io.BytesIO"), - ("py:class", "_io.BufferedRandom"), -) +nitpick_ignore = (("py:class", "_io.BytesIO"),) warning_is_error = True autoclass_content = "both" diff --git a/pyproject.toml b/pyproject.toml index 2546fbd92..4fc745002 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -342,3 +342,45 @@ ignore_path = [ "./src/*.egg-info/", "./src/*/_setuptools_scm_version.txt", ] + +[tool.vulture] +# Ideally we would limit the paths to the source code where we want to ignore names, +# but Vulture does not enable this. +ignore_names = [ + # pytest configuration + "pytest_collect_file", + "pytest_collection_modifyitems", + "pytest_plugins", + # pytest fixtures - we name fixtures like this for this purpose + "fixture_*", + # Sphinx + "autoclass_content", + "autoclass_content", + "autodoc_member_order", + "copybutton_exclude", + "extensions", + "html_show_copyright", + "html_show_sourcelink", + "html_show_sphinx", + "html_theme", + "html_theme_options", + "html_title", + "htmlhelp_basename", + "intersphinx_mapping", + "language", + "linkcheck_ignore", + "linkcheck_retries", + "master_doc", + "nitpicky", + "nitpick_ignore", + "project_copyright", + "pygments_style", + "rst_prolog", + "source_suffix", + "spelling_word_list_filename", + "templates_path", + "warning_is_error", +] + +# Duplicate some of .gitignore +exclude = [".venv"] diff --git a/tests/conftest.py b/tests/conftest.py index 0ec595e31..6c927cbed 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,7 +15,7 @@ @pytest.fixture(name="_mock_database") -def mock_database() -> Generator[VuforiaDatabase, None, None]: +def fixture_mock_database() -> Generator[VuforiaDatabase, None, None]: """ Yield a mock ``VuforiaDatabase``. """ From ddbb36edb0fb34a3d16b2bc99f2470c826384e5c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 11:48:55 +0100 Subject: [PATCH 380/641] Progress towards satisfying vulture --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6c927cbed..d1b122f15 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -49,7 +49,7 @@ def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: @pytest.fixture(name="image_file", params=["r+b", "rb"]) -def image_file_fixture( +def fixture_image_file( high_quality_image: io.BytesIO, tmp_path: Path, request: pytest.FixtureRequest, From b1d36ab5ff3c75fce4519f2fd18cec59fbcf8a71 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 11:53:04 +0100 Subject: [PATCH 381/641] Progress towards satisfying vulture --- tests/test_vws.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_vws.py b/tests/test_vws.py index c5761b78a..88bcc17c5 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -248,6 +248,24 @@ def test_get_target(vws_client: VWS) -> None: target_quota=1000, total_recos=0, ) + + assert report.active_images == expected_report.active_images + assert ( + report.current_month_recos == expected_report.current_month_recos + ) + assert report.failed_images == expected_report.failed_images + assert report.inactive_images == expected_report.inactive_images + assert report.name == expected_report.name + assert ( + report.previous_month_recos == expected_report.previous_month_recos + ) + assert report.processing_images == expected_report.processing_images + assert report.reco_threshold == expected_report.reco_threshold + assert report.request_quota == expected_report.request_quota + assert report.request_usage == expected_report.request_usage + assert report.target_quota == expected_report.target_quota + assert report.total_recos == expected_report.total_recos + assert report == expected_report From 4fdf2687eec6a9b830bc6175e2a1940afaa98481 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 11:58:25 +0100 Subject: [PATCH 382/641] Progress towards satisfying vulture --- tests/test_vws.py | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/tests/test_vws.py b/tests/test_vws.py index 88bcc17c5..158ad9064 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -206,20 +206,35 @@ def test_get_target_summary_report( application_metadata=None, ) - result = vws_client.get_target_summary_report(target_id=target_id) + report = vws_client.get_target_summary_report(target_id=target_id) expected_report = TargetSummaryReport( status=TargetStatuses.SUCCESS, - database_name=result.database_name, + database_name=report.database_name, target_name=target_name, upload_date=datetime.date(2018, 4, 25), active_flag=True, - tracking_rating=result.tracking_rating, + tracking_rating=report.tracking_rating, total_recos=0, current_month_recos=0, previous_month_recos=0, ) - assert result == expected_report + + assert report.status == expected_report.status + assert report.database_name == expected_report.database_name + assert report.target_name == expected_report.target_name + assert report.upload_date == expected_report.upload_date + assert report.active_flag == expected_report.active_flag + assert report.tracking_rating == expected_report.tracking_rating + assert report.total_recos == expected_report.total_recos + assert ( + report.current_month_recos == expected_report.current_month_recos + ) + assert ( + report.previous_month_recos == expected_report.previous_month_recos + ) + + assert report == expected_report class TestGetDatabaseSummaryReport: @@ -301,6 +316,25 @@ def test_get_target_record( ) assert result.target_record == expected_target_record + + assert ( + result.target_record.target_id == expected_target_record.target_id + ) + assert ( + result.target_record.active_flag + == expected_target_record.active_flag + ) + assert result.target_record.name == expected_target_record.name + assert result.target_record.width == expected_target_record.width + assert ( + result.target_record.tracking_rating + == expected_target_record.tracking_rating + ) + assert ( + result.target_record.reco_rating + == expected_target_record.reco_rating + ) + assert result.status == TargetStatuses.PROCESSING From 4f79d4785a842ede11e5246285dedf0ae809c4ca Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 12:06:12 +0100 Subject: [PATCH 383/641] Test TargetStatuses FAILED --- tests/test_cloud_reco_exceptions.py | 6 +++++- tests/test_vws.py | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 5c0a89cd2..d33da8e72 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -116,4 +116,8 @@ def test_inactive_project( with pytest.raises(InactiveProjectError) as exc: cloud_reco_client.query(image=high_quality_image) - assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + response = exc.value.response + assert response.status_code == HTTPStatus.FORBIDDEN + # We need one test which checks tell position + # and so we choose this one almost at random. + assert response.tell_position != 0 diff --git a/tests/test_vws.py b/tests/test_vws.py index 158ad9064..42fdee45a 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -337,6 +337,27 @@ def test_get_target_record( assert result.status == TargetStatuses.PROCESSING + @staticmethod + def test_get_failed( + vws_client: VWS, + image_file_failed_state: io.BytesIO, + ) -> None: + """ + Check that the report works with a failed target. + """ + target_id = vws_client.add_target( + name="x", + width=1, + image=image_file_failed_state, + active_flag=True, + application_metadata=None, + ) + + vws_client.wait_for_target_processed(target_id=target_id) + result = vws_client.get_target_record(target_id=target_id) + + assert result.status == TargetStatuses.FAILED + class TestWaitForTargetProcessed: """ From 080ee97a4be2f26eb9afff8a847f29ae75ebd023 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:07:47 +0000 Subject: [PATCH 384/641] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4fc745002..ae5fea28c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -383,4 +383,4 @@ ignore_names = [ ] # Duplicate some of .gitignore -exclude = [".venv"] +exclude = [ ".venv" ] From 53fbdd4c990ea45beba65674f768226ebaa90f92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:12:41 +0000 Subject: [PATCH 385/641] Bump sybil from 7.1.0 to 7.1.1 Bumps [sybil](https://github.com/simplistix/sybil) from 7.1.0 to 7.1.1. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/7.1.0...7.1.1) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ae5fea28c..e5468bfed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", - "sybil==7.1.0", + "sybil==7.1.1", "types-requests==2.32.0.20240914", "vulture==2.11", "vws-python-mock==2024.8.30", From e36d374f3ba05951c08cddc6526d9975cf3fe83e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 18 Sep 2024 04:04:01 +0100 Subject: [PATCH 386/641] Use vulture on docs --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d5ebb2c33..c7f3f0074 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,7 @@ ci: - ruff-format-fix-docs - spelling - vulture + - vulture-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: @@ -106,6 +107,12 @@ repos: types_or: [python] pass_filenames: false + - id: vulture-docs + name: vulture docs + entry: doccmd --language=python --command="vulture" + language: system + types_or: [markdown, rst] + - id: pyroma name: pyroma entry: python -m pyroma --min 10 . From 2d855358b9ed83913a4ab56d379a122e6d917343 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:56:47 +0000 Subject: [PATCH 387/641] Bump vulture from 2.11 to 2.12 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.11 to 2.12. - [Release notes](https://github.com/jendrikseipp/vulture/releases) - [Changelog](https://github.com/jendrikseipp/vulture/blob/main/CHANGELOG.md) - [Commits](https://github.com/jendrikseipp/vulture/compare/v2.11...v2.12) --- updated-dependencies: - dependency-name: vulture dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5468bfed..8c412194a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinxcontrib-spelling==8", "sybil==7.1.1", "types-requests==2.32.0.20240914", - "vulture==2.11", + "vulture==2.12", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] From af827ff3fc3f198603e21d67d1a61f44467b3564 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:57:03 +0000 Subject: [PATCH 388/641] Bump pyproject-fmt from 2.2.3 to 2.2.4 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.2.3 to 2.2.4. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.2.3...2.2.4) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5468bfed..00e73cb38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.7", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.2.3", + "pyproject-fmt==2.2.4", "pyright==1.1.380", "pyroma==4.2", "pytest==8.3.3", From 0baad7ed36baa543d4feaffe7395c5bf6aff378f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:25:02 +0000 Subject: [PATCH 389/641] Bump pyright from 1.1.380 to 1.1.381 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.380 to 1.1.381. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.380...v1.1.381) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 654058d64..14f498296 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.2.7", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.380", + "pyright==1.1.381", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 033daadb512e6b59312852ef592e2e09fcc92d91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:33:21 +0000 Subject: [PATCH 390/641] Bump doccmd from 2024.9.16 to 2024.9.18 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.16 to 2024.9.18. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.16...2024.09.18) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 14f498296..a75a7f9e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.16", + "doccmd==2024.9.18", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 8111a3880cb4b911c89b58cf425c3c0dea3cdeaa Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Sep 2024 08:29:07 +0100 Subject: [PATCH 391/641] Simplify release script by removing unnecessary intermediary variables --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64761eefa..faf2c7d2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,11 +47,9 @@ jobs: - name: "Update changelog" uses: jacobtomlinson/gha-find-replace@v3 - env: - NEXT_VERSION: ${{ steps.calver.outputs.release }} with: find: "Next\n----" - replace: "Next\n----\n\n${{ env.NEXT_VERSION }}\n------------" + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n------------" include: "CHANGELOG.rst" regex: false From a1c87b57b0df55f8576e0cbf8f6e3b155675a6b7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Sep 2024 08:48:25 +0100 Subject: [PATCH 392/641] Simplify release script by removing unnecessary git fetch tags command --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index faf2c7d2e..5c0cd1771 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,8 +78,7 @@ jobs: - name: Build a binary wheel and a source tarball run: | # Checkout the latest tag - the one we just created. - git fetch --tags - git checkout "$(git describe --tags "$(git rev-list --tags --max-count=1)")" + git checkout ${{ steps.tag_version.outputs.new_tag }} python -m pip install build check-wheel-contents python -m build --sdist --wheel --outdir dist/ . check-wheel-contents dist/*.whl From af6cfb79557e78d154fab0c68913561086ef4783 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Sep 2024 09:01:40 +0100 Subject: [PATCH 393/641] Add back required part of the command --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c0cd1771..a24d5daff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,6 +78,7 @@ jobs: - name: Build a binary wheel and a source tarball run: | # Checkout the latest tag - the one we just created. + git fetch --tags git checkout ${{ steps.tag_version.outputs.new_tag }} python -m pip install build check-wheel-contents python -m build --sdist --wheel --outdir dist/ . From e9d5f41cc01ddb7078893aefaf38e40d0ed38807 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:44:58 +0000 Subject: [PATCH 394/641] Bump doccmd from 2024.9.18 to 2024.9.19.3 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.18 to 2024.9.19.3. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.18...2024.09.19.3) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a75a7f9e7..5a2984164 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.18", + "doccmd==2024.9.19.3", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From d5d07fd13aedf30f2c918f2fd09deb8ef01dc778 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:49:10 +0000 Subject: [PATCH 395/641] Bump ruff from 0.6.5 to 0.6.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.5 to 0.6.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.5...0.6.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5a2984164..5082934bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.5", + "ruff==0.6.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 121a925697d930011297444edb392dbe6c3c741b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:53:48 +0000 Subject: [PATCH 396/641] Bump sybil from 7.1.1 to 8.0.0 Bumps [sybil](https://github.com/simplistix/sybil) from 7.1.1 to 8.0.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/7.1.1...8.0.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5082934bc..27e70ed6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", - "sybil==7.1.1", + "sybil==8.0.0", "types-requests==2.32.0.20240914", "vulture==2.12", "vws-python-mock==2024.8.30", From 156f46f7c678b469607524d80dbd8dcd4614c455 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 20 Sep 2024 21:13:33 +0100 Subject: [PATCH 397/641] Remove lint ignores - do not allow hardcoded secrets in documentation --- README.rst | 9 +++++---- conftest.py | 23 ++++++++++++++++++----- docs/source/index.rst | 9 +++++---- pyproject.toml | 10 ---------- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/README.rst b/README.rst index ffccbc916..ce352e4e5 100644 --- a/README.rst +++ b/README.rst @@ -24,15 +24,16 @@ Getting Started """Add a target to VWS and then query it.""" + import os import pathlib import uuid from vws import VWS, CloudRecoService - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" + server_access_key = os.environ["VWS_SERVER_ACCESS_KEY"] + server_secret_key = os.environ["VWS_SERVER_SECRET_KEY"] + client_access_key = os.environ["VWS_CLIENT_ACCESS_KEY"] + client_secret_key = os.environ["VWS_CLIENT_SECRET_KEY"] vws_client = VWS( server_access_key=server_access_key, diff --git a/conftest.py b/conftest.py index 02f059890..691dcbe0e 100644 --- a/conftest.py +++ b/conftest.py @@ -1,6 +1,7 @@ """Setup for Sybil.""" import io +import uuid from collections.abc import Generator from doctest import ELLIPSIS from pathlib import Path @@ -42,18 +43,30 @@ def fixture_make_image_file( @pytest.fixture(name="mock_vws") -def fixture_mock_vws() -> Generator[None, None, None]: +def fixture_mock_vws( + monkeypatch: pytest.MonkeyPatch, +) -> Generator[None, None, None]: """ Yield a mock VWS. The keys used here match the keys in the documentation. """ + server_access_key = uuid.uuid4().hex + server_secret_key = uuid.uuid4().hex + client_access_key = uuid.uuid4().hex + client_secret_key = uuid.uuid4().hex + database = VuforiaDatabase( - server_access_key="[server-access-key]", - server_secret_key="[server-secret-key]", - client_access_key="[client-access-key]", - client_secret_key="[client-secret-key]", + server_access_key=server_access_key, + server_secret_key=server_secret_key, + client_access_key=client_access_key, + client_secret_key=client_secret_key, ) + + monkeypatch.setenv(name="VWS_SERVER_ACCESS_KEY", value=server_access_key) + monkeypatch.setenv(name="VWS_SERVER_SECRET_KEY", value=server_secret_key) + monkeypatch.setenv(name="VWS_CLIENT_ACCESS_KEY", value=client_access_key) + monkeypatch.setenv(name="VWS_CLIENT_SECRET_KEY", value=client_secret_key) # We use a low processing time so that tests run quickly. with MockVWS(processing_time_seconds=0.2) as mock: mock.add_database(database=database) diff --git a/docs/source/index.rst b/docs/source/index.rst index fe1ee9a9e..fe0f8584a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -20,15 +20,16 @@ See the :doc:`api-reference` for full usage details. """Add a target to VWS and then query it.""" + import os import pathlib import uuid from vws import VWS, CloudRecoService - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" + server_access_key = os.environ["VWS_SERVER_ACCESS_KEY"] + server_secret_key = os.environ["VWS_SERVER_SECRET_KEY"] + client_access_key = os.environ["VWS_CLIENT_ACCESS_KEY"] + client_secret_key = os.environ["VWS_CLIENT_SECRET_KEY"] vws_client = VWS( server_access_key=server_access_key, diff --git a/pyproject.toml b/pyproject.toml index 27e70ed6c..71ab39eee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,16 +123,6 @@ lint.ignore = [ "S101", ] -lint.per-file-ignores."conftest.py" = [ - # Allow hardcoded secrets in tests. - "S106", -] - -lint.per-file-ignores."doccmd_*.py" = [ - # Allow hardcoded secrets in documentation. - "S105", -] - lint.per-file-ignores."tests/*.py" = [ # Do not require tests to have a one-line summary. "D205", From ce03744bd22e28dbf74c59e98317847de67f8881 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Sep 2024 00:23:42 +0100 Subject: [PATCH 398/641] Bump version of Python mentioned in docs --- docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index fe0f8584a..661814708 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -8,7 +8,7 @@ Installation $ pip install vws-python -This is tested on Python 3.8+. +This is tested on Python 3.12+. Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. Usage From bdf672a8260d4c87480c1c5a3386aabbd072b1e6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Sep 2024 09:52:44 +0100 Subject: [PATCH 399/641] Test shell snippets in documentation code blocks --- .pre-commit-config.yaml | 18 +++++++++++++----- docs/source/release-process.rst | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7f3f0074..1b9f9b56b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,11 +49,6 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace -- repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 - hooks: - - id: shellcheck - args: ["--shell", "bash"] - repo: local hooks: - id: actionlint @@ -63,6 +58,19 @@ repos: pass_filenames: false types_or: [yaml] + - id: shellcheck + name: shellcheck + entry: shellcheck --shell bash + language: system + pass_filenames: false + types_or: [shell] + + - id: shellcheck-docs + name: shellcheck-docs + entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash" + language: system + types_or: [markdown, rst] + - id: mypy name: mypy stages: [push] diff --git a/docs/source/release-process.rst b/docs/source/release-process.rst index 0c662f553..db1744feb 100644 --- a/docs/source/release-process.rst +++ b/docs/source/release-process.rst @@ -17,6 +17,6 @@ Perform a Release .. code-block:: console :substitutions: - $ gh workflow run release.yml --repo |github-owner|/|github-repository| + $ gh workflow run release.yml --repo "|github-owner|/|github-repository|" .. _Install GitHub CLI: https://cli.github.com/ From a78c28a5afc14a76e2a3e09cee1ac8296ac7f519 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Sat, 21 Sep 2024 08:53:13 +0000 Subject: [PATCH 400/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2eb9d9a05..b18bc5e4f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.21 +------------ + 2024.09.04.1 ------------ From 7101f9eeb6d3da63383e98fc7b1ee46394e8f705 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Sep 2024 09:53:40 +0100 Subject: [PATCH 401/641] Do not run new hooks on pre-commit CI --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b9f9b56b..f71de6b92 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,8 @@ ci: - spelling - vulture - vulture-docs + - shellcheck + - shellcheck-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: From b7a2e47860753f6f05ca5a73d8ac6a9284e06b4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:12:41 +0000 Subject: [PATCH 402/641] Bump ruff from 0.6.6 to 0.6.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.6 to 0.6.7. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.6...0.6.7) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 71ab39eee..4e70acc0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.6", + "ruff==0.6.7", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From c05549a18d3c0710420dd17bbda917890878e95e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:17:33 +0000 Subject: [PATCH 403/641] Bump pylint from 3.2.7 to 3.3.0 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.7 to 3.3.0. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.7...v3.3.0) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4e70acc0d..8f50326bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.2.7", + "pylint==3.3.0", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", "pyright==1.1.381", From cd819da5a467a4f8272f51d16aec2cfa9e81d354 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:17:33 +0000 Subject: [PATCH 404/641] Bump doccmd from 2024.9.19.3 to 2024.9.21 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.19.3 to 2024.9.21. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.19.3...2024.09.21) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4e70acc0d..29c20d514 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.19.3", + "doccmd==2024.9.21", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 4616984c0b063cc6a7fc3273be3bee0ee1a9605d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Sep 2024 11:26:05 +0100 Subject: [PATCH 405/641] Satisfy pylint --- conftest.py | 4 ++-- docs/source/conf.py | 2 -- src/vws/vws.py | 1 + tests/conftest.py | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/conftest.py b/conftest.py index 691dcbe0e..05d6727f2 100644 --- a/conftest.py +++ b/conftest.py @@ -30,7 +30,7 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @pytest.fixture(name="make_image_file") def fixture_make_image_file( high_quality_image: io.BytesIO, -) -> Generator[None, None, None]: +) -> Generator[None]: """ Make an image file available in the test directory. The path of this file matches the path in the documentation. @@ -45,7 +45,7 @@ def fixture_make_image_file( @pytest.fixture(name="mock_vws") def fixture_mock_vws( monkeypatch: pytest.MonkeyPatch, -) -> Generator[None, None, None]: +) -> Generator[None]: """ Yield a mock VWS. diff --git a/docs/source/conf.py b/docs/source/conf.py index 5e3a67830..9c88cea7d 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,8 +3,6 @@ Configuration for Sphinx. """ -# pylint: disable=invalid-name - import datetime import importlib.metadata diff --git a/src/vws/vws.py b/src/vws/vws.py index 185af1178..9e40655d2 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -633,6 +633,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: def update_target( self, + *, target_id: str, name: str | None = None, width: float | None = None, diff --git a/tests/conftest.py b/tests/conftest.py index d1b122f15..ed50f2e7b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,7 +15,7 @@ @pytest.fixture(name="_mock_database") -def fixture_mock_database() -> Generator[VuforiaDatabase, None, None]: +def fixture_mock_database() -> Generator[VuforiaDatabase]: """ Yield a mock ``VuforiaDatabase``. """ @@ -53,7 +53,7 @@ def fixture_image_file( high_quality_image: io.BytesIO, tmp_path: Path, request: pytest.FixtureRequest, -) -> Generator[BinaryIO, None, None]: +) -> Generator[BinaryIO]: """An image file object.""" file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() From 2ce2199b0fd0895456ff5b48ab4ec0dbacea15b6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Sep 2024 21:40:31 +0100 Subject: [PATCH 406/641] Add check-json and meta pre-commit hooks --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f71de6b92..621e643b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,9 @@ ci: default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: +- repo: meta + hooks: + - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: @@ -44,6 +47,7 @@ repos: - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: check-symlinks + - id: check-json - id: check-toml - id: check-vcs-permalinks - id: check-yaml From c4f2e11613cf08fa7b358689d533b8172b7fd7a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:19:18 +0000 Subject: [PATCH 407/641] Bump doccmd from 2024.9.21 to 2024.9.23 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.21 to 2024.9.23. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.21...2024.09.23) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0533d97b..82bb8c825 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.21", + "doccmd==2024.9.23", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 7a1fbd9fd4af7170c6c170656591b72cf0c58bfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:24:41 +0000 Subject: [PATCH 408/641] Bump actionlint-py from 1.7.1.15 to 1.7.2.16 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.1.15 to 1.7.2.16. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.1.15...v1.7.2.16) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 82bb8c825..c65ef4771 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools", ] optional-dependencies.dev = [ - "actionlint-py==1.7.1.15", + "actionlint-py==1.7.2.16", "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", From 64ded7f8648a0e3237c6b73621b1cd36636760ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:18:41 +0000 Subject: [PATCH 409/641] Bump pylint from 3.3.0 to 3.3.1 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c65ef4771..757113f9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.3.0", + "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", "pyright==1.1.381", From 3e13270c37feab6a6177a7981b192c05f6fa8651 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:24:23 +0000 Subject: [PATCH 410/641] Bump pyright from 1.1.381 to 1.1.382 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.381 to 1.1.382. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.381...v1.1.382) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 757113f9b..71dcd0270 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.381", + "pyright==1.1.382", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 9e7a7e3c988e9cf9cbd450875bd1894cef8801af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:30:31 +0000 Subject: [PATCH 411/641] Bump doccmd from 2024.9.23 to 2024.9.24 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.23 to 2024.9.24. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.23...2024.09.24) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 71dcd0270..e13d7b1ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.23", + "doccmd==2024.9.24", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 25cee00767dd5023f6fbdbffd2970d28f491b49a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Sep 2024 12:46:10 +0100 Subject: [PATCH 412/641] Update RTD build OS --- readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yaml b/readthedocs.yaml index 88e40e66a..d3bd4fd21 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -1,7 +1,7 @@ version: 2 build: - os: ubuntu-20.04 + os: ubuntu-24.04 tools: python: "3.12" From dfd4798d915586cf4d60270981f2d1a8835b236c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 26 Sep 2024 08:50:23 +0100 Subject: [PATCH 413/641] Remove ignores of deprecated ruff rules --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e13d7b1ad..c881eaf5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,8 +103,6 @@ lint.select = [ "ALL", ] lint.ignore = [ - # We do not annotate the type of 'self'. - "ANN101", # We are happy to manage our own "complexity". "C901", # Ruff warns that this conflicts with the formatter. From 8e8562436fb3e808c05a2cf633ce201b9e3320c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:14:35 +0000 Subject: [PATCH 414/641] Bump doccmd from 2024.9.24 to 2024.9.26 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.24 to 2024.9.26. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.24...2024.09.26) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c881eaf5a..b1d52d097 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.24", + "doccmd==2024.9.26", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 3a94c400228a2d6c64ce9f69ff7f68ffd3e5a09b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:21:46 +0000 Subject: [PATCH 415/641] Bump pyright from 1.1.382 to 1.1.382.post0 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.382 to 1.1.382.post0. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.382...v1.1.382.post0) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b1d52d097..e79e38925 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.382", + "pyright==1.1.382.post0", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From c3a52d1c883ba04815ca96e04ae210781986b496 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:42:03 +0000 Subject: [PATCH 416/641] Bump ruff from 0.6.7 to 0.6.8 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.7 to 0.6.8. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.7...0.6.8) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e79e38925..0680b1e1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.7", + "ruff==0.6.8", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 5607425d89fb79469fd2a582d937f097c29aa945 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 28 Sep 2024 12:27:26 +0100 Subject: [PATCH 417/641] Make it possible create sets of our custom types --- src/vws/reports.py | 12 ++++++------ src/vws/types.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vws/reports.py b/src/vws/reports.py index 3d157a783..431cfcaa6 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -10,7 +10,7 @@ @beartype -@dataclass +@dataclass(frozen=True) class DatabaseSummaryReport: """ A database summary report. @@ -47,7 +47,7 @@ class TargetStatuses(Enum): @beartype -@dataclass +@dataclass(frozen=True) class TargetSummaryReport: """ A target summary report. @@ -68,7 +68,7 @@ class TargetSummaryReport: @beartype(conf=BeartypeConf(is_pep484_tower=True)) -@dataclass +@dataclass(frozen=True) class TargetRecord: """ A target record. @@ -86,7 +86,7 @@ class TargetRecord: @beartype -@dataclass +@dataclass(frozen=True) class TargetData: """ The target data optionally included with a query match. @@ -98,7 +98,7 @@ class TargetData: @beartype -@dataclass +@dataclass(frozen=True) class QueryResult: """ One query match result. @@ -112,7 +112,7 @@ class QueryResult: @beartype -@dataclass +@dataclass(frozen=True) class TargetStatusAndRecord: """ The target status and a target record. diff --git a/src/vws/types.py b/src/vws/types.py index e6f59145a..22e912607 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -5,7 +5,7 @@ from beartype import beartype -@dataclass +@dataclass(frozen=True) @beartype class Response: """ From 05323e4c6d0ca6b1e34ed90dc46de3fb30014c3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:19:44 +0000 Subject: [PATCH 418/641] Bump doccmd from 2024.9.26 to 2024.9.27 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.26 to 2024.9.27. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.26...2024.09.27) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0680b1e1b..19b7ac353 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.26", + "doccmd==2024.9.27", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From fc7327548f72d495c3b72c3e32cafee14e83798d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:25:39 +0000 Subject: [PATCH 419/641] Bump pyright from 1.1.382.post0 to 1.1.382.post1 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.382.post0 to 1.1.382.post1. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.382.post0...v1.1.382.post1) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19b7ac353..35b86716b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.382.post0", + "pyright==1.1.382.post1", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 262376afbdf65344e92ffd4932b69775492318dd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 2 Oct 2024 10:51:34 +0100 Subject: [PATCH 420/641] Work out minimum Python version so that fewer replacements are needed when we bump the version --- README.rst | 3 ++- docs/source/conf.py | 13 ++++++++++++- docs/source/index.rst | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index ce352e4e5..730535169 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ Installation pip install vws-python -This is tested on Python 3.12+. Get in touch with +This is tested on Python |minimum-python-version|\+. Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. @@ -78,3 +78,4 @@ documentation `__. :target: https://badge.fury.io/py/VWS-Python .. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest :target: https://vws-python.readthedocs.io/en/latest/?badge=latest +.. |minimum-python-version| replace:: 3.12 diff --git a/docs/source/conf.py b/docs/source/conf.py index 9c88cea7d..6f96be9c4 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,6 +6,8 @@ import datetime import importlib.metadata +from packaging.specifiers import SpecifierSet + project = "VWS-Python" author = "Adam Dangoor" @@ -39,6 +41,14 @@ _month, _day, _year, *_ = version.split(".") release = f"{_month}.{_day}.{_year}" + +project_metadata = importlib.metadata.metadata(distribution_name=project) +requires_python = project_metadata["Requires-Python"] +specifiers = SpecifierSet(specifiers=requires_python) +(specifier,) = specifiers +assert specifier.operator == ">=" +minimum_python_version = specifier.version + language = "en" # The name of the syntax highlighting style to use. @@ -57,7 +67,7 @@ htmlhelp_basename = "VWSPYTHONdoc" autoclass_content = "init" intersphinx_mapping = { - "python": ("https://docs.python.org/3.12", None), + "python": (f"https://docs.python.org/{minimum_python_version}", None), } nitpicky = True nitpick_ignore = (("py:class", "_io.BytesIO"),) @@ -75,6 +85,7 @@ rst_prolog = f""" .. |project| replace:: {project} .. |release| replace:: {release} +.. |minimum-python-version| replace:: {minimum_python_version} .. |github-owner| replace:: VWS-Python .. |github-repository| replace:: vws-python """ diff --git a/docs/source/index.rst b/docs/source/index.rst index 661814708..3c89de779 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -8,7 +8,7 @@ Installation $ pip install vws-python -This is tested on Python 3.12+. +This is tested on Python |minimum-python-version|\+. Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. Usage From fff2e20c8ab7151e735f9ef01be7438fe32c7fb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:46:33 +0000 Subject: [PATCH 421/641] Bump pyright from 1.1.382.post1 to 1.1.383 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.382.post1 to 1.1.383. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.382.post1...v1.1.383) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 35b86716b..76c134517 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.382.post1", + "pyright==1.1.383", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 44806d048401875a07fe5b014d9e34d3c9b908e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:25:23 +0000 Subject: [PATCH 422/641] Bump actionlint-py from 1.7.2.16 to 1.7.3.17 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.2.16 to 1.7.3.17. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.2.16...v1.7.3.17) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 76c134517..5eb8f84a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools", ] optional-dependencies.dev = [ - "actionlint-py==1.7.2.16", + "actionlint-py==1.7.3.17", "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", From f25a4b4f2b5661b676ed5cad6b3cb5950e7c2238 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:29:39 +0000 Subject: [PATCH 423/641] Bump vulture from 2.12 to 2.13 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.12 to 2.13. - [Release notes](https://github.com/jendrikseipp/vulture/releases) - [Changelog](https://github.com/jendrikseipp/vulture/blob/main/CHANGELOG.md) - [Commits](https://github.com/jendrikseipp/vulture/compare/v2.12...v2.13) --- updated-dependencies: - dependency-name: vulture dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5eb8f84a9..f5aa17b71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinxcontrib-spelling==8", "sybil==8.0.0", "types-requests==2.32.0.20240914", - "vulture==2.12", + "vulture==2.13", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] From e8462d53374bec0483c759802df3a4fc43768631 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 4 Oct 2024 23:40:08 +0100 Subject: [PATCH 424/641] Add shfmt to pre-commit --- .pre-commit-config.yaml | 15 +++++++++++++++ pyproject.toml | 1 + 2 files changed, 16 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 621e643b9..424fb2551 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,6 +32,8 @@ ci: - vulture-docs - shellcheck - shellcheck-docs + - shfmt + - shfmt-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: @@ -77,6 +79,19 @@ repos: language: system types_or: [markdown, rst] + - id: shfmt + name: shfmt + entry: shfmt --write + language: system + pass_filenames: false + types_or: [shell] + + - id: shfmt-docs + name: shfmt-docs + entry: doccmd --language=shell --language=console --no-pad-file --command="shfmt --write" + language: system + types_or: [markdown, rst] + - id: mypy name: mypy stages: [push] diff --git a/pyproject.toml b/pyproject.toml index f5aa17b71..72d010d30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ optional-dependencies.dev = [ # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", + "shfmt-py==3.7.0.1", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From cb1a73994bcac505f7f570a42793649e84948410 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 5 Oct 2024 00:25:06 +0100 Subject: [PATCH 425/641] Update shfmt command to work on more inputs --- .pre-commit-config.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 424fb2551..df7c059cb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -81,14 +81,13 @@ repos: - id: shfmt name: shfmt - entry: shfmt --write + entry: shfmt --write --space-redirects --indent=4 language: system - pass_filenames: false types_or: [shell] - id: shfmt-docs name: shfmt-docs - entry: doccmd --language=shell --language=console --no-pad-file --command="shfmt --write" + entry: doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: system types_or: [markdown, rst] From 63e5cbd755ec88ac0880d9ef06076b65ff00ca64 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:05:58 +0100 Subject: [PATCH 426/641] Start using uv for Python in CI --- .github/workflows/ci.yml | 19 +++++++++++-------- .github/workflows/release.yml | 1 + .github/workflows/windows-ci.yml | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f424e7a3..855fc0b6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,28 +24,31 @@ jobs: steps: - uses: actions/checkout@v4 - - name: "Set up Python" - uses: actions/setup-python@v5 + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v3 with: - python-version: ${{ matrix.python-version }} + enable-cache: true + + - name: Install Python 3.12 + run: uv python install ${{ matrix.python-version }} # We do not use the cache action as uv is faster than the cache action. - name: "Install dependencies" run: | - curl -LsSf https://astral.sh/uv/install.sh | sh uv pip install --system --upgrade --editable .[dev] - name: "Lint" run: | - pre-commit run --all-files --hook-stage commit --verbose - pre-commit run --all-files --hook-stage push --verbose - pre-commit run --all-files --hook-stage manual --verbose + uv run --all-extras pre-commit run --all-files --hook-stage commit --verbose + uv run --all-extras pre-commit run --all-files --hook-stage push --verbose + uv run --all-extras pre-commit run --all-files --hook-stage manual --verbose - name: "Run tests" run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v4" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a24d5daff..a0f9e80f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches token: ${{ secrets.RELEASE_PAT }} + # TODO use UV here - name: "Set up Python" uses: actions/setup-python@v5 with: diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 16bf4706a..bb4fdb566 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -29,6 +29,7 @@ jobs: with: python-version: ${{ matrix.python-version }} + # TODO Here (or maybe get rid of this and use the ci yml?) # We do not use the cache action as uv is faster than the cache action. - name: "Install dependencies" run: | From 82795ca377a55defbfaf7d18082970800c7ce40f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:09:04 +0100 Subject: [PATCH 427/641] Disable cache for now --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 855fc0b6a..83aec1393 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,6 @@ jobs: - name: Install the latest version of uv uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - name: Install Python 3.12 run: uv python install ${{ matrix.python-version }} From 9b540e7c7712bf3b133dfd05deb8b5b626de9d9b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:09:25 +0100 Subject: [PATCH 428/641] Remove unnecessary setup --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83aec1393..e515c9de4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,11 +31,6 @@ jobs: - name: Install Python 3.12 run: uv python install ${{ matrix.python-version }} - # We do not use the cache action as uv is faster than the cache action. - - name: "Install dependencies" - run: | - uv pip install --system --upgrade --editable .[dev] - - name: "Lint" run: | uv run --all-extras pre-commit run --all-files --hook-stage commit --verbose From 36f8282322abd23d159e682238f246ae41c5db9f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:14:50 +0100 Subject: [PATCH 429/641] Remove duplicate Python version spec --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e515c9de4..19856ca36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Install the latest version of uv uses: astral-sh/setup-uv@v3 - - name: Install Python 3.12 + - name: Install Python run: uv python install ${{ matrix.python-version }} - name: "Lint" From e63a99a6e05d226a13ea4f988183ee5a5168f6de Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:59:47 +0100 Subject: [PATCH 430/641] Use uv in move CI places --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 17 ++++++++--------- .github/workflows/windows-ci.yml | 19 +++++++------------ 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19856ca36..ff6b3002b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,14 +18,14 @@ jobs: strategy: matrix: python-version: ["3.12"] - platform: [ubuntu-latest] + platform: ["ubuntu-latest", "windows-latest"] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 - - name: Install the latest version of uv + - name: Install uv uses: astral-sh/setup-uv@v3 - name: Install Python diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0f9e80f5..b7eae4b80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,11 +31,11 @@ jobs: # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches token: ${{ secrets.RELEASE_PAT }} - # TODO use UV here - - name: "Set up Python" - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Install Python + run: uv python install ${{ matrix.python-version }} - name: "Calver calculate version" uses: StephaneBour/actions-calver@master @@ -78,12 +78,11 @@ jobs: - name: Build a binary wheel and a source tarball run: | - # Checkout the latest tag - the one we just created. git fetch --tags git checkout ${{ steps.tag_version.outputs.new_tag }} - python -m pip install build check-wheel-contents - python -m build --sdist --wheel --outdir dist/ . - check-wheel-contents dist/*.whl + uv run pip install build check-wheel-contents + uv run python -m build --sdist --wheel --outdir dist/ . + uv run check-wheel-contents dist/*.whl # We use PyPI trusted publishing rather than a PyPI API token. # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index bb4fdb566..bbd432c32 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -24,20 +24,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: "Set up Python" - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - # TODO Here (or maybe get rid of this and use the ci yml?) - # We do not use the cache action as uv is faster than the cache action. - - name: "Install dependencies" - run: | - irm https://astral.sh/uv/install.ps1 | iex - uv pip install --system --upgrade --editable .[dev] + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Install Python + run: uv python install ${{ matrix.python-version }} - name: "Run tests" run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + uv run pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 10c2f9002322401d3bcf899cf58f8423752a63e1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:06:43 +0100 Subject: [PATCH 431/641] Update calling method for shellcheck shell option to be consistent amoung projects --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df7c059cb..07471f79c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: hooks: - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -68,7 +68,7 @@ repos: - id: shellcheck name: shellcheck - entry: shellcheck --shell bash + entry: shellcheck --shell=bash language: system pass_filenames: false types_or: [shell] From 0d9b3f7e4577662f1fa3b539009666da2792287f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:12:35 +0100 Subject: [PATCH 432/641] Exclude shellcheck error which prevents it from working on Windows --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07471f79c..2dcd8d24f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,14 +68,14 @@ repos: - id: shellcheck name: shellcheck - entry: shellcheck --shell=bash + entry: shellcheck --shell=bash --exclude=SC1017 language: system pass_filenames: false types_or: [shell] - id: shellcheck-docs name: shellcheck-docs - entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash" + entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" language: system types_or: [markdown, rst] From db39ad0c9815b1cd64fe00f2aff2e0218db21f12 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:20:19 +0100 Subject: [PATCH 433/641] Use --all-extras in Windows CI setup --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index bbd432c32..a8d11ed69 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -35,4 +35,4 @@ jobs: run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - uv run pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From fe7c11ee7b622adae553b802d20c374bc9c77bbe Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:29:11 +0100 Subject: [PATCH 434/641] Ignore D004 errors in doc8 so it works on Windows --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 72d010d30..69483b9fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -332,6 +332,9 @@ ignore_path = [ "./src/*/_setuptools_scm_version.txt", ] +# See https://github.com/PyCQA/doc8/issues/78 +ignore = [ "D004" ] + [tool.vulture] # Ideally we would limit the paths to the source code where we want to ignore names, # but Vulture does not enable this. From 0c5de9d6b57cba66d47c5f2393c0ac1c7d47bc83 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:42:59 +0100 Subject: [PATCH 435/641] Try to work around Windows line endings issue --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 00a7b00c9..b5c2d0d58 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ .git_archival.txt export-subst +*.txt text eol=lf From 5bc6c372b2a9529f434f35e4486b312282853099 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:44:20 +0100 Subject: [PATCH 436/641] Remove duplicate Windows CI setup --- .github/workflows/windows-ci.yml | 38 -------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/windows-ci.yml diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml deleted file mode 100644 index a8d11ed69..000000000 --- a/.github/workflows/windows-ci.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- - -name: Windows CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - schedule: - # * is a special character in YAML so you have to quote this string - # Run at 1:00 every day - - cron: '0 1 * * *' - -jobs: - build: - - strategy: - matrix: - python-version: ["3.12"] - platform: [windows-latest] - - runs-on: ${{ matrix.platform }} - - steps: - - uses: actions/checkout@v4 - - - name: Install uv - uses: astral-sh/setup-uv@v3 - - - name: Install Python - run: uv python install ${{ matrix.python-version }} - - - name: "Run tests" - run: | - # We run tests against "." and not the tests directory as we test the README - # and documentation. - uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 1cc5ea02c9994487ad92b22378e0a124c36269e9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 17:09:21 +0100 Subject: [PATCH 437/641] Use setup-uv GitHub Action --- .github/workflows/ci.yml | 11 ++++------- .github/workflows/release.yml | 3 --- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff6b3002b..497045078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,20 +28,17 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: Install Python - run: uv python install ${{ matrix.python-version }} - - name: "Lint" run: | - uv run --all-extras pre-commit run --all-files --hook-stage commit --verbose - uv run --all-extras pre-commit run --all-files --hook-stage push --verbose - uv run --all-extras pre-commit run --all-files --hook-stage manual --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage commit --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage push --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose - name: "Run tests" run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml + uv run --all-extras --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v4" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7eae4b80..c38a38adc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,9 +34,6 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: Install Python - run: uv python install ${{ matrix.python-version }} - - name: "Calver calculate version" uses: StephaneBour/actions-calver@master id: calver From 105496609fb81ef3960ca3934aba564ede94bff0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 17:20:45 +0100 Subject: [PATCH 438/641] Move release dependencies to pyproject.toml --- .github/workflows/release.yml | 3 +-- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c38a38adc..bdca6c419 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,8 +77,7 @@ jobs: run: | git fetch --tags git checkout ${{ steps.tag_version.outputs.new_tag }} - uv run pip install build check-wheel-contents - uv run python -m build --sdist --wheel --outdir dist/ . + uv run --extra=release python -m build --sdist --wheel --outdir dist/ . uv run check-wheel-contents dist/*.whl # We use PyPI trusted publishing rather than a PyPI API token. diff --git a/pyproject.toml b/pyproject.toml index 69483b9fa..ca54e17c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,6 +77,7 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" +optional-dependencies.release = ["build", "check-wheel-contents"] urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] From 5f5ab26714453475b7d0b546f3796237ee1d3b2b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 17:26:03 +0100 Subject: [PATCH 439/641] Ignore release dependency group in deptry --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index ca54e17c1..014a99631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -287,6 +287,7 @@ ignore = [ [tool.deptry] pep621_dev_dependency_groups = [ "dev", + "release", ] [tool.pyproject-fmt] From b11da61d835d1395e8644cd6d2cfc0ed310d818c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 6 Oct 2024 16:28:10 +0000 Subject: [PATCH 440/641] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 014a99631..9160b5793 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,8 +76,8 @@ optional-dependencies.dev = [ "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] +optional-dependencies.release = [ "build", "check-wheel-contents" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" -optional-dependencies.release = ["build", "check-wheel-contents"] urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] From 71c7d3b9f10d4bcf77358d7fed864f67f911e969 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 23:07:06 +0100 Subject: [PATCH 441/641] Use uv to run actionlint --- .pre-commit-config.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2dcd8d24f..98066432a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,6 @@ ci: # We use system Python, with required dependencies specified in pyproject.toml. # We therefore cannot use those dependencies in pre-commit CI. skip: - - actionlint - check-manifest - deptry - doc8 @@ -61,8 +60,8 @@ repos: hooks: - id: actionlint name: actionlint - entry: actionlint - language: system + entry: uv run --all-extras actionlint + language: python pass_filenames: false types_or: [yaml] From efc20c088c77d65d47411358cc0aafcb41e55618 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 23:08:23 +0100 Subject: [PATCH 442/641] Add the uv dependency --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 98066432a..8ab4682c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,6 +64,7 @@ repos: language: python pass_filenames: false types_or: [yaml] + additional_dependencies: ["uv"] - id: shellcheck name: shellcheck From 099f7ae93242a791048246cc6d577bae7d6526a0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 23:37:05 +0100 Subject: [PATCH 443/641] Make pre-commit work without activating a virtualenv --- .pre-commit-config.yaml | 138 ++++++++++++++++++++++++---------------- pyproject.toml | 2 +- 2 files changed, 84 insertions(+), 56 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ab4682c0..c91592406 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,7 @@ ci: # We use system Python, with required dependencies specified in pyproject.toml. # We therefore cannot use those dependencies in pre-commit CI. skip: + - actionlint - check-manifest - deptry - doc8 @@ -60,7 +61,7 @@ repos: hooks: - id: actionlint name: actionlint - entry: uv run --all-extras actionlint + entry: uv run --extra=dev actionlint language: python pass_filenames: false types_or: [yaml] @@ -68,182 +69,209 @@ repos: - id: shellcheck name: shellcheck - entry: shellcheck --shell=bash --exclude=SC1017 - language: system + entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 + language: python pass_filenames: false types_or: [shell] + additional_dependencies: ["uv"] - id: shellcheck-docs name: shellcheck-docs - entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" - language: system + entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: shfmt name: shfmt - entry: shfmt --write --space-redirects --indent=4 - language: system + entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 + language: python types_or: [shell] + additional_dependencies: ["uv"] - id: shfmt-docs name: shfmt-docs - entry: doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" - language: system + entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: mypy name: mypy stages: [push] - entry: python -m mypy . - language: system + entry: uv run --extra=dev -m mypy . + language: python types_or: [python, toml] pass_filenames: false + additional_dependencies: ["uv"] - id: mypy-docs name: mypy-docs stages: [push] - entry: doccmd --language=python --command="mypy" - language: system + entry: uv run --extra=dev doccmd --language=python --command="mypy" + language: python types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - id: check-manifest name: check-manifest stages: [push] - entry: python -m check_manifest . - language: system + entry: uv run --extra=dev -m check_manifest . + language: python pass_filenames: false + additional_dependencies: ["uv"] - id: pyright name: pyright stages: [push] - entry: python -m pyright . - language: system + entry: uv run --extra=dev -m pyright . + language: python types_or: [python, toml] pass_filenames: false + additional_dependencies: ["uv"] - id: pyright-docs name: pyright-docs stages: [push] - entry: doccmd --language=python --command="pyright" - language: system + entry: uv run --extra=dev doccmd --language=python --command="pyright" + language: python types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - id: vulture name: vulture - entry: python -m vulture . - language: system + entry: uv run --extra=dev -m vulture . + language: python types_or: [python] pass_filenames: false + additional_dependencies: ["uv"] - id: vulture-docs name: vulture docs - entry: doccmd --language=python --command="vulture" - language: system + entry: uv run --extra=dev doccmd --language=python --command="vulture" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: pyroma name: pyroma - entry: python -m pyroma --min 10 . - language: system + entry: uv run --extra=dev -m pyroma --min 10 . + language: python pass_filenames: false types_or: [toml] + additional_dependencies: ["uv"] - id: deptry name: deptry - entry: python -m deptry src/ - language: system + entry: uv run --extra=dev -m deptry src/ + language: python pass_filenames: false + additional_dependencies: ["uv"] - id: pylint name: pylint - entry: python -m pylint *.py src/ tests/ docs/ - language: system + entry: uv run --extra=dev -m pylint *.py src/ tests/ docs/ + language: python stages: [manual] pass_filenames: false + additional_dependencies: ["uv"] - id: pylint-docs name: pylint-docs - entry: doccmd --language=python --command="pylint" - language: system + entry: uv run --extra=dev doccmd --language=python --command="pylint" + language: python stages: [manual] types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - id: ruff-check-fix name: Ruff check fix - entry: python -m ruff check --fix - language: system + entry: uv run --extra=dev -m ruff check --fix + language: python types_or: [python] + additional_dependencies: ["uv"] - id: ruff-check-fix-docs name: Ruff check fix docs - entry: doccmd --language=python --command="ruff check --fix" - language: system + entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: ruff-format-fix name: Ruff format - entry: python -m ruff format - language: system + entry: uv run --extra=dev -m ruff format + language: python types_or: [python] + additional_dependencies: ["uv"] - id: ruff-format-fix-docs name: Ruff format docs - entry: doccmd --language=python --no-pad-file --command="ruff format" - language: system + entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: doc8 name: doc8 - entry: python -m doc8 - language: system + entry: uv run --extra=dev -m doc8 + language: python types_or: [rst] + additional_dependencies: ["uv"] - id: interrogate name: interrogate - entry: python -m interrogate - language: system + entry: uv run --extra=dev -m interrogate + language: python types_or: [python] + additional_dependencies: ["uv"] - id: interrogate-docs name: interrogate docs - entry: doccmd --language=python --command="interrogate" - language: system + entry: uv run --extra=dev doccmd --language=python --command="interrogate" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: pyproject-fmt-fix name: pyproject-fmt - entry: pyproject-fmt - language: system + entry: uv run --extra=dev pyproject-fmt + language: python types_or: [toml] files: pyproject.toml + additional_dependencies: ["uv"] - id: linkcheck name: linkcheck - entry: make -C docs/ linkcheck SPHINXOPTS=-W - language: system + entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M linkcheck docs/source/ docs/build/ -W + language: python types_or: [rst] stages: [manual] pass_filenames: false + additional_dependencies: ["uv"] - id: spelling name: spelling - entry: make -C docs/ spelling SPHINXOPTS=-W - language: system + entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M spelling docs/source/ docs/build/ -W + language: python types_or: [rst] stages: [manual] pass_filenames: false + additional_dependencies: ["uv"] - id: docs name: Build Documentation - entry: make docs - language: system + entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M html docs/source/ docs/build/ -W + language: python stages: [manual] pass_filenames: false + additional_dependencies: ["uv"] - id: pyright-verifytypes name: pyright-verifytypes stages: [push] - entry: python -m pyright --verifytypes vws - language: system + entry: uv run --extra=dev -m pyright --verifytypes vws + language: python pass_filenames: false types_or: [python] + additional_dependencies: ["uv"] diff --git a/pyproject.toml b/pyproject.toml index 9160b5793..d1619c959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "mypy==1.11.2", "pre-commit==3.8.0", "pydocstyle==6.3", - "pyenchant==3.2.2", + "pyenchant==3.3.0rc1", "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", From 7775e637ed1edcc8bbacab115de05940effab608 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 10:01:51 +0100 Subject: [PATCH 444/641] Bump pyenchant to a macOS ARM compatible RC --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9160b5793..d1619c959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "mypy==1.11.2", "pre-commit==3.8.0", "pydocstyle==6.3", - "pyenchant==3.2.2", + "pyenchant==3.3.0rc1", "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", From 6407bd18c983716d4ce4de5a67bc57c464d9320f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 10:38:05 +0100 Subject: [PATCH 445/641] Update pre-commit config --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c91592406..298105352 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -98,7 +98,7 @@ repos: - id: mypy name: mypy - stages: [push] + stages: [pre-push] entry: uv run --extra=dev -m mypy . language: python types_or: [python, toml] @@ -107,7 +107,7 @@ repos: - id: mypy-docs name: mypy-docs - stages: [push] + stages: [pre-push] entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst, python, toml] @@ -115,7 +115,7 @@ repos: - id: check-manifest name: check-manifest - stages: [push] + stages: [pre-push] entry: uv run --extra=dev -m check_manifest . language: python pass_filenames: false @@ -123,7 +123,7 @@ repos: - id: pyright name: pyright - stages: [push] + stages: [pre-push] entry: uv run --extra=dev -m pyright . language: python types_or: [python, toml] @@ -132,7 +132,7 @@ repos: - id: pyright-docs name: pyright-docs - stages: [push] + stages: [pre-push] entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst, python, toml] @@ -269,7 +269,7 @@ repos: - id: pyright-verifytypes name: pyright-verifytypes - stages: [push] + stages: [pre-push] entry: uv run --extra=dev -m pyright --verifytypes vws language: python pass_filenames: false From 195f9b3520c851845c725af0063ba0dbdba3ecc3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 10:40:44 +0100 Subject: [PATCH 446/641] Use new hook stage names --- .github/workflows/ci.yml | 4 ++-- docs/source/contributing.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 497045078..a0823870e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,8 @@ jobs: - name: "Lint" run: | - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage commit --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage push --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose - name: "Run tests" diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 2a61da727..21e5dbe82 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -40,8 +40,8 @@ Run lint tools either by committing, or with: .. code-block:: console - $ pre-commit run --all-files --hook-stage commit --verbose - $ pre-commit run --all-files --hook-stage push --verbose + $ pre-commit run --all-files --hook-stage pre-commit --verbose + $ pre-commit run --all-files --hook-stage pre-push --verbose $ pre-commit run --all-files --hook-stage manual --verbose .. _Homebrew: https://brew.sh From 83b8110112ebaeed1da3496b5c1475706d0a2bc9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 11:18:12 +0100 Subject: [PATCH 447/641] Simplify docs setup --- .pre-commit-config.yaml | 6 +++--- docs/Makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 298105352..ef2edf370 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -243,7 +243,7 @@ repos: - id: linkcheck name: linkcheck - entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M linkcheck docs/source/ docs/build/ -W + entry: make -C docs/ linkcheck SPHINXOPTS=-W language: python types_or: [rst] stages: [manual] @@ -252,7 +252,7 @@ repos: - id: spelling name: spelling - entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M spelling docs/source/ docs/build/ -W + entry: make -C docs/ spelling SPHINXOPTS=-W language: python types_or: [rst] stages: [manual] @@ -261,7 +261,7 @@ repos: - id: docs name: Build Documentation - entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M html docs/source/ docs/build/ -W + entry: make docs language: python stages: [manual] pass_filenames: false diff --git a/docs/Makefile b/docs/Makefile index 6225d81e0..e8f3118ce 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -17,4 +17,4 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @uv run --extra=dev $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) From 54cdd7f9b86bd10ef8484f4f9256e22513a99a2a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 11:19:54 +0100 Subject: [PATCH 448/641] Make it possible to run docs help without virtualenv --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index e8f3118ce..15e9c44b1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -10,7 +10,7 @@ BUILDDIR = build # Put it first so that "make" without argument is like "make help". help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @uv run --extra=dev $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile From f8d59b51c22c4110cbb9ab0ff2a004159127d313 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:40:00 +0000 Subject: [PATCH 449/641] Bump pre-commit from 3.8.0 to 4.0.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.8.0 to 4.0.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.8.0...v4.0.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1619c959..82c5d548c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy==1.11.2", - "pre-commit==3.8.0", + "pre-commit==4.0.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.18.0", From 87b670f930bd9fb1f1d3d268fcc4d1e9e08df08d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:46:42 +0000 Subject: [PATCH 450/641] Bump ruff from 0.6.8 to 0.6.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.8 to 0.6.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.8...0.6.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 82c5d548c..99059f736 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.8", + "ruff==0.6.9", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From adf881808c0d5dcce241c8ead6a15dc0c2e97c61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:57:10 +0000 Subject: [PATCH 451/641] Bump doccmd from 2024.9.27 to 2024.10.6 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.27 to 2024.10.6. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.27...2024.10.06) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 99059f736..1a9fcd24e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.27", + "doccmd==2024.10.6", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 08f911851937987f6bd30e77a922b391ee998766 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 13:18:52 +0100 Subject: [PATCH 452/641] Use Sphinx feature to simplify setting copyright --- docs/source/conf.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 6f96be9c4..0fa6f6f69 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,7 +3,6 @@ Configuration for Sphinx. """ -import datetime import importlib.metadata from packaging.specifiers import SpecifierSet @@ -24,8 +23,7 @@ source_suffix = ".rst" master_doc = "index" -year = datetime.datetime.now(tz=datetime.UTC).year -project_copyright = f"{year}, {author}" +project_copyright = f"%Y, {author}" # Exclude the prompt from copied code with sphinx_copybutton. # https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies. From e7e5f48254aa657cb0425d6912209dc101932da6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 22:53:05 +0100 Subject: [PATCH 453/641] Separate test and lint CI build --- .github/workflows/ci.yml | 9 --------- .github/workflows/lint.yml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0823870e..f7f4e9bf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,12 +28,6 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: "Lint" - run: | - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose - - name: "Run tests" run: | # We run tests against "." and not the tests directory as we test the README @@ -45,6 +39,3 @@ jobs: with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - - - uses: pre-commit-ci/lite-action@v1.0.3 - if: always() diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..a3caafacf --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +--- + +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + # * is a special character in YAML so you have to quote this string + # Run at 1:00 every day + - cron: '0 1 * * *' + +jobs: + build: + + strategy: + matrix: + python-version: ["3.12"] + platform: ["ubuntu-latest", "windows-latest"] + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: "Lint" + run: | + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose + + - uses: pre-commit-ci/lite-action@v1.0.3 + if: always() From 263e2bcf9db8271446c896020f99cf70ce40b368 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 22:55:17 +0100 Subject: [PATCH 454/641] Change build names --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7f4e9bf1..ad53968be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ --- -name: CI +name: Test on: push: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a3caafacf..41109f7d5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ --- -name: CI +name: Lint on: push: From 526817e71375263fbe3f079faf168cd3e4cee666 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 02:02:02 +0100 Subject: [PATCH 455/641] Pin build and check-wheel-contents --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a9fcd24e..f3fd720a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] -optional-dependencies.release = [ "build", "check-wheel-contents" ] +optional-dependencies.release = [ "build==1.2.2.post1", "check-wheel-contents==0.6.0" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" urls.Source = "https://github.com/VWS-Python/vws-python" From 287c006f09ef0653622c0cac374010f1bcd2a673 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 02:55:10 +0100 Subject: [PATCH 456/641] Use uv instead of 'build' for building --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdca6c419..25de8e0ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,8 +77,8 @@ jobs: run: | git fetch --tags git checkout ${{ steps.tag_version.outputs.new_tag }} - uv run --extra=release python -m build --sdist --wheel --outdir dist/ . - uv run check-wheel-contents dist/*.whl + uv build --sdist --wheel --out-dir dist/ + uv run --extra=release check-wheel-contents dist/*.whl # We use PyPI trusted publishing rather than a PyPI API token. # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. From 8ae14320b9804244d24c387dd473b04384c0d732 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 02:56:38 +0100 Subject: [PATCH 457/641] Use uv instead of 'build' for building --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3fd720a3..b458a89db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] -optional-dependencies.release = [ "build==1.2.2.post1", "check-wheel-contents==0.6.0" ] +optional-dependencies.release = [ "check-wheel-contents==0.6.0" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" urls.Source = "https://github.com/VWS-Python/vws-python" From 2cf3c493d22eac70f5227883df28fb4ff958c2ed Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 04:12:36 +0100 Subject: [PATCH 458/641] Use environment variables to remove duplication in uv commands --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad53968be..9c36d9c0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - uv run --all-extras --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml + uv run --extra=dev --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v4" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 41109f7d5..9c52e9b2e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,9 +30,11 @@ jobs: - name: "Lint" run: | - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose + uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose + uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose + uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose + env: + UV_PYTHON: ${{ matrix.python-version }} - uses: pre-commit-ci/lite-action@v1.0.3 if: always() From 462db7033ad09f67c393f8bddc203ff4280646eb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 04:23:41 +0100 Subject: [PATCH 459/641] Update release process to support >= 10 releases in a day --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25de8e0ee..2074d8655 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,11 +43,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get the changelog underline + id: changelog_underline + run: | + underline="$(echo "${{ steps.calver.outputs.release }}" | tr -c '\n' '-')" + echo "underline=${underline}" >> "$GITHUB_OUTPUT" + - name: "Update changelog" uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n------------" + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}" include: "CHANGELOG.rst" regex: false From 2e78c52033aeff5f652e3857580992985bac9763 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 05:00:25 +0100 Subject: [PATCH 460/641] Format some yaml files --- .github/dependabot.yml | 21 +- .pre-commit-config.yaml | 483 ++++++++++++++++++++-------------------- 2 files changed, 253 insertions(+), 251 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a04c486d6..76027ef36 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,13 @@ +--- version: 2 updates: -- package-ecosystem: pip - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 + - package-ecosystem: pip + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef2edf370..b0538c0b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,277 +1,278 @@ +--- fail_fast: true # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks ci: - # We use system Python, with required dependencies specified in pyproject.toml. - # We therefore cannot use those dependencies in pre-commit CI. - skip: - - actionlint - - check-manifest - - deptry - - doc8 - - docs - - interrogate - - interrogate-docs - - linkcheck - - mypy - - mypy-docs - - pylint - - pyproject-fmt-fix - - pyright - - pyright-docs - - pyright-verifytypes - - pyroma - - ruff-check-fix - - ruff-check-fix-docs - - ruff-format-fix - - ruff-format-fix-docs - - spelling - - vulture - - vulture-docs - - shellcheck - - shellcheck-docs - - shfmt - - shfmt-docs + # We use system Python, with required dependencies specified in pyproject.toml. + # We therefore cannot use those dependencies in pre-commit CI. + skip: + - actionlint + - check-manifest + - deptry + - doc8 + - docs + - interrogate + - interrogate-docs + - linkcheck + - mypy + - mypy-docs + - pylint + - pyproject-fmt-fix + - pyright + - pyright-docs + - pyright-verifytypes + - pyroma + - ruff-check-fix + - ruff-check-fix-docs + - ruff-format-fix + - ruff-format-fix-docs + - spelling + - vulture + - vulture-docs + - shellcheck + - shellcheck-docs + - shfmt + - shfmt-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: -- repo: meta - hooks: - - id: check-useless-excludes -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - - id: check-case-conflict - - id: check-executables-have-shebangs - - id: check-merge-conflict - - id: check-shebang-scripts-are-executable - - id: check-symlinks - - id: check-json - - id: check-toml - - id: check-vcs-permalinks - - id: check-yaml - - id: end-of-file-fixer - - id: file-contents-sorter - files: spelling_private_dict\.txt$ - - id: trailing-whitespace -- repo: local - hooks: - - id: actionlint - name: actionlint - entry: uv run --extra=dev actionlint - language: python - pass_filenames: false - types_or: [yaml] - additional_dependencies: ["uv"] + - repo: meta + hooks: + - id: check-useless-excludes + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-json + - id: check-toml + - id: check-vcs-permalinks + - id: check-yaml + - id: end-of-file-fixer + - id: file-contents-sorter + files: spelling_private_dict\.txt$ + - id: trailing-whitespace + - repo: local + hooks: + - id: actionlint + name: actionlint + entry: uv run --extra=dev actionlint + language: python + pass_filenames: false + types_or: [yaml] + additional_dependencies: ["uv"] - - id: shellcheck - name: shellcheck - entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 - language: python - pass_filenames: false - types_or: [shell] - additional_dependencies: ["uv"] + - id: shellcheck + name: shellcheck + entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 + language: python + pass_filenames: false + types_or: [shell] + additional_dependencies: ["uv"] - - id: shellcheck-docs - name: shellcheck-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: shellcheck-docs + name: shellcheck-docs + entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: shfmt - name: shfmt - entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 - language: python - types_or: [shell] - additional_dependencies: ["uv"] + - id: shfmt + name: shfmt + entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 + language: python + types_or: [shell] + additional_dependencies: ["uv"] - - id: shfmt-docs - name: shfmt-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: shfmt-docs + name: shfmt-docs + entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: mypy - name: mypy - stages: [pre-push] - entry: uv run --extra=dev -m mypy . - language: python - types_or: [python, toml] - pass_filenames: false - additional_dependencies: ["uv"] + - id: mypy + name: mypy + stages: [pre-push] + entry: uv run --extra=dev -m mypy . + language: python + types_or: [python, toml] + pass_filenames: false + additional_dependencies: ["uv"] - - id: mypy-docs - name: mypy-docs - stages: [pre-push] - entry: uv run --extra=dev doccmd --language=python --command="mypy" - language: python - types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + - id: mypy-docs + name: mypy-docs + stages: [pre-push] + entry: uv run --extra=dev doccmd --language=python --command="mypy" + language: python + types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - - id: check-manifest - name: check-manifest - stages: [pre-push] - entry: uv run --extra=dev -m check_manifest . - language: python - pass_filenames: false - additional_dependencies: ["uv"] + - id: check-manifest + name: check-manifest + stages: [pre-push] + entry: uv run --extra=dev -m check_manifest . + language: python + pass_filenames: false + additional_dependencies: ["uv"] - - id: pyright - name: pyright - stages: [pre-push] - entry: uv run --extra=dev -m pyright . - language: python - types_or: [python, toml] - pass_filenames: false - additional_dependencies: ["uv"] + - id: pyright + name: pyright + stages: [pre-push] + entry: uv run --extra=dev -m pyright . + language: python + types_or: [python, toml] + pass_filenames: false + additional_dependencies: ["uv"] - - id: pyright-docs - name: pyright-docs - stages: [pre-push] - entry: uv run --extra=dev doccmd --language=python --command="pyright" - language: python - types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + - id: pyright-docs + name: pyright-docs + stages: [pre-push] + entry: uv run --extra=dev doccmd --language=python --command="pyright" + language: python + types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - - id: vulture - name: vulture - entry: uv run --extra=dev -m vulture . - language: python - types_or: [python] - pass_filenames: false - additional_dependencies: ["uv"] + - id: vulture + name: vulture + entry: uv run --extra=dev -m vulture . + language: python + types_or: [python] + pass_filenames: false + additional_dependencies: ["uv"] - - id: vulture-docs - name: vulture docs - entry: uv run --extra=dev doccmd --language=python --command="vulture" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: vulture-docs + name: vulture docs + entry: uv run --extra=dev doccmd --language=python --command="vulture" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: pyroma - name: pyroma - entry: uv run --extra=dev -m pyroma --min 10 . - language: python - pass_filenames: false - types_or: [toml] - additional_dependencies: ["uv"] + - id: pyroma + name: pyroma + entry: uv run --extra=dev -m pyroma --min 10 . + language: python + pass_filenames: false + types_or: [toml] + additional_dependencies: ["uv"] - - id: deptry - name: deptry - entry: uv run --extra=dev -m deptry src/ - language: python - pass_filenames: false - additional_dependencies: ["uv"] + - id: deptry + name: deptry + entry: uv run --extra=dev -m deptry src/ + language: python + pass_filenames: false + additional_dependencies: ["uv"] - - id: pylint - name: pylint - entry: uv run --extra=dev -m pylint *.py src/ tests/ docs/ - language: python - stages: [manual] - pass_filenames: false - additional_dependencies: ["uv"] + - id: pylint + name: pylint + entry: uv run --extra=dev -m pylint *.py src/ tests/ docs/ + language: python + stages: [manual] + pass_filenames: false + additional_dependencies: ["uv"] - - id: pylint-docs - name: pylint-docs - entry: uv run --extra=dev doccmd --language=python --command="pylint" - language: python - stages: [manual] - types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + - id: pylint-docs + name: pylint-docs + entry: uv run --extra=dev doccmd --language=python --command="pylint" + language: python + stages: [manual] + types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - - id: ruff-check-fix - name: Ruff check fix - entry: uv run --extra=dev -m ruff check --fix - language: python - types_or: [python] - additional_dependencies: ["uv"] + - id: ruff-check-fix + name: Ruff check fix + entry: uv run --extra=dev -m ruff check --fix + language: python + types_or: [python] + additional_dependencies: ["uv"] - - id: ruff-check-fix-docs - name: Ruff check fix docs - entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: ruff-check-fix-docs + name: Ruff check fix docs + entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: ruff-format-fix - name: Ruff format - entry: uv run --extra=dev -m ruff format - language: python - types_or: [python] - additional_dependencies: ["uv"] + - id: ruff-format-fix + name: Ruff format + entry: uv run --extra=dev -m ruff format + language: python + types_or: [python] + additional_dependencies: ["uv"] - - id: ruff-format-fix-docs - name: Ruff format docs - entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: ruff-format-fix-docs + name: Ruff format docs + entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: doc8 - name: doc8 - entry: uv run --extra=dev -m doc8 - language: python - types_or: [rst] - additional_dependencies: ["uv"] + - id: doc8 + name: doc8 + entry: uv run --extra=dev -m doc8 + language: python + types_or: [rst] + additional_dependencies: ["uv"] - - id: interrogate - name: interrogate - entry: uv run --extra=dev -m interrogate - language: python - types_or: [python] - additional_dependencies: ["uv"] + - id: interrogate + name: interrogate + entry: uv run --extra=dev -m interrogate + language: python + types_or: [python] + additional_dependencies: ["uv"] - - id: interrogate-docs - name: interrogate docs - entry: uv run --extra=dev doccmd --language=python --command="interrogate" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: interrogate-docs + name: interrogate docs + entry: uv run --extra=dev doccmd --language=python --command="interrogate" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: pyproject-fmt-fix - name: pyproject-fmt - entry: uv run --extra=dev pyproject-fmt - language: python - types_or: [toml] - files: pyproject.toml - additional_dependencies: ["uv"] + - id: pyproject-fmt-fix + name: pyproject-fmt + entry: uv run --extra=dev pyproject-fmt + language: python + types_or: [toml] + files: pyproject.toml + additional_dependencies: ["uv"] - - id: linkcheck - name: linkcheck - entry: make -C docs/ linkcheck SPHINXOPTS=-W - language: python - types_or: [rst] - stages: [manual] - pass_filenames: false - additional_dependencies: ["uv"] + - id: linkcheck + name: linkcheck + entry: make -C docs/ linkcheck SPHINXOPTS=-W + language: python + types_or: [rst] + stages: [manual] + pass_filenames: false + additional_dependencies: ["uv"] - - id: spelling - name: spelling - entry: make -C docs/ spelling SPHINXOPTS=-W - language: python - types_or: [rst] - stages: [manual] - pass_filenames: false - additional_dependencies: ["uv"] + - id: spelling + name: spelling + entry: make -C docs/ spelling SPHINXOPTS=-W + language: python + types_or: [rst] + stages: [manual] + pass_filenames: false + additional_dependencies: ["uv"] - - id: docs - name: Build Documentation - entry: make docs - language: python - stages: [manual] - pass_filenames: false - additional_dependencies: ["uv"] + - id: docs + name: Build Documentation + entry: make docs + language: python + stages: [manual] + pass_filenames: false + additional_dependencies: ["uv"] - - id: pyright-verifytypes - name: pyright-verifytypes - stages: [pre-push] - entry: uv run --extra=dev -m pyright --verifytypes vws - language: python - pass_filenames: false - types_or: [python] - additional_dependencies: ["uv"] + - id: pyright-verifytypes + name: pyright-verifytypes + stages: [pre-push] + entry: uv run --extra=dev -m pyright --verifytypes vws + language: python + pass_filenames: false + types_or: [python] + additional_dependencies: ["uv"] From 21ab5e8513a4da1386910bf607a9df8808e2e3b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:15:25 +0000 Subject: [PATCH 461/641] Bump doccmd from 2024.10.6 to 2024.10.8.12 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.6 to 2024.10.8.12. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.06...2024.10.08.12) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b458a89db..3bef30376 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.6", + "doccmd==2024.10.8.12", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From fd8c70cd4eacdf2f60542c876187ece0f4f2e3d7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 12:50:01 +0100 Subject: [PATCH 462/641] Add YAML formatting --- .pre-commit-config.yaml | 4 ++++ .yamlfmt | 5 +++++ codecov.yaml | 1 + readthedocs.yaml | 9 +++++---- 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .yamlfmt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0538c0b1..27090c9f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,6 +58,10 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace + - repo: https://github.com/google/yamlfmt + rev: v0.13.0 + hooks: + - id: yamlfmt - repo: local hooks: - id: actionlint diff --git a/.yamlfmt b/.yamlfmt new file mode 100644 index 000000000..fbb6dd434 --- /dev/null +++ b/.yamlfmt @@ -0,0 +1,5 @@ +formatter: + include_document_start: true + retain_line_breaks_single: true + trim_trailing_whitespace: true + end_of_file_newline: true diff --git a/codecov.yaml b/codecov.yaml index e49034f39..5c35baac9 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -1,3 +1,4 @@ +--- coverage: status: patch: diff --git a/readthedocs.yaml b/readthedocs.yaml index d3bd4fd21..4b8a4eb2b 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -1,3 +1,4 @@ +--- version: 2 build: @@ -7,10 +8,10 @@ build: python: install: - - method: pip - path: . - extra_requirements: - - dev + - method: pip + path: . + extra_requirements: + - dev sphinx: builder: html From 04d8fcd9d83557e4761ca7aee2d40183b8e598f8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 12:54:11 +0100 Subject: [PATCH 463/641] Add checkmake --- .checkmake-config.ini | 2 ++ .pre-commit-config.yaml | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 .checkmake-config.ini diff --git a/.checkmake-config.ini b/.checkmake-config.ini new file mode 100644 index 000000000..f2ac3c91b --- /dev/null +++ b/.checkmake-config.ini @@ -0,0 +1,2 @@ +[minphony] +disabled = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 27090c9f6..655b9afb3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,6 +58,11 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace + - repo: https://github.com/mrtazz/checkmake.git + rev: 0.2.2 + hooks: + - id: checkmake + args: ["--config", ".checkmake-config.ini"] - repo: https://github.com/google/yamlfmt rev: v0.13.0 hooks: From 7ba119cf11ee3a48fef77ffd8005aa7c214e4446 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 12:56:16 +0100 Subject: [PATCH 464/641] Add pygrep hooks --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 655b9afb3..706c7aede 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,6 +58,13 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 # Use the ref you want to point at + hooks: + - id: rst-directive-colons + - id: rst-inline-touching-normal + - id: text-unicode-replacement-char + - id: rst-backticks - repo: https://github.com/mrtazz/checkmake.git rev: 0.2.2 hooks: From 464b398a12906a7f0bbd4fad795e9f6b66f7de99 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 13:03:05 +0100 Subject: [PATCH 465/641] Add docformatter pre-commit --- .pre-commit-config.yaml | 9 +++++- conftest.py | 11 +++---- docs/source/__init__.py | 4 ++- pyproject.toml | 4 +++ src/vws/exceptions/base_exceptions.py | 3 +- src/vws/exceptions/custom_exceptions.py | 8 +++--- src/vws/exceptions/vws_exceptions.py | 3 +- src/vws/query.py | 7 +++-- src/vws/reports.py | 15 ++++------ src/vws/types.py | 4 ++- src/vws/vws.py | 38 ++++++++++--------------- tests/__init__.py | 4 ++- tests/conftest.py | 8 ++++-- tests/test_vws.py | 3 +- tests/test_vws_exceptions.py | 8 +++--- 15 files changed, 68 insertions(+), 61 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 706c7aede..ddcbc74cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,7 +59,7 @@ repos: files: spelling_private_dict\.txt$ - id: trailing-whitespace - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.10.0 # Use the ref you want to point at + rev: v1.10.0 hooks: - id: rst-directive-colons - id: rst-inline-touching-normal @@ -84,6 +84,13 @@ repos: types_or: [yaml] additional_dependencies: ["uv"] + - id: docformatter + name: docformatter + entry: uv run --extra=dev -m docformatter + language: python + types_or: [python] + additional_dependencies: ["uv"] + - id: shellcheck name: shellcheck entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 diff --git a/conftest.py b/conftest.py index 05d6727f2..1d776f8db 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,6 @@ -"""Setup for Sybil.""" +""" +Setup for Sybil. +""" import io import uuid @@ -31,8 +33,8 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: def fixture_make_image_file( high_quality_image: io.BytesIO, ) -> Generator[None]: - """ - Make an image file available in the test directory. + """Make an image file available in the test directory. + The path of this file matches the path in the documentation. """ new_image = Path("high_quality_image.jpg") @@ -46,8 +48,7 @@ def fixture_make_image_file( def fixture_mock_vws( monkeypatch: pytest.MonkeyPatch, ) -> Generator[None]: - """ - Yield a mock VWS. + """Yield a mock VWS. The keys used here match the keys in the documentation. """ diff --git a/docs/source/__init__.py b/docs/source/__init__.py index 535ceb2ec..b63eed5fb 100644 --- a/docs/source/__init__.py +++ b/docs/source/__init__.py @@ -1 +1,3 @@ -"""Documentation.""" +""" +Documentation. +""" diff --git a/pyproject.toml b/pyproject.toml index 3bef30376..06e8c93b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ optional-dependencies.dev = [ "deptry==0.20.0", "doc8==1.1.2", "doccmd==2024.10.8.12", + "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", @@ -258,6 +259,9 @@ spelling-private-dict-file = 'spelling_private_dict.txt' # --spelling-private-dict-file option instead of raising a message. spelling-store-unknown-words = 'no' +[tool.docformatter] +make-summary-multi-line = true + [tool.check-manifest] ignore = [ diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index ad1116708..b0888f93f 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -32,8 +32,7 @@ def response(self) -> Response: @beartype class VWSError(Exception): - """ - Base class for Vuforia Web Services errors. + """Base class for Vuforia Web Services errors. These errors are defined at https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes. diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index cb237abd8..f05d59b41 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -11,11 +11,11 @@ @beartype class OopsAnErrorOccurredPossiblyBadNameError(Exception): - """ - Exception raised when VWS returns an HTML page which says "Oops, an error - occurred". + """Exception raised when VWS returns an HTML page which says "Oops, an + error occurred". - This has been seen to happen when the given name includes a bad character. + This has been seen to happen when the given name includes a bad + character. """ def __init__(self, response: Response) -> None: diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index bf6d5fc4d..b0e3dcbda 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -33,8 +33,7 @@ def target_id(self) -> str: @beartype class FailError(VWSError): """ - Exception raised when Vuforia returns a response with a result code - 'Fail'. + Exception raised when Vuforia returns a response with a result code 'Fail'. """ diff --git a/src/vws/query.py b/src/vws/query.py index 2380ba962..84144691c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -34,7 +34,9 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """Get the data of an image file.""" + """ + Get the data of an image file. + """ original_tell = image.tell() image.seek(0) image_data = image.read() @@ -72,8 +74,7 @@ def query( CloudRecoIncludeTargetData.TOP ), ) -> list[QueryResult]: - """ - Use the Vuforia Web Query API to make an Image Recognition Query. + """Use the Vuforia Web Query API to make an Image Recognition Query. See https://developer.vuforia.com/library/web-api/vuforia-query-web-api diff --git a/src/vws/reports.py b/src/vws/reports.py index 431cfcaa6..85b5d9133 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -12,8 +12,7 @@ @beartype @dataclass(frozen=True) class DatabaseSummaryReport: - """ - A database summary report. + """A database summary report. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. @@ -49,8 +48,7 @@ class TargetStatuses(Enum): @beartype @dataclass(frozen=True) class TargetSummaryReport: - """ - A target summary report. + """A target summary report. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. @@ -70,8 +68,7 @@ class TargetSummaryReport: @beartype(conf=BeartypeConf(is_pep484_tower=True)) @dataclass(frozen=True) class TargetRecord: - """ - A target record. + """A target record. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. @@ -100,8 +97,7 @@ class TargetData: @beartype @dataclass(frozen=True) class QueryResult: - """ - One query match result. + """One query match result. See https://developer.vuforia.com/library/web-api/vuforia-query-web-api. @@ -114,8 +110,7 @@ class QueryResult: @beartype @dataclass(frozen=True) class TargetStatusAndRecord: - """ - The target status and a target record. + """The target status and a target record. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. diff --git a/src/vws/types.py b/src/vws/types.py index 22e912607..269f2e23f 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -1,4 +1,6 @@ -"""Responses for requests to VWS and VWQ.""" +""" +Responses for requests to VWS and VWQ. +""" from dataclasses import dataclass diff --git a/src/vws/vws.py b/src/vws/vws.py index 9e40655d2..492bef5cf 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -53,7 +53,9 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """Get the data of an image file.""" + """ + Get the data of an image file. + """ original_tell = image.tell() image.seek(0) image_data = image.read() @@ -72,8 +74,7 @@ def _target_api_request( request_path: str, base_vws_url: str, ) -> Response: - """ - Make a request to the Vuforia Target API. + """Make a request to the Vuforia Target API. This uses `requests` to make a request against https://vws.vuforia.com. @@ -160,8 +161,7 @@ def make_request( expected_result_code: str, content_type: str, ) -> Response: - """ - Make a request to the Vuforia Target API. + """Make a request to the Vuforia Target API. This uses `requests` to make a request against Vuforia. @@ -251,8 +251,7 @@ def add_target( *, active_flag: bool, ) -> str: - """ - Add a target to a Vuforia Web Services database. + """Add a target to a Vuforia Web Services database. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#add @@ -326,8 +325,8 @@ def add_target( return str(json.loads(s=response.text)["target_id"]) def get_target_record(self, target_id: str) -> TargetStatusAndRecord: - """ - Get a given target's target record from the Target Management System. + """Get a given target's target record from the Target Management + System. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. @@ -383,8 +382,7 @@ def wait_for_target_processed( seconds_between_requests: float = 0.2, timeout_seconds: float = 60 * 5, ) -> None: - """ - Wait up to five minutes (arbitrary) for a target to get past the + """Wait up to five minutes (arbitrary) for a target to get past the processing stage. Args: @@ -428,8 +426,7 @@ def wait_for_target_processed( time.sleep(seconds_between_requests) def list_targets(self) -> list[str]: - """ - List target IDs. + """List target IDs. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#details-list. @@ -461,8 +458,7 @@ def list_targets(self) -> list[str]: return list(json.loads(s=response.text)["results"]) def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: - """ - Get a summary report for a target. + """Get a summary report for a target. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. @@ -510,8 +506,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: ) def get_database_summary_report(self) -> DatabaseSummaryReport: - """ - Get a summary report for the database. + """Get a summary report for the database. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. @@ -557,8 +552,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: ) def delete_target(self, target_id: str) -> None: - """ - Delete a given target. + """Delete a given target. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#delete. @@ -592,8 +586,7 @@ def delete_target(self, target_id: str) -> None: ) def get_duplicate_targets(self, target_id: str) -> list[str]: - """ - Get targets which may be considered duplicates of a given target. + """Get targets which may be considered duplicates of a given target. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#check. @@ -641,8 +634,7 @@ def update_target( active_flag: bool | None = None, application_metadata: str | None = None, ) -> None: - """ - Update a target in a Vuforia Web Services database. + """Update a target in a Vuforia Web Services database. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#update diff --git a/tests/__init__.py b/tests/__init__.py index 3502d86d5..c7e38a862 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1,3 @@ -"""Tests for ``vws``.""" +""" +Tests for ``vws``. +""" diff --git a/tests/conftest.py b/tests/conftest.py index ed50f2e7b..74c6fc56d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -54,7 +54,9 @@ def fixture_image_file( tmp_path: Path, request: pytest.FixtureRequest, ) -> Generator[BinaryIO]: - """An image file object.""" + """ + An image file object. + """ file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() file.write_bytes(data=buffer) @@ -69,7 +71,9 @@ def image( high_quality_image: io.BytesIO, image_file: BinaryIO, ) -> io.BytesIO | BinaryIO: - """An image in any of the types that the API accepts.""" + """ + An image in any of the types that the API accepts. + """ if request.param == "high_quality_image": return high_quality_image return image_file diff --git a/tests/test_vws.py b/tests/test_vws.py index 42fdee45a..500320c0a 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -80,8 +80,7 @@ def test_add_two_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - No exception is raised when adding two targets with different names. + """No exception is raised when adding two targets with different names. This demonstrates that the image seek position is not changed. """ diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 0c9de2d29..8f422615d 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -139,8 +139,8 @@ def test_target_name_exist( high_quality_image: io.BytesIO, ) -> None: """ - A ``TargetNameExist`` exception is raised after adding two targets with - the same name. + A ``TargetNameExist`` exception is raised after adding two targets with the + same name. """ vws_client.add_target( name="x", @@ -166,8 +166,8 @@ def test_project_inactive( high_quality_image: io.BytesIO, ) -> None: """ - A ``ProjectInactive`` exception is raised if adding a target to an - inactive database. + A ``ProjectInactive`` exception is raised if adding a target to an inactive + database. """ database = VuforiaDatabase(state=States.PROJECT_INACTIVE) with MockVWS() as mock: From 590a61bb8c1b4f0c44dbf84c9bdd56ad7f1a0002 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 13:06:44 +0100 Subject: [PATCH 466/641] Do not run docformatter on pre-commit.ci --- .pre-commit-config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ddcbc74cc..7c9012062 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,7 @@ ci: - check-manifest - deptry - doc8 + - docformatter - docs - interrogate - interrogate-docs @@ -28,13 +29,13 @@ ci: - ruff-check-fix-docs - ruff-format-fix - ruff-format-fix-docs - - spelling - - vulture - - vulture-docs - shellcheck - shellcheck-docs - shfmt - shfmt-docs + - spelling + - vulture + - vulture-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: From 4cb28c0a6540df059dd9ed2d289f59264ad9f090 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:10:06 +0000 Subject: [PATCH 467/641] [pre-commit.ci lite] apply automatic fixes --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2074d8655..2ea1e6aa7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,9 +86,9 @@ jobs: uv build --sdist --wheel --out-dir dist/ uv run --extra=release check-wheel-contents dist/*.whl - # We use PyPI trusted publishing rather than a PyPI API token. - # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. - name: Publish distribution 📦 to PyPI + # We use PyPI trusted publishing rather than a PyPI API token. + # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. uses: pypa/gh-action-pypi-publish@release/v1 with: verbose: true From 6a9c7f0bde39421d2cd36eec52dab2049caa67f6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 09:11:51 +0100 Subject: [PATCH 468/641] Run docformatter in place --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c9012062..d774662ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -87,7 +87,7 @@ repos: - id: docformatter name: docformatter - entry: uv run --extra=dev -m docformatter + entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] additional_dependencies: ["uv"] diff --git a/pyproject.toml b/pyproject.toml index 06e8c93b0..801d197b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,6 +265,8 @@ make-summary-multi-line = true [tool.check-manifest] ignore = [ + ".checkmake-config.ini", + ".yamlfmt", "*.enc", ".pre-commit-config.yaml", "readthedocs.yaml", From 522efd9611e6eaf38941d140f2828e5234c8cfa5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:24:12 +0000 Subject: [PATCH 469/641] Bump pre-commit from 4.0.0 to 4.0.1 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.0.0...v4.0.1) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 801d197b0..1eae0bf50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy==1.11.2", - "pre-commit==4.0.0", + "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.18.0", From da5af35f35c27ac1e2c9e194e033cc86b3225e1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:29:30 +0000 Subject: [PATCH 470/641] Bump check-manifest from 0.49 to 0.50 Bumps [check-manifest](https://github.com/mgedmin/check-manifest) from 0.49 to 0.50. - [Changelog](https://github.com/mgedmin/check-manifest/blob/master/CHANGES.rst) - [Commits](https://github.com/mgedmin/check-manifest/compare/0.49...0.50) --- updated-dependencies: - dependency-name: check-manifest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1eae0bf50..187a88381 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ ] optional-dependencies.dev = [ "actionlint-py==1.7.3.17", - "check-manifest==0.49", + "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", "doccmd==2024.10.8.12", From bf034b3f9c45dd44dc0a4cbc6f9b5563bca150e6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 14:31:36 +0100 Subject: [PATCH 471/641] Specify Windows support in classifiers --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 187a88381..074d754b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", + "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", From b5f707d8c3ed9a95610ed50da3ecadccdc40b093 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 15:37:09 +0100 Subject: [PATCH 472/641] Switch from yamlfmt to yamlfix --- .github/dependabot.yml | 7 ++- .github/workflows/ci.yml | 12 ++-- .github/workflows/dependabot-merge.yml | 2 +- .github/workflows/lint.yml | 8 +-- .github/workflows/release.yml | 15 ++--- .pre-commit-config.yaml | 83 ++++++++++++++------------ pyproject.toml | 5 ++ readthedocs.yaml | 5 +- 8 files changed, 76 insertions(+), 61 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 76027ef36..610da79f8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,13 +1,14 @@ --- version: 2 + updates: - package-ecosystem: pip - directory: "/" + directory: / schedule: interval: daily open-pull-requests-limit: 10 - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: interval: daily open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c36d9c0d..71a07849e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,15 +10,15 @@ on: schedule: # * is a special character in YAML so you have to quote this string # Run at 1:00 every day - - cron: '0 1 * * *' + - cron: 0 1 * * * jobs: build: strategy: matrix: - python-version: ["3.12"] - platform: ["ubuntu-latest", "windows-latest"] + python-version: ['3.12'] + platform: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} @@ -28,14 +28,14 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: "Run tests" + - name: Run tests run: | # We run tests against "." and not the tests directory as we test the README # and documentation. uv run --extra=dev --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - - name: "Upload coverage to Codecov" - uses: "codecov/codecov-action@v4" + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml index 1c75ca282..5238c9f68 100644 --- a/.github/workflows/dependabot-merge.yml +++ b/.github/workflows/dependabot-merge.yml @@ -16,7 +16,7 @@ jobs: id: metadata uses: dependabot/fetch-metadata@v2 with: - github-token: "${{ secrets.GITHUB_TOKEN }}" + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Enable auto-merge for Dependabot PRs run: gh pr merge --auto --merge "$PR_URL" env: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9c52e9b2e..630311fc3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,15 +10,15 @@ on: schedule: # * is a special character in YAML so you have to quote this string # Run at 1:00 every day - - cron: '0 1 * * *' + - cron: 0 1 * * * jobs: build: strategy: matrix: - python-version: ["3.12"] - platform: ["ubuntu-latest", "windows-latest"] + python-version: ['3.12'] + platform: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} @@ -28,7 +28,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: "Lint" + - name: Lint run: | uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ea1e6aa7..8fd8c1ce9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: - python-version: ["3.12"] + python-version: ['3.12'] steps: - uses: actions/checkout@v4 @@ -34,11 +34,11 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: "Calver calculate version" + - name: Calver calculate version uses: StephaneBour/actions-calver@master id: calver with: - date_format: "%Y.%m.%d" + date_format: '%Y.%m.%d' release: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -49,12 +49,13 @@ jobs: underline="$(echo "${{ steps.calver.outputs.release }}" | tr -c '\n' '-')" echo "underline=${underline}" >> "$GITHUB_OUTPUT" - - name: "Update changelog" + - name: Update changelog uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}" - include: "CHANGELOG.rst" + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\ + \ }}" + include: CHANGELOG.rst regex: false - uses: stefanzweifel/git-auto-commit-action@v5 @@ -69,7 +70,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} custom_tag: ${{ steps.calver.outputs.release }} - tag_prefix: "" + tag_prefix: '' commit_sha: ${{ steps.commit.outputs.commit_hash }} - name: Create a GitHub release diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d774662ab..8ff06fc0c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,8 +36,10 @@ ci: - spelling - vulture - vulture-docs + - yamlfix default_install_hook_types: [pre-commit, pre-push, commit-msg] + repos: - repo: meta hooks: @@ -70,11 +72,8 @@ repos: rev: 0.2.2 hooks: - id: checkmake - args: ["--config", ".checkmake-config.ini"] - - repo: https://github.com/google/yamlfmt - rev: v0.13.0 - hooks: - - id: yamlfmt + args: [--config, .checkmake-config.ini] + - repo: local hooks: - id: actionlint @@ -83,14 +82,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: shellcheck name: shellcheck @@ -98,28 +97,30 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" + entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck + --shell=bash --exclude=SC1017" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: shfmt-docs name: shfmt-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" + entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt + --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: mypy name: mypy @@ -128,7 +129,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: mypy-docs name: mypy-docs @@ -136,7 +137,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: check-manifest name: check-manifest @@ -144,7 +145,7 @@ repos: entry: uv run --extra=dev -m check_manifest . language: python pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyright name: pyright @@ -153,7 +154,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyright-docs name: pyright-docs @@ -161,7 +162,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: vulture name: vulture @@ -169,14 +170,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyroma name: pyroma @@ -184,14 +185,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pylint name: pylint @@ -199,7 +200,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pylint-docs name: pylint-docs @@ -207,56 +208,57 @@ repos: language: python stages: [manual] types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: ruff-format-fix-docs name: Ruff format docs - entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" + entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff + format" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyproject-fmt-fix name: pyproject-fmt @@ -264,7 +266,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: linkcheck name: linkcheck @@ -273,7 +275,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: spelling name: spelling @@ -282,7 +284,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: docs name: Build Documentation @@ -290,7 +292,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyright-verifytypes name: pyright-verifytypes @@ -299,4 +301,11 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] + + - id: yamlfix + name: pyproject-fmt + entry: uv run --extra=dev yamlfix + language: python + types_or: [yaml] + additional_dependencies: [uv] diff --git a/pyproject.toml b/pyproject.toml index 187a88381..aefcc61cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,7 @@ optional-dependencies.dev = [ "vulture==2.13", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", + "yamlfix==1.17.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.0" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" @@ -384,3 +385,7 @@ ignore_names = [ # Duplicate some of .gitignore exclude = [ ".venv" ] + +[tool.yamlfix] +section_whitelines = 1 +whitelines = 1 diff --git a/readthedocs.yaml b/readthedocs.yaml index 4b8a4eb2b..bdd2bf053 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -4,14 +4,13 @@ version: 2 build: os: ubuntu-24.04 tools: - python: "3.12" + python: '3.12' python: install: - method: pip path: . - extra_requirements: - - dev + extra_requirements: [dev] sphinx: builder: html From c1da067b33c0197311848b1530458bafd210b680 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 15:47:52 +0100 Subject: [PATCH 473/641] Remove checkmake - it is flaky on Windows --- .checkmake-config.ini | 2 -- .pre-commit-config.yaml | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 .checkmake-config.ini diff --git a/.checkmake-config.ini b/.checkmake-config.ini deleted file mode 100644 index f2ac3c91b..000000000 --- a/.checkmake-config.ini +++ /dev/null @@ -1,2 +0,0 @@ -[minphony] -disabled = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ff06fc0c..94dbbfd07 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,11 +68,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - id: rst-backticks - - repo: https://github.com/mrtazz/checkmake.git - rev: 0.2.2 - hooks: - - id: checkmake - args: [--config, .checkmake-config.ini] + - repo: local hooks: From a04341e24d8538f408937965eff577d677249173 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:50:12 +0000 Subject: [PATCH 474/641] [pre-commit.ci lite] apply automatic fixes --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 94dbbfd07..7e7426899 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,6 @@ repos: - id: text-unicode-replacement-char - id: rst-backticks - - repo: local hooks: - id: actionlint From bf6fe462c8e17d6f7571c30dda4ffdd93de273a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:55:12 +0000 Subject: [PATCH 475/641] Bump pyright from 1.1.383 to 1.1.384 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.383 to 1.1.384. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.383...v1.1.384) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aefcc61cb..5c505ece7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.383", + "pyright==1.1.384", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 645d2a3682d3736407b61d03ca73bed430ff8ab8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 15:56:11 +0100 Subject: [PATCH 476/641] Remove yamlfmt config --- .yamlfmt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .yamlfmt diff --git a/.yamlfmt b/.yamlfmt deleted file mode 100644 index fbb6dd434..000000000 --- a/.yamlfmt +++ /dev/null @@ -1,5 +0,0 @@ -formatter: - include_document_start: true - retain_line_breaks_single: true - trim_trailing_whitespace: true - end_of_file_newline: true From dad0faf59ac761179a00e382af24182a9eebdc21 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 22:53:31 +0100 Subject: [PATCH 477/641] Add Windows classifier --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 5c505ece7..11acd2531 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", + "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", From 91a46c92f822a823799e23334bddea14b7f7919a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 10:09:44 +0100 Subject: [PATCH 478/641] Use max supported Python version for explicit pyproject-fmt configuration --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 11acd2531..6311092d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -301,6 +301,7 @@ pep621_dev_dependency_groups = [ [tool.pyproject-fmt] indent = 4 keep_full_version = true +max_supported_python = "3.12" [tool.pytest.ini_options] From 1c5572c1fd3e1c2b482f25599dcfdfde56032742 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:15:38 +0000 Subject: [PATCH 479/641] Bump sphinx from 8.0.2 to 8.1.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.0.2 to 8.1.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.0.2...v8.1.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6311092d3..7f23c7ffd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.0.2", + "sphinx==8.1.0", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", From 807a87855910dffda050130af43a150753d7aace Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:20:22 +0000 Subject: [PATCH 480/641] Bump pyproject-fmt from 2.2.4 to 2.3.0 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.2.4 to 2.3.0. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.2.4...2.3.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f23c7ffd..097ffe582 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.2.4", + "pyproject-fmt==2.3.0", "pyright==1.1.384", "pyroma==4.2", "pytest==8.3.3", From cc684da5da89565721ae44aaf5f9c75ee9649af9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 13:24:39 +0100 Subject: [PATCH 481/641] Remove workaround for CRLF line endings now we tell git to check out with lf --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 097ffe582..35f7cb6fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -343,8 +343,7 @@ ignore_path = [ "./src/*/_setuptools_scm_version.txt", ] -# See https://github.com/PyCQA/doc8/issues/78 -ignore = [ "D004" ] + [tool.vulture] # Ideally we would limit the paths to the source code where we want to ignore names, From 2815ef71af7a4c26c2640c722e45e054e57d42cf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 12:27:05 +0000 Subject: [PATCH 482/641] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 35f7cb6fd..859c191d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -343,8 +343,6 @@ ignore_path = [ "./src/*/_setuptools_scm_version.txt", ] - - [tool.vulture] # Ideally we would limit the paths to the source code where we want to ignore names, # but Vulture does not enable this. From 2bc9f573673e00695536249008f7de3750424536 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 13:39:25 +0100 Subject: [PATCH 483/641] Update git attributes --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index b5c2d0d58..ee0f759ba 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ .git_archival.txt export-subst -*.txt text eol=lf +* text=auto eol=lf From b935b983b4da493d38b1bbb3745766e92f163ad0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 13:59:19 +0100 Subject: [PATCH 484/641] Move shellcheck settings to rc file --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e7426899..685d83135 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,7 +88,7 @@ repos: - id: shellcheck name: shellcheck - entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 + entry: uv run --extra=dev shellcheck --shell=bash language: python pass_filenames: false types_or: [shell] @@ -97,7 +97,7 @@ repos: - id: shellcheck-docs name: shellcheck-docs entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck - --shell=bash --exclude=SC1017" + --shell=bash" language: python types_or: [markdown, rst] additional_dependencies: [uv] From 68cd32fa1ee89aac6b5e6d2c569e7041e71c2d9e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 21:15:39 +0100 Subject: [PATCH 485/641] Bump doccmd --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 859c191d2..4f4413514 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.8.12", + "doccmd==2024.10.11", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 14c89176ba5a3fac78f3718e60a9922049446830 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:23:59 +0000 Subject: [PATCH 486/641] Bump sphinx from 8.1.0 to 8.1.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.1.0 to 8.1.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.1.0...v8.1.1) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4f4413514..0c4bd0c16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.1.0", + "sphinx==8.1.1", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", From 14cb8b8a1f519778e8a6d8c9ed32d519bfc95317 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:37:42 +0000 Subject: [PATCH 487/641] Bump doccmd from 2024.10.11 to 2024.10.12 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.11 to 2024.10.12. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.11...2024.10.12) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0c4bd0c16..83fade1c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.11", + "doccmd==2024.10.12", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 2b2065c751ebcfc66214a4abbd75ae461174218a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Oct 2024 15:58:06 +0100 Subject: [PATCH 488/641] Configure VSCode to run tests in its UI --- .vscode/settings.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 9f41e3120..69abf060e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,10 @@ "editor.defaultFormatter": "charliermarsh.ruff", "editor.formatOnSave": true }, - "esbonio.sphinx.confDir": "" + "esbonio.sphinx.confDir": "", + "python.testing.pytestArgs": [ + "." + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true } From 2cdb39022ea3baa1f91f657e31ab5c66a71348de Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Oct 2024 16:34:49 +0100 Subject: [PATCH 489/641] Add lower bounds to all requirements --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 83fade1c0..cff439de0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,9 +35,9 @@ dynamic = [ ] dependencies = [ "beartype>=0.18.5", - "requests", - "urllib3", - "vws-auth-tools", + "requests>=2.32.3", + "urllib3>=2.2.3", + "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ "actionlint-py==1.7.3.17", From bb103d18d7eaaf258c78f19424bdc681fc27424b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Oct 2024 17:07:41 +0100 Subject: [PATCH 490/641] Move mypy file definitions to pyproject.toml --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 685d83135..2d174ed65 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -120,7 +120,7 @@ repos: - id: mypy name: mypy stages: [pre-push] - entry: uv run --extra=dev -m mypy . + entry: uv run --extra=dev -m mypy language: python types_or: [python, toml] pass_filenames: false diff --git a/pyproject.toml b/pyproject.toml index cff439de0..89061bec7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -320,6 +320,8 @@ exclude_also = [ [tool.mypy] strict = true +files = [ "." ] +exclude = [ "build" ] [tool.pyright] From 7b9bf892452eb78d632252cd7e93d36f6682b446 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Oct 2024 17:48:16 +0100 Subject: [PATCH 491/641] No need to give directory to check-manifest --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2d174ed65..beedacfcc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -137,7 +137,7 @@ repos: - id: check-manifest name: check-manifest stages: [pre-push] - entry: uv run --extra=dev -m check_manifest . + entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false additional_dependencies: [uv] From dc8263655eefbf83ada9406f24f99dddc4469103 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:43:20 +0000 Subject: [PATCH 492/641] Bump pre-commit-ci/lite-action from 1.0.3 to 1.1.0 Bumps [pre-commit-ci/lite-action](https://github.com/pre-commit-ci/lite-action) from 1.0.3 to 1.1.0. - [Release notes](https://github.com/pre-commit-ci/lite-action/releases) - [Commits](https://github.com/pre-commit-ci/lite-action/compare/v1.0.3...v1.1.0) --- updated-dependencies: - dependency-name: pre-commit-ci/lite-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 630311fc3..9e70657b7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,5 +36,5 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - - uses: pre-commit-ci/lite-action@v1.0.3 + - uses: pre-commit-ci/lite-action@v1.1.0 if: always() From 4fd84ff4badd1a4c96693a09acdc87eea5b76621 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:58:13 +0000 Subject: [PATCH 493/641] Bump doccmd from 2024.10.12 to 2024.10.13.1 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.12 to 2024.10.13.1. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.12...2024.10.13.1) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 89061bec7..d1f29501a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.12", + "doccmd==2024.10.13.1", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 13198d45ddabd6e52a9d17aea65fb10d188d8b80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:58:21 +0000 Subject: [PATCH 494/641] Bump sphinx from 8.1.1 to 8.1.3 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.1.1 to 8.1.3. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.1.1...v8.1.3) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 89061bec7..1dc192d0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.1.1", + "sphinx==8.1.3", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", From ff4deced2935ddff9d6a119c77d4c1e500e0f886 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 15 Oct 2024 10:56:24 +0100 Subject: [PATCH 495/641] Fix the version in Sphinx to be the last released version --- docs/source/conf.py | 6 ++++-- pyproject.toml | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 0fa6f6f69..da1b8193b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -36,8 +36,10 @@ # Use ``importlib.metadata.version`` as per # https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx version = importlib.metadata.version(distribution_name=project) -_month, _day, _year, *_ = version.split(".") -release = f"{_month}.{_day}.{_year}" +# This method of getting the release from the version goes hand in hand with +# the ``post-release`` versioning scheme chosen in the ``setuptools-scm`` +# configuration. +release = version.split(".post")[0] project_metadata = importlib.metadata.metadata(distribution_name=project) diff --git a/pyproject.toml b/pyproject.toml index 133dc39af..7bfac91d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,13 @@ universal = true [tool.setuptools_scm] +# This keeps the start of the version the same as the last release. +# This is useful for our documentation to include e.g. binary links +# to the latest released binary. +# +# Code to match this is in ``conf.py``. +version_scheme = "post-release" + [tool.ruff] line-length = 79 From 5d33d0fc9ecfa38090d2fec259f25f167bdf6dce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:26:23 +0000 Subject: [PATCH 496/641] Bump mypy from 1.11.2 to 1.12.0 Bumps [mypy](https://github.com/python/mypy) from 1.11.2 to 1.12.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11.2...v1.12.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7bfac91d8..62bc754b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy==1.11.2", + "mypy==1.12.0", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From dd59c3d91f33810452b92c8bbff00b29ea752a6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:26:30 +0000 Subject: [PATCH 497/641] Bump pyproject-fmt from 2.3.0 to 2.3.1 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.3.0...2.3.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7bfac91d8..8806a6e66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.3.0", + "pyproject-fmt==2.3.1", "pyright==1.1.384", "pyroma==4.2", "pytest==8.3.3", From f07f73ac88655e902e5641751852f411d318707f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:26:41 +0000 Subject: [PATCH 498/641] Bump doccmd from 2024.10.13.1 to 2024.10.14.2 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.13.1 to 2024.10.14.2. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.13.1...2024.10.14.2) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7bfac91d8..dfe4c79dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.13.1", + "doccmd==2024.10.14.2", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 2cd5a89085f1ab1b0972f66fb04e095a9bf2871c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:23:16 +0000 Subject: [PATCH 499/641] Bump types-requests from 2.32.0.20240914 to 2.32.0.20241016 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240914 to 2.32.0.20241016. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5da09aeb5..e5bc87b45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==8.0.0", - "types-requests==2.32.0.20240914", + "types-requests==2.32.0.20241016", "vulture==2.13", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", From dc74630c01e7dc7ec6fc57905e569951105df3ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:23:24 +0000 Subject: [PATCH 500/641] Bump pyright from 1.1.384 to 1.1.385 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.384 to 1.1.385. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.384...v1.1.385) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5da09aeb5..52d907df4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.3.1", - "pyright==1.1.384", + "pyright==1.1.385", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From ce8962edd5c77071d07cadda6e54f4ddd61f3448 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:36:17 +0000 Subject: [PATCH 501/641] Bump pyproject-fmt from 2.3.1 to 2.4.2 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.3.1 to 2.4.2. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/commits/pyproject-fmt/2.4.2) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 519eaefc0..ef9fd64dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.3.1", + "pyproject-fmt==2.4.2", "pyright==1.1.385", "pyroma==4.2", "pytest==8.3.3", From 2509610c91acdc8670d240430adcbe41c9fb60cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:46:33 +0000 Subject: [PATCH 502/641] Bump sphinx-substitution-extensions from 2024.8.6 to 2024.10.17 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2024.8.6 to 2024.10.17. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2024.08.06...2024.10.17) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef9fd64dd..5cbd0e67c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ optional-dependencies.dev = [ "shfmt-py==3.7.0.1", "sphinx==8.1.3", "sphinx-copybutton==0.5.2", - "sphinx-substitution-extensions==2024.8.6", + "sphinx-substitution-extensions==2024.10.17", "sphinxcontrib-spelling==8", "sybil==8.0.0", "types-requests==2.32.0.20241016", From 9c43fd596543e6a10c944839f7d9655c504c9fdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:46:53 +0000 Subject: [PATCH 503/641] Bump ruff from 0.6.9 to 0.7.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.9 to 0.7.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.9...0.7.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef9fd64dd..8a572334a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.9", + "ruff==0.7.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 8a4cc589e17ed655267a314d781fb7c08cc58709 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:46:58 +0000 Subject: [PATCH 504/641] Bump pyproject-fmt from 2.4.2 to 2.4.3 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.4.2 to 2.4.3. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.4.2...pyproject-fmt/2.4.3) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef9fd64dd..751bf3d06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.4.2", + "pyproject-fmt==2.4.3", "pyright==1.1.385", "pyroma==4.2", "pytest==8.3.3", From f1abe8355a2b0dcede791e32ba3719ca5ab2d01b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 20 Oct 2024 11:00:38 +0200 Subject: [PATCH 505/641] Fix the name of the yamlfix pre-commit hook --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index beedacfcc..77643a13e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -299,7 +299,7 @@ repos: additional_dependencies: [uv] - id: yamlfix - name: pyproject-fmt + name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] From 075cc5a7b0b82957c58f1ae5a10924c327d4975d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:59:45 +0000 Subject: [PATCH 506/641] Bump doccmd from 2024.10.14.2 to 2024.10.18 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.14.2 to 2024.10.18. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.14.2...2024.10.18) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e9fdc41f0..7af4baf7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.14.2", + "doccmd==2024.10.18", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From f0af2c3e981bcda770435fee34ac3d1e246e1f0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:59:56 +0000 Subject: [PATCH 507/641] Bump mypy from 1.12.0 to 1.12.1 Bumps [mypy](https://github.com/python/mypy) from 1.12.0 to 1.12.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.12.0...v1.12.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e9fdc41f0..454abbc44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy==1.12.0", + "mypy==1.12.1", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From e8083dd412058de0c87a66e5d6ab5c272b8f0d90 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 21 Oct 2024 23:09:22 +0100 Subject: [PATCH 508/641] Pin uv for pre-commit hook --- .pre-commit-config.yaml | 60 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 77643a13e..0812bf573 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -77,14 +77,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: shellcheck name: shellcheck @@ -92,7 +92,7 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: shellcheck-docs name: shellcheck-docs @@ -100,14 +100,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: shfmt-docs name: shfmt-docs @@ -115,7 +115,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: mypy name: mypy @@ -124,7 +124,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: mypy-docs name: mypy-docs @@ -132,7 +132,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst, python, toml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: check-manifest name: check-manifest @@ -140,7 +140,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyright name: pyright @@ -149,7 +149,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyright-docs name: pyright-docs @@ -157,7 +157,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst, python, toml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: vulture name: vulture @@ -165,14 +165,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyroma name: pyroma @@ -180,14 +180,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pylint name: pylint @@ -195,7 +195,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pylint-docs name: pylint-docs @@ -203,28 +203,28 @@ repos: language: python stages: [manual] types_or: [markdown, rst, python, toml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: ruff-format-fix-docs name: Ruff format docs @@ -232,28 +232,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyproject-fmt-fix name: pyproject-fmt @@ -261,7 +261,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: linkcheck name: linkcheck @@ -270,7 +270,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: spelling name: spelling @@ -279,7 +279,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: docs name: Build Documentation @@ -287,7 +287,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyright-verifytypes name: pyright-verifytypes @@ -296,11 +296,11 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] From 407d9ecc1f0b70b5bf4c529ebe9df957bd3962d9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 23 Oct 2024 07:57:24 +0100 Subject: [PATCH 509/641] Remove unnecessary build dependency - pip --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 553586bff..ec7ab4e74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,6 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "pip", "setuptools", "setuptools-scm[toml]>=7.1", "wheel", From e593d7ae219cfdf85179b3ae5d18b47dbe3f1ccb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 23 Oct 2024 08:36:21 +0100 Subject: [PATCH 510/641] Use faster mypy cache --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ec7ab4e74..615d3f72a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy==1.12.1", + "mypy[faster-cache]==1.13.0", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From afeaa00ad4f55be98e2c418188e5e6337f67be9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:54:47 +0000 Subject: [PATCH 511/641] Bump pyright from 1.1.385 to 1.1.386 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.385 to 1.1.386. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.385...v1.1.386) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 615d3f72a..a9a05c103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.4.3", - "pyright==1.1.385", + "pyright==1.1.386", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 2ec44c07ce746abf172314d9afca7c837e0b198a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:17:06 +0000 Subject: [PATCH 512/641] Bump ruff from 0.7.0 to 0.7.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.0 to 0.7.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.0...0.7.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a9a05c103..80d64af0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.7.0", + "ruff==0.7.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 2aa33f520fb7e3de6144a773a932d1731f430cdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:25:18 +0000 Subject: [PATCH 513/641] Bump pytest-cov from 5.0.0 to 6.0.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 5.0.0 to 6.0.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v5.0.0...v6.0.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 80d64af0f..0ca2be15e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pyright==1.1.386", "pyroma==4.2", "pytest==8.3.3", - "pytest-cov==5.0.0", + "pytest-cov==6.0.0", "pyyaml==6.0.2", "ruff==0.7.1", # We add shellcheck-py not only for shell scripts and shell code blocks, From 96e8221a17383cbebaad402b70b4bbb898e71245 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:25:36 +0000 Subject: [PATCH 514/641] Bump pyright from 1.1.386 to 1.1.387 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.386 to 1.1.387. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.386...v1.1.387) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 80d64af0f..69b992507 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.4.3", - "pyright==1.1.386", + "pyright==1.1.387", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 980ff1d2402218532a644b6a5a00cdeab4e57d86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:44:27 +0000 Subject: [PATCH 515/641] Bump pyproject-fmt from 2.4.3 to 2.5.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.4.3 to 2.5.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.4.3...pyproject-fmt/2.5.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2424d52f4..4275ca7b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.4.3", + "pyproject-fmt==2.5.0", "pyright==1.1.387", "pyroma==4.2", "pytest==8.3.3", From de9ab9c39e10ae51a9e280e10d00e64b96a467db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:44:45 +0000 Subject: [PATCH 516/641] Bump sybil from 8.0.0 to 8.0.1 Bumps [sybil](https://github.com/simplistix/sybil) from 8.0.0 to 8.0.1. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/8.0.0...8.0.1) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2424d52f4..6ad7ab7d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.10.17", "sphinxcontrib-spelling==8", - "sybil==8.0.0", + "sybil==8.0.1", "types-requests==2.32.0.20241016", "vulture==2.13", "vws-python-mock==2024.8.30", From b12077eae7ae2e50ce7346601f5efcd46af58cf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:12:38 +0000 Subject: [PATCH 517/641] Bump ruff from 0.7.1 to 0.7.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.1 to 0.7.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.1...0.7.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad5efe8d8..298a0df4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.7.1", + "ruff==0.7.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 1daef9ab15f2e4a64138073def7097902e8dace0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 4 Nov 2024 16:16:29 +0000 Subject: [PATCH 518/641] Use @unique to ensure and communicate enum uniqueness --- src/vws/include_target_data.py | 3 ++- src/vws/reports.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vws/include_target_data.py b/src/vws/include_target_data.py index e259f654a..37682e08a 100644 --- a/src/vws/include_target_data.py +++ b/src/vws/include_target_data.py @@ -2,12 +2,13 @@ Tools for managing ``CloudRecoService.query``'s ``include_target_data``. """ -from enum import StrEnum, auto +from enum import StrEnum, auto, unique from beartype import beartype @beartype +@unique class CloudRecoIncludeTargetData(StrEnum): """ Options for the ``include_target_data`` parameter of diff --git a/src/vws/reports.py b/src/vws/reports.py index 85b5d9133..f6a77133c 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -4,7 +4,7 @@ import datetime from dataclasses import dataclass -from enum import Enum +from enum import Enum, unique from beartype import BeartypeConf, beartype @@ -33,6 +33,7 @@ class DatabaseSummaryReport: @beartype +@unique class TargetStatuses(Enum): """Constants representing VWS target statuses. From 9739a24ee72fad19fedba0818f93545226e2595f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:18:06 +0000 Subject: [PATCH 519/641] Bump actionlint-py from 1.7.3.17 to 1.7.4.18 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.3.17 to 1.7.4.18. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.3.17...v1.7.4.18) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 298a0df4f..690657ec4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.3.17", + "actionlint-py==1.7.4.18", "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", From 2f618b920c1748a34d6d30137d0b99a67103d334 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 5 Nov 2024 20:13:08 +0000 Subject: [PATCH 520/641] Do not run doccmd against Python or toml files --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0812bf573..1f294554b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -131,7 +131,7 @@ repos: stages: [pre-push] entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python - types_or: [markdown, rst, python, toml] + types_or: [markdown, rst] additional_dependencies: [uv==0.4.25] - id: check-manifest @@ -156,7 +156,7 @@ repos: stages: [pre-push] entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python - types_or: [markdown, rst, python, toml] + types_or: [markdown, rst] additional_dependencies: [uv==0.4.25] - id: vulture @@ -202,7 +202,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pylint" language: python stages: [manual] - types_or: [markdown, rst, python, toml] + types_or: [markdown, rst] additional_dependencies: [uv==0.4.25] - id: ruff-check-fix From 5af1a602dd67a6ebf65debd4369513cf3ddc7943 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:36:52 +0000 Subject: [PATCH 521/641] Bump doccmd from 2024.10.18 to 2024.11.5 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.18 to 2024.11.5. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.18...2024.11.05) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 690657ec4..6c39d3d01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.18", + "doccmd==2024.11.5", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 5e78ef0673387e37b610a12f1b4026676d347d91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:02:21 +0000 Subject: [PATCH 522/641] Bump pyright from 1.1.387 to 1.1.388 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.387 to 1.1.388. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.387...v1.1.388) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c39d3d01..bd1705d9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.387", + "pyright==1.1.388", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==6.0.0", From 2a8852858c4f9b218ce7d1df67b8cc7543f5c02a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:06:42 +0000 Subject: [PATCH 523/641] Bump doccmd from 2024.11.5 to 2024.11.6.1 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.11.5 to 2024.11.6.1. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.11.05...2024.11.06.1) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bd1705d9a..eec897621 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.11.5", + "doccmd==2024.11.6.1", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 9e88c0dd62aa91d30e328cd988b9bf95673e3a96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:16:45 +0000 Subject: [PATCH 524/641] Bump doccmd from 2024.11.6.1 to 2024.11.7 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.11.6.1 to 2024.11.7. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.11.06.1...2024.11.07) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eec897621..c399ae48b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.11.6.1", + "doccmd==2024.11.7", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From a6d114b11d3a11f95a4fe94eb2f06264da8c233a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:17:09 +0000 Subject: [PATCH 525/641] Bump ruff from 0.7.2 to 0.7.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.2 to 0.7.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.2...0.7.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c399ae48b..3aff29e7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.7.2", + "ruff==0.7.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 74bb998ca19f486b24e556b86ab662193363853d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:17:19 +0000 Subject: [PATCH 526/641] Bump deptry from 0.20.0 to 0.21.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.20.0 to 0.21.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.20.0...0.21.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c399ae48b..e9db15c79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.4.18", "check-manifest==0.50", - "deptry==0.20.0", + "deptry==0.21.0", "doc8==1.1.2", "doccmd==2024.11.7", "docformatter==1.7.5", From 9f406c2deea7538e323d3cf039988e326ac00c69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:58:19 +0000 Subject: [PATCH 527/641] Bump sybil from 8.0.1 to 9.0.0 Bumps [sybil](https://github.com/simplistix/sybil) from 8.0.1 to 9.0.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/8.0.1...9.0.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9e8090be7..7004063b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.10.17", "sphinxcontrib-spelling==8", - "sybil==8.0.1", + "sybil==9.0.0", "types-requests==2.32.0.20241016", "vulture==2.13", "vws-python-mock==2024.8.30", From b55458e1edb758d2fd3fcfea657455d55beafe17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:04:35 +0000 Subject: [PATCH 528/641] Bump doccmd from 2024.11.7 to 2024.11.14 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.11.7 to 2024.11.14. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.11.07...2024.11.14) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7004063b0..ad76b0516 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.21.0", "doc8==1.1.2", - "doccmd==2024.11.7", + "doccmd==2024.11.14", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 445526966b2ced8c55671dfd0c8ff6056a6922bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:04:47 +0000 Subject: [PATCH 529/641] Bump pyright from 1.1.388 to 1.1.389 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.388 to 1.1.389. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.388...v1.1.389) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7004063b0..60f545b93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.388", + "pyright==1.1.389", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==6.0.0", From 86f74a13c7c7317b58d6e8d8d6d4c505d96d2708 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:57:05 +0000 Subject: [PATCH 530/641] Bump ruff from 0.7.3 to 0.7.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.3 to 0.7.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.3...0.7.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d385dc6e0..7f533a20d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.7.3", + "ruff==0.7.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From abc954d08269297e30f7daf9a719e8e5375b3ee1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:57:22 +0000 Subject: [PATCH 531/641] Bump deptry from 0.21.0 to 0.21.1 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.21.0 to 0.21.1. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.21.0...0.21.1) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d385dc6e0..e83bb2c7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.4.18", "check-manifest==0.50", - "deptry==0.21.0", + "deptry==0.21.1", "doc8==1.1.2", "doccmd==2024.11.14", "docformatter==1.7.5", From 3c55fb81a5eee8e9ae0372e34c801c0eef99ae64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:26:54 +0000 Subject: [PATCH 532/641] Bump codecov/codecov-action from 4 to 5 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71a07849e..bb73eadda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: uv run --extra=dev --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} From 0576a32161e431dbf7073a44015ecf191a660542 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:34:18 +0000 Subject: [PATCH 533/641] Bump ruff from 0.7.4 to 0.8.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.4 to 0.8.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.4...0.8.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 36cd9d384..3d7623855 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.7.4", + "ruff==0.8.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From fa0addc8db76ca85b4639eca91189b84c2243c70 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 22 Nov 2024 12:46:30 +0000 Subject: [PATCH 534/641] Autofix ruff issue --- src/vws/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vws/__init__.py b/src/vws/__init__.py index 9e4633af8..42788b92d 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -6,6 +6,6 @@ from .vws import VWS __all__ = [ - "CloudRecoService", "VWS", + "CloudRecoService", ] From fdf5a16f77b5a3bb33285173b0729fa4314434da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:00:28 +0000 Subject: [PATCH 535/641] Bump astral-sh/setup-uv from 3 to 4 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 3 to 4. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v3...v4) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb73eadda..35cc026b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 - name: Run tests run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9e70657b7..0a55727a1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 - name: Lint run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8fd8c1ce9..5e6f15e6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: token: ${{ secrets.RELEASE_PAT }} - name: Install uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 - name: Calver calculate version uses: StephaneBour/actions-calver@master From 34b4b9aab0de114073858f0359f521e8ae9c9064 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:30:19 +0000 Subject: [PATCH 536/641] Bump actionlint-py from 1.7.4.18 to 1.7.4.20 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.4.18 to 1.7.4.20. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.4.18...v1.7.4.20) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3d7623855..2c8142542 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.4.18", + "actionlint-py==1.7.4.20", "check-manifest==0.50", "deptry==0.21.1", "doc8==1.1.2", From 20e0b07a7394b3ff4b69f6360874167a30680ca2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:04:08 +0000 Subject: [PATCH 537/641] Bump ruff from 0.8.0 to 0.8.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.0 to 0.8.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.0...0.8.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2c8142542..d0ee6f44f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.0", + "ruff==0.8.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 370c8a5a66a6753c7ecd299de78839d56bdda1ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:53:21 +0000 Subject: [PATCH 538/641] Bump pytest from 8.3.3 to 8.3.4 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.3 to 8.3.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.3...8.3.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0ee6f44f..b74b6a66e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.5.0", "pyright==1.1.389", "pyroma==4.2", - "pytest==8.3.3", + "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", "ruff==0.8.1", From 1cce0971b880daf4bdf879fadb2244dfc97f3549 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:53:35 +0000 Subject: [PATCH 539/641] Bump pylint from 3.3.1 to 3.3.2 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0ee6f44f..bf0c961b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.18.0", - "pylint==3.3.1", + "pylint==3.3.2", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", "pyright==1.1.389", From b3ff7cc12c2c94fa9e230e4244d7c644da4f4d27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:53:48 +0000 Subject: [PATCH 540/641] Bump check-wheel-contents from 0.6.0 to 0.6.1 Bumps [check-wheel-contents](https://github.com/jwodder/check-wheel-contents) from 0.6.0 to 0.6.1. - [Release notes](https://github.com/jwodder/check-wheel-contents/releases) - [Changelog](https://github.com/jwodder/check-wheel-contents/blob/master/CHANGELOG.md) - [Commits](https://github.com/jwodder/check-wheel-contents/compare/v0.6.0...v0.6.1) --- updated-dependencies: - dependency-name: check-wheel-contents dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0ee6f44f..56ca35d84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,7 +78,7 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] -optional-dependencies.release = [ "check-wheel-contents==0.6.0" ] +optional-dependencies.release = [ "check-wheel-contents==0.6.1" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" urls.Source = "https://github.com/VWS-Python/vws-python" From e74039ad71083e9a470cdb3fe0e52347e83d785f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:28:43 +0000 Subject: [PATCH 541/641] Bump pyright from 1.1.389 to 1.1.390 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.389 to 1.1.390. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.389...v1.1.390) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e0a07199d..ecca88562 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.2", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.389", + "pyright==1.1.390", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From bb992fd87907d12b0deae55e53f7a54c9823e51b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:26:59 +0000 Subject: [PATCH 542/641] Bump ruff from 0.8.1 to 0.8.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.1 to 0.8.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.1...0.8.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ecca88562..edd1c2c55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.1", + "ruff==0.8.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From aeb05ee1cfc608ee9da9ccd954b86064af84badb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:01:10 +0000 Subject: [PATCH 543/641] Bump vulture from 2.13 to 2.14 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.13 to 2.14. - [Release notes](https://github.com/jendrikseipp/vulture/releases) - [Changelog](https://github.com/jendrikseipp/vulture/blob/main/CHANGELOG.md) - [Commits](https://github.com/jendrikseipp/vulture/compare/v2.13...v2.14) --- updated-dependencies: - dependency-name: vulture dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index edd1c2c55..3e2a979d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinxcontrib-spelling==8", "sybil==9.0.0", "types-requests==2.32.0.20241016", - "vulture==2.13", + "vulture==2.14", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", From ed3817c454fc26bbcf0a7b7498cbb604dc82ea32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:59:27 +0000 Subject: [PATCH 544/641] Bump ruff from 0.8.2 to 0.8.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.2 to 0.8.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.2...0.8.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3e2a979d2..6b81fed6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.2", + "ruff==0.8.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From ff43aad37a966384ac97cf9f6f890c94a17b4b93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 10:49:38 +0000 Subject: [PATCH 545/641] Bump pyright from 1.1.390 to 1.1.391 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.390 to 1.1.391. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.390...v1.1.391) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6b81fed6c..52d8d147a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.2", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.390", + "pyright==1.1.391", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From f52e3e4701c2fd4d702250d84bf99581e9404199 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 18 Dec 2024 16:17:28 +0000 Subject: [PATCH 546/641] Update RTD config with new requirements --- readthedocs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/readthedocs.yaml b/readthedocs.yaml index bdd2bf053..8f093abcc 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -14,4 +14,5 @@ python: sphinx: builder: html + configuration: docs/source/conf.py fail_on_warning: true From f6c4ec183632c1df4730e8c8c00ec969d0902f64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:32:42 +0000 Subject: [PATCH 547/641] Bump deptry from 0.21.1 to 0.21.2 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.21.1 to 0.21.2. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.21.1...0.21.2) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 52d8d147a..3b7b2568a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.4.20", "check-manifest==0.50", - "deptry==0.21.1", + "deptry==0.21.2", "doc8==1.1.2", "doccmd==2024.11.14", "docformatter==1.7.5", From c1532193ffbfdcc6c0e2c4091ebec0b6c8cf7bd9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:33:01 +0000 Subject: [PATCH 548/641] Bump ruff from 0.8.3 to 0.8.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.3 to 0.8.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.3...0.8.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 52d8d147a..7e830040f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.3", + "ruff==0.8.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 0937e2a0f7ec5abe592ac7000fc7d41ef7af5408 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:33:06 +0000 Subject: [PATCH 549/641] Bump sphinxcontrib-spelling from 8 to 8.0.1 Bumps [sphinxcontrib-spelling](https://github.com/sphinx-contrib/spelling) from 8 to 8.0.1. - [Release notes](https://github.com/sphinx-contrib/spelling/releases) - [Commits](https://github.com/sphinx-contrib/spelling/compare/8.0.0...8.0.1) --- updated-dependencies: - dependency-name: sphinxcontrib-spelling dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 52d8d147a..f25340ce1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ optional-dependencies.dev = [ "sphinx==8.1.3", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.10.17", - "sphinxcontrib-spelling==8", + "sphinxcontrib-spelling==8.0.1", "sybil==9.0.0", "types-requests==2.32.0.20241016", "vulture==2.14", From d8ebbab8d077f76a6ecc4179e7ef787223096a49 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Dec 2024 11:48:06 +0000 Subject: [PATCH 550/641] Do not use now-useless toml specifier for setuptools-scm --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 32e9f8f46..4016997ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "setuptools.build_meta" requires = [ "setuptools", - "setuptools-scm[toml]>=7.1", + "setuptools-scm>=8.1.0", "wheel", ] From 6cd662ccaa746c47197b59dff99f7bf4de88669a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 21 Dec 2024 22:50:23 +0000 Subject: [PATCH 551/641] Bump astral-sh/setup-uv from 4 to 5 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 5. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v4...v5) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35cc026b6..a97d1ec58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Run tests run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0a55727a1..2a3910dd7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Lint run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e6f15e6a..14bba54cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: token: ${{ secrets.RELEASE_PAT }} - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Calver calculate version uses: StephaneBour/actions-calver@master From fd30fbd5debf5f819829fcfb67a020a2e318f0a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:14:45 +0000 Subject: [PATCH 552/641] Bump mypy[faster-cache] from 1.13.0 to 1.14.0 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.13.0 to 1.14.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4016997ec..687e6593a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.13.0", + "mypy[faster-cache]==1.14.0", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From f53424b1e183dc3e938fd91407980115b751753f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Dec 2024 12:00:13 +0000 Subject: [PATCH 553/641] Use new follow_untyped_imports mypy setting --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 687e6593a..aa3600e57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -328,6 +328,7 @@ exclude_also = [ strict = true files = [ "." ] exclude = [ "build" ] +follow_untyped_imports = true [tool.pyright] From 05d54c857511795806262026f17bb4b5b114a515 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:14:18 +0000 Subject: [PATCH 554/641] Remove duplicated ruff configuration --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa3600e57..90290dc5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -132,11 +132,6 @@ lint.ignore = [ "S101", ] -lint.per-file-ignores."tests/*.py" = [ - # Do not require tests to have a one-line summary. - "D205", -] - # Do not automatically remove commented out code. # We comment out code during development, and with VSCode auto-save, this code # is sometimes annoyingly removed. From d6d66a410b074f927df04f90ed8962c788648683 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:14:48 +0000 Subject: [PATCH 555/641] Remove unnecessary ruff ignore --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 90290dc5f..99df439da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,8 +114,6 @@ lint.select = [ "ALL", ] lint.ignore = [ - # We are happy to manage our own "complexity". - "C901", # Ruff warns that this conflicts with the formatter. "COM812", # Allow our chosen docstring line-style - no one-line summary. From 539d225043c1750e53413d048bf4df8b3132058a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:15:02 +0000 Subject: [PATCH 556/641] Remove unnecessary ruff ignore --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 99df439da..9a62370da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,7 +120,6 @@ lint.ignore = [ "D200", "D205", "D212", - "D415", # Ruff warns that this conflicts with the formatter. "ISC001", # Ignore "too-many-*" errors as they seem to get in the way more than From 8b5a6897701bf5ec402e415b27609f5d7199dad9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:15:48 +0000 Subject: [PATCH 557/641] Remove unnecessary ruff ignore --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9a62370da..5f5c1db89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,8 +120,6 @@ lint.ignore = [ "D200", "D205", "D212", - # Ruff warns that this conflicts with the formatter. - "ISC001", # Ignore "too-many-*" errors as they seem to get in the way more than # helping. "PLR0913", From b4f25c8dacdbe762958d1c67b6c7fe3d58d2d4a1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:18:47 +0000 Subject: [PATCH 558/641] Only allow assert in tests --- docs/source/conf.py | 6 +++++- pyproject.toml | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index da1b8193b..99ef1ff1c 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -46,7 +46,11 @@ requires_python = project_metadata["Requires-Python"] specifiers = SpecifierSet(specifiers=requires_python) (specifier,) = specifiers -assert specifier.operator == ">=" +if specifier.operator != ">=": + msg = ( + f"We only support '>=' for Requires-Python, got {specifier.operator}." + ) + raise ValueError(msg) minimum_python_version = specifier.version language = "en" diff --git a/pyproject.toml b/pyproject.toml index 5f5c1db89..ae5990b27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,7 +123,10 @@ lint.ignore = [ # Ignore "too-many-*" errors as they seem to get in the way more than # helping. "PLR0913", - # Allow 'assert' as we use it for tests. +] + +lint.per-file-ignores."tests/*.py" = [ + # Do not require tests to have a one-line summary. "S101", ] From 4e1d021c82a6adf8dc8887687a5e7bf5a935f2f1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:20:05 +0000 Subject: [PATCH 559/641] Put back conflict ignore --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index ae5990b27..75c51e73e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,6 +120,8 @@ lint.ignore = [ "D200", "D205", "D212", + # Ruff warns that this conflicts with the formatter. + "ISC001", # Ignore "too-many-*" errors as they seem to get in the way more than # helping. "PLR0913", From 16bc9a915c058a8bb4a2c83ca96e553f11fd7d4d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:35:15 +0000 Subject: [PATCH 560/641] Allow asserts in docs --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 75c51e73e..cb6b2568c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,8 +127,13 @@ lint.ignore = [ "PLR0913", ] +lint.per-file-ignores."docs/source/*.py" = [ + # Allow asserts in docs. + "S101", +] + lint.per-file-ignores."tests/*.py" = [ - # Do not require tests to have a one-line summary. + # Allow asserts in tests. "S101", ] From 1df656fc3ee2d8ed0f7de88eae3b44e21b37e8e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:41:22 +0000 Subject: [PATCH 561/641] Bump pylint from 3.3.2 to 3.3.3 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.2 to 3.3.3. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.2...v3.3.3) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aa3600e57..549871ba9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.18.0", - "pylint==3.3.2", + "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", "pyright==1.1.391", From 21318569f938c843a1058a6dfd18ef4ff9bb97bd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 11:56:53 +0000 Subject: [PATCH 562/641] Allow asserts in README --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index cb6b2568c..161471daa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,6 +127,11 @@ lint.ignore = [ "PLR0913", ] +lint.per-file-ignores."doccmd_*.py" = [ + # Allow asserts in docs. + "S101", +] + lint.per-file-ignores."docs/source/*.py" = [ # Allow asserts in docs. "S101", From c88618247a7462144d33d3e5b608f584cdf83e35 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 23:13:32 +0000 Subject: [PATCH 563/641] Use new mypy plugin for strict kwargs --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index eb9b6e3e1..6db511fff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.14.0", + "mypy-strict-kwargs==2024.12.24", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", @@ -334,6 +335,9 @@ strict = true files = [ "." ] exclude = [ "build" ] follow_untyped_imports = true +plugins = [ + "mypy_strict_kwargs", +] [tool.pyright] From b9f8f7cc2204b09d4ae04c085f7c433813424395 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 23:19:11 +0000 Subject: [PATCH 564/641] Use one more kwarg --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 99ef1ff1c..3255877d6 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -39,7 +39,7 @@ # This method of getting the release from the version goes hand in hand with # the ``post-release`` versioning scheme chosen in the ``setuptools-scm`` # configuration. -release = version.split(".post")[0] +release = version.split(sep=".post")[0] project_metadata = importlib.metadata.metadata(distribution_name=project) From b1adac283828212f3681713592745a88940dbb6c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 23:25:59 +0000 Subject: [PATCH 565/641] Use keyword args all over --- src/vws/exceptions/vws_exceptions.py | 2 +- src/vws/vws.py | 2 +- tests/test_cloud_reco_exceptions.py | 12 ++++++----- tests/test_vws.py | 13 ++++++++---- tests/test_vws_exceptions.py | 30 ++++++++++++++++------------ 5 files changed, 35 insertions(+), 24 deletions(-) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index b0e3dcbda..482223766 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -154,7 +154,7 @@ def target_name(self) -> str: """ response_body = self.response.request_body or b"" request_json = json.loads(s=response_body) - return str(request_json["name"]) + return str(object=request_json["name"]) @beartype diff --git a/src/vws/vws.py b/src/vws/vws.py index 492bef5cf..f101a7ecc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -322,7 +322,7 @@ def add_target( content_type="application/json", ) - return str(json.loads(s=response.text)["target_id"]) + return str(object=json.loads(s=response.text)["target_id"]) def get_target_record(self, target_id: str) -> TargetStatusAndRecord: """Get a given target's target record from the Target Management diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index d33da8e72..3515b0d22 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -33,7 +33,7 @@ def test_too_many_max_results( A ``MaxNumResultsOutOfRange`` error is raised if the given ``max_num_results`` is out of range. """ - with pytest.raises(MaxNumResultsOutOfRangeError) as exc: + with pytest.raises(expected_exception=MaxNumResultsOutOfRangeError) as exc: cloud_reco_client.query( image=high_quality_image, max_num_results=51, @@ -43,7 +43,7 @@ def test_too_many_max_results( "Integer out of range (51) in form data part 'max_result'. " "Accepted range is from 1 to 50 (inclusive)." ) - assert str(exc.value) == exc.value.response.text == expected_value + assert str(object=exc.value) == exc.value.response.text == expected_value def test_image_too_large( @@ -54,7 +54,7 @@ def test_image_too_large( A ``RequestEntityTooLarge`` exception is raised if an image which is too large is given. """ - with pytest.raises(RequestEntityTooLargeError) as exc: + with pytest.raises(expected_exception=RequestEntityTooLargeError) as exc: cloud_reco_client.query(image=png_too_large) assert ( @@ -92,7 +92,9 @@ def test_authentication_failure( with MockVWS() as mock: mock.add_database(database=database) - with pytest.raises(AuthenticationFailureError) as exc: + with pytest.raises( + expected_exception=AuthenticationFailureError + ) as exc: cloud_reco_client.query(image=high_quality_image) assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED @@ -113,7 +115,7 @@ def test_inactive_project( client_secret_key=database.client_secret_key, ) - with pytest.raises(InactiveProjectError) as exc: + with pytest.raises(expected_exception=InactiveProjectError) as exc: cloud_reco_client.query(image=high_quality_image) response = exc.value.response diff --git a/tests/test_vws.py b/tests/test_vws.py index 500320c0a..e16eff555 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -30,8 +30,11 @@ class TestAddTarget: """ @staticmethod - @pytest.mark.parametrize("application_metadata", [None, b"a"]) - @pytest.mark.parametrize("active_flag", [True, False]) + @pytest.mark.parametrize( + argnames="application_metadata", + argvalues=[None, b"a"], + ) + @pytest.mark.parametrize(argnames="active_flag", argvalues=[True, False]) def test_add_target( vws_client: VWS, image: io.BytesIO | BinaryIO, @@ -211,7 +214,7 @@ def test_get_target_summary_report( status=TargetStatuses.SUCCESS, database_name=report.database_name, target_name=target_name, - upload_date=datetime.date(2018, 4, 25), + upload_date=datetime.date(year=2018, month=4, day=25), active_flag=True, tracking_rating=report.tracking_rating, total_recos=0, @@ -511,7 +514,9 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: report = vws_client.get_target_summary_report(target_id=target_id) assert report.status == TargetStatuses.PROCESSING - with pytest.raises(TargetProcessingTimeoutError): + with pytest.raises( + expected_exception=TargetProcessingTimeoutError + ): vws_client.wait_for_target_processed( target_id=target_id, timeout_seconds=0.1, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 8f422615d..f9a7b8dab 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -45,7 +45,7 @@ def test_image_too_large( When giving an image which is too large, an ``ImageTooLarge`` exception is raised. """ - with pytest.raises(ImageTooLargeError) as exc: + with pytest.raises(expected_exception=ImageTooLargeError) as exc: vws_client.add_target( name="x", width=1, @@ -63,7 +63,7 @@ def test_invalid_given_id(vws_client: VWS) -> None: causes an ``UnknownTarget`` exception to be raised. """ target_id = "12345abc" - with pytest.raises(UnknownTargetError) as exc: + with pytest.raises(expected_exception=UnknownTargetError) as exc: vws_client.delete_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.NOT_FOUND assert exc.value.target_id == target_id @@ -76,7 +76,9 @@ def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ max_char_value = 65535 bad_name = chr(max_char_value + 1) - with pytest.raises(OopsAnErrorOccurredPossiblyBadNameError) as exc: + with pytest.raises( + expected_exception=OopsAnErrorOccurredPossiblyBadNameError + ) as exc: vws_client.add_target( name=bad_name, width=1, @@ -105,7 +107,7 @@ def test_fail(high_quality_image: io.BytesIO) -> None: server_secret_key=uuid.uuid4().hex, ) - with pytest.raises(FailError) as exc: + with pytest.raises(expected_exception=FailError) as exc: vws_client.add_target( name="x", width=1, @@ -122,7 +124,7 @@ def test_bad_image(vws_client: VWS) -> None: A ``BadImage`` exception is raised when a non-image is given. """ not_an_image = io.BytesIO(initial_bytes=b"Not an image") - with pytest.raises(BadImageError) as exc: + with pytest.raises(expected_exception=BadImageError) as exc: vws_client.add_target( name="x", width=1, @@ -149,7 +151,7 @@ def test_target_name_exist( active_flag=True, application_metadata=None, ) - with pytest.raises(TargetNameExistError) as exc: + with pytest.raises(expected_exception=TargetNameExistError) as exc: vws_client.add_target( name="x", width=1, @@ -177,7 +179,7 @@ def test_project_inactive( server_secret_key=database.server_secret_key, ) - with pytest.raises(ProjectInactiveError) as exc: + with pytest.raises(expected_exception=ProjectInactiveError) as exc: vws_client.add_target( name="x", width=1, @@ -205,7 +207,7 @@ def test_target_status_processing( application_metadata=None, ) - with pytest.raises(TargetStatusProcessingError) as exc: + with pytest.raises(expected_exception=TargetStatusProcessingError) as exc: vws_client.delete_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN @@ -220,7 +222,7 @@ def test_metadata_too_large( A ``MetadataTooLarge`` exception is raised if the metadata given is too large. """ - with pytest.raises(MetadataTooLargeError) as exc: + with pytest.raises(expected_exception=MetadataTooLargeError) as exc: vws_client.add_target( name="x", width=1, @@ -260,7 +262,7 @@ def test_request_time_too_skewed( # >= 1 ticks are acceptable. with ( freeze_time(auto_tick_seconds=time_difference_from_now), - pytest.raises(RequestTimeTooSkewedError) as exc, + pytest.raises(expected_exception=RequestTimeTooSkewedError) as exc, ): vws_client.get_target_record(target_id=target_id) @@ -285,7 +287,9 @@ def test_authentication_failure( with MockVWS() as mock: mock.add_database(database=database) - with pytest.raises(AuthenticationFailureError) as exc: + with pytest.raises( + expected_exception=AuthenticationFailureError + ) as exc: vws_client.add_target( name="x", width=1, @@ -313,7 +317,7 @@ def test_target_status_not_success( application_metadata=None, ) - with pytest.raises(TargetStatusNotSuccessError) as exc: + with pytest.raises(expected_exception=TargetStatusNotSuccessError) as exc: vws_client.update_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN @@ -353,7 +357,7 @@ def test_base_exception( """ ``VWSException``s has a response property. """ - with pytest.raises(VWSError) as exc: + with pytest.raises(expected_exception=VWSError) as exc: vws_client.get_target_record(target_id="a") assert exc.value.response.status_code == HTTPStatus.NOT_FOUND From ad0795cf48d84f8ee6cf533963bc4510aaf92d1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2024 10:20:18 +0000 Subject: [PATCH 566/641] Bump mypy-strict-kwargs from 2024.12.24 to 2024.12.25 Bumps [mypy-strict-kwargs](https://github.com/adamtheturtle/mypy-strict-kwargs) from 2024.12.24 to 2024.12.25. - [Release notes](https://github.com/adamtheturtle/mypy-strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/mypy-strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/mypy-strict-kwargs/compare/2024.12.24...2024.12.25) --- updated-dependencies: - dependency-name: mypy-strict-kwargs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6db511fff..726dbd4ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.14.0", - "mypy-strict-kwargs==2024.12.24", + "mypy-strict-kwargs==2024.12.25", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From 64607a2fa7dfdd670e8f4399eb5c5592bd2356ba Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 26 Dec 2024 07:01:41 +0000 Subject: [PATCH 567/641] Disable type ignore comments for pyright --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 726dbd4ca..6ee5eec29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -341,6 +341,7 @@ plugins = [ [tool.pyright] +enableTypeIgnoreComments = false reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" From 8f2631e60c3a9c8547898f2cd85a3acd4f2127cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 10:59:42 +0000 Subject: [PATCH 568/641] Bump doccmd from 2024.11.14 to 2024.12.26 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.11.14 to 2024.12.26. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.11.14...2024.12.26) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6ee5eec29..3c82dd032 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.21.2", "doc8==1.1.2", - "doccmd==2024.11.14", + "doccmd==2024.12.26", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From b641d7e40e2ecfd700eebb168a4fd99624a245cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:54:02 +0000 Subject: [PATCH 569/641] Bump actionlint-py from 1.7.4.20 to 1.7.5.21 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.4.20 to 1.7.5.21. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.4.20...v1.7.5.21) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c82dd032..5bf392282 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.4.20", + "actionlint-py==1.7.5.21", "check-manifest==0.50", "deptry==0.21.2", "doc8==1.1.2", From d8c738d775ea332b6d1bd19fc32da9b6cfafe512 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 30 Dec 2024 11:03:32 +0000 Subject: [PATCH 570/641] Set release fetch-depth to 0 with a comment why --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14bba54cc..e25f5f32e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,12 @@ jobs: # See # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches token: ${{ secrets.RELEASE_PAT }} + # Fetch all history including tags. + # Needed to find the latest tag. + # + # Also, avoids + # https://github.com/stefanzweifel/git-auto-commit-action/issues/99. + fetch-depth: 0 - name: Install uv uses: astral-sh/setup-uv@v5 From 3e9e239dab2da489e4af0a473d513f3105ebdaec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:14:09 +0000 Subject: [PATCH 571/641] Bump mypy[faster-cache] from 1.14.0 to 1.14.1 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.14.0 to 1.14.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.14.0...v1.14.1) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5bf392282..c0f6a28f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.14.0", + "mypy[faster-cache]==1.14.1", "mypy-strict-kwargs==2024.12.25", "pre-commit==4.0.1", "pydocstyle==6.3", From abac5901fdad9feed0e2c44130d0ca781e41ee2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 10:45:59 +0000 Subject: [PATCH 572/641] Bump sphinx-substitution-extensions from 2024.10.17 to 2025.1.2 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2024.10.17 to 2025.1.2. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2024.10.17...2025.01.02) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c0f6a28f7..8819a5885 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ optional-dependencies.dev = [ "shfmt-py==3.7.0.1", "sphinx==8.1.3", "sphinx-copybutton==0.5.2", - "sphinx-substitution-extensions==2024.10.17", + "sphinx-substitution-extensions==2025.1.2", "sphinxcontrib-spelling==8.0.1", "sybil==9.0.0", "types-requests==2.32.0.20241016", From 2405e89225dc55d38f1f7d70465a275a88e87aa2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 10:31:36 +0000 Subject: [PATCH 573/641] Bump ruff from 0.8.4 to 0.8.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.4 to 0.8.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.4...0.8.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8819a5885..3007e1da3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.4", + "ruff==0.8.5", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 5c309c01e1c4f5e5f0706182acfe3c5a19fe26e0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Jan 2025 10:25:40 +0000 Subject: [PATCH 574/641] Git ignore DS_Store files --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0a4d3ec0c..556e31308 100644 --- a/.gitignore +++ b/.gitignore @@ -98,8 +98,9 @@ secrets.tar # mypy .mypy_cache/ -# macOS attributes -*.DS_Store +# Ignore Mac DS_Store files +.DS_Store +**/.DS_Store # pyre .pyre/ From 7da543de3eeee679b6f114223173afea9bfb2a6e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Jan 2025 12:44:48 +0000 Subject: [PATCH 575/641] Add sphinx-lint --- .pre-commit-config.yaml | 69 +++++++++++++++++++++++------------------ pyproject.toml | 1 + 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f294554b..ea72086b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ ci: # We therefore cannot use those dependencies in pre-commit CI. skip: - actionlint + - sphinx-lint - check-manifest - deptry - doc8 @@ -77,14 +78,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shellcheck name: shellcheck @@ -92,7 +93,7 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shellcheck-docs name: shellcheck-docs @@ -100,14 +101,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shfmt-docs name: shfmt-docs @@ -115,7 +116,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: mypy name: mypy @@ -124,7 +125,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: mypy-docs name: mypy-docs @@ -132,7 +133,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: check-manifest name: check-manifest @@ -140,7 +141,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyright name: pyright @@ -149,7 +150,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyright-docs name: pyright-docs @@ -157,7 +158,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: vulture name: vulture @@ -165,14 +166,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyroma name: pyroma @@ -180,14 +181,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pylint name: pylint @@ -195,7 +196,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pylint-docs name: pylint-docs @@ -203,28 +204,28 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-format-fix-docs name: Ruff format docs @@ -232,28 +233,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyproject-fmt-fix name: pyproject-fmt @@ -261,7 +262,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: linkcheck name: linkcheck @@ -270,7 +271,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: spelling name: spelling @@ -279,7 +280,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: docs name: Build Documentation @@ -287,7 +288,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyright-verifytypes name: pyright-verifytypes @@ -296,11 +297,19 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] + + - id: sphinx-lint + name: sphinx-lint + entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long + *.rst + language: python + types_or: [rst] + additional_dependencies: [uv==0.5.14] diff --git a/pyproject.toml b/pyproject.toml index 3007e1da3..64653715f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,7 @@ optional-dependencies.dev = [ "shfmt-py==3.7.0.1", "sphinx==8.1.3", "sphinx-copybutton==0.5.2", + "sphinx-lint==1.0.0", "sphinx-substitution-extensions==2025.1.2", "sphinxcontrib-spelling==8.0.1", "sybil==9.0.0", From 4cca633998b09d0e411fe6a0dd6b0ef1382e126b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Jan 2025 12:49:23 +0000 Subject: [PATCH 576/641] Add sphinx-lint --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea72086b0..0373a88bb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -309,7 +309,7 @@ repos: - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long - *.rst + README.rst CHANGELOG.rst language: python types_or: [rst] additional_dependencies: [uv==0.5.14] From 83db11de8b240c59aad39de1330307caf28aa399 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Jan 2025 13:01:48 +0000 Subject: [PATCH 577/641] Add sphinx-lint --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0373a88bb..ea4c5ebc2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -309,7 +309,6 @@ repos: - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long - README.rst CHANGELOG.rst language: python types_or: [rst] additional_dependencies: [uv==0.5.14] From c8128785f2b615d12e9fef35970344acd7dff7f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:50:08 +0000 Subject: [PATCH 578/641] Bump ruff from 0.8.5 to 0.8.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.5 to 0.8.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.5...0.8.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64653715f..6bacaed13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.5", + "ruff==0.8.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 0e0cb9272b36cab04f4307a4b9f7a5b2f5e8646e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:50:17 +0000 Subject: [PATCH 579/641] Bump actionlint-py from 1.7.5.21 to 1.7.6.22 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.5.21 to 1.7.6.22. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.5.21...v1.7.6.22) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64653715f..daa0a562d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.5.21", + "actionlint-py==1.7.6.22", "check-manifest==0.50", "deptry==0.21.2", "doc8==1.1.2", From cec8a50c73dd3b18d9e37c65b09222b694bc38f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:50:27 +0000 Subject: [PATCH 580/641] Bump pygments from 2.18.0 to 2.19.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.18.0 to 2.19.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.18.0...2.19.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64653715f..a73ffc731 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", - "pygments==2.18.0", + "pygments==2.19.0", "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", From c5e71b61a5fbf3096cddd18304e473a729cb1a63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 10:25:13 +0000 Subject: [PATCH 581/641] Bump pygments from 2.19.0 to 2.19.1 Bumps [pygments](https://github.com/pygments/pygments) from 2.19.0 to 2.19.1. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.19.0...2.19.1) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1037669a8..7808e35f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", - "pygments==2.19.0", + "pygments==2.19.1", "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", From d1cdad93a0b67da8790e6891a0717f43635d5698 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:37:29 +0000 Subject: [PATCH 582/641] Bump deptry from 0.21.2 to 0.22.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.21.2 to 0.22.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.21.2...0.22.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7808e35f5..6debe88fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.6.22", "check-manifest==0.50", - "deptry==0.21.2", + "deptry==0.22.0", "doc8==1.1.2", "doccmd==2024.12.26", "docformatter==1.7.5", From d1f2c40bbabee195aaa5042f9188232035f74cc7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:37:36 +0000 Subject: [PATCH 583/641] Bump doccmd from 2024.12.26 to 2025.1.11 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.12.26 to 2025.1.11. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.12.26...2025.01.11) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7808e35f5..86ad9ace3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.21.2", "doc8==1.1.2", - "doccmd==2024.12.26", + "doccmd==2025.1.11", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 8ca426106fc6de07929bc7773935e3b33cbb49c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:37:53 +0000 Subject: [PATCH 584/641] Bump ruff from 0.8.6 to 0.9.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.6 to 0.9.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.6...0.9.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7808e35f5..6644e66c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.6", + "ruff==0.9.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e8b9c02a0f7bfe474475a7c28ac6565d0b26cfb7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 13 Jan 2025 19:49:07 +0000 Subject: [PATCH 585/641] Stop shadowing Python builtin "types" --- CHANGELOG.rst | 8 ++------ docs/source/api-reference.rst | 2 +- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/{vws.py => response.py} | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) rename src/vws/{vws.py => response.py} (99%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b18bc5e4f..346066c86 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,16 +4,12 @@ Changelog Next ---- -2024.09.21 ------------- - -2024.09.04.1 ------------- +* Move ``Response`` from ``vws.response`` to ``vws.response``. 2024.09.04 ------------ -* Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. +* Move ``Response`` from ``vws.exceptions.response`` to ``vws.response``. * Add ``raw`` field to ``Response``. 2024.09.03 diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 5b7027550..01bba09b2 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -13,6 +13,6 @@ API Reference :undoc-members: :members: -.. automodule:: vws.types +.. automodule:: vws.response :undoc-members: :members: diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index b0888f93f..943323bfd 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,7 @@ from beartype import beartype -from vws.types import Response +from vws.response import Response @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index f05d59b41..11d47a67a 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from vws.types import Response +from vws.response import Response @beartype diff --git a/src/vws/query.py b/src/vws/query.py index 84144691c..96122aa14 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -27,7 +27,7 @@ ) from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -from vws.types import Response +from vws.response import Response _ImageType = io.BytesIO | BinaryIO diff --git a/src/vws/vws.py b/src/vws/response.py similarity index 99% rename from src/vws/vws.py rename to src/vws/response.py index f101a7ecc..f87766571 100644 --- a/src/vws/vws.py +++ b/src/vws/response.py @@ -46,7 +46,7 @@ TargetStatuses, TargetSummaryReport, ) -from vws.types import Response +from vws.response import Response _ImageType = io.BytesIO | BinaryIO From 91d7fffa311e9e0ea6ec18fb6799c2a5e588dd27 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 13 Jan 2025 19:51:53 +0000 Subject: [PATCH 586/641] Revert "Stop shadowing Python builtin "types"" This reverts commit e8b9c02a0f7bfe474475a7c28ac6565d0b26cfb7. --- CHANGELOG.rst | 8 ++++++-- docs/source/api-reference.rst | 2 +- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/{response.py => vws.py} | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) rename src/vws/{response.py => vws.py} (99%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 346066c86..b18bc5e4f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,12 +4,16 @@ Changelog Next ---- -* Move ``Response`` from ``vws.response`` to ``vws.response``. +2024.09.21 +------------ + +2024.09.04.1 +------------ 2024.09.04 ------------ -* Move ``Response`` from ``vws.exceptions.response`` to ``vws.response``. +* Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. * Add ``raw`` field to ``Response``. 2024.09.03 diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 01bba09b2..5b7027550 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -13,6 +13,6 @@ API Reference :undoc-members: :members: -.. automodule:: vws.response +.. automodule:: vws.types :undoc-members: :members: diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 943323bfd..b0888f93f 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,7 @@ from beartype import beartype -from vws.response import Response +from vws.types import Response @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 11d47a67a..f05d59b41 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from vws.response import Response +from vws.types import Response @beartype diff --git a/src/vws/query.py b/src/vws/query.py index 96122aa14..84144691c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -27,7 +27,7 @@ ) from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -from vws.response import Response +from vws.types import Response _ImageType = io.BytesIO | BinaryIO diff --git a/src/vws/response.py b/src/vws/vws.py similarity index 99% rename from src/vws/response.py rename to src/vws/vws.py index f87766571..f101a7ecc 100644 --- a/src/vws/response.py +++ b/src/vws/vws.py @@ -46,7 +46,7 @@ TargetStatuses, TargetSummaryReport, ) -from vws.response import Response +from vws.types import Response _ImageType = io.BytesIO | BinaryIO From cfa9a065ee95cff51de806d33113612b58cf7769 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 13 Jan 2025 19:52:24 +0000 Subject: [PATCH 587/641] Stop shadowing Python builtin "types" --- docs/source/api-reference.rst | 2 +- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/{types.py => response.py} | 0 src/vws/vws.py | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename src/vws/{types.py => response.py} (100%) diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 5b7027550..01bba09b2 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -13,6 +13,6 @@ API Reference :undoc-members: :members: -.. automodule:: vws.types +.. automodule:: vws.response :undoc-members: :members: diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index b0888f93f..943323bfd 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,7 @@ from beartype import beartype -from vws.types import Response +from vws.response import Response @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index f05d59b41..11d47a67a 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from vws.types import Response +from vws.response import Response @beartype diff --git a/src/vws/query.py b/src/vws/query.py index 84144691c..96122aa14 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -27,7 +27,7 @@ ) from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -from vws.types import Response +from vws.response import Response _ImageType = io.BytesIO | BinaryIO diff --git a/src/vws/types.py b/src/vws/response.py similarity index 100% rename from src/vws/types.py rename to src/vws/response.py diff --git a/src/vws/vws.py b/src/vws/vws.py index f101a7ecc..f87766571 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -46,7 +46,7 @@ TargetStatuses, TargetSummaryReport, ) -from vws.types import Response +from vws.response import Response _ImageType = io.BytesIO | BinaryIO From fa88b5aba6cb2644051f897791580077599246e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:57:17 +0000 Subject: [PATCH 588/641] Bump pyright from 1.1.391 to 1.1.392 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.391 to 1.1.392. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.391...v1.1.392) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 95088de94..1fe83f189 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.391", + "pyright==1.1.392", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From ec09302f088a783c88888bf67a001f78480dcef1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 16 Jan 2025 08:29:31 +0000 Subject: [PATCH 589/641] Bump uv in pre-commit hooks to 0.5.20 --- .pre-commit-config.yaml | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea4c5ebc2..8cfad7775 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,14 +78,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: shellcheck name: shellcheck @@ -93,7 +93,7 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: shellcheck-docs name: shellcheck-docs @@ -101,14 +101,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: shfmt-docs name: shfmt-docs @@ -116,7 +116,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: mypy name: mypy @@ -125,7 +125,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: mypy-docs name: mypy-docs @@ -133,7 +133,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: check-manifest name: check-manifest @@ -141,7 +141,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyright name: pyright @@ -150,7 +150,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyright-docs name: pyright-docs @@ -158,7 +158,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: vulture name: vulture @@ -166,14 +166,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyroma name: pyroma @@ -181,14 +181,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pylint name: pylint @@ -196,7 +196,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pylint-docs name: pylint-docs @@ -204,28 +204,28 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: ruff-format-fix-docs name: Ruff format docs @@ -233,28 +233,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyproject-fmt-fix name: pyproject-fmt @@ -262,7 +262,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: linkcheck name: linkcheck @@ -271,7 +271,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: spelling name: spelling @@ -280,7 +280,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: docs name: Build Documentation @@ -288,7 +288,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyright-verifytypes name: pyright-verifytypes @@ -297,18 +297,18 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long language: python types_or: [rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] From 84ed631f22d6c48d0a176e967f7bf51d3360d1d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:55:30 +0000 Subject: [PATCH 590/641] Bump pyright from 1.1.392 to 1.1.392.post0 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.392 to 1.1.392.post0. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.392...v1.1.392.post0) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1fe83f189..fc80a4b8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.392", + "pyright==1.1.392.post0", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From 381e4c14ac8d8101eb416f76450fdaf335c3c65a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:12:52 +0000 Subject: [PATCH 591/641] Bump ruff from 0.9.1 to 0.9.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.1 to 0.9.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.1...0.9.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc80a4b8b..ffc039e6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.1", + "ruff==0.9.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e0b9f4304803a9d303b2ecfa8dae97c3297576cc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 17 Jan 2025 21:42:29 +0000 Subject: [PATCH 592/641] Use new format for pylint-per-file-ignores --- pyproject.toml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ffc039e6f..7876b245e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pyenchant==3.3.0rc1", "pygments==2.19.1", "pylint==3.3.3", - "pylint-per-file-ignores==1.3.2", + "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.0", "pyright==1.1.392.post0", "pyroma==4.2", @@ -244,16 +244,14 @@ disable = [ 'useless-type-doc', ] -# This format is described in the following issue: -# https://github.com/christopherpickering/pylint-per-file-ignores/issues/160 -# # We ignore invalid names because: # - We want to use generated module names, which may not be valid, but are never seen. -# - We want to use global variables in documentation, which may not be uppercase -per-file-ignores = """ -docs/:invalid-name -doccmd_README_rst.*.py:invalid-name -""" +# - We want to use global variables in documentation, which may not be uppercase. +# - conf.py is a Sphinx configuration file which requires lowercase global variable names. +per-file-ignores = [ + "docs/:invalid-name", + "doccmd_README_rst.*.py:invalid-name", +] [tool.pylint.'FORMAT'] From 62b7929c87295b6b84e20f5e10c327fbd3170403 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:44:58 +0000 Subject: [PATCH 593/641] Bump actionlint-py from 1.7.6.22 to 1.7.7.23 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.6.22 to 1.7.7.23. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.6.22...v1.7.7.23) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7876b245e..ac82f3dae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.6.22", + "actionlint-py==1.7.7.23", "check-manifest==0.50", "deptry==0.22.0", "doc8==1.1.2", From be7bd0807c3abf3a71eb88ac2b06309aec2e9079 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:56:35 +0000 Subject: [PATCH 594/641] Bump pre-commit from 4.0.1 to 4.1.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.0.1 to 4.1.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.0.1...v4.1.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ac82f3dae..ce014677f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.14.1", "mypy-strict-kwargs==2024.12.25", - "pre-commit==4.0.1", + "pre-commit==4.1.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.1", From 1db4390098d433c9a18e26b5d2b0013dd755a558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 10:38:35 +0000 Subject: [PATCH 595/641] Bump ruff from 0.9.2 to 0.9.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.2 to 0.9.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.2...0.9.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ce014677f..8380900e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.2", + "ruff==0.9.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From effe06f77ac552a50acdc8f409eda201914e9123 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 10:30:22 +0000 Subject: [PATCH 596/641] Bump deptry from 0.22.0 to 0.23.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.22.0...0.23.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8380900e6..8321983b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.7.23", "check-manifest==0.50", - "deptry==0.22.0", + "deptry==0.23.0", "doc8==1.1.2", "doccmd==2025.1.11", "docformatter==1.7.5", From b9b14c4a488a8a28017f388294a54cb2d1082ad7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 10:31:31 +0000 Subject: [PATCH 597/641] Bump pylint from 3.3.3 to 3.3.4 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.3 to 3.3.4. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.3...v3.3.4) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8321983b1..04b173ec3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.1", - "pylint==3.3.3", + "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.0", "pyright==1.1.392.post0", From 1c6c6a146b6eb9ee23faa18eedd82f9e0bff6ff4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:33:08 +0000 Subject: [PATCH 598/641] Bump pyright from 1.1.392.post0 to 1.1.393 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.392.post0 to 1.1.393. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.392.post0...v1.1.393) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 04b173ec3..eb97626ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.0", - "pyright==1.1.392.post0", + "pyright==1.1.393", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From d83dc0fc60a019e12c88c0eebb9cb07ed282a210 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 10:12:44 +0000 Subject: [PATCH 599/641] Bump ruff from 0.9.3 to 0.9.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.3 to 0.9.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.3...0.9.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eb97626ac..528d2a1da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.3", + "ruff==0.9.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 72724e3a35848f2fa5b1941d09631c68a220c445 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:40:00 +0000 Subject: [PATCH 600/641] Bump mypy[faster-cache] from 1.14.1 to 1.15.0 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.14.1 to 1.15.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.14.1...v1.15.0) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 528d2a1da..9d13cb32a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.14.1", + "mypy[faster-cache]==1.15.0", "mypy-strict-kwargs==2024.12.25", "pre-commit==4.1.0", "pydocstyle==6.3", From 27e4ff50ce7d8f45770bedb2b296e24997a97773 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:32:43 +0000 Subject: [PATCH 601/641] Bump ruff from 0.9.4 to 0.9.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.4 to 0.9.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.4...0.9.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d13cb32a..25cfe33a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.4", + "ruff==0.9.5", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 6cd98b652dc0b875aea5fbfa1e6756f25c4edbea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:14:24 +0000 Subject: [PATCH 602/641] Bump ruff from 0.9.5 to 0.9.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.5 to 0.9.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.5...0.9.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 25cfe33a3..42bf430f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.5", + "ruff==0.9.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e1285610787bebc584e3f2135fe4d99c73fd37c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:01:49 +0000 Subject: [PATCH 603/641] Bump pyright from 1.1.393 to 1.1.394 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.393 to 1.1.394. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.393...v1.1.394) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 42bf430f7..8c4119585 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.0", - "pyright==1.1.393", + "pyright==1.1.394", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From e13c439e4816c10dfbe044910538025f1e65c3e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 10:50:57 +0000 Subject: [PATCH 604/641] Bump doccmd from 2025.1.11 to 2025.2.17 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.1.11 to 2025.2.17. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.01.11...2025.02.17) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8c4119585..f1a471279 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.1.11", + "doccmd==2025.2.17", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From ce1e6ab169dc7f4cb26f41f4b43a53bec41b3179 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:40:30 +0000 Subject: [PATCH 605/641] Bump pyproject-fmt from 2.5.0 to 2.5.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.5.0...pyproject-fmt/2.5.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1a471279..297222105 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.19.1", "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", - "pyproject-fmt==2.5.0", + "pyproject-fmt==2.5.1", "pyright==1.1.394", "pyroma==4.2", "pytest==8.3.4", From ef308f4e3b3db2e8a5b668fdc3b740c69246bc40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:40:36 +0000 Subject: [PATCH 606/641] Bump sphinx-substitution-extensions from 2025.1.2 to 2025.2.19 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.1.2 to 2025.2.19. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.01.02...2025.02.19) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1a471279..36967d9bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinx==8.1.3", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", - "sphinx-substitution-extensions==2025.1.2", + "sphinx-substitution-extensions==2025.2.19", "sphinxcontrib-spelling==8.0.1", "sybil==9.0.0", "types-requests==2.32.0.20241016", From aeb12cb061f732c534a0bd569c437e51ba650088 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:45:54 +0000 Subject: [PATCH 607/641] Bump sybil from 9.0.0 to 9.1.0 Bumps [sybil](https://github.com/simplistix/sybil) from 9.0.0 to 9.1.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/9.0.0...9.1.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4617145cd..16399ce7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-lint==1.0.0", "sphinx-substitution-extensions==2025.2.19", "sphinxcontrib-spelling==8.0.1", - "sybil==9.0.0", + "sybil==9.1.0", "types-requests==2.32.0.20241016", "vulture==2.14", "vws-python-mock==2024.8.30", From 5b5f08bec20e2c161225bb9f779e260a0fbe9052 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:00:54 +0000 Subject: [PATCH 608/641] Bump sphinx from 8.1.3 to 8.2.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.1.3 to 8.2.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.1.3...v8.2.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 16399ce7a..6b77bb7a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.1.3", + "sphinx==8.2.0", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-substitution-extensions==2025.2.19", From 34db2b50cdaa147e699db601317bc2be889ee0dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:00:55 +0000 Subject: [PATCH 609/641] Bump vws-python-mock from 2024.8.30 to 2025.2.18 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2024.8.30 to 2025.2.18. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2024.08.30...2025.02.18) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 16399ce7a..63bf52922 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "sybil==9.1.0", "types-requests==2.32.0.20241016", "vulture==2.14", - "vws-python-mock==2024.8.30", + "vws-python-mock==2025.2.18", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] From e703605f962b1bf89c320895a46a1b3cc89ed7a5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 20 Feb 2025 13:38:43 +0000 Subject: [PATCH 610/641] Add traceback to word list --- spelling_private_dict.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index ec77ade47..ce782a4af 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -90,6 +90,7 @@ rgb str timestamp todo +traceback travis txt unmocked From e80f13e4f7eb7fd4d39bdfc3770223f129fa1c4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:47:01 +0000 Subject: [PATCH 611/641] Bump doccmd from 2025.2.17 to 2025.2.19 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.2.17 to 2025.2.19. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.02.17...2025.02.19) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6b77bb7a4..c97064e77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.2.17", + "doccmd==2025.2.19", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From a37bc0c4e65717bf575c77f3e3a82bd83b74180d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 20 Feb 2025 13:57:17 +0000 Subject: [PATCH 612/641] Remove unnecessary strategy from release.yml --- .github/workflows/release.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e25f5f32e..5f18688d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,10 +20,6 @@ jobs: # This is needed for https://github.com/stefanzweifel/git-auto-commit-action. contents: write - strategy: - matrix: - python-version: ['3.12'] - steps: - uses: actions/checkout@v4 with: From 95d1f7252555bd05e805a733746694eec095881e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 20 Feb 2025 14:51:04 +0000 Subject: [PATCH 613/641] Make sure GitHub releases are marked as latest --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f18688d2..e0e8e6c11 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,6 +79,7 @@ jobs: uses: ncipollo/release-action@v1 with: tag: ${{ steps.tag_version.outputs.new_tag }} + makeLatest: true name: Release ${{ steps.tag_version.outputs.new_tag }} body: ${{ steps.tag_version.outputs.changelog }} From 91804f94b814b8cdb14b840f1b7983a3f664091c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 20 Feb 2025 19:09:23 +0000 Subject: [PATCH 614/641] Fix release parsing in conf.py --- docs/source/conf.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 3255877d6..e7a796f4a 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,6 +6,7 @@ import importlib.metadata from packaging.specifiers import SpecifierSet +from packaging.version import Version project = "VWS-Python" author = "Adam Dangoor" @@ -30,16 +31,16 @@ copybutton_exclude = ".linenos, .gp" # The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the +# |release|, also used in various other places throughout the # built documents. # # Use ``importlib.metadata.version`` as per -# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx -version = importlib.metadata.version(distribution_name=project) -# This method of getting the release from the version goes hand in hand with -# the ``post-release`` versioning scheme chosen in the ``setuptools-scm`` -# configuration. -release = version.split(sep=".post")[0] +# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx. +_version_string = importlib.metadata.version(distribution_name=project) +_version = Version(version=_version_string) +# GitHub release tags have the format YYYY.MM.DD, while Python requirement +# versions may have the format YYYY.M.D for single digit months and days. +release = ".".join(f"{part:02d}" for part in _version.release) project_metadata = importlib.metadata.metadata(distribution_name=project) From 37906612599247027b1eff5c1a5d29f8d6aba90f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 08:40:18 +0000 Subject: [PATCH 615/641] Error in release process if trying to commit changes and there are none --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e0e8e6c11..89ba2b4e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,6 +65,8 @@ jobs: with: commit_message: Bump CHANGELOG file_pattern: CHANGELOG.rst + # Error if there are no changes. + skip_dirty_check: true - name: Bump version and push tag id: tag_version From ea17aae6a2d7f09c5f83361511255e2924b17c89 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 09:10:50 +0000 Subject: [PATCH 616/641] Enable the uv cache in CI --- .github/workflows/ci.yml | 3 +++ .github/workflows/lint.yml | 3 +++ .github/workflows/release.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a97d1ec58..a2ce97e41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: '**/pyproject.toml' - name: Run tests run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2a3910dd7..ab512c738 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,6 +27,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: '**/pyproject.toml' - name: Lint run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89ba2b4e6..e44c847b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: '**/pyproject.toml' - name: Calver calculate version uses: StephaneBour/actions-calver@master From 86126a6e594e9defa3dc229d582885cd0fddda58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 10:52:59 +0000 Subject: [PATCH 617/641] Bump ruff from 0.9.6 to 0.9.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.6 to 0.9.7. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.6...0.9.7) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c97064e77..0dbc1f172 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.6", + "ruff==0.9.7", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 56f93d3d7f356bc0ca01455c187070922a02b88b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 10:53:05 +0000 Subject: [PATCH 618/641] Bump doccmd from 2025.2.19 to 2025.2.20.7 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.2.19 to 2025.2.20.7. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.02.19...2025.02.20.7) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c97064e77..67cb564bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.2.19", + "doccmd==2025.2.20.7", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 94f256d5f71d2d639decba4d11bb3b608a16cca8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 12:16:49 +0000 Subject: [PATCH 619/641] Remove unused version setting in conf.py --- docs/source/conf.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index e7a796f4a..c6f6230bb 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,7 +6,6 @@ import importlib.metadata from packaging.specifiers import SpecifierSet -from packaging.version import Version project = "VWS-Python" author = "Adam Dangoor" @@ -30,19 +29,6 @@ # https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies. copybutton_exclude = ".linenos, .gp" -# The version info for the project you're documenting, acts as replacement for -# |release|, also used in various other places throughout the -# built documents. -# -# Use ``importlib.metadata.version`` as per -# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx. -_version_string = importlib.metadata.version(distribution_name=project) -_version = Version(version=_version_string) -# GitHub release tags have the format YYYY.MM.DD, while Python requirement -# versions may have the format YYYY.M.D for single digit months and days. -release = ".".join(f"{part:02d}" for part in _version.release) - - project_metadata = importlib.metadata.metadata(distribution_name=project) requires_python = project_metadata["Requires-Python"] specifiers = SpecifierSet(specifiers=requires_python) @@ -89,7 +75,6 @@ rst_prolog = f""" .. |project| replace:: {project} -.. |release| replace:: {release} .. |minimum-python-version| replace:: {minimum_python_version} .. |github-owner| replace:: VWS-Python .. |github-repository| replace:: vws-python From a42aa17bce274f17184da429dc3fce1d7956d41b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 12:23:52 +0000 Subject: [PATCH 620/641] Remove double setting of autoclass content - just use both --- docs/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index c6f6230bb..924fc9d41 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,7 +56,6 @@ # Output file base name for HTML help builder. htmlhelp_basename = "VWSPYTHONdoc" -autoclass_content = "init" intersphinx_mapping = { "python": (f"https://docs.python.org/{minimum_python_version}", None), } From 81e270b44b52d4af5a25b97b05456f42aa511ba9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 21:15:59 +0000 Subject: [PATCH 621/641] Use SphinxConfig to avoid some duplication --- docs/source/conf.py | 12 ++++++++++-- pyproject.toml | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 924fc9d41..8c7e78f05 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -4,11 +4,19 @@ """ import importlib.metadata +from pathlib import Path from packaging.specifiers import SpecifierSet +from sphinx_pyproject import SphinxConfig -project = "VWS-Python" -author = "Adam Dangoor" +_pyproject_file = Path(__file__).parent.parent.parent / "pyproject.toml" +_pyproject_config = SphinxConfig( + pyproject_file=_pyproject_file, + config_overrides={"version": None}, +) + +project = _pyproject_config.name +author = _pyproject_config.author extensions = [ "sphinx_copybutton", diff --git a/pyproject.toml b/pyproject.toml index 67cb564bc..11e82235f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,6 +71,7 @@ optional-dependencies.dev = [ "sphinx==8.2.0", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", + "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2025.2.19", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", From e7aa907bec4f3aa56f5708069bb00f02fb9e2e7d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 22 Feb 2025 21:21:13 +0000 Subject: [PATCH 622/641] Switch from ReadTheDocs to GitHub Pages --- .github/workflows/publish-site.yml | 27 +++++++++++++++++++++++++++ README.rst | 7 ++----- docs/source/index.rst | 1 - pyproject.toml | 3 +-- readthedocs.yaml | 18 ------------------ 5 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/publish-site.yml delete mode 100644 readthedocs.yaml diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml new file mode 100644 index 000000000..4ca927ccb --- /dev/null +++ b/.github/workflows/publish-site.yml @@ -0,0 +1,27 @@ +--- +name: Deploy documentation + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + pages: + runs-on: ubuntu-latest + environment: + name: ${{ github.ref_name == 'main' && 'github-pages' || 'development' }} + url: ${{ steps.deployment.outputs.page_url }} + permissions: + pages: write + id-token: write + steps: + - id: deployment + uses: sphinx-notes/pages@v3 + with: + documentation_path: docs/source + pyproject_extras: dev + python_version: '3.13' + sphinx_build_options: -W + publish: ${{ github.ref_name == 'main' }} diff --git a/README.rst b/README.rst index 730535169..d7943b35f 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -|Build Status| |codecov| |PyPI| |Documentation Status| +|Build Status| |codecov| |PyPI| vws-python ========== @@ -67,8 +67,7 @@ Getting Started Full Documentation ------------------ -See the `full -documentation `__. +See the `full documentation `__. .. |Build Status| image:: https://github.com/VWS-Python/vws-python/actions/workflows/ci.yml/badge.svg?branch=main :target: https://github.com/VWS-Python/vws-python/actions @@ -76,6 +75,4 @@ documentation `__. :target: https://codecov.io/gh/VWS-Python/vws-python .. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg :target: https://badge.fury.io/py/VWS-Python -.. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest - :target: https://vws-python.readthedocs.io/en/latest/?badge=latest .. |minimum-python-version| replace:: 3.12 diff --git a/docs/source/index.rst b/docs/source/index.rst index 3c89de779..505d6569a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -114,7 +114,6 @@ See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for .. _VWS Python Mock: https://github.com/VWS-Python/vws-python-mock - Reference --------- diff --git a/pyproject.toml b/pyproject.toml index 11e82235f..f72b912e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "yamlfix==1.17.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.1" ] -urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" +urls.Documentation = "https://vws-python.github.io/vws-python/" urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] @@ -283,7 +283,6 @@ ignore = [ ".yamlfmt", "*.enc", ".pre-commit-config.yaml", - "readthedocs.yaml", "CHANGELOG.rst", "CODE_OF_CONDUCT.rst", "CONTRIBUTING.rst", diff --git a/readthedocs.yaml b/readthedocs.yaml deleted file mode 100644 index 8f093abcc..000000000 --- a/readthedocs.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -version: 2 - -build: - os: ubuntu-24.04 - tools: - python: '3.12' - -python: - install: - - method: pip - path: . - extra_requirements: [dev] - -sphinx: - builder: html - configuration: docs/source/conf.py - fail_on_warning: true From c0b426f2a234ad835ea0e00fcfdd091d8e61c02f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 23 Feb 2025 02:29:44 +0000 Subject: [PATCH 623/641] Update VWS-Python-Mock link to new site --- docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 505d6569a..818b0698d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -110,7 +110,7 @@ To write unit tests for code which uses this library, without using your Vuforia assert matching_targets[0].target_id == target_id There are some differences between the mock and the real Vuforia. -See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. +See https://vws-python.github.io/vws-python-mock/differences-to-vws for details. .. _VWS Python Mock: https://github.com/VWS-Python/vws-python-mock From ab4a5ebec7e21706610568be4f9bcd86be0c1c4e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 23 Feb 2025 02:38:25 +0000 Subject: [PATCH 624/641] Use cache on publish site --- .github/workflows/publish-site.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml index 4ca927ccb..8f5a347a4 100644 --- a/.github/workflows/publish-site.yml +++ b/.github/workflows/publish-site.yml @@ -24,4 +24,5 @@ jobs: pyproject_extras: dev python_version: '3.13' sphinx_build_options: -W + cache: true publish: ${{ github.ref_name == 'main' }} From a0f127ea7a98e4df08681c4defce9d4ea437c78f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:10:58 +0000 Subject: [PATCH 625/641] Bump vws-python-mock from 2025.2.18 to 2025.2.21 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2025.2.18 to 2025.2.21. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2025.02.18...2025.02.21) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f16742d4a..29d2e31c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "sybil==9.1.0", "types-requests==2.32.0.20241016", "vulture==2.14", - "vws-python-mock==2025.2.18", + "vws-python-mock==2025.2.21", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] From 2e92c1f7a720bada0aef0e0d27d2cbdd2d254e8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:11:14 +0000 Subject: [PATCH 626/641] Bump sphinx from 8.2.0 to 8.2.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.2.0 to 8.2.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/v8.2.1/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.2.0...v8.2.1) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f16742d4a..a683b4218 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.2.0", + "sphinx==8.2.1", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", From e37bdaf1bab87e5631ca05b58b1aaa506b4495dc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 26 Feb 2025 06:32:15 +0000 Subject: [PATCH 627/641] Bump uv in pre-commit --- .pre-commit-config.yaml | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8cfad7775..cf9bf80da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,14 +78,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: shellcheck name: shellcheck @@ -93,7 +93,7 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: shellcheck-docs name: shellcheck-docs @@ -101,14 +101,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: shfmt-docs name: shfmt-docs @@ -116,7 +116,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: mypy name: mypy @@ -125,7 +125,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: mypy-docs name: mypy-docs @@ -133,7 +133,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: check-manifest name: check-manifest @@ -141,7 +141,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyright name: pyright @@ -150,7 +150,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyright-docs name: pyright-docs @@ -158,7 +158,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: vulture name: vulture @@ -166,14 +166,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyroma name: pyroma @@ -181,14 +181,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pylint name: pylint @@ -196,7 +196,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pylint-docs name: pylint-docs @@ -204,28 +204,28 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: ruff-format-fix-docs name: Ruff format docs @@ -233,28 +233,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyproject-fmt-fix name: pyproject-fmt @@ -262,7 +262,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: linkcheck name: linkcheck @@ -271,7 +271,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: spelling name: spelling @@ -280,7 +280,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: docs name: Build Documentation @@ -288,7 +288,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyright-verifytypes name: pyright-verifytypes @@ -297,18 +297,18 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long language: python types_or: [rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] From 3fa7b062bf5276fe492b77d497e3b89cc2ba3796 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:17:12 +0000 Subject: [PATCH 628/641] Bump pyright from 1.1.394 to 1.1.395 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.394 to 1.1.395. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.394...v1.1.395) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d79f2b5a..c14a3a4d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", - "pyright==1.1.394", + "pyright==1.1.395", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From 7c9be95b6b0f5289c61bcf98576f24238b887af5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:39:46 +0000 Subject: [PATCH 629/641] Bump ruff from 0.9.7 to 0.9.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.7 to 0.9.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.7...0.9.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c14a3a4d8..650fabaef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.7", + "ruff==0.9.9", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 25670bd10c923d608556eaa2a3353df08ccf6ff5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:07:10 +0000 Subject: [PATCH 630/641] Bump types-requests from 2.32.0.20241016 to 2.32.0.20250301 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20241016 to 2.32.0.20250301. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 650fabaef..5ce93f65c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.2.19", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", - "types-requests==2.32.0.20241016", + "types-requests==2.32.0.20250301", "vulture==2.14", "vws-python-mock==2025.2.21", "vws-test-fixtures==2023.3.5", From a3593ca8a42020c824cc683db51cff51de295062 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:07:20 +0000 Subject: [PATCH 631/641] Bump sphinx from 8.2.1 to 8.2.3 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.2.1 to 8.2.3. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.2.1...v8.2.3) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 650fabaef..1ec046ef5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.2.1", + "sphinx==8.2.3", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", From ecc014373f7fdd4d519c1b12b2afd1ab753cea6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:07:33 +0000 Subject: [PATCH 632/641] Bump pytest from 8.3.4 to 8.3.5 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.4 to 8.3.5. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.4...8.3.5) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 650fabaef..9d9d5a22b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.5.1", "pyright==1.1.395", "pyroma==4.2", - "pytest==8.3.4", + "pytest==8.3.5", "pytest-cov==6.0.0", "pyyaml==6.0.2", "ruff==0.9.9", From d8f1e1bc2aec99e4841db51924012d58e180a7e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:12:34 +0000 Subject: [PATCH 633/641] Bump pyright from 1.1.395 to 1.1.396 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.395 to 1.1.396. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.395...v1.1.396) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d9d5a22b..1fc27ee6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", - "pyright==1.1.395", + "pyright==1.1.396", "pyroma==4.2", "pytest==8.3.5", "pytest-cov==6.0.0", From e0e84ba39cd3698c43ff821301774fbed015690e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 10:07:16 +0000 Subject: [PATCH 634/641] Bump sphinx-substitution-extensions from 2025.2.19 to 2025.3.3 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.2.19 to 2025.3.3. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.02.19...2025.03.03) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d623d796a..79bf6ee6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2025.2.19", + "sphinx-substitution-extensions==2025.3.3", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", "types-requests==2.32.0.20250301", From 408308459172071dd3b9f5f6f1d54353cf166574 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 10:30:48 +0000 Subject: [PATCH 635/641] Bump types-requests from 2.32.0.20250301 to 2.32.0.20250306 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20250301 to 2.32.0.20250306. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 79bf6ee6c..2b47a90b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.3.3", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", - "types-requests==2.32.0.20250301", + "types-requests==2.32.0.20250306", "vulture==2.14", "vws-python-mock==2025.2.21", "vws-test-fixtures==2023.3.5", From da809ed87553479188e84aa0ca0d40ea8c0f7082 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 11:04:52 +0000 Subject: [PATCH 636/641] Bump doccmd from 2025.2.20.7 to 2025.3.6 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.2.20.7 to 2025.3.6. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.02.20.7...2025.03.06) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2b47a90b3..19855a789 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.2.20.7", + "doccmd==2025.3.6", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From c472d754bac31f89af3e1f3da8da7c25ef05db43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:16:16 +0000 Subject: [PATCH 637/641] Bump ruff from 0.9.9 to 0.9.10 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.9 to 0.9.10. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.9...0.9.10) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19855a789..3aea85732 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.9", + "ruff==0.9.10", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From bcc4f866d1debdd529206672c684038af74f393d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:16:30 +0000 Subject: [PATCH 638/641] Bump vws-python-mock from 2025.2.21 to 2025.3.10 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2025.2.21 to 2025.3.10. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2025.02.21...2025.03.10) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19855a789..86d9b4964 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "sybil==9.1.0", "types-requests==2.32.0.20250306", "vulture==2.14", - "vws-python-mock==2025.2.21", + "vws-python-mock==2025.3.10", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] From 086563f1ce61f99973bab89d253bc4f30992b498 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 10 Mar 2025 10:30:54 +0000 Subject: [PATCH 639/641] Remove OopsAnErrorOccurredPossiblyBadName which matches error no longer found in Vuforia --- CHANGELOG.rst | 2 ++ src/vws/exceptions/custom_exceptions.py | 25 ------------------------- src/vws/vws.py | 17 ++--------------- tests/test_vws_exceptions.py | 8 ++++---- 4 files changed, 8 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b18bc5e4f..e2c0eeaa8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Removed ``vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName`` which now does not occur in VWS. + 2024.09.21 ------------ diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 11d47a67a..694e98c30 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -9,31 +9,6 @@ from vws.response import Response -@beartype -class OopsAnErrorOccurredPossiblyBadNameError(Exception): - """Exception raised when VWS returns an HTML page which says "Oops, an - error occurred". - - This has been seen to happen when the given name includes a bad - character. - """ - - def __init__(self, response: Response) -> None: - """ - Args: - response: The response returned by Vuforia. - """ - super().__init__(response.text) - self._response = response - - @property - def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ - return self._response - - @beartype class RequestEntityTooLargeError(Exception): """ diff --git a/src/vws/vws.py b/src/vws/vws.py index f87766571..5dd7503db 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -16,7 +16,6 @@ from vws_auth_tools import authorization_header, rfc_1123_date from vws.exceptions.custom_exceptions import ( - OopsAnErrorOccurredPossiblyBadNameError, ServerError, TargetProcessingTimeoutError, ) @@ -178,12 +177,6 @@ def make_request( The response to the request made by `requests`. Raises: - ~vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadNameError: - Vuforia returns an HTML page with the text "Oops, an error - occurred". - - This has been seen to happen when the given name includes a bad - character. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is @@ -202,9 +195,6 @@ def make_request( base_vws_url=self._base_vws_url, ) - if "Oops, an error occurred" in response.text: - raise OopsAnErrorOccurredPossiblyBadNameError(response=response) - if ( response.status_code == HTTPStatus.TOO_MANY_REQUESTS ): # pragma: no cover @@ -290,12 +280,9 @@ def add_target( inactive. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is an error with the time sent to Vuforia. - ~vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadNameError: - Vuforia returns an HTML page with the text "Oops, an error - occurred". This has been seen to happen when the given name - includes a bad character. ~vws.exceptions.custom_exceptions.ServerError: There is an error - with Vuforia's servers. + with Vuforia's servers. This has been seen to happen when the + given name includes a bad character. ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. """ diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index f9a7b8dab..86da66040 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -15,7 +15,7 @@ from vws import VWS from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ( - OopsAnErrorOccurredPossiblyBadNameError, + ServerError, ) from vws.exceptions.vws_exceptions import ( AuthenticationFailureError, @@ -71,13 +71,13 @@ def test_invalid_given_id(vws_client: VWS) -> None: def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ - When a name with a bad character is given, an - ``OopsAnErrorOccurredPossiblyBadName`` exception is raised. + When a name with a bad character is given, a ``ServerError`` exception is + raised. """ max_char_value = 65535 bad_name = chr(max_char_value + 1) with pytest.raises( - expected_exception=OopsAnErrorOccurredPossiblyBadNameError + expected_exception=ServerError, ) as exc: vws_client.add_target( name=bad_name, From 7f525577813f690b49895cb8bba333e8a4e8ba49 Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:42:18 +0000 Subject: [PATCH 640/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e2c0eeaa8..46318086d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2025.03.10 +---------- + * Removed ``vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName`` which now does not occur in VWS. 2024.09.21 From 6e6701d9fd7d7470bf168f34ac7802a07968be2d Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:50:15 +0000 Subject: [PATCH 641/641] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 46318086d..5527f9da1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2025.03.10.1 +------------ + 2025.03.10 ----------