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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] [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/331] 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/331] 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/331] 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/331] 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/331] 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/331] --- 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/331] --- 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/331] 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/331] [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/331] --- 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/331] 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/331] 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/331] 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/331] 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/331] [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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] [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/331] 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/331] 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/331] 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/331] [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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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/331] 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