From 4c585699f2e0960a80db469f4e327ddc0bde9470 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Feb 2023 10:58:51 +0000 Subject: [PATCH 0001/1638] Bump types-requests from 2.28.11.12 to 2.28.11.13 in /requirements Bumps [types-requests](https://github.com/python/typeshed) from 2.28.11.12 to 2.28.11.13. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 7aa87ca56..7ef9151e7 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -26,6 +26,6 @@ sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 sphinxcontrib-spelling==7.7.0 types-freezegun==1.1.10 -types-requests==2.28.11.12 +types-requests==2.28.11.13 types-setuptools==67.2.0.1 vulture==2.7 From 02320c5882a44105a6d4a0d2e1c9fbeac4d853cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Feb 2023 23:18:29 +0000 Subject: [PATCH 0002/1638] Bump types-setuptools from 67.2.0.1 to 67.3.0.1 in /requirements Bumps [types-setuptools](https://github.com/python/typeshed) from 67.2.0.1 to 67.3.0.1. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 7ef9151e7..845e6771c 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -27,5 +27,5 @@ sphinx-prompt==1.5.0 sphinxcontrib-spelling==7.7.0 types-freezegun==1.1.10 types-requests==2.28.11.13 -types-setuptools==67.2.0.1 +types-setuptools==67.3.0.1 vulture==2.7 From 66968c5243ba113dd8223566237b2ee06596ba9c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 19 Feb 2023 16:33:39 +0000 Subject: [PATCH 0003/1638] Switch from flake8/isort to ruff --- Makefile | 10 +--- docs/source/__init__.py | 1 + docs/source/conf.py | 2 +- lint.mk | 35 ++---------- pyproject.toml | 86 ++++++++++++++++------------- readthedocs.yaml | 2 +- requirements/dev-requirements.txt | 5 +- setup.cfg | 4 -- spelling_private_dict.txt | 1 + src/vws/query.py | 7 ++- src/vws/reports.py | 9 ++- src/vws/vws.py | 15 ++--- tests/conftest.py | 17 +++--- tests/test_cloud_reco_exceptions.py | 4 +- tests/test_query.py | 6 +- tests/test_vws.py | 4 +- tests/test_vws_exceptions.py | 16 +++--- 17 files changed, 99 insertions(+), 125 deletions(-) create mode 100644 docs/source/__init__.py diff --git a/Makefile b/Makefile index c3c09ec82..7e7e1c51c 100644 --- a/Makefile +++ b/Makefile @@ -10,24 +10,20 @@ lint: \ black \ check-manifest \ doc8 \ - flake8 \ - isort \ linkcheck \ mypy \ + ruff \ pip-extra-reqs \ pip-missing-reqs \ pyroma \ spelling \ vulture \ - pylint \ - pydocstyle \ + pylint .PHONY: fix-lint fix-lint: \ - add-trailing-comma \ - autoflake \ fix-black \ - fix-isort + fix-ruff .PHONY: docs docs: diff --git a/docs/source/__init__.py b/docs/source/__init__.py new file mode 100644 index 000000000..535ceb2ec --- /dev/null +++ b/docs/source/__init__.py @@ -0,0 +1 @@ +"""Documentation.""" diff --git a/docs/source/conf.py b/docs/source/conf.py index 24debca3d..7d35d92ad 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,7 +26,7 @@ source_suffix = ".rst" master_doc = "index" -year = datetime.datetime.now().year +year = datetime.datetime.now(tz=datetime.UTC).year project_copyright = f"{year}, {author}" # The version info for the project you're documenting, acts as replacement for diff --git a/lint.mk b/lint.mk index df123627d..0d22c7b32 100644 --- a/lint.mk +++ b/lint.mk @@ -22,17 +22,13 @@ check-manifest: doc8: doc8 . -.PHONY: flake8 -flake8: - flake8 . +.PHONY: ruff +ruff: + ruff . -.PHONY: isort -isort: - isort --check-only . - -.PHONY: fix-isort -fix-isort: - isort . +.PHONY: fix-ruff +fix-ruff: + ruff --fix . .PHONY: pip-extra-reqs pip-extra-reqs: @@ -61,22 +57,3 @@ linkcheck: .PHONY: spelling spelling: $(MAKE) -C docs/ spelling SPHINXOPTS=$(SPHINXOPTS) - -.PHONY: autoflake -autoflake: - autoflake \ - --in-place \ - --recursive \ - --remove-all-unused-imports \ - --remove-unused-variables \ - --expand-star-imports \ - --exclude _vendor,release \ - . - -.PHONY: pydocstyle -pydocstyle: - pydocstyle - -.PHONY: add-trailing-comma -add-trailing-comma: - add-trailing-comma $$(find . -type f -name '*.py') --exit-zero-even-if-changed diff --git a/pyproject.toml b/pyproject.toml index b36f70469..33e030b5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,18 +48,18 @@ 'too-many-return-statements', 'too-many-lines', 'locally-disabled', - # Let flake8 handle long lines + # Let ruff handle long lines 'line-too-long', - # Let flake8 handle unused imports + # Let ruff handle unused imports 'unused-import', - # Let isort deal with sorting + # 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 isort handle imports + # Let ruff handle imports 'wrong-import-order', # mypy does not want untyped parameters. 'useless-type-doc', @@ -88,11 +88,6 @@ line-length = 79 -[tool.isort] - -multi_line_output = 3 -include_trailing_comma = true - [tool.coverage.run] branch = true @@ -106,16 +101,7 @@ log_cli = true ignore = [ "*.enc", - ".appveyor.yml", - ".coveragerc", - ".isort.cfg", - ".markdownlint.json", - ".pydocstyle", - ".remarkrc", - ".readthedocs.yml", "readthedocs.yaml", - ".style.yapf", - ".travis.yml", "CHANGELOG.rst", "CODE_OF_CONDUCT.rst", "CONTRIBUTING.rst", @@ -128,9 +114,6 @@ ignore = [ "docs", "docs/**", ".git_archival.txt", - "mypy.ini", - "pylintrc", - "pytest.ini", "spelling_private_dict.txt", "tests", "tests-pylintrc", @@ -164,23 +147,50 @@ module = [ ignore_missing_imports = true -[tool.pydocstyle] -# We do not have summary lines, care about "mood", or need sections with -# dash underlined titles. -ignore = [ - 'D200', - 'D205', - 'D400', - 'D415', - 'D202', - 'D203', - 'D212', - 'D401', - 'D406', - 'D407', - 'D413', -] - [build-system] requires = ["setuptools", "pip", "wheel"] build-backend = "setuptools.build_meta" + +[tool.ruff] +select = ["ALL"] + +ignore = [ + # We do not annotate the type of 'self'. + "ANN101", + # We are happy to manage our own "complexity". + "C901", + # Allow our chosen docstring line-style - no one-line summary. + "D200", + "D203", + "D205", + "D212", + "D213", + # Allow backslashes in a docstring. + # See https://click.palletsprojects.com/en/8.0.x/documentation/#preventing-rewrapping. + "D301", + # 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", + # 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. + "PLR0912", + "PLR0913", + # Allow 'assert' as we use it for tests. + "S101", + # Allow imports which are only used for type checking to be outside type + # checking blocks. + "TCH002", + "TCH003", +] + +[tool.ruff.per-file-ignores] +"tests/test_*.py" = [ + # Do not require tests to have a one-line summary. + "D205", +] diff --git a/readthedocs.yaml b/readthedocs.yaml index aa4ff368d..e47cb6624 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-20.04 tools: - python: "3.9" + python: "3.11" python: install: diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 845e6771c..7fb820aef 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -4,16 +4,12 @@ Sphinx-Substitution-Extensions==2022.2.16 Sphinx==6.1.3 VWS-Python-Mock==2021.12.27.3 VWS-Test-Fixtures==2022.1.3 -add-trailing-comma==2.4.0 -autoflake==2.0.1 black==23.1.0 check-manifest==0.49 doc8==1.1.1 dodgy==0.2.1 # Look for uploaded secrets -flake8==6.0.0 # Lint freezegun==1.2.2 furo==2022.12.7 -isort==5.12.0 # Lint imports mypy==1.0.0 # Type checking pip_check_reqs==2.4.3 pydocstyle==6.3.0 # Lint docstrings @@ -22,6 +18,7 @@ pylint==2.15.5 # Lint pyroma==4.1 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.1 # Test runners +ruff==0.0.247 sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 sphinxcontrib-spelling==7.7.0 diff --git a/setup.cfg b/setup.cfg index ad2c20573..76a490df1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,3 @@ -[flake8] -exclude=./.eggs, - ./build/, - [bdist_wheel] universal = 1 diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 180e2272a..197ecd7d5 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -87,6 +87,7 @@ todo travis txt unmocked +untyped url usefixtures validators diff --git a/src/vws/query.py b/src/vws/query.py index cdef06a24..bc2909a21 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -92,7 +92,7 @@ def query( Returns: An ordered list of target details of matching targets. - """ # noqa: E501 + """ image_content = image.getvalue() body = { "image": ("image.jpeg", image_content, "image/jpeg"), @@ -108,7 +108,7 @@ def query( ( content, content_type_header, - ) = encode_multipart_formdata( # type:ignore + ) = encode_multipart_formdata( # type:ignore[no-untyped-call] fields=body, ) method = "POST" @@ -166,8 +166,9 @@ def query( target_data_dict = item["target_data"] metadata = target_data_dict["application_metadata"] timestamp_string = target_data_dict["target_timestamp"] - target_timestamp = datetime.datetime.utcfromtimestamp( + target_timestamp = datetime.datetime.fromtimestamp( timestamp_string, + tz=datetime.UTC, ) target_data = TargetData( name=target_data_dict["name"], diff --git a/src/vws/reports.py b/src/vws/reports.py index f310b0415..d1272f57b 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -5,7 +5,6 @@ import datetime from dataclasses import dataclass from enum import Enum -from typing import Optional @dataclass @@ -32,8 +31,8 @@ class DatabaseSummaryReport: class TargetStatuses(Enum): - """ - Constants representing VWS target statuses. + """Constants representing VWS target statuses. + See the 'status' field in https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API.html#How-To-Retrieve-a-Target-Record """ @@ -87,7 +86,7 @@ class TargetData: """ name: str - application_metadata: Optional[str] + application_metadata: str | None target_timestamp: datetime.datetime @@ -101,7 +100,7 @@ class QueryResult: """ target_id: str - target_data: Optional[TargetData] + target_data: TargetData | None @dataclass diff --git a/src/vws/vws.py b/src/vws/vws.py index 26033d48c..349123def 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -95,7 +95,7 @@ def _target_api_request( url = urljoin(base=base_vws_url, url=request_path) - response = requests.request( + return requests.request( method=method, url=url, headers=headers, @@ -104,8 +104,6 @@ def _target_api_request( timeout=None, ) - return response - class VWS: """ @@ -204,8 +202,9 @@ def add_target( name: str, width: int | float, image: io.BytesIO, - active_flag: bool, application_metadata: str | None, + *, + active_flag: bool, ) -> str: """ Add a target to a Vuforia Web Services database. @@ -317,11 +316,10 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: tracking_rating=target_record_dict["tracking_rating"], reco_rating=target_record_dict["reco_rating"], ) - target_status_and_record = TargetStatusAndRecord( + return TargetStatusAndRecord( status=status, target_record=target_record, ) - return target_status_and_record def _wait_for_target_processed( self, @@ -393,7 +391,7 @@ def wait_for_target_processed( """ # func_timeout does not have type hints. - @func_set_timeout(timeout=timeout_seconds) # type: ignore + @func_set_timeout(timeout=timeout_seconds) # type: ignore[misc] def decorated() -> None: self._wait_for_target_processed( target_id=target_id, @@ -504,7 +502,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: ) response_data = dict(response.json()) - database_summary_report = DatabaseSummaryReport( + return DatabaseSummaryReport( active_images=response_data["active_images"], current_month_recos=response_data["current_month_recos"], failed_images=response_data["failed_images"], @@ -518,7 +516,6 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: target_quota=response_data["target_quota"], total_recos=response_data["total_recos"], ) - return database_summary_report def delete_target(self, target_id: str) -> None: """ diff --git a/tests/conftest.py b/tests/conftest.py index a3b1d7099..8c17fcb2a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,17 +2,16 @@ Configuration, plugins and fixtures for `pytest`. """ -from typing import Iterator +from collections.abc import Iterator import pytest from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase - from vws import VWS, CloudRecoService -@pytest.fixture() -def _mock_database() -> Iterator[VuforiaDatabase]: +@pytest.fixture(name="_mock_database") +def mock_database() -> Iterator[VuforiaDatabase]: """ Yield a mock ``VuforiaDatabase``. """ @@ -23,24 +22,22 @@ def _mock_database() -> Iterator[VuforiaDatabase]: @pytest.fixture() -def vws_client(_mock_database: VuforiaDatabase) -> Iterator[VWS]: +def vws_client(_mock_database: VuforiaDatabase) -> VWS: """ Yield a VWS client which connects to a mock database. """ - yield VWS( + return VWS( server_access_key=_mock_database.server_access_key, server_secret_key=_mock_database.server_secret_key, ) @pytest.fixture() -def cloud_reco_client( - _mock_database: VuforiaDatabase, -) -> Iterator[CloudRecoService]: +def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: """ Yield a ``CloudRecoService`` client which connects to a mock database. """ - yield CloudRecoService( + return CloudRecoService( client_access_key=_mock_database.client_access_key, client_secret_key=_mock_database.client_secret_key, ) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index d5139da0d..5221f98c2 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -4,13 +4,13 @@ import io import time +import uuid from http import HTTPStatus import pytest from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase from mock_vws.states import States - from vws import VWS, CloudRecoService from vws.exceptions.base_exceptions import CloudRecoException from vws.exceptions.cloud_reco_exceptions import ( @@ -105,7 +105,7 @@ def test_authentication_failure(high_quality_image: io.BytesIO) -> None: database = VuforiaDatabase() cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, - client_secret_key="a", + client_secret_key=uuid.uuid4().hex, ) with MockVWS() as mock: mock.add_database(database=database) diff --git a/tests/test_query.py b/tests/test_query.py index fd97c80ad..e26d86edd 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -7,7 +7,6 @@ from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase - from vws import VWS, CloudRecoService from vws.include_target_data import CloudRecoIncludeTargetData @@ -157,11 +156,12 @@ def test_custom( vws_client.wait_for_target_processed(target_id=target_id) vws_client.wait_for_target_processed(target_id=target_id_2) vws_client.wait_for_target_processed(target_id=target_id_3) + max_num_results = 2 matches = cloud_reco_client.query( image=high_quality_image, - max_num_results=2, + max_num_results=max_num_results, ) - assert len(matches) == 2 + assert len(matches) == max_num_results class TestIncludeTargetData: diff --git a/tests/test_vws.py b/tests/test_vws.py index 85a5a1806..f7f09f6bc 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -14,7 +14,6 @@ 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 TargetProcessingTimeout from vws.reports import ( @@ -36,9 +35,10 @@ class TestAddTarget: def test_add_target( vws_client: VWS, high_quality_image: io.BytesIO, - active_flag: bool, application_metadata: bytes | None, cloud_reco_client: CloudRecoService, + *, + active_flag: bool, ) -> None: """ No exception is raised when adding one target. diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 8837386c1..d6545b2bf 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -3,6 +3,7 @@ """ import io +import uuid from http import HTTPStatus import pytest @@ -10,7 +11,6 @@ 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 VWSException from vws.exceptions.custom_exceptions import UnknownVWSErrorPossiblyBadName @@ -96,8 +96,8 @@ def test_fail(high_quality_image: io.BytesIO) -> None: """ with MockVWS(): vws_client = VWS( - server_access_key="a", - server_secret_key="a", + server_access_key=uuid.uuid4().hex, + server_secret_key=uuid.uuid4().hex, ) with pytest.raises(Fail) as exc: @@ -251,9 +251,11 @@ def test_request_time_too_skewed( # * At least one time check when processing the request # # >= 1 ticks are acceptable. - with freeze_time(auto_tick_seconds=time_difference_from_now): - with pytest.raises(RequestTimeTooSkewed) as exc: - vws_client.get_target_record(target_id=target_id) + with ( + freeze_time(auto_tick_seconds=time_difference_from_now), + pytest.raises(RequestTimeTooSkewed) as exc, + ): + vws_client.get_target_record(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN @@ -268,7 +270,7 @@ def test_authentication_failure(high_quality_image: io.BytesIO) -> None: vws_client = VWS( server_access_key=database.server_access_key, - server_secret_key="a", + server_secret_key=uuid.uuid4().hex, ) with MockVWS() as mock: From 586315e1732e311377e0e6e54e9b29f731473234 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:00:04 +0000 Subject: [PATCH 0004/1638] Bump sphinxcontrib-spelling from 7.7.0 to 8.0.0 in /requirements Bumps [sphinxcontrib-spelling](https://github.com/sphinx-contrib/spelling) from 7.7.0 to 8.0.0. - [Release notes](https://github.com/sphinx-contrib/spelling/releases) - [Commits](https://github.com/sphinx-contrib/spelling/compare/7.7.0...8.0.0) --- updated-dependencies: - dependency-name: sphinxcontrib-spelling dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 7fb820aef..90e6283e9 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -21,7 +21,7 @@ pytest==7.2.1 # Test runners ruff==0.0.247 sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 -sphinxcontrib-spelling==7.7.0 +sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 types-requests==2.28.11.13 types-setuptools==67.3.0.1 From acb859ffbbb27030baafe208612a0442586b0c38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:00:11 +0000 Subject: [PATCH 0005/1638] Bump mypy from 1.0.0 to 1.0.1 in /requirements Bumps [mypy](https://github.com/python/mypy) from 1.0.0 to 1.0.1. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v1.0.0...v1.0.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 7fb820aef..e72611887 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -10,7 +10,7 @@ doc8==1.1.1 dodgy==0.2.1 # Look for uploaded secrets freezegun==1.2.2 furo==2022.12.7 -mypy==1.0.0 # Type checking +mypy==1.0.1 # Type checking pip_check_reqs==2.4.3 pydocstyle==6.3.0 # Lint docstrings pyenchant==3.2.2 # Bindings for a spellchecking sytem From 8482e11249080446477e81cb98a7095bba98cc15 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 20 Feb 2023 22:42:20 +0000 Subject: [PATCH 0006/1638] Add GitHub Actions to dependabot checks --- .github/dependabot.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 33d4caeda..4173a0589 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,14 +5,8 @@ updates: schedule: interval: daily open-pull-requests-limit: 10 - ignore: - - dependency-name: twine - versions: - - 3.4.0 - - dependency-name: pylint - versions: - - 2.7.0 - - 2.7.1 - - dependency-name: pyroma - versions: - - 2.6.1 +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 From 901fcdbe9d4f739acdab59d49e026833e21f525a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:43:45 +0000 Subject: [PATCH 0007/1638] Bump jacobtomlinson/gha-find-replace from 2 to 3 Bumps [jacobtomlinson/gha-find-replace](https://github.com/jacobtomlinson/gha-find-replace) from 2 to 3. - [Release notes](https://github.com/jacobtomlinson/gha-find-replace/releases) - [Commits](https://github.com/jacobtomlinson/gha-find-replace/compare/v2...v3) --- updated-dependencies: - dependency-name: jacobtomlinson/gha-find-replace dependency-type: direct:production update-type: version-update:semver-major ... 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 579085c53..a6a861440 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "Update changelog" - uses: jacobtomlinson/gha-find-replace@v2 + uses: jacobtomlinson/gha-find-replace@v3 env: NEXT_VERSION: ${{ steps.calver.outputs.release }} with: From 78c67ef9de7ab59a4df6e9d0ee9145059fe23782 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:43:48 +0000 Subject: [PATCH 0008/1638] Bump mathieudutour/github-tag-action from 6.0 to 6.1 Bumps [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action) from 6.0 to 6.1. - [Release notes](https://github.com/mathieudutour/github-tag-action/releases) - [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.0...v6.1) --- 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 579085c53..dfe14f47e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,7 @@ jobs: - name: Bump version and push tag id: tag_version - uses: mathieudutour/github-tag-action@v6.0 + uses: mathieudutour/github-tag-action@v6.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} custom_tag: ${{ steps.calver.outputs.release }} From e7ad186183009f71ee7510aa294f942d880bcc7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:44:05 +0000 Subject: [PATCH 0009/1638] Bump ruff from 0.0.247 to 0.0.249 in /requirements Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.247 to 0.0.249. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.247...v0.0.249) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 5288f198f..8ceae7969 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -18,7 +18,7 @@ pylint==2.15.5 # Lint pyroma==4.1 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.1 # Test runners -ruff==0.0.247 +ruff==0.0.249 sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 From 6c4feab727229915df132081dc8557a36bf7ae60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 10:59:20 +0000 Subject: [PATCH 0010/1638] Bump types-requests from 2.28.11.13 to 2.28.11.14 in /requirements Bumps [types-requests](https://github.com/python/typeshed) from 2.28.11.13 to 2.28.11.14. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 8ceae7969..109417242 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -23,6 +23,6 @@ sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 -types-requests==2.28.11.13 +types-requests==2.28.11.14 types-setuptools==67.3.0.1 vulture==2.7 From 8c066c8ed69d8ca907496dbdf691709e17fedd08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 11:13:39 +0000 Subject: [PATCH 0011/1638] Bump types-setuptools from 67.3.0.1 to 67.3.0.2 in /requirements Bumps [types-setuptools](https://github.com/python/typeshed) from 67.3.0.1 to 67.3.0.2. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 109417242..516655fce 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -24,5 +24,5 @@ sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 types-requests==2.28.11.14 -types-setuptools==67.3.0.1 +types-setuptools==67.3.0.2 vulture==2.7 From d17e96eda971e62a884494f14ef4e5096070c0da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Feb 2023 10:16:36 +0000 Subject: [PATCH 0012/1638] Bump types-setuptools from 67.3.0.2 to 67.4.0.1 in /requirements Bumps [types-setuptools](https://github.com/python/typeshed) from 67.3.0.2 to 67.4.0.1. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 516655fce..17dd2549e 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -24,5 +24,5 @@ sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 types-requests==2.28.11.14 -types-setuptools==67.3.0.2 +types-setuptools==67.4.0.1 vulture==2.7 From e17151673a6ba0314109df44b127954cc4df536b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 10:18:42 +0000 Subject: [PATCH 0013/1638] Bump ruff from 0.0.249 to 0.0.252 in /requirements Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.249 to 0.0.252. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.249...v0.0.252) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 516655fce..0556b1b7c 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -18,7 +18,7 @@ pylint==2.15.5 # Lint pyroma==4.1 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.1 # Test runners -ruff==0.0.249 +ruff==0.0.252 sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 From a8dfedd4beb6f6a7f00171566140d74e0b30e29c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 11:01:13 +0000 Subject: [PATCH 0014/1638] Bump types-setuptools from 67.4.0.1 to 67.4.0.3 in /requirements Bumps [types-setuptools](https://github.com/python/typeshed) from 67.4.0.1 to 67.4.0.3. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 02d049627..73b5eb59d 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -24,5 +24,5 @@ sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 types-requests==2.28.11.14 -types-setuptools==67.4.0.1 +types-setuptools==67.4.0.3 vulture==2.7 From 2a5ca7f10b6871d3c866a9815228ca126f5e96f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 11:01:22 +0000 Subject: [PATCH 0015/1638] Bump pyroma from 4.1 to 4.2 in /requirements Bumps [pyroma](https://github.com/regebro/pyroma) from 4.1 to 4.2. - [Release notes](https://github.com/regebro/pyroma/releases) - [Changelog](https://github.com/regebro/pyroma/blob/master/CHANGES.txt) - [Commits](https://github.com/regebro/pyroma/compare/4.1...4.2) --- updated-dependencies: - dependency-name: pyroma dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 02d049627..ff1f65128 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -15,7 +15,7 @@ pip_check_reqs==2.4.3 pydocstyle==6.3.0 # Lint docstrings pyenchant==3.2.2 # Bindings for a spellchecking sytem pylint==2.15.5 # Lint -pyroma==4.1 # Packaging best practices checker +pyroma==4.2 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.1 # Test runners ruff==0.0.252 From e499887765870ebb32c776d5c7b6c013314fbe67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 11:16:31 +0000 Subject: [PATCH 0016/1638] Bump actions/cache from 2 to 3 Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3. - [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/v2...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .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 e05a190e2..4d7d08d9f 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@v2 + - uses: actions/cache@v3 with: path: ~\AppData\Local\pip\Cache # This is like the example but we use ``*requirements.txt`` rather From ab8878653c0d871f1185ec34357724e56219302b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 11:35:25 +0000 Subject: [PATCH 0017/1638] Bump types-requests from 2.28.11.14 to 2.28.11.15 in /requirements Bumps [types-requests](https://github.com/python/typeshed) from 2.28.11.14 to 2.28.11.15. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 73b5eb59d..3460a1d27 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -23,6 +23,6 @@ sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 -types-requests==2.28.11.14 +types-requests==2.28.11.15 types-setuptools==67.4.0.3 vulture==2.7 From bdd8f863bbb8d5b8cd85f43bbda0652f757a0c14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 11:01:36 +0000 Subject: [PATCH 0018/1638] Bump ruff from 0.0.252 to 0.0.253 in /requirements Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.252 to 0.0.253. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.252...v0.0.253) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 7b9714674..0ccc244f7 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -18,7 +18,7 @@ pylint==2.15.5 # Lint pyroma==4.2 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.1 # Test runners -ruff==0.0.252 +ruff==0.0.253 sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 From 8fdeccaf6450a42b7037bfee076c32ab2b435f64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 10:20:31 +0000 Subject: [PATCH 0019/1638] Bump pip-check-reqs from 2.4.3 to 2.4.4 in /requirements Bumps [pip-check-reqs](https://github.com/r1chardj0n3s/pip-check-reqs) from 2.4.3 to 2.4.4. - [Release notes](https://github.com/r1chardj0n3s/pip-check-reqs/releases) - [Changelog](https://github.com/r1chardj0n3s/pip-check-reqs/blob/master/CHANGELOG.rst) - [Commits](https://github.com/r1chardj0n3s/pip-check-reqs/commits) --- updated-dependencies: - dependency-name: pip-check-reqs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 0ccc244f7..1657afb7d 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -11,7 +11,7 @@ dodgy==0.2.1 # Look for uploaded secrets freezegun==1.2.2 furo==2022.12.7 mypy==1.0.1 # Type checking -pip_check_reqs==2.4.3 +pip_check_reqs==2.4.4 pydocstyle==6.3.0 # Lint docstrings pyenchant==3.2.2 # Bindings for a spellchecking sytem pylint==2.15.5 # Lint From 648fbf2e5dc250318d9d36f5f0889b30e0d1e1b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 4 Mar 2023 10:13:47 +0000 Subject: [PATCH 0020/1638] Bump ruff from 0.0.253 to 0.0.254 in /requirements Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.253 to 0.0.254. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.253...v0.0.254) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 1657afb7d..460ef3e1c 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -18,7 +18,7 @@ pylint==2.15.5 # Lint pyroma==4.2 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.1 # Test runners -ruff==0.0.253 +ruff==0.0.254 sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 From 74fabc2ce5280cc62bd94b10c49fff5272ac7bf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 4 Mar 2023 10:17:44 +0000 Subject: [PATCH 0021/1638] Bump pytest from 7.2.1 to 7.2.2 in /requirements Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.1 to 7.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/7.2.1...7.2.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 460ef3e1c..6e01a59b5 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -17,7 +17,7 @@ pyenchant==3.2.2 # Bindings for a spellchecking sytem pylint==2.15.5 # Lint pyroma==4.2 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage -pytest==7.2.1 # Test runners +pytest==7.2.2 # Test runners ruff==0.0.254 sphinx-autodoc-typehints==1.22 sphinx-prompt==1.5.0 From 7114deceeeeaaa64e07fad79f5ae5cfacd81d8a1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 4 Mar 2023 18:10:23 +0000 Subject: [PATCH 0022/1638] Switch from setup.cfg to pyproject.toml for setuptools config --- pyproject.toml | 33 +++++++++++++++++++++++++++++++++ setup.cfg | 38 -------------------------------------- 2 files changed, 33 insertions(+), 38 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 33e030b5a..9438f5ebc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -151,6 +151,9 @@ ignore_missing_imports = true requires = ["setuptools", "pip", "wheel"] build-backend = "setuptools.build_meta" +[tool.distutils.bdist_wheel] +universal = true + [tool.ruff] select = ["ALL"] @@ -194,3 +197,33 @@ ignore = [ # Do not require tests to have a one-line summary. "D205", ] + +[project] +authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com"} ] +classifiers = [ + "Operating System :: POSIX", + "Environment :: Web Environment", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + "Development Status :: 5 - Production/Stable", +] +description = "Interact with the Vuforia Web Services (VWS) API." +dynamic = ["version"] +keywords = ["vuforia", "vws", "client"] +license = { file = "LICENSE" } +name = "vws-python" +readme = { file = "README.rst", content-type = "text/x-rst"} +requires-python = ">=3.10" + +[project.urls] +Source = "https://github.com/VWS-Python/vws-python" +Documentation = "https://vws-python.readthedocs.io/en/latest/" + +[tool.setuptools] +zip-safe = false + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +vws = ["py.typed"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 76a490df1..000000000 --- a/setup.cfg +++ /dev/null @@ -1,38 +0,0 @@ -[bdist_wheel] -universal = 1 - -[metadata] -name = VWS Python -description = Interact with the Vuforia Web Services (VWS) API. -long_description = file: README.rst -long_description_content_type = text/x-rst -keywords = vuforia client -license = MIT License -license_file = LICENSE -classifiers = - Operating System :: POSIX - Environment :: Web Environment - Programming Language :: Python :: 3.11 - License :: OSI Approved :: MIT License - Development Status :: 5 - Production/Stable -url = https://vws-python.readthedocs.io -author = Adam Dangoor -author_email = adamdangoor@gmail.com - -[options] -zip_safe = False -include_package_data = True -# Avoid dependency links because they are not supported by Read The Docs. -# -# Also, they require users to use ``--process-dependency-links``. -dependency_links = -package_dir= - =src -packages=find: - -[options.packages.find] -where=src - -[options.package_data] -vws = - py.typed From e22df7d0ea66463481b006c3a38332f8603c82bd Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Sun, 5 Mar 2023 10:06:35 +0000 Subject: [PATCH 0023/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 08fe2bd58..8feff3395 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2023.03.05 +------------ + 2021.03.28.2 ------------ From d9d602c4b20854233df49f47b2c74ed9b3acbed8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Mar 2023 10:11:00 +0000 Subject: [PATCH 0024/1638] Bump pylint to latest --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 6e01a59b5..6a193d98e 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -14,7 +14,7 @@ mypy==1.0.1 # Type checking pip_check_reqs==2.4.4 pydocstyle==6.3.0 # Lint docstrings pyenchant==3.2.2 # Bindings for a spellchecking sytem -pylint==2.15.5 # Lint +pylint==2.16.3 # Lint pyroma==4.2 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.2 # Test runners From 7a4135d9064092a813cc0e2c7ce2a3b71a96a57c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Mar 2023 17:50:15 +0000 Subject: [PATCH 0025/1638] Remove double prompt in release process docs --- docs/source/release-process.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/release-process.rst b/docs/source/release-process.rst index a9c773fe4..8b9f06a23 100644 --- a/docs/source/release-process.rst +++ b/docs/source/release-process.rst @@ -17,6 +17,6 @@ Perform a Release .. prompt:: bash :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/manual/installation From 065994cfcdbba703715dae0f85b9d9c2cf092d67 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Mar 2023 22:37:06 +0000 Subject: [PATCH 0026/1638] Move setuptools_scm config to pyproject.toml --- pyproject.toml | 2 ++ setup.py | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9438f5ebc..bf6b8ec55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -227,3 +227,5 @@ where = ["src"] [tool.setuptools.package-data] vws = ["py.typed"] + +[tool.setuptools_scm] diff --git a/setup.py b/setup.py index 7c8f1adf7..53d206039 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,5 @@ """Setup script for VWS Python, a wrapper for Vuforia's Web Services APIs.""" -from __future__ import annotations - from pathlib import Path from setuptools import setup @@ -30,9 +28,7 @@ def _get_dependencies(requirements_file: Path) -> list[str]: ) setup( - use_scm_version=True, setup_requires=SETUP_REQUIRES, install_requires=INSTALL_REQUIRES, extras_require={"dev": DEV_REQUIRES}, - python_requires=">=3", ) From 7faa4323b7d0868613807302eaf34c9748b1bde7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:01:29 +0000 Subject: [PATCH 0027/1638] Bump types-setuptools from 67.4.0.3 to 67.5.0.0 in /requirements Bumps [types-setuptools](https://github.com/python/typeshed) from 67.4.0.3 to 67.5.0.0. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 6a193d98e..d30392bf5 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -24,5 +24,5 @@ sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 types-requests==2.28.11.15 -types-setuptools==67.4.0.3 +types-setuptools==67.5.0.0 vulture==2.7 From 4f0d036be29b74e4fa8ce3305ec7fb0c01a3886a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:01:31 +0000 Subject: [PATCH 0028/1638] Bump vws-test-fixtures from 2022.1.3 to 2023.3.5 in /requirements Bumps [vws-test-fixtures](https://github.com/VWS-Python/vws-test-fixtures) from 2022.1.3 to 2023.3.5. - [Release notes](https://github.com/VWS-Python/vws-test-fixtures/releases) - [Changelog](https://github.com/VWS-Python/vws-test-fixtures/blob/master/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-test-fixtures/compare/2022.01.03...2023.03.05) --- updated-dependencies: - dependency-name: vws-test-fixtures dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 6a193d98e..f1fee9246 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -3,7 +3,7 @@ Pygments==2.14.0 Sphinx-Substitution-Extensions==2022.2.16 Sphinx==6.1.3 VWS-Python-Mock==2021.12.27.3 -VWS-Test-Fixtures==2022.1.3 +VWS-Test-Fixtures==2023.3.5 black==23.1.0 check-manifest==0.49 doc8==1.1.1 From 3dafc0219eddabbc2e83d7a80ef9ed210a5f1653 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 21:27:41 +0000 Subject: [PATCH 0029/1638] Bump vws-python-mock from 2021.12.27.3 to 2023.3.5 in /requirements Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2021.12.27.3 to 2023.3.5. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2021.12.27.3...2023.03.05) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 0138c42d8..cea2cac20 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -2,7 +2,7 @@ PyYAML==6.0 Pygments==2.14.0 Sphinx-Substitution-Extensions==2022.2.16 Sphinx==6.1.3 -VWS-Python-Mock==2021.12.27.3 +VWS-Python-Mock==2023.3.5 VWS-Test-Fixtures==2023.3.5 black==23.1.0 check-manifest==0.49 From 164b196304a50795db11ed873a8ba37e6b3b33a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 10:58:55 +0000 Subject: [PATCH 0030/1638] Bump pylint from 2.16.3 to 2.16.4 in /requirements Bumps [pylint](https://github.com/PyCQA/pylint) from 2.16.3 to 2.16.4. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](https://github.com/PyCQA/pylint/compare/v2.16.3...v2.16.4) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index cea2cac20..b16000179 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -14,7 +14,7 @@ mypy==1.0.1 # Type checking pip_check_reqs==2.4.4 pydocstyle==6.3.0 # Lint docstrings pyenchant==3.2.2 # Bindings for a spellchecking sytem -pylint==2.16.3 # Lint +pylint==2.16.4 # Lint pyroma==4.2 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.2 # Test runners From 45175791e49875ddfd41ed80370e2d75271e992d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 10:59:00 +0000 Subject: [PATCH 0031/1638] Bump mypy from 1.0.1 to 1.1.1 in /requirements Bumps [mypy](https://github.com/python/mypy) from 1.0.1 to 1.1.1. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v1.0.1...v1.1.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index cea2cac20..f802a8533 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -10,7 +10,7 @@ doc8==1.1.1 dodgy==0.2.1 # Look for uploaded secrets freezegun==1.2.2 furo==2022.12.7 -mypy==1.0.1 # Type checking +mypy==1.1.1 # Type checking pip_check_reqs==2.4.4 pydocstyle==6.3.0 # Lint docstrings pyenchant==3.2.2 # Bindings for a spellchecking sytem From ee57229b585f31764d94dbd3cfc7367812697ac9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Mar 2023 10:59:27 +0000 Subject: [PATCH 0032/1638] Bump types-setuptools from 67.5.0.0 to 67.6.0.0 in /requirements Bumps [types-setuptools](https://github.com/python/typeshed) from 67.5.0.0 to 67.6.0.0. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index fb085a416..296410890 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -24,5 +24,5 @@ sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 types-requests==2.28.11.15 -types-setuptools==67.5.0.0 +types-setuptools==67.6.0.0 vulture==2.7 From 33f1d07fb64b82cc4d0b16a62658308dbccfdf5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Mar 2023 10:59:38 +0000 Subject: [PATCH 0033/1638] Bump pylint from 2.16.4 to 2.17.0 in /requirements Bumps [pylint](https://github.com/PyCQA/pylint) from 2.16.4 to 2.17.0. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](https://github.com/PyCQA/pylint/compare/v2.16.4...v2.17.0) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index fb085a416..2f898aceb 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -14,7 +14,7 @@ mypy==1.1.1 # Type checking pip_check_reqs==2.4.4 pydocstyle==6.3.0 # Lint docstrings pyenchant==3.2.2 # Bindings for a spellchecking sytem -pylint==2.16.4 # Lint +pylint==2.17.0 # Lint pyroma==4.2 # Packaging best practices checker pytest-cov==4.0.0 # Measure code coverage pytest==7.2.2 # Test runners From 0a76b4ca9ebb3ad13e4827271b96227f24e6787f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 10 Mar 2023 18:10:56 +0000 Subject: [PATCH 0034/1638] Move requirements to pyproject.toml --- pyproject.toml | 6 ++++++ requirements/requirements.txt | 4 ---- setup.py | 5 ----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bf6b8ec55..6fce98828 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -214,6 +214,12 @@ license = { file = "LICENSE" } name = "vws-python" readme = { file = "README.rst", content-type = "text/x-rst"} requires-python = ">=3.10" +dependencies = [ + "VWS-Auth-Tools", + "func-timeout", + "requests", + "urllib3", +] [project.urls] Source = "https://github.com/VWS-Python/vws-python" diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 2ba459c37..e69de29bb 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,4 +0,0 @@ -VWS-Auth-Tools -func-timeout -requests -urllib3 diff --git a/setup.py b/setup.py index 53d206039..abedaf948 100644 --- a/setup.py +++ b/setup.py @@ -15,10 +15,6 @@ def _get_dependencies(requirements_file: Path) -> list[str]: return [line for line in lines if not line.startswith("#")] -INSTALL_REQUIRES = _get_dependencies( - requirements_file=Path("requirements/requirements.txt"), -) - DEV_REQUIRES = _get_dependencies( requirements_file=Path("requirements/dev-requirements.txt"), ) @@ -29,6 +25,5 @@ def _get_dependencies(requirements_file: Path) -> list[str]: setup( setup_requires=SETUP_REQUIRES, - install_requires=INSTALL_REQUIRES, extras_require={"dev": DEV_REQUIRES}, ) From 775bb9cfc87552c31566949ba582d26b261cba24 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 10 Mar 2023 19:08:55 +0000 Subject: [PATCH 0035/1638] Use pdm to get a list of dependencies for pip-check-reqs --- .github/workflows/ci.yml | 5 +---- .github/workflows/windows-ci.yml | 5 +---- MANIFEST.in | 1 - lint.mk | 2 ++ requirements/dev-requirements.txt | 2 +- requirements/requirements.txt | 0 setup.py | 21 --------------------- 7 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 requirements/requirements.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4086af23e..d3c94b7c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,10 +32,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.cache/pip - # This is like the example but we use ``*requirements.txt`` rather - # than ``requirements.txt`` because we have multiple requirements - # files. - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }} + key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 4d7d08d9f..637726ae9 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -32,10 +32,7 @@ jobs: - uses: actions/cache@v3 with: path: ~\AppData\Local\pip\Cache - # This is like the example but we use ``*requirements.txt`` rather - # than ``requirements.txt`` because we have multiple requirements - # files. - key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }} + key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- diff --git a/MANIFEST.in b/MANIFEST.in index 644e528be..15fe1e8bb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,2 @@ include src/vws/py.typed -include requirements/*.txt include pyproject.toml diff --git a/lint.mk b/lint.mk index 0d22c7b32..c7843930a 100644 --- a/lint.mk +++ b/lint.mk @@ -32,10 +32,12 @@ fix-ruff: .PHONY: pip-extra-reqs pip-extra-reqs: + pdm export --pyproject > requirements/requirements.txt pip-extra-reqs --requirements-file=requirements/requirements.txt src/ .PHONY: pip-missing-reqs pip-missing-reqs: + pdm export --pyproject > requirements/requirements.txt pip-missing-reqs --requirements-file=requirements/requirements.txt src/ .PHONY: pylint diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 35ed44e96..f300f429f 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -11,6 +11,7 @@ dodgy==0.2.1 # Look for uploaded secrets freezegun==1.2.2 furo==2022.12.7 mypy==1.1.1 # Type checking +pdm==2.4.8 pip_check_reqs==2.4.4 pydocstyle==6.3.0 # Lint docstrings pyenchant==3.2.2 # Bindings for a spellchecking sytem @@ -24,5 +25,4 @@ sphinx-prompt==1.5.0 sphinxcontrib-spelling==8.0.0 types-freezegun==1.1.10 types-requests==2.28.11.15 -types-setuptools==67.6.0.0 vulture==2.7 diff --git a/requirements/requirements.txt b/requirements/requirements.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/setup.py b/setup.py index abedaf948..0ba349562 100644 --- a/setup.py +++ b/setup.py @@ -1,28 +1,7 @@ """Setup script for VWS Python, a wrapper for Vuforia's Web Services APIs.""" -from pathlib import Path - from setuptools import setup - -def _get_dependencies(requirements_file: Path) -> list[str]: - """ - Return requirements from a requirements file. - - This expects a requirements file with no ``--find-links`` lines. - """ - lines = requirements_file.read_text().strip().split("\n") - return [line for line in lines if not line.startswith("#")] - - -DEV_REQUIRES = _get_dependencies( - requirements_file=Path("requirements/dev-requirements.txt"), -) - -SETUP_REQUIRES = _get_dependencies( - requirements_file=Path("requirements/setup-requirements.txt"), -) - setup( setup_requires=SETUP_REQUIRES, extras_require={"dev": DEV_REQUIRES}, From 37c9e713e25107bb2bdad04d7ec70b20b6923b64 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 10 Mar 2023 19:13:25 +0000 Subject: [PATCH 0036/1638] Move dev requirements to pyproject.toml --- pyproject.toml | 32 +++++++++++++++++++++++++++++++ requirements/dev-requirements.txt | 28 --------------------------- setup.py | 1 - 3 files changed, 32 insertions(+), 29 deletions(-) delete mode 100644 requirements/dev-requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 6fce98828..4b42d8804 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -221,6 +221,38 @@ dependencies = [ "urllib3", ] +[project.optional-dependencies] +dev = [ + "PyYAML==6.0", + "Pygments==2.14.0", + "Sphinx-Substitution-Extensions==2022.2.16", + "Sphinx==6.1.3", + "VWS-Python-Mock==2023.3.5", + "VWS-Test-Fixtures==2023.3.5", + "black==23.1.0", + "check-manifest==0.49", + "doc8==1.1.1", + "dodgy==0.2.1", + "freezegun==1.2.2", + "furo==2022.12.7", + "mypy==1.1.1", + "pdm==2.4.8", + "pip_check_reqs==2.4.4", + "pydocstyle==6.3.0 ", + "pyenchant==3.2.2 ", + "pylint==2.17.0 ", + "pyroma==4.2", + "pytest-cov==4.0.0", + "pytest==7.2.2 ", + "ruff==0.0.254", + "sphinx-autodoc-typehints==1.22", + "sphinx-prompt==1.5.0", + "sphinxcontrib-spelling==8.0.0", + "types-freezegun==1.1.10", + "types-requests==2.28.11.15", + "vulture==2.7", +] + [project.urls] Source = "https://github.com/VWS-Python/vws-python" Documentation = "https://vws-python.readthedocs.io/en/latest/" diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt deleted file mode 100644 index f300f429f..000000000 --- a/requirements/dev-requirements.txt +++ /dev/null @@ -1,28 +0,0 @@ -PyYAML==6.0 -Pygments==2.14.0 -Sphinx-Substitution-Extensions==2022.2.16 -Sphinx==6.1.3 -VWS-Python-Mock==2023.3.5 -VWS-Test-Fixtures==2023.3.5 -black==23.1.0 -check-manifest==0.49 -doc8==1.1.1 -dodgy==0.2.1 # Look for uploaded secrets -freezegun==1.2.2 -furo==2022.12.7 -mypy==1.1.1 # Type checking -pdm==2.4.8 -pip_check_reqs==2.4.4 -pydocstyle==6.3.0 # Lint docstrings -pyenchant==3.2.2 # Bindings for a spellchecking sytem -pylint==2.17.0 # Lint -pyroma==4.2 # Packaging best practices checker -pytest-cov==4.0.0 # Measure code coverage -pytest==7.2.2 # Test runners -ruff==0.0.254 -sphinx-autodoc-typehints==1.22 -sphinx-prompt==1.5.0 -sphinxcontrib-spelling==8.0.0 -types-freezegun==1.1.10 -types-requests==2.28.11.15 -vulture==2.7 diff --git a/setup.py b/setup.py index 0ba349562..1a83dec17 100644 --- a/setup.py +++ b/setup.py @@ -4,5 +4,4 @@ setup( setup_requires=SETUP_REQUIRES, - extras_require={"dev": DEV_REQUIRES}, ) From e9031dfd6341d94f2f2277ec4cab894bb25be854 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 10 Mar 2023 19:15:44 +0000 Subject: [PATCH 0037/1638] Move setup requirements to pyproject.toml --- pyproject.toml | 8 +++++++- requirements/setup-requirements.txt | 2 -- setup.py | 4 +--- 3 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 requirements/setup-requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 4b42d8804..82f59df39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,7 +148,13 @@ module = [ ignore_missing_imports = true [build-system] -requires = ["setuptools", "pip", "wheel"] +requires = [ + "pip", + "setuptools", + "setuptools-scm-git-archive==1.4", + "setuptools_scm[toml]==7.1.0", + "wheel", +] build-backend = "setuptools.build_meta" [tool.distutils.bdist_wheel] diff --git a/requirements/setup-requirements.txt b/requirements/setup-requirements.txt deleted file mode 100644 index 6ad6a80ee..000000000 --- a/requirements/setup-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -setuptools_scm==7.1.0 -setuptools-scm-git-archive==1.4 diff --git a/setup.py b/setup.py index 1a83dec17..017ba0d27 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,4 @@ from setuptools import setup -setup( - setup_requires=SETUP_REQUIRES, -) +setup() From 4f7252cad27671c52214bebf12b1bfc14857e83e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 10 Mar 2023 19:17:52 +0000 Subject: [PATCH 0038/1638] Remove setup.py --- setup.py | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 setup.py diff --git a/setup.py b/setup.py deleted file mode 100644 index 017ba0d27..000000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Setup script for VWS Python, a wrapper for Vuforia's Web Services APIs.""" - -from setuptools import setup - -setup() From 0dc2d458d530cfa58ac469b1b5cb5ebf7af597bd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 10 Mar 2023 19:28:48 +0000 Subject: [PATCH 0039/1638] Update lint commands to account for changes --- lint.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lint.mk b/lint.mk index c7843930a..5c8151867 100644 --- a/lint.mk +++ b/lint.mk @@ -32,17 +32,15 @@ fix-ruff: .PHONY: pip-extra-reqs pip-extra-reqs: - pdm export --pyproject > requirements/requirements.txt - pip-extra-reqs --requirements-file=requirements/requirements.txt src/ + pdm export --pyproject | pip-extra-reqs --requirements-file=/dev/fd/0 src/ .PHONY: pip-missing-reqs pip-missing-reqs: - pdm export --pyproject > requirements/requirements.txt - pip-missing-reqs --requirements-file=requirements/requirements.txt src/ + pdm export --pyproject | pip-missing-reqs --requirements-file=/dev/fd/0 src/ .PHONY: pylint pylint: - pylint *.py src/ tests/ docs/ + pylint src/ tests/ docs/ .PHONY: pyroma pyroma: From 01b1232542de8baf9069316e44c04ce1e44a0eed Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 10 Mar 2023 19:32:49 +0000 Subject: [PATCH 0040/1638] Update dependabot settings --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4173a0589..a04c486d6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,7 @@ version: 2 updates: - package-ecosystem: pip - directory: "/requirements" + directory: "/" schedule: interval: daily open-pull-requests-limit: 10 From de2ed6c65de2033e583222df663b1772bb642c6e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 11 Mar 2023 00:08:49 +0000 Subject: [PATCH 0041/1638] Add back types-setuptools, we still need it for sphinx config --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 82f59df39..2cd781792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,6 +256,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "types-freezegun==1.1.10", "types-requests==2.28.11.15", + "types-setuptools==67.6.0.0", "vulture==2.7", ] From 4fa6874d5df01ee298ddd8143b86dd45861c419a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 11 Mar 2023 20:14:45 +0000 Subject: [PATCH 0042/1638] Neaten how we do pip-check-reqs --- lint.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lint.mk b/lint.mk index 5c8151867..4eb884039 100644 --- a/lint.mk +++ b/lint.mk @@ -32,11 +32,11 @@ fix-ruff: .PHONY: pip-extra-reqs pip-extra-reqs: - pdm export --pyproject | pip-extra-reqs --requirements-file=/dev/fd/0 src/ + pip-extra-reqs --requirements-file=<(pdm export --pyproject) src/ .PHONY: pip-missing-reqs pip-missing-reqs: - pdm export --pyproject | pip-missing-reqs --requirements-file=/dev/fd/0 src/ + pip-missing-reqs --requirements-file=<(pdm export --pyproject) src/ .PHONY: pylint pylint: From d53e9a117dca225230fca3b06367f9a00b025deb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 11 Mar 2023 23:27:59 +0000 Subject: [PATCH 0043/1638] Switch to new way of getting version for Sphinx build. --- docs/source/conf.py | 7 +++---- pyproject.toml | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 7d35d92ad..f3f0c9e3b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,8 +6,7 @@ # pylint: disable=invalid-name import datetime - -from pkg_resources import get_distribution +import importlib.metadata project = "VWS-Python" author = "Adam Dangoor" @@ -33,9 +32,9 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -# Use ``pkg_resources`` as per +# Use ``importlib.metadata.version`` as per # https://github.com/pypa/setuptools_scm#usage-from-sphinx. -version = get_distribution(project).version +version = importlib.metadata.version(distribution_name=project) _month, _day, _year, *_ = version.split(".") release = f"{_month}.{_day}.{_year}" diff --git a/pyproject.toml b/pyproject.toml index 2cd781792..82f59df39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,6 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "types-freezegun==1.1.10", "types-requests==2.28.11.15", - "types-setuptools==67.6.0.0", "vulture==2.7", ] From a853cde2c561a8b3dcef846977c0ce94e7eee2e9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 07:40:34 +0000 Subject: [PATCH 0044/1638] Progress towards tested docs --- docs/source/conf.py | 1 + docs/source/index.rst | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index f3f0c9e3b..d6060a1f1 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,6 +13,7 @@ extensions = [ "sphinx.ext.autodoc", + "sphinx.ext.doctest", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", "sphinx_autodoc_typehints", diff --git a/docs/source/index.rst b/docs/source/index.rst index 9ac46da27..436280f3c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,6 +16,8 @@ Usage See the :doc:`api-reference` for full usage details. +.. TODO - make this a doctest with hidden mock as setup + .. code:: python import io @@ -61,20 +63,24 @@ To write unit tests for code which uses this library, without using your Vuforia pip3 install vws-python-mock -.. code:: python +.. testcode:: + + import io - from mock_vws import MockVWS, VuforiaDatabase + from mock_vws.database import VuforiaDatabase + from mock_vws import MockVWS + from vws import CloudRecoService, VWS with MockVWS() as mock: database = VuforiaDatabase() mock.add_database(database=database) vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, ) cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, ) name = 'my_image_name' From ac954c1eff947f2326c7d1443f2803ae5fa68e1c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 07:49:17 +0000 Subject: [PATCH 0045/1638] Passing doctest --- docs/source/index.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 436280f3c..ab4895ea0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -66,6 +66,7 @@ To write unit tests for code which uses this library, without using your Vuforia .. testcode:: import io + import pathlib from mock_vws.database import VuforiaDatabase from mock_vws import MockVWS @@ -83,15 +84,17 @@ To write unit tests for code which uses this library, without using your Vuforia client_secret_key=database.client_secret_key, ) - name = 'my_image_name' - with open('/path/to/image.png', 'rb') as my_image_file: + image = pathlib.Path('high_quality_image.jpg').resolve() + with image.open(mode='rb') as my_image_file: my_image = io.BytesIO(my_image_file.read()) target_id = vws_client.add_target( - name=name, + name="example_image_name", width=1, image=my_image, + application_metadata=None, + active_flag=True, ) There are some differences between the mock and the real Vuforia. From a86e9dae1678d4ecaf2b48c3ee2ef5b0903468c2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 07:53:59 +0000 Subject: [PATCH 0046/1638] Passing doctest --- docs/source/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index ab4895ea0..ed1a06991 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -17,6 +17,7 @@ Usage See the :doc:`api-reference` for full usage details. .. TODO - make this a doctest with hidden mock as setup +.. TODO - run doctest on CI .. code:: python @@ -85,7 +86,7 @@ To write unit tests for code which uses this library, without using your Vuforia ) - image = pathlib.Path('high_quality_image.jpg').resolve() + image = pathlib.Path('high_quality_image.jpg') with image.open(mode='rb') as my_image_file: my_image = io.BytesIO(my_image_file.read()) From 8e579a2b1b6c5ac47445cc05d6fcf1c28b5bdaeb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 08:25:29 +0000 Subject: [PATCH 0047/1638] Passing doctest without adding image to Git --- docs/source/index.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/source/index.rst b/docs/source/index.rst index ed1a06991..91a4dd870 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -64,6 +64,19 @@ To write unit tests for code which uses this library, without using your Vuforia pip3 install vws-python-mock +.. testsetup:: + + 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) + .. testcode:: import io @@ -98,6 +111,11 @@ To write unit tests for code which uses this library, without using your Vuforia active_flag=True, ) +.. testcleanup:: + + 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. From ff871d8685041ebf486e812d1d5fd87d09102a6f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 09:11:26 +0000 Subject: [PATCH 0048/1638] Run test on CI --- Makefile | 1 + docs/source/index.rst | 3 --- lint.mk | 4 ++++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7e7e1c51c..671b6b0da 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ lint: \ black \ check-manifest \ doc8 \ + doctest \ linkcheck \ mypy \ ruff \ diff --git a/docs/source/index.rst b/docs/source/index.rst index 91a4dd870..2c25dc31c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,9 +16,6 @@ Usage See the :doc:`api-reference` for full usage details. -.. TODO - make this a doctest with hidden mock as setup -.. TODO - run doctest on CI - .. code:: python import io diff --git a/lint.mk b/lint.mk index 4eb884039..8c2bf3f2a 100644 --- a/lint.mk +++ b/lint.mk @@ -57,3 +57,7 @@ linkcheck: .PHONY: spelling spelling: $(MAKE) -C docs/ spelling SPHINXOPTS=$(SPHINXOPTS) + +.PHONY: doctest +doctest: + $(MAKE) -C docs/ doctest SPHINXOPTS=$(SPHINXOPTS) From 150add9810c74f6692714ca71c79e2fa17e5ebe6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 09:34:24 +0000 Subject: [PATCH 0049/1638] Use doctest for simple docs example --- docs/source/index.rst | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 2c25dc31c..8148b21b0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,9 +16,35 @@ Usage See the :doc:`api-reference` for full usage details. -.. code:: python +.. testsetup:: simple + + 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) + mock.__enter__() + + # 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) + +.. testcode:: simple import io + import pathlib from vws import VWS, CloudRecoService @@ -37,7 +63,8 @@ See the :doc:`api-reference` for full usage details. ) name = 'my_image_name' - with open('/path/to/image.png', 'rb') as my_image_file: + image = pathlib.Path('high_quality_image.jpg') + with image.open(mode='rb') as my_image_file: my_image = io.BytesIO(my_image_file.read()) target_id = vws_client.add_target( @@ -52,6 +79,12 @@ See the :doc:`api-reference` for full usage details. assert matching_targets[0].target_id == target_id +.. testcleanup:: simple + + new_image = pathlib.Path('high_quality_image.jpg') + new_image.unlink() + mock.__exit__() + Testing ------- @@ -61,7 +94,7 @@ To write unit tests for code which uses this library, without using your Vuforia pip3 install vws-python-mock -.. testsetup:: +.. testsetup:: testing import pathlib import shutil @@ -74,7 +107,7 @@ To write unit tests for code which uses this library, without using your Vuforia new_image = pathlib.Path('high_quality_image.jpg') shutil.copy(image, new_image) -.. testcode:: +.. testcode:: testing import io import pathlib @@ -108,7 +141,7 @@ To write unit tests for code which uses this library, without using your Vuforia active_flag=True, ) -.. testcleanup:: +.. testcleanup:: testing new_image = pathlib.Path('high_quality_image.jpg') new_image.unlink() From 310d9d4c874000bd46ee7b9b794dcfa1462911d8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 09:54:53 +0000 Subject: [PATCH 0050/1638] Start testing README --- README.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9a758c090..ef3f9bd9e 100644 --- a/README.rst +++ b/README.rst @@ -18,7 +18,11 @@ Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with a Getting Started --------------- -.. code:: python +.. testsetup:: simple + + assert False + +.. testcode:: simple import io From 246f462153c51eab36794c83d402becd3fd51f3e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 09:58:02 +0000 Subject: [PATCH 0051/1638] Switch to pathlib --- README.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index ef3f9bd9e..dcb0e42f5 100644 --- a/README.rst +++ b/README.rst @@ -18,13 +18,10 @@ Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with a Getting Started --------------- -.. testsetup:: simple - - assert False - -.. testcode:: simple +.. code:: python import io + import pathlib from vws import VWS, CloudRecoService @@ -43,7 +40,8 @@ Getting Started ) name = 'my_image_name' - with open('/path/to/image.png', 'rb') as my_image_file: + image = pathlib.Path('high_quality_image.jpg') + with image.open(mode='rb') as my_image_file: my_image = io.BytesIO(my_image_file.read()) target_id = vws_client.add_target( From 8e0314672a129af7afb4ab64e2f1256917a0b840 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 10:26:47 +0000 Subject: [PATCH 0052/1638] Use README markdown for easier testing with sphinx-codeblocks --- README.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..be2e13bad --- /dev/null +++ b/README.md @@ -0,0 +1,65 @@ +[![Build +Status](https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg)](https://github.com/VWS-Python/vws-python/actions) +[![codecov](https://codecov.io/gh/VWS-Python/vws-python/branch/master/graph/badge.svg)](https://codecov.io/gh/VWS-Python/vws-python) +[![PyPI](https://badge.fury.io/py/VWS-Python.svg)](https://badge.fury.io/py/VWS-Python) +[![Documentation Status](https://readthedocs.org/projects/vws-python/badge/?version=latest)](https://vws-python.readthedocs.io/en/latest/?badge=latest) + +# vws-python + +Python library for the Vuforia Web Services (VWS) API and the Vuforia +Web Query API. + +## Installation + +```sh +pip install vws-python +``` + +This is tested on Python 3.11+. Get in touch with +`adamdangoor@gmail.com` if you would like to use this with another +language. + +## Getting Started + +```python +import io +import pathlib + +from vws import VWS, CloudRecoService + +server_access_key = '[server-access-key]' +server_secret_key = '[server-secret-key]' +client_access_key = '[client-access-key]' +client_secret_key = '[client-secret-key]' + +vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, +) +cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, +) +name = 'my_image_name' + +image = pathlib.Path('high_quality_image.jpg') +with image.open(mode='rb') as my_image_file: + my_image = io.BytesIO(my_image_file.read()) + +target_id = vws_client.add_target( + name=name, + width=1, + image=my_image, + active_flag=True, + application_metadata=None, +) +vws_client.wait_for_target_processed(target_id=target_id) +matching_targets = cloud_reco_client.query(image=my_image) + +assert matching_targets[0].target_id == target_id +``` + +## Full Documentation + +See the [full +documentation](https://vws-python.readthedocs.io/en/latest). From 00ac78601d82453bbdd4f8860ddc73c7230ba01d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 10:27:22 +0000 Subject: [PATCH 0053/1638] Add TODO for later --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 82f59df39..5122cb378 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -259,6 +259,8 @@ dev = [ "vulture==2.7", ] +# TODO add pytest-codeblocks here + add it to CI + [project.urls] Source = "https://github.com/VWS-Python/vws-python" Documentation = "https://vws-python.readthedocs.io/en/latest/" From 88f487d76fc5135d934b81e57ab2a1d72c8fbf0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Mar 2023 11:10:24 +0000 Subject: [PATCH 0054/1638] Bump ruff from 0.0.254 to 0.0.255 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.254 to 0.0.255. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.254...v0.0.255) --- 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 82f59df39..8e16f5247 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -250,7 +250,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.2.2 ", - "ruff==0.0.254", + "ruff==0.0.255", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From dfef4d53392498f1d5cdbd3a8bc61e0d1ffcd6e9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 12:00:44 +0000 Subject: [PATCH 0055/1638] Add setup and teardown for markdown test --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index be2e13bad..557a11372 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,33 @@ language. ## Getting Started + + ```python import io import pathlib @@ -59,6 +86,15 @@ matching_targets = cloud_reco_client.query(image=my_image) assert matching_targets[0].target_id == target_id ``` + + ## Full Documentation See the [full From 9beeda298405118da8c00b01c87531568e768a5c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 12:03:42 +0000 Subject: [PATCH 0056/1638] Progress --- README.rst | 73 -------------------------------------------------- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 README.rst diff --git a/README.rst b/README.rst deleted file mode 100644 index dcb0e42f5..000000000 --- a/README.rst +++ /dev/null @@ -1,73 +0,0 @@ -|Build Status| |codecov| |PyPI| |Documentation Status| - -vws-python -========== - -Python library for the Vuforia Web Services (VWS) API and the Vuforia Web Query API. - -Installation ------------- - -.. code:: sh - - pip install vws-python - -This is tested on Python 3.11+. -Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. - -Getting Started ---------------- - -.. code:: python - - import io - import pathlib - - from vws import VWS, CloudRecoService - - server_access_key = '[server-access-key]' - server_secret_key = '[server-secret-key]' - client_access_key = '[client-access-key]' - client_secret_key = '[client-secret-key]' - - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, - ) - name = 'my_image_name' - - image = pathlib.Path('high_quality_image.jpg') - with image.open(mode='rb') as my_image_file: - my_image = io.BytesIO(my_image_file.read()) - - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image) - - assert matching_targets[0].target_id == target_id - - -Full Documentation ------------------- - -See the `full documentation `__. - -.. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg - :target: https://github.com/VWS-Python/vws-python/actions -.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/master/graph/badge.svg - :target: https://codecov.io/gh/VWS-Python/vws-python -.. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest - :target: https://vws-python.readthedocs.io/en/latest/?badge=latest - :alt: Documentation Status -.. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg - :target: https://badge.fury.io/py/VWS-Python diff --git a/pyproject.toml b/pyproject.toml index 5122cb378..dbfc99dec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -218,7 +218,7 @@ dynamic = ["version"] keywords = ["vuforia", "vws", "client"] license = { file = "LICENSE" } name = "vws-python" -readme = { file = "README.rst", content-type = "text/x-rst"} +readme = { file = "README.md", content-type = "text/markdown"} requires-python = ">=3.10" dependencies = [ "VWS-Auth-Tools", From a7fa9ae092cd70c0ec21de6adcbcd4dca0bf8766 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 12:07:40 +0000 Subject: [PATCH 0057/1638] Clean up mock after README test --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 557a11372..260ce8229 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ shutil.copy(image, new_image) ``` --> + + ```python import io import pathlib @@ -86,12 +88,13 @@ matching_targets = cloud_reco_client.query(image=my_image) assert matching_targets[0].target_id == target_id ``` + + From 4f907498ed4c35b1a07b7ce4cbde6e2c4175163b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 12:11:44 +0000 Subject: [PATCH 0058/1638] Run doctests on CI --- lint.mk | 1 + pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/lint.mk b/lint.mk index 8c2bf3f2a..a49af3243 100644 --- a/lint.mk +++ b/lint.mk @@ -61,3 +61,4 @@ spelling: .PHONY: doctest doctest: $(MAKE) -C docs/ doctest SPHINXOPTS=$(SPHINXOPTS) + pytest --codeblocks README.md diff --git a/pyproject.toml b/pyproject.toml index dbfc99dec..0cc4e26c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -249,6 +249,7 @@ dev = [ "pylint==2.17.0 ", "pyroma==4.2", "pytest-cov==4.0.0", + "pytest_codeblocks==0.16.1", "pytest==7.2.2 ", "ruff==0.0.254", "sphinx-autodoc-typehints==1.22", From 559073d14de903b4addc90073d97cd7842753348 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 12:15:45 +0000 Subject: [PATCH 0059/1638] Remove done TODO --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0cc4e26c0..1097a19ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -260,8 +260,6 @@ dev = [ "vulture==2.7", ] -# TODO add pytest-codeblocks here + add it to CI - [project.urls] Source = "https://github.com/VWS-Python/vws-python" Documentation = "https://vws-python.readthedocs.io/en/latest/" From 335661fdcff5d2777daa5044ac30a7f5641d9e6d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 23:15:37 +0000 Subject: [PATCH 0060/1638] Enable more ruff checks --- .vscode/extensions.json | 7 +++++++ .vscode/settings.json | 9 +++++++++ pyproject.toml | 8 -------- src/vws/query.py | 5 ++++- src/vws/vws.py | 5 ++++- tests/test_vws.py | 5 ++++- 6 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..ba237974f --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "ms-python.black-formatter", + "charliermarsh.ruff", + "ms-python.python" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..a3f9997dc --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "[python]": { + "editor.codeActionsOnSave": { + "source.fixAll": true + }, + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.formatOnSave": true + } +} diff --git a/pyproject.toml b/pyproject.toml index 5111f1cfb..167058ae0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -174,9 +174,6 @@ ignore = [ "D205", "D212", "D213", - # Allow backslashes in a docstring. - # See https://click.palletsprojects.com/en/8.0.x/documentation/#preventing-rewrapping. - "D301", # It is too much work to make every docstring imperative. "D401", # We ignore some docstyle errors which do not apply to Google style @@ -188,14 +185,9 @@ ignore = [ "N818", # Ignore "too-many-*" errors as they seem to get in the way more than # helping. - "PLR0912", "PLR0913", # Allow 'assert' as we use it for tests. "S101", - # Allow imports which are only used for type checking to be outside type - # checking blocks. - "TCH002", - "TCH003", ] [tool.ruff.per-file-ignores] diff --git a/src/vws/query.py b/src/vws/query.py index bc2909a21..021f8665c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -5,8 +5,8 @@ from __future__ import annotations import datetime -import io from http import HTTPStatus +from typing import TYPE_CHECKING from urllib.parse import urljoin import requests @@ -27,6 +27,9 @@ from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData +if TYPE_CHECKING: + import io + class CloudRecoService: """ diff --git a/src/vws/vws.py b/src/vws/vws.py index 349123def..f15f0684f 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -5,10 +5,10 @@ from __future__ import annotations import base64 -import io import json from datetime import date from time import sleep +from typing import TYPE_CHECKING from urllib.parse import urljoin import requests @@ -47,6 +47,9 @@ TargetSummaryReport, ) +if TYPE_CHECKING: + import io + def _target_api_request( server_access_key: str, diff --git a/tests/test_vws.py b/tests/test_vws.py index f7f09f6bc..2eb519ebb 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -6,9 +6,9 @@ import base64 import datetime -import io import random import uuid +from typing import TYPE_CHECKING import pytest from freezegun import freeze_time @@ -23,6 +23,9 @@ TargetSummaryReport, ) +if TYPE_CHECKING: + import io + class TestAddTarget: """ From 12117fa3f4f7ffa90dfd50578922b44dda582c5b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 23:24:20 +0000 Subject: [PATCH 0061/1638] Exclude type checking blocks from code coverage report --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 167058ae0..b52dbd361 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,6 +92,9 @@ line-length = 79 branch = true +[tool.coverage.report] +exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] + [tool.pytest.ini_options] xfail_strict = true From aebc6eff7699b67335d8dfccf4983e9cb0cc1471 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 14 Mar 2023 23:55:06 +0000 Subject: [PATCH 0062/1638] Enable ruff TCH checks in more files --- src/vws/exceptions/base_exceptions.py | 7 ++++++- tests/conftest.py | 7 ++++++- tests/test_cloud_reco_exceptions.py | 7 ++++++- tests/test_query.py | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 66c0ae70c..afaa56fac 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -3,7 +3,12 @@ Cloud Recognition Web API. """ -from requests import Response +from __future__ import annotations + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from requests import Response class CloudRecoException(Exception): diff --git a/tests/conftest.py b/tests/conftest.py index 8c17fcb2a..6c514f3fa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,13 +2,18 @@ Configuration, plugins and fixtures for `pytest`. """ -from collections.abc import Iterator +from __future__ import annotations + +from typing import TYPE_CHECKING import pytest from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase from vws import VWS, CloudRecoService +if TYPE_CHECKING: + from collections.abc import Iterator + @pytest.fixture(name="_mock_database") def mock_database() -> Iterator[VuforiaDatabase]: diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 5221f98c2..079857947 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -2,10 +2,12 @@ Tests for exceptions raised when using the CloudRecoService. """ -import io +from __future__ import annotations + import time import uuid from http import HTTPStatus +from typing import TYPE_CHECKING import pytest from mock_vws import MockVWS @@ -25,6 +27,9 @@ RequestEntityTooLarge, ) +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 e26d86edd..048200b2c 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -2,14 +2,19 @@ Tests for the ``CloudRecoService`` querying functionality. """ -import io +from __future__ import annotations + import uuid +from typing import TYPE_CHECKING from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase from vws import VWS, CloudRecoService from vws.include_target_data import CloudRecoIncludeTargetData +if TYPE_CHECKING: + import io + class TestQuery: """ From c1610911a3538ed15a156e0fa7e4e2e440a3ac0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Mar 2023 11:09:01 +0000 Subject: [PATCH 0063/1638] Bump ruff from 0.0.255 to 0.0.256 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.255 to 0.0.256. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.255...v0.0.256) --- 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 b52dbd361..437e6b0ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,7 +246,7 @@ dev = [ "pytest-cov==4.0.0", "pytest_codeblocks==0.16.1", "pytest==7.2.2 ", - "ruff==0.0.255", + "ruff==0.0.256", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From bed220bfb727154051ebc7c7dce3cfe99aa5c046 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:52:22 +0000 Subject: [PATCH 0064/1638] Bump pdm from 2.4.8 to 2.4.9 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.4.8 to 2.4.9. - [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.4.8...2.4.9) --- 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 437e6b0ee..69fd4c4d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -237,7 +237,7 @@ dev = [ "freezegun==1.2.2", "furo==2022.12.7", "mypy==1.1.1", - "pdm==2.4.8", + "pdm==2.4.9", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 3e1ff2e1c3ae2ecfbaff7192aa704462133e26b9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 18 Mar 2023 18:59:51 +0000 Subject: [PATCH 0065/1638] Allow the public methods to take file-like objects, not just io.BytesIO --- CHANGELOG.rst | 2 ++ README.md | 21 ++++++-------- docs/source/index.rst | 38 +++++++++++-------------- src/vws/query.py | 15 ++++++---- src/vws/vws.py | 16 ++++++++--- tests/conftest.py | 36 +++++++++++++++++++---- tests/test_query.py | 66 +++++++++++++++++++++---------------------- tests/test_vws.py | 66 +++++++++++++++++++++---------------------- 8 files changed, 146 insertions(+), 114 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8feff3395..b1f863684 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Support file-like objects in every method which accepts a file. + 2023.03.05 ------------ diff --git a/README.md b/README.md index 260ce8229..49c0de9b4 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,6 @@ shutil.copy(image, new_image) ```python -import io import pathlib from vws import VWS, CloudRecoService @@ -73,17 +72,15 @@ name = 'my_image_name' image = pathlib.Path('high_quality_image.jpg') with image.open(mode='rb') as my_image_file: - my_image = io.BytesIO(my_image_file.read()) - -target_id = vws_client.add_target( - name=name, - width=1, - image=my_image, - active_flag=True, - application_metadata=None, -) -vws_client.wait_for_target_processed(target_id=target_id) -matching_targets = cloud_reco_client.query(image=my_image) + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) assert matching_targets[0].target_id == target_id ``` diff --git a/docs/source/index.rst b/docs/source/index.rst index 8148b21b0..7510dc42d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -43,7 +43,6 @@ See the :doc:`api-reference` for full usage details. .. testcode:: simple - import io import pathlib from vws import VWS, CloudRecoService @@ -65,17 +64,15 @@ See the :doc:`api-reference` for full usage details. image = pathlib.Path('high_quality_image.jpg') with image.open(mode='rb') as my_image_file: - my_image = io.BytesIO(my_image_file.read()) - - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image) + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) assert matching_targets[0].target_id == target_id @@ -109,7 +106,6 @@ To write unit tests for code which uses this library, without using your Vuforia .. testcode:: testing - import io import pathlib from mock_vws.database import VuforiaDatabase @@ -131,15 +127,13 @@ To write unit tests for code which uses this library, without using your Vuforia image = pathlib.Path('high_quality_image.jpg') with image.open(mode='rb') as my_image_file: - my_image = io.BytesIO(my_image_file.read()) - - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image, - application_metadata=None, - active_flag=True, - ) + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, + ) .. testcleanup:: testing diff --git a/src/vws/query.py b/src/vws/query.py index 021f8665c..08ce1aaa9 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -6,7 +6,7 @@ import datetime from http import HTTPStatus -from typing import TYPE_CHECKING +from typing import BinaryIO from urllib.parse import urljoin import requests @@ -27,8 +27,13 @@ from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -if TYPE_CHECKING: - import io + +def _get_image_data(image: BinaryIO) -> bytes: + original_tell = image.tell() + image.seek(0) + image_data = image.read() + image.seek(original_tell) + return image_data class CloudRecoService: @@ -54,7 +59,7 @@ def __init__( def query( self, - image: io.BytesIO, + image: BinaryIO, max_num_results: int = 1, include_target_data: CloudRecoIncludeTargetData = ( CloudRecoIncludeTargetData.TOP @@ -96,7 +101,7 @@ def query( Returns: An ordered list of target details of matching targets. """ - image_content = image.getvalue() + image_content = _get_image_data(image=image) body = { "image": ("image.jpeg", image_content, "image/jpeg"), "max_num_results": (None, int(max_num_results), "text/plain"), diff --git a/src/vws/vws.py b/src/vws/vws.py index f15f0684f..cfc79e888 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -8,7 +8,7 @@ import json from datetime import date from time import sleep -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, BinaryIO from urllib.parse import urljoin import requests @@ -51,6 +51,14 @@ import io +def _get_image_data(image: BinaryIO) -> bytes: + original_tell = image.tell() + image.seek(0) + image_data = image.read() + image.seek(original_tell) + return image_data + + def _target_api_request( server_access_key: str, server_secret_key: str, @@ -204,7 +212,7 @@ def add_target( self, name: str, width: int | float, - image: io.BytesIO, + image: BinaryIO, application_metadata: str | None, *, active_flag: bool, @@ -255,7 +263,7 @@ def add_target( occurred". This has been seen to happen when the given name includes a bad character. """ - image_data = image.getvalue() + image_data = _get_image_data(image=image) image_data_encoded = base64.b64encode(image_data).decode("ascii") data = { @@ -644,7 +652,7 @@ def update_target( data["width"] = width if image is not None: - image_data = image.getvalue() + image_data = _get_image_data(image=image) image_data_encoded = base64.b64encode(image_data).decode("ascii") data["image"] = image_data_encoded diff --git a/tests/conftest.py b/tests/conftest.py index 6c514f3fa..ac8181bd7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,7 +4,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING +import io +from typing import TYPE_CHECKING, BinaryIO import pytest from mock_vws import MockVWS @@ -12,11 +13,12 @@ from vws import VWS, CloudRecoService if TYPE_CHECKING: - from collections.abc import Iterator + from collections.abc import Generator + from pathlib import Path @pytest.fixture(name="_mock_database") -def mock_database() -> Iterator[VuforiaDatabase]: +def mock_database() -> Generator[VuforiaDatabase, None, None]: """ Yield a mock ``VuforiaDatabase``. """ @@ -29,7 +31,7 @@ def mock_database() -> Iterator[VuforiaDatabase]: @pytest.fixture() def vws_client(_mock_database: VuforiaDatabase) -> VWS: """ - Yield a VWS client which connects to a mock database. + A VWS client which connects to a mock database. """ return VWS( server_access_key=_mock_database.server_access_key, @@ -40,9 +42,33 @@ def vws_client(_mock_database: VuforiaDatabase) -> VWS: @pytest.fixture() def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: """ - Yield a ``CloudRecoService`` client which connects to a mock database. + A ``CloudRecoService`` client which connects to a mock database. """ return CloudRecoService( client_access_key=_mock_database.client_access_key, client_secret_key=_mock_database.client_secret_key, ) + + +@pytest.fixture() +def image_file( + high_quality_image: io.BytesIO, + tmp_path: Path, +) -> 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 + + +@pytest.fixture(params=["high_quality_image", "image_file"]) +def image( + request: pytest.FixtureRequest, +) -> BinaryIO: + """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 diff --git a/tests/test_query.py b/tests/test_query.py index 048200b2c..0a4357db5 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -24,19 +24,19 @@ class TestQuery: @staticmethod def test_no_matches( cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ An empty list is returned if there are no matches. """ - result = cloud_reco_client.query(image=high_quality_image) + result = cloud_reco_client.query(image=image) assert result == [] @staticmethod def test_match( vws_client: VWS, cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ Details of matching targets are returned. @@ -44,12 +44,12 @@ def test_match( target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) vws_client.wait_for_target_processed(target_id=target_id) - [matching_target] = cloud_reco_client.query(image=high_quality_image) + [matching_target] = cloud_reco_client.query(image=image) assert matching_target.target_id == target_id @@ -59,7 +59,7 @@ class TestCustomBaseVWQURL: """ @staticmethod - def test_custom_base_url(high_quality_image: io.BytesIO) -> None: + def test_custom_base_url(image: io.BytesIO) -> None: """ It is possible to use query a target to a database under a custom VWQ URL. @@ -76,7 +76,7 @@ def test_custom_base_url(high_quality_image: io.BytesIO) -> None: target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -89,7 +89,7 @@ def test_custom_base_url(high_quality_image: io.BytesIO) -> None: base_vwq_url=base_vwq_url, ) - matches = cloud_reco_client.query(image=high_quality_image) + matches = cloud_reco_client.query(image=image) assert len(matches) == 1 match = matches[0] assert match.target_id == target_id @@ -104,7 +104,7 @@ class TestMaxNumResults: def test_default( vws_client: VWS, cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ By default the maximum number of results is 1. @@ -112,27 +112,27 @@ def test_default( target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) target_id_2 = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) vws_client.wait_for_target_processed(target_id=target_id) vws_client.wait_for_target_processed(target_id=target_id_2) - matches = cloud_reco_client.query(image=high_quality_image) + matches = cloud_reco_client.query(image=image) assert len(matches) == 1 @staticmethod def test_custom( vws_client: VWS, cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ It is possible to set a custom ``max_num_results``. @@ -140,21 +140,21 @@ def test_custom( target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) target_id_2 = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) target_id_3 = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -163,7 +163,7 @@ def test_custom( vws_client.wait_for_target_processed(target_id=target_id_3) max_num_results = 2 matches = cloud_reco_client.query( - image=high_quality_image, + image=image, max_num_results=max_num_results, ) assert len(matches) == max_num_results @@ -178,7 +178,7 @@ class TestIncludeTargetData: def test_default( vws_client: VWS, cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ By default, target data is only returned in the top match. @@ -186,21 +186,21 @@ def test_default( target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) target_id_2 = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) vws_client.wait_for_target_processed(target_id=target_id) vws_client.wait_for_target_processed(target_id=target_id_2) top_match, second_match = cloud_reco_client.query( - image=high_quality_image, + image=image, max_num_results=2, ) assert top_match.target_data is not None @@ -210,7 +210,7 @@ def test_default( def test_top( vws_client: VWS, cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ When ``CloudRecoIncludeTargetData.TOP`` is given, target data is only @@ -219,21 +219,21 @@ def test_top( target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) target_id_2 = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) vws_client.wait_for_target_processed(target_id=target_id) vws_client.wait_for_target_processed(target_id=target_id_2) top_match, second_match = cloud_reco_client.query( - image=high_quality_image, + image=image, max_num_results=2, include_target_data=CloudRecoIncludeTargetData.TOP, ) @@ -244,7 +244,7 @@ def test_top( def test_none( vws_client: VWS, cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ When ``CloudRecoIncludeTargetData.NONE`` is given, target data is not @@ -253,21 +253,21 @@ def test_none( target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) target_id_2 = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) vws_client.wait_for_target_processed(target_id=target_id) vws_client.wait_for_target_processed(target_id=target_id_2) top_match, second_match = cloud_reco_client.query( - image=high_quality_image, + image=image, max_num_results=2, include_target_data=CloudRecoIncludeTargetData.NONE, ) @@ -278,7 +278,7 @@ def test_none( def test_all( vws_client: VWS, cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ When ``CloudRecoIncludeTargetData.ALL`` is given, target data is @@ -287,21 +287,21 @@ def test_all( target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) target_id_2 = vws_client.add_target( name=uuid.uuid4().hex, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) vws_client.wait_for_target_processed(target_id=target_id) vws_client.wait_for_target_processed(target_id=target_id_2) top_match, second_match = cloud_reco_client.query( - image=high_quality_image, + image=image, max_num_results=2, include_target_data=CloudRecoIncludeTargetData.ALL, ) diff --git a/tests/test_vws.py b/tests/test_vws.py index 2eb519ebb..7c148cf29 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -8,7 +8,7 @@ import datetime import random import uuid -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, BinaryIO import pytest from freezegun import freeze_time @@ -37,7 +37,7 @@ class TestAddTarget: @pytest.mark.parametrize("active_flag", [True, False]) def test_add_target( vws_client: VWS, - high_quality_image: io.BytesIO, + image: BinaryIO, application_metadata: bytes | None, cloud_reco_client: CloudRecoService, *, @@ -57,7 +57,7 @@ def test_add_target( target_id = vws_client.add_target( name=name, width=width, - image=high_quality_image, + image=image, application_metadata=encoded_metadata, active_flag=active_flag, ) @@ -68,7 +68,7 @@ def test_add_target( assert target_record.width == width assert target_record.active_flag is active_flag vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=high_quality_image) + matching_targets = cloud_reco_client.query(image=image) if active_flag: [matching_target] = matching_targets assert matching_target.target_id == target_id @@ -81,7 +81,7 @@ def test_add_target( @staticmethod def test_add_two_targets( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ No exception is raised when adding two targets with different names. @@ -92,7 +92,7 @@ def test_add_two_targets( vws_client.add_target( name=name, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -104,7 +104,7 @@ class TestCustomBaseVWSURL: """ @staticmethod - def test_custom_base_url(high_quality_image: io.BytesIO) -> None: + def test_custom_base_url(image: io.BytesIO) -> None: """ It is possible to use add a target to a database under a custom VWS URL. @@ -122,7 +122,7 @@ def test_custom_base_url(high_quality_image: io.BytesIO) -> None: vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -136,7 +136,7 @@ class TestListTargets: @staticmethod def test_list_targets( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ It is possible to get a list of target IDs. @@ -144,14 +144,14 @@ def test_list_targets( id_1 = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) id_2 = vws_client.add_target( name="a", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -166,7 +166,7 @@ class TestDelete: @staticmethod def test_delete_target( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ It is possible to delete a target. @@ -174,7 +174,7 @@ def test_delete_target( target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -193,7 +193,7 @@ class TestGetTargetSummaryReport: @staticmethod def test_get_target_summary_report( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ Details of a target are returned by ``get_target_summary_report``. @@ -204,7 +204,7 @@ def test_get_target_summary_report( target_id = vws_client.add_target( name=target_name, width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -262,7 +262,7 @@ class TestGetTargetRecord: @staticmethod def test_get_target_record( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ Details of a target are returned by ``get_target_record``. @@ -270,7 +270,7 @@ def test_get_target_record( target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -297,7 +297,7 @@ class TestWaitForTargetProcessed: @staticmethod def test_wait_for_target_processed( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ It is possible to wait until a target is processed. @@ -305,7 +305,7 @@ def test_wait_for_target_processed( target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -317,7 +317,7 @@ def test_wait_for_target_processed( @staticmethod def test_default_seconds_between_requests( - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ By default, 0.2 seconds are waited between polling requests. @@ -333,7 +333,7 @@ def test_default_seconds_between_requests( target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -369,7 +369,7 @@ def test_default_seconds_between_requests( @staticmethod def test_custom_seconds_between_requests( - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ It is possible to customize the time waited between polling requests. @@ -385,7 +385,7 @@ def test_custom_seconds_between_requests( target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -420,7 +420,7 @@ def test_custom_seconds_between_requests( assert report.request_usage == expected_requests @staticmethod - def test_custom_timeout(high_quality_image: io.BytesIO) -> None: + def test_custom_timeout(image: io.BytesIO) -> None: """ It is possible to set a maximum timeout. """ @@ -435,7 +435,7 @@ def test_custom_timeout(high_quality_image: io.BytesIO) -> None: target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -464,7 +464,7 @@ class TestGetDuplicateTargets: @staticmethod def test_get_duplicate_targets( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ It is possible to get the IDs of similar targets. @@ -472,14 +472,14 @@ def test_get_duplicate_targets( target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) similar_target_id = vws_client.add_target( name="a", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) @@ -498,7 +498,7 @@ class TestUpdateTarget: @staticmethod def test_update_target( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, different_high_quality_image: io.BytesIO, cloud_reco_client: CloudRecoService, ) -> None: @@ -510,12 +510,12 @@ def test_update_target( target_id = vws_client.add_target( name=old_name, width=old_width, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) vws_client.wait_for_target_processed(target_id=target_id) - [matching_target] = cloud_reco_client.query(image=high_quality_image) + [matching_target] = cloud_reco_client.query(image=image) assert matching_target.target_id == target_id query_target_data = matching_target.target_data assert query_target_data is not None @@ -557,7 +557,7 @@ def test_update_target( @staticmethod def test_no_fields_given( vws_client: VWS, - high_quality_image: io.BytesIO, + image: io.BytesIO, ) -> None: """ It is possible to give no update fields. @@ -565,7 +565,7 @@ def test_no_fields_given( target_id = vws_client.add_target( name="x", width=1, - image=high_quality_image, + image=image, active_flag=True, application_metadata=None, ) From 65694bf1aad0b6c7bd656a07138b38d6db811fe9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 19 Mar 2023 08:08:55 +0000 Subject: [PATCH 0066/1638] Remove test which is now is covered by ruff INP001 --- tests/test_meta.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 tests/test_meta.py diff --git a/tests/test_meta.py b/tests/test_meta.py deleted file mode 100644 index d05e23403..000000000 --- a/tests/test_meta.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -Tests for this repository. -""" - -from pathlib import Path - - -def test_init_files() -> None: - """ - ``__init__`` files exist where they should do. - - If ``__init__`` files are missing, linters may not run on all files that - they should run on. - """ - directories = (Path("src"), Path("tests")) - - for directory in directories: - files = directory.glob("**/*.py") - for python_file in files: - parent = python_file.parent - expected_init = parent / "__init__.py" - assert expected_init.exists() From b315c5268f324f43d3254f10c7716a49bbbca3a5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 19 Mar 2023 07:17:58 +0000 Subject: [PATCH 0067/1638] Switch from doctest to Sybil --- .github/workflows/ci.yml | 4 +- Makefile | 1 - README.md | 101 -------------------------------------- README.rst | 102 +++++++++++++++++++++++++++++++++++++++ conftest.py | 15 ++++++ docs/source/conf.py | 1 - docs/source/index.rst | 19 +++++--- lint.mk | 9 +--- pyproject.toml | 4 +- 9 files changed, 137 insertions(+), 119 deletions(-) delete mode 100644 README.md create mode 100644 README.rst create mode 100644 conftest.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3c94b7c2..3c9c6946b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,9 @@ jobs: - name: "Run tests" run: | - pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests tests/ --cov-report=xml + # 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 - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v3" diff --git a/Makefile b/Makefile index 671b6b0da..7e7e1c51c 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,6 @@ lint: \ black \ check-manifest \ doc8 \ - doctest \ linkcheck \ mypy \ ruff \ diff --git a/README.md b/README.md deleted file mode 100644 index 49c0de9b4..000000000 --- a/README.md +++ /dev/null @@ -1,101 +0,0 @@ -[![Build -Status](https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg)](https://github.com/VWS-Python/vws-python/actions) -[![codecov](https://codecov.io/gh/VWS-Python/vws-python/branch/master/graph/badge.svg)](https://codecov.io/gh/VWS-Python/vws-python) -[![PyPI](https://badge.fury.io/py/VWS-Python.svg)](https://badge.fury.io/py/VWS-Python) -[![Documentation Status](https://readthedocs.org/projects/vws-python/badge/?version=latest)](https://vws-python.readthedocs.io/en/latest/?badge=latest) - -# vws-python - -Python library for the Vuforia Web Services (VWS) API and the Vuforia -Web Query API. - -## Installation - -```sh -pip install vws-python -``` - -This is tested on Python 3.11+. Get in touch with -`adamdangoor@gmail.com` if you would like to use this with another -language. - -## Getting Started - - - - - -```python -import pathlib - -from vws import VWS, CloudRecoService - -server_access_key = '[server-access-key]' -server_secret_key = '[server-secret-key]' -client_access_key = '[client-access-key]' -client_secret_key = '[client-secret-key]' - -vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, -) -cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, -) -name = 'my_image_name' - -image = pathlib.Path('high_quality_image.jpg') -with image.open(mode='rb') as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - -assert matching_targets[0].target_id == target_id -``` - - - - - -## Full Documentation - -See the [full -documentation](https://vws-python.readthedocs.io/en/latest). diff --git a/README.rst b/README.rst new file mode 100644 index 000000000..992fe4b1d --- /dev/null +++ b/README.rst @@ -0,0 +1,102 @@ +|Build Status| |codecov| |PyPI| |Documentation Status| + +vws-python +========== + +Python library for the Vuforia Web Services (VWS) API and the Vuforia +Web Query API. + +Installation +------------ + +.. code:: sh + + pip install vws-python + +This is tested on Python 3.11+. Get in touch with +``adamdangoor@gmail.com`` if you would like to use this with another +language. + +Getting Started +--------------- + +.. invisible-code-block: python + + 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) + mock.__enter__() + + # 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 + + from vws import VWS, CloudRecoService + + server_access_key = '[server-access-key]' + server_secret_key = '[server-secret-key]' + client_access_key = '[client-access-key]' + client_secret_key = '[client-secret-key]' + + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, + ) + name = 'my_image_name' + + image = pathlib.Path('high_quality_image.jpg') + with image.open(mode='rb') as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) + + assert matching_targets[0].target_id == target_id + +.. invisible-code-block: python + new_image = pathlib.Path('high_quality_image.jpg') + new_image.unlink() + mock.__exit__() + +Full Documentation +------------------ + +See the `full +documentation `__. + +.. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg + :target: https://github.com/VWS-Python/vws-python/actions +.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/master/graph/badge.svg + :target: https://codecov.io/gh/VWS-Python/vws-python +.. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg + :target: https://badge.fury.io/py/VWS-Python +.. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest + :target: https://vws-python.readthedocs.io/en/latest/?badge=latest diff --git a/conftest.py b/conftest.py new file mode 100644 index 000000000..7775d9311 --- /dev/null +++ b/conftest.py @@ -0,0 +1,15 @@ +from doctest import ELLIPSIS + +from sybil import Sybil +from sybil.parsers.rest import ( + DocTestParser, + PythonCodeBlockParser, +) + +pytest_collect_file = Sybil( + parsers=[ + DocTestParser(optionflags=ELLIPSIS), + PythonCodeBlockParser(), + ], + patterns=["*.rst", "*.py"], +).pytest() diff --git a/docs/source/conf.py b/docs/source/conf.py index d6060a1f1..f3f0c9e3b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,7 +13,6 @@ extensions = [ "sphinx.ext.autodoc", - "sphinx.ext.doctest", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", "sphinx_autodoc_typehints", diff --git a/docs/source/index.rst b/docs/source/index.rst index 7510dc42d..5eb478998 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,7 +16,7 @@ Usage See the :doc:`api-reference` for full usage details. -.. testsetup:: simple +.. invisible-code-block: python import pathlib import shutil @@ -41,7 +41,7 @@ See the :doc:`api-reference` for full usage details. new_image = pathlib.Path('high_quality_image.jpg') shutil.copy(image, new_image) -.. testcode:: simple +.. code-block:: python import pathlib @@ -76,7 +76,7 @@ See the :doc:`api-reference` for full usage details. assert matching_targets[0].target_id == target_id -.. testcleanup:: simple +.. invisible-code-block: python new_image = pathlib.Path('high_quality_image.jpg') new_image.unlink() @@ -91,7 +91,14 @@ To write unit tests for code which uses this library, without using your Vuforia pip3 install vws-python-mock -.. testsetup:: testing +.. invisible-code-block: python + + # Reset test + for i in list(globals().keys()): + if not i.startswith('_'): + exec('del ' + i) + +.. invisible-code-block: python import pathlib import shutil @@ -104,7 +111,7 @@ To write unit tests for code which uses this library, without using your Vuforia new_image = pathlib.Path('high_quality_image.jpg') shutil.copy(image, new_image) -.. testcode:: testing +.. code-block:: python import pathlib @@ -135,7 +142,7 @@ To write unit tests for code which uses this library, without using your Vuforia active_flag=True, ) -.. testcleanup:: testing +.. invisible-code-block: python new_image = pathlib.Path('high_quality_image.jpg') new_image.unlink() diff --git a/lint.mk b/lint.mk index a49af3243..4c9524628 100644 --- a/lint.mk +++ b/lint.mk @@ -40,7 +40,7 @@ pip-missing-reqs: .PHONY: pylint pylint: - pylint src/ tests/ docs/ + pylint *.py src/ tests/ docs/ .PHONY: pyroma pyroma: @@ -56,9 +56,4 @@ linkcheck: .PHONY: spelling spelling: - $(MAKE) -C docs/ spelling SPHINXOPTS=$(SPHINXOPTS) - -.PHONY: doctest -doctest: - $(MAKE) -C docs/ doctest SPHINXOPTS=$(SPHINXOPTS) - pytest --codeblocks README.md + $(MAKE) -C docs/ spelling SPHINXOPTS=$(SPHINXOPTS) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 69fd4c4d5..5aec24ea5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -213,7 +213,7 @@ dynamic = ["version"] keywords = ["vuforia", "vws", "client"] license = { file = "LICENSE" } name = "vws-python" -readme = { file = "README.md", content-type = "text/markdown"} +readme = { file = "README.rst", content-type = "text/x-rst"} requires-python = ">=3.10" dependencies = [ "VWS-Auth-Tools", @@ -244,12 +244,12 @@ dev = [ "pylint==2.17.0 ", "pyroma==4.2", "pytest-cov==4.0.0", - "pytest_codeblocks==0.16.1", "pytest==7.2.2 ", "ruff==0.0.256", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", + "sybil==4.0.1", "types-freezegun==1.1.10", "types-requests==2.28.11.15", "vulture==2.7", From 1b0af26f97fa1b8467b78a5bad6924807ff10307 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 19 Mar 2023 19:10:47 +0000 Subject: [PATCH 0068/1638] Run sybil tests on Windows --- .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 637726ae9..b97da3ef2 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -46,4 +46,6 @@ jobs: - name: "Run tests" run: | - pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests tests/ --cov-report=xml + # 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 b64c94ae76a81f91ae21eb973d49b7afc6087b09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 11:10:24 +0000 Subject: [PATCH 0069/1638] Bump ruff from 0.0.256 to 0.0.257 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.256 to 0.0.257. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.256...v0.0.257) --- 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 48d9da464..f00c065c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.2.2 ", - "ruff==0.0.256", + "ruff==0.0.257", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From db7282b6c78eb66176a6450f646244c831c35430 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 22 Mar 2023 20:20:41 +0000 Subject: [PATCH 0070/1638] Add pyright check --- Makefile | 1 + lint.mk | 4 ++++ pyproject.toml | 3 +++ src/vws/query.py | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7e7e1c51c..a45521c22 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ lint: \ ruff \ pip-extra-reqs \ pip-missing-reqs \ + pyright \ pyroma \ spelling \ vulture \ diff --git a/lint.mk b/lint.mk index b74211036..b8e3daf5e 100644 --- a/lint.mk +++ b/lint.mk @@ -46,6 +46,10 @@ pylint: pyroma: pyroma --min 10 . +.PHONY: pyright +pyright: + pyright . + .PHONY: vulture vulture: vulture --min-confidence 100 --exclude _vendor --exclude .eggs . diff --git a/pyproject.toml b/pyproject.toml index f00c065c3..e32c9bdb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,6 +243,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", + "pyright==1.1.300", "pylint==2.17.0 ", "pyroma==4.2", "pytest-cov==4.0.0", @@ -271,3 +272,5 @@ where = ["src"] vws = ["py.typed"] [tool.setuptools_scm] + +[tool.pyright] diff --git a/src/vws/query.py b/src/vws/query.py index 08ce1aaa9..e59165675 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -166,7 +166,7 @@ def query( }[result_code] raise exception(response=response) - result = [] + result: list[QueryResult] = [] result_list = list(response.json()["results"]) for item in result_list: target_data: TargetData | None = None From 90251e66bc835c3c17b26518605b07c45bd7cf63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 11:08:34 +0000 Subject: [PATCH 0071/1638] Bump types-requests from 2.28.11.15 to 2.28.11.16 Bumps [types-requests](https://github.com/python/typeshed) from 2.28.11.15 to 2.28.11.16. - [Release notes](https://github.com/python/typeshed/releases) - [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 e32c9bdb2..1a2206ac1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -254,7 +254,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==4.0.1", "types-freezegun==1.1.10", - "types-requests==2.28.11.15", + "types-requests==2.28.11.16", "vulture==2.7", ] From d2045626604bcb3548370d4f3129411a9bdb1b3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 11:09:03 +0000 Subject: [PATCH 0072/1638] Bump pylint from 2.17.0 to 2.17.1 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.17.0 to 2.17.1. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](https://github.com/PyCQA/pylint/compare/v2.17.0...v2.17.1) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e32c9bdb2..032271095 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -244,7 +244,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.300", - "pylint==2.17.0 ", + "pylint==2.17.1 ", "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.2.2 ", From d63c7977042a5b88002624dc8ad2ff0b7f51c358 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 11:09:38 +0000 Subject: [PATCH 0073/1638] Bump ruff from 0.0.257 to 0.0.258 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.257 to 0.0.258. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.257...v0.0.258) --- 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 e32c9bdb2..70f1417e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.2.2 ", - "ruff==0.0.257", + "ruff==0.0.258", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 71882f9edae21157cac0785421bc8094d5745b53 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 23 Mar 2023 17:04:16 +0000 Subject: [PATCH 0074/1638] Ignore S311 --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 70f1417e0..96e199cc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -193,6 +193,8 @@ ignore = [ "PLR0913", # Allow 'assert' as we use it for tests. "S101", + # Allow simple random numbers as we are not using them for cryptography. + "S311", ] [tool.ruff.per-file-ignores] From 503c6ec80016884bb27fae01443ce08185a99397 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:09:31 +0000 Subject: [PATCH 0075/1638] Bump furo from 2022.12.7 to 2023.3.23 Bumps [furo](https://github.com/pradyunsg/furo) from 2022.12.7 to 2023.3.23. - [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/2022.12.07...2023.03.23) --- 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 b25ef218b..fb3cbaf44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -239,7 +239,7 @@ dev = [ "doc8==1.1.1", "dodgy==0.2.1", "freezegun==1.2.2", - "furo==2022.12.7", + "furo==2023.3.23", "mypy==1.1.1", "pdm==2.4.9", "pip_check_reqs==2.4.4", From f1186d55e29eec84f309fcda67cee4cd82850661 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:09:56 +0000 Subject: [PATCH 0076/1638] Bump ruff from 0.0.258 to 0.0.259 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.258 to 0.0.259. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.258...v0.0.259) --- 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 b25ef218b..2a69c480f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -250,7 +250,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.2.2 ", - "ruff==0.0.258", + "ruff==0.0.259", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From e3dbb413c282dd0d02335d782a8b60b93e3cd5f6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 25 Mar 2023 16:47:56 +0000 Subject: [PATCH 0077/1638] Remove func-timeout dependency, for simplicity and type safety --- pyproject.toml | 3 --- src/vws/vws.py | 60 ++++++++++---------------------------------------- 2 files changed, 12 insertions(+), 51 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c3851d947..cd16f0767 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -144,8 +144,6 @@ strict = true [[tool.mypy.overrides]] module = [ - "func_timeout", - "func_timeout.exceptions", "sybil", "sybil.parsers.rest", ] @@ -221,7 +219,6 @@ readme = { file = "README.rst", content-type = "text/x-rst"} requires-python = ">=3.10" dependencies = [ "VWS-Auth-Tools", - "func-timeout", "requests", "urllib3", ] diff --git a/src/vws/vws.py b/src/vws/vws.py index cfc79e888..6dbd16b8d 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -6,14 +6,12 @@ import base64 import json +import time from datetime import date -from time import sleep from typing import TYPE_CHECKING, BinaryIO from urllib.parse import urljoin import requests -from func_timeout import func_set_timeout -from func_timeout.exceptions import FunctionTimedOut from requests import Response from vws_auth_tools import authorization_header, rfc_1123_date @@ -332,39 +330,6 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: target_record=target_record, ) - def _wait_for_target_processed( - self, - target_id: str, - seconds_between_requests: float, - ) -> None: - """ - Wait indefinitely for a target to get past the processing stage. - - Args: - target_id: The ID of the target to wait for. - seconds_between_requests: The number of seconds to wait between - requests made while polling the target status. - - 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 - known database. - TimeoutError: The target remained in the processing stage for more - than five minutes. - ~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. - """ - while True: - report = self.get_target_summary_report(target_id=target_id) - if report.status != TargetStatuses.PROCESSING: - return - - sleep(seconds_between_requests) - def wait_for_target_processed( self, target_id: str, @@ -400,19 +365,18 @@ def wait_for_target_processed( ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. """ + start_time = time.monotonic() + while True: + report = self.get_target_summary_report(target_id=target_id) + if report.status != TargetStatuses.PROCESSING: + return + + if timeout_seconds is not None: + elapsed_time = time.monotonic() - start_time + if elapsed_time > timeout_seconds: # pragma: no cover + raise TargetProcessingTimeout - # func_timeout does not have type hints. - @func_set_timeout(timeout=timeout_seconds) # type: ignore[misc] - def decorated() -> None: - self._wait_for_target_processed( - target_id=target_id, - seconds_between_requests=seconds_between_requests, - ) - - try: - decorated() - except FunctionTimedOut as exc: - raise TargetProcessingTimeout from exc + time.sleep(seconds_between_requests) def list_targets(self) -> list[str]: """ From 4f242991a67818d1f9ebe16cdc35752210176880 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 25 Mar 2023 20:25:16 +0000 Subject: [PATCH 0078/1638] Remove the ability to have no timeout for waiting for a target - it is a bad practice --- src/vws/vws.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 6dbd16b8d..d54523666 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -334,7 +334,7 @@ def wait_for_target_processed( self, target_id: str, seconds_between_requests: float = 0.2, - timeout_seconds: float | None = 60 * 5, + timeout_seconds: float = 60 * 5, ) -> None: """ Wait up to five minutes (arbitrary) for a target to get past the @@ -348,8 +348,7 @@ def wait_for_target_processed( decrease the number of calls made to the API, to decrease the likelihood of hitting the request quota. timeout_seconds: The maximum number of seconds to wait for the - target to be processed. If ``None`` is given, no maximum is - applied. + target to be processed. Raises: ~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret @@ -371,10 +370,9 @@ def wait_for_target_processed( if report.status != TargetStatuses.PROCESSING: return - if timeout_seconds is not None: - elapsed_time = time.monotonic() - start_time - if elapsed_time > timeout_seconds: # pragma: no cover - raise TargetProcessingTimeout + elapsed_time = time.monotonic() - start_time + if elapsed_time > timeout_seconds: # pragma: no cover + raise TargetProcessingTimeout time.sleep(seconds_between_requests) From ec4833c49f280a8fde3bfd9ae8dcff2496ce40ed Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Sat, 25 Mar 2023 20:52:15 +0000 Subject: [PATCH 0079/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b1f863684..ac793382f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2023.03.25 +------------ + * Support file-like objects in every method which accepts a file. 2023.03.05 From a128f61b2bc61169b5fcbb4427b0b4dc45685974 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 26 Mar 2023 12:20:13 +0100 Subject: [PATCH 0080/1638] Do not autofix ERA001 ruff error --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index cd16f0767..4d4e1ebd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -195,6 +195,11 @@ ignore = [ "S311", ] +# 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.per-file-ignores] "tests/test_*.py" = [ # Do not require tests to have a one-line summary. From 44115b360f5fff22d9cfaee9b1ebe06f594344f7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 26 Mar 2023 12:57:26 +0100 Subject: [PATCH 0081/1638] Bump sybil and use new clear-namespace --- conftest.py | 2 ++ docs/source/index.rst | 8 ++------ pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/conftest.py b/conftest.py index 972f875ba..881a76db2 100644 --- a/conftest.py +++ b/conftest.py @@ -4,12 +4,14 @@ from sybil import Sybil from sybil.parsers.rest import ( + ClearNamespaceParser, DocTestParser, PythonCodeBlockParser, ) pytest_collect_file = Sybil( parsers=[ + ClearNamespaceParser(), DocTestParser(optionflags=ELLIPSIS), PythonCodeBlockParser(), ], diff --git a/docs/source/index.rst b/docs/source/index.rst index 5eb478998..69152f6f1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -75,6 +75,7 @@ See the :doc:`api-reference` for full usage details. matching_targets = cloud_reco_client.query(image=my_image_file) assert matching_targets[0].target_id == target_id + a = 1 .. invisible-code-block: python @@ -91,12 +92,7 @@ To write unit tests for code which uses this library, without using your Vuforia pip3 install vws-python-mock -.. invisible-code-block: python - - # Reset test - for i in list(globals().keys()): - if not i.startswith('_'): - exec('del ' + i) +.. clear-namespace .. invisible-code-block: python diff --git a/pyproject.toml b/pyproject.toml index 4d4e1ebd7..70f80657d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", - "sybil==4.0.1", + "sybil==5.0.0", "types-freezegun==1.1.10", "types-requests==2.28.11.16", "vulture==2.7", From d092b67b9a17a3328906ff239b96eb137556c0f8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 26 Mar 2023 13:01:10 +0100 Subject: [PATCH 0082/1638] Remove types-freezegun dependency which is no longer needed --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d4e1ebd7..f62ec5864 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,6 @@ dev = [ "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==4.0.1", - "types-freezegun==1.1.10", "types-requests==2.28.11.16", "vulture==2.7", ] From 5f5afa44df0c889c7ca50d74273a161125c2a023 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 26 Mar 2023 17:06:45 +0100 Subject: [PATCH 0083/1638] Neaten how we enter and exit the mock in docs tests --- README.rst | 6 ++++-- docs/source/index.rst | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 992fe4b1d..a1cbf9427 100644 --- a/README.rst +++ b/README.rst @@ -22,6 +22,7 @@ Getting Started .. invisible-code-block: python + import contextlib import pathlib import shutil @@ -37,7 +38,8 @@ Getting Started client_secret_key='[client-secret-key]', ) mock.add_database(database=database) - mock.__enter__() + 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' @@ -84,7 +86,7 @@ Getting Started .. invisible-code-block: python new_image = pathlib.Path('high_quality_image.jpg') new_image.unlink() - mock.__exit__() + stack.close() Full Documentation ------------------ diff --git a/docs/source/index.rst b/docs/source/index.rst index 69152f6f1..630355629 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,6 +18,7 @@ See the :doc:`api-reference` for full usage details. .. invisible-code-block: python + import contextlib import pathlib import shutil @@ -33,7 +34,8 @@ See the :doc:`api-reference` for full usage details. client_secret_key='[client-secret-key]', ) mock.add_database(database=database) - mock.__enter__() + 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' @@ -81,7 +83,7 @@ See the :doc:`api-reference` for full usage details. new_image = pathlib.Path('high_quality_image.jpg') new_image.unlink() - mock.__exit__() + stack.close() Testing ------- From 5381672a4fe1d9071797c7fb78c1b5156c00b190 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 28 Mar 2023 10:54:30 +0100 Subject: [PATCH 0084/1638] Type check urllib3 --- pyproject.toml | 1 + src/vws/include_target_data.py | 11 ++++++----- src/vws/query.py | 11 +++-------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 813cffeef..a418279ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,6 +258,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.0", "types-requests==2.28.11.16", + "types-urllib3==1.26.25.9", "vulture==2.7", ] diff --git a/src/vws/include_target_data.py b/src/vws/include_target_data.py index 11107d9fe..bff82c926 100644 --- a/src/vws/include_target_data.py +++ b/src/vws/include_target_data.py @@ -2,15 +2,16 @@ Tools for managing ``CloudRecoService.query``'s ``include_target_data``. """ -from enum import Enum +from enum import StrEnum, auto -class CloudRecoIncludeTargetData(Enum): + +class CloudRecoIncludeTargetData(StrEnum): """ Options for the ``include_target_data`` parameter of ``CloudRecoService.query``. """ - TOP = "top" - NONE = "none" - ALL = "all" + TOP = auto() + NONE = auto() + ALL = auto() diff --git a/src/vws/query.py b/src/vws/query.py index e59165675..22235a419 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -6,7 +6,7 @@ import datetime from http import HTTPStatus -from typing import BinaryIO +from typing import Any, BinaryIO from urllib.parse import urljoin import requests @@ -102,7 +102,7 @@ def query( An ordered list of target details of matching targets. """ image_content = _get_image_data(image=image) - body = { + body: dict[str, Any] = { "image": ("image.jpeg", image_content, "image/jpeg"), "max_num_results": (None, int(max_num_results), "text/plain"), "include_target_data": ( @@ -113,12 +113,7 @@ def query( } date = rfc_1123_date() request_path = "/v1/query" - ( - content, - content_type_header, - ) = encode_multipart_formdata( # type:ignore[no-untyped-call] - fields=body, - ) + content, content_type_header = encode_multipart_formdata(fields=body) method = "POST" authorization_string = authorization_header( From 2f0a8e96ba051750aacf8eb713aefbf6a822abac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 10:00:32 +0000 Subject: [PATCH 0085/1638] Bump furo from 2023.3.23 to 2023.3.27 Bumps [furo](https://github.com/pradyunsg/furo) from 2023.3.23 to 2023.3.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/2023.03.23...2023.03.27) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a418279ef..600a740c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "doc8==1.1.1", "dodgy==0.2.1", "freezegun==1.2.2", - "furo==2023.3.23", + "furo==2023.3.27", "mypy==1.1.1", "pdm==2.4.9", "pip_check_reqs==2.4.4", From 6a21da6a3ae61ef59fd3ff34ab62806b12ab96da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 10:05:47 +0000 Subject: [PATCH 0086/1638] Bump vws-python-mock from 2023.3.5 to 2023.3.26 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2023.3.5 to 2023.3.26. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2023.03.05...2023.03.26) --- 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 a418279ef..33ca19c1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -234,7 +234,7 @@ dev = [ "Pygments==2.14.0", "Sphinx-Substitution-Extensions==2022.2.16", "Sphinx==6.1.3", - "VWS-Python-Mock==2023.3.5", + "VWS-Python-Mock==2023.3.26", "VWS-Test-Fixtures==2023.3.5", "black==23.1.0", "check-manifest==0.49", From 38d41477ef2b6f38bb773ce1ba07df8ef8aa2546 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 11:18:08 +0000 Subject: [PATCH 0087/1638] Bump types-urllib3 from 1.26.25.9 to 1.26.25.10 Bumps [types-urllib3](https://github.com/python/typeshed) from 1.26.25.9 to 1.26.25.10. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-urllib3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0c83ace80..1049870e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,7 +258,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.0", "types-requests==2.28.11.16", - "types-urllib3==1.26.25.9", + "types-urllib3==1.26.25.10", "vulture==2.7", ] From 6ff3f2db4d380bf938488fca861f7c46406cd829 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 11:18:31 +0000 Subject: [PATCH 0088/1638] Bump black from 23.1.0 to 23.3.0 Bumps [black](https://github.com/psf/black) from 23.1.0 to 23.3.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.1.0...23.3.0) --- updated-dependencies: - dependency-name: black 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 0c83ace80..49e7256fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Sphinx==6.1.3", "VWS-Python-Mock==2023.3.26", "VWS-Test-Fixtures==2023.3.5", - "black==23.1.0", + "black==23.3.0", "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", From 68be2782a800b72676bd27c9b871e7c0555c8a58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 11:18:37 +0000 Subject: [PATCH 0089/1638] Bump pyright from 1.1.300 to 1.1.301 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.300 to 1.1.301. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.300...v1.1.301) --- 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 0c83ace80..4c9b6831f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.300", + "pyright==1.1.301", "pylint==2.17.1 ", "pyroma==4.2", "pytest-cov==4.0.0", From bf5bb81ed74a3874883996c575a43801e698eb24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:47:21 +0000 Subject: [PATCH 0090/1638] Bump types-requests from 2.28.11.16 to 2.28.11.17 Bumps [types-requests](https://github.com/python/typeshed) from 2.28.11.16 to 2.28.11.17. - [Release notes](https://github.com/python/typeshed/releases) - [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 d5101aef3..065af71cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.0", - "types-requests==2.28.11.16", + "types-requests==2.28.11.17", "types-urllib3==1.26.25.10", "vulture==2.7", ] From 439ce77315b7d48b6878fcc7a6846a18888638a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Mar 2023 11:08:01 +0000 Subject: [PATCH 0091/1638] Bump ruff from 0.0.259 to 0.0.260 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.259 to 0.0.260. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.259...v0.0.260) --- 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 d5101aef3..f91d8ad3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.2.2 ", - "ruff==0.0.259", + "ruff==0.0.260", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From fcd2599ed25354d7623bb71609bb5d5cd55752e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:26:25 +0000 Subject: [PATCH 0092/1638] Bump pylint from 2.17.1 to 2.17.2 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.17.1 to 2.17.2. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](https://github.com/PyCQA/pylint/compare/v2.17.1...v2.17.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 f91d8ad3a..b9372f427 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.301", - "pylint==2.17.1 ", + "pylint==2.17.2 ", "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.2.2 ", From 0e45b502b0891e5752a7caac1b657f224cbefab4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:06:26 +0000 Subject: [PATCH 0093/1638] Bump pyright from 1.1.301 to 1.1.302 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.301 to 1.1.302. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.301...v1.1.302) --- 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 b9372f427..db18a4119 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.301", + "pyright==1.1.302", "pylint==2.17.2 ", "pyroma==4.2", "pytest-cov==4.0.0", From 89b054c6fd110601b10181219bda6eb739c84a39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:06:58 +0000 Subject: [PATCH 0094/1638] Bump ruff from 0.0.260 to 0.0.261 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.260 to 0.0.261. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.260...v0.0.261) --- 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 b9372f427..7037c67f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.2.2 ", - "ruff==0.0.260", + "ruff==0.0.261", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From bc6dcf20f6f1f5c8d3d1fcebefafd027500c038f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Apr 2023 11:06:09 +0000 Subject: [PATCH 0095/1638] Bump mypy from 1.1.1 to 1.2.0 Bumps [mypy](https://github.com/python/mypy) from 1.1.1 to 1.2.0. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v1.1.1...v1.2.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 d1e7642c0..4ea1d9133 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.3.27", - "mypy==1.1.1", + "mypy==1.2.0", "pdm==2.4.9", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", From 655b52eb411e73ad2121c3aa1e8583f126c9d035 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 11:12:49 +0000 Subject: [PATCH 0096/1638] Bump pytest from 7.2.2 to 7.3.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.2 to 7.3.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.2.2...7.3.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 bc9e666e4..74d8472ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -251,7 +251,7 @@ dev = [ "pylint==2.17.2 ", "pyroma==4.2", "pytest-cov==4.0.0", - "pytest==7.2.2 ", + "pytest==7.3.0 ", "ruff==0.0.261", "sphinx-autodoc-typehints==1.22", "sphinx-prompt==1.5.0", From 0bdccb7e4e07367338b028abbb89a038b3fc5931 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:07:22 +0000 Subject: [PATCH 0097/1638] Bump pdm from 2.4.9 to 2.5.2 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.4.9 to 2.5.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.4.9...2.5.2) --- 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 bc9e666e4..c3bd0ab84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.3.27", "mypy==1.2.0", - "pdm==2.4.9", + "pdm==2.5.2", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 0f1d025dc3fff459610a689a04f45c7943dd0fec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:07:39 +0000 Subject: [PATCH 0098/1638] Bump pygments from 2.14.0 to 2.15.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.14.0 to 2.15.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.14.0...2.15.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 bc9e666e4..18a48ca82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -231,7 +231,7 @@ dependencies = [ [project.optional-dependencies] dev = [ "PyYAML==6.0", - "Pygments==2.14.0", + "Pygments==2.15.0", "Sphinx-Substitution-Extensions==2022.2.16", "Sphinx==6.1.3", "VWS-Python-Mock==2023.3.26", From 2acb702596cebff574746d0dc3c1ce1c8512c503 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Apr 2023 21:52:41 +0000 Subject: [PATCH 0099/1638] Bump vws-python-mock from 2023.3.26 to 2023.4.8 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2023.3.26 to 2023.4.8. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2023.03.26...2023.04.08) --- 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 648510572..9f240d36d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -234,7 +234,7 @@ dev = [ "Pygments==2.15.0", "Sphinx-Substitution-Extensions==2022.2.16", "Sphinx==6.1.3", - "VWS-Python-Mock==2023.3.26", + "VWS-Python-Mock==2023.4.8", "VWS-Test-Fixtures==2023.3.5", "black==23.3.0", "check-manifest==0.49", From 48a3d374d3d5925214ee477e5d95be4c515ac945 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 12 Apr 2023 23:07:49 +0100 Subject: [PATCH 0100/1638] Update test to match new default query_recognizes_deletion_seconds --- tests/test_cloud_reco_exceptions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 079857947..67f043c47 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -97,7 +97,10 @@ def test_active_matching_targets_delete_processing( ) vws_client.wait_for_target_processed(target_id=target_id) vws_client.delete_target(target_id=target_id) - time.sleep(0.2) + # This matches the "query_recognizes_deletion_seconds" setting to + # ``MockVWS``. + query_recognizes_deletion_seconds = 2 + time.sleep(query_recognizes_deletion_seconds) with pytest.raises(ActiveMatchingTargetsDeleteProcessing): cloud_reco_client.query(image=high_quality_image) From b8c0422311a9ea2d413367df7ba02b47dd84cab4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Apr 2023 11:06:00 +0000 Subject: [PATCH 0101/1638] Bump sphinx-autodoc-typehints from 1.22 to 1.23.0 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.22 to 1.23.0. - [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.22...1.23.0) --- updated-dependencies: - dependency-name: sphinx-autodoc-typehints 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 9f240d36d..b78595fcb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -253,7 +253,7 @@ dev = [ "pytest-cov==4.0.0", "pytest==7.3.0 ", "ruff==0.0.261", - "sphinx-autodoc-typehints==1.22", + "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.0", From 8e0b5802d866dcb0b8f1376384bc20f20d7331e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Apr 2023 11:06:14 +0000 Subject: [PATCH 0102/1638] Bump pyright from 1.1.302 to 1.1.303 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.302 to 1.1.303. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.302...v1.1.303) --- 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 9f240d36d..e4ab59acb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.302", + "pyright==1.1.303", "pylint==2.17.2 ", "pyroma==4.2", "pytest-cov==4.0.0", From 5c6c0bcb4b4ee062cccb60da579cc784e7487fea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 11:09:44 +0000 Subject: [PATCH 0103/1638] Bump pytest from 7.3.0 to 7.3.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.0 to 7.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/7.3.0...7.3.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 e1b2101d7..9cebda946 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -251,7 +251,7 @@ dev = [ "pylint==2.17.2 ", "pyroma==4.2", "pytest-cov==4.0.0", - "pytest==7.3.0 ", + "pytest==7.3.1 ", "ruff==0.0.261", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", From b051eba521ace7411bc50da907daed55a704b8ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 11:05:10 +0000 Subject: [PATCH 0104/1638] Bump pygments from 2.15.0 to 2.15.1 Bumps [pygments](https://github.com/pygments/pygments) from 2.15.0 to 2.15.1. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.15.0...2.15.1) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e1b2101d7..6e982c329 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -231,7 +231,7 @@ dependencies = [ [project.optional-dependencies] dev = [ "PyYAML==6.0", - "Pygments==2.15.0", + "Pygments==2.15.1", "Sphinx-Substitution-Extensions==2022.2.16", "Sphinx==6.1.3", "VWS-Python-Mock==2023.4.8", From 698060e3701bc21e3f1d244f83bdaf5c1dcb2cbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 11:05:34 +0000 Subject: [PATCH 0105/1638] Bump pdm from 2.5.2 to 2.5.3 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.5.2 to 2.5.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.5.2...2.5.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 e1b2101d7..f8a57b6fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.3.27", "mypy==1.2.0", - "pdm==2.5.2", + "pdm==2.5.3", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 164668ab13752137e91646a6b1b3d1f6caf37933 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Apr 2023 11:06:31 +0000 Subject: [PATCH 0106/1638] Bump ruff from 0.0.261 to 0.0.262 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.261 to 0.0.262. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.261...v0.0.262) --- 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 ae7fe94d6..4c4d1fe16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.3.1 ", - "ruff==0.0.261", + "ruff==0.0.262", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 54fd26a795c189e3298ff48aa51df25cdd7819bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Apr 2023 11:03:54 +0000 Subject: [PATCH 0107/1638] Bump pyright from 1.1.303 to 1.1.304 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.303 to 1.1.304. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.303...v1.1.304) --- 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 ae7fe94d6..1bd1760b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.303", + "pyright==1.1.304", "pylint==2.17.2 ", "pyroma==4.2", "pytest-cov==4.0.0", From ba71574e043bc51d6bbdd909c667cd2fbb0fb8ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 11:05:15 +0000 Subject: [PATCH 0108/1638] Bump sphinx from 6.1.3 to 6.2.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 6.1.3 to 6.2.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v6.1.3...v6.2.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 0471a9d9d..379a5bce3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0", "Pygments==2.15.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==6.1.3", + "Sphinx==6.2.1", "VWS-Python-Mock==2023.4.8", "VWS-Test-Fixtures==2023.3.5", "black==23.3.0", From dbfc8968c3cd12a624b6a720afe1875ae41db9d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 11:12:20 +0000 Subject: [PATCH 0109/1638] Bump types-urllib3 from 1.26.25.10 to 1.26.25.12 Bumps [types-urllib3](https://github.com/python/typeshed) from 1.26.25.10 to 1.26.25.12. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-urllib3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 379a5bce3..52b945184 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,7 +258,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.0", "types-requests==2.28.11.17", - "types-urllib3==1.26.25.10", + "types-urllib3==1.26.25.12", "vulture==2.7", ] From 02bea104b0882c6d664060e9db51b8a054182a49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 May 2023 11:05:55 +0000 Subject: [PATCH 0110/1638] Bump ruff from 0.0.262 to 0.0.264 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.262 to 0.0.264. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.262...v0.0.264) --- 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 379a5bce3..5bc0901aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.3.1 ", - "ruff==0.0.262", + "ruff==0.0.264", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 288b41246338da98115706fa1825a9441ecca36d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 May 2023 11:04:22 +0000 Subject: [PATCH 0111/1638] Bump pyright from 1.1.304 to 1.1.306 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.304 to 1.1.306. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.304...v1.1.306) --- 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 379a5bce3..0f309518a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.304", + "pyright==1.1.306", "pylint==2.17.2 ", "pyroma==4.2", "pytest-cov==4.0.0", From 29616cb2ea31a76822c69de50d6a761292c2fbb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 20:23:46 +0000 Subject: [PATCH 0112/1638] Bump pylint from 2.17.2 to 2.17.3 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.17.2 to 2.17.3. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](https://github.com/PyCQA/pylint/compare/v2.17.2...v2.17.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 0fc35096f..af522d4a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.306", - "pylint==2.17.2 ", + "pylint==2.17.3 ", "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.3.1 ", From 8d7eef468bce556646b215ff6447b6410ffdbe08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 20:24:10 +0000 Subject: [PATCH 0113/1638] Bump types-requests from 2.28.11.17 to 2.29.0.0 Bumps [types-requests](https://github.com/python/typeshed) from 2.28.11.17 to 2.29.0.0. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- 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 0fc35096f..365532822 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.0", - "types-requests==2.28.11.17", + "types-requests==2.29.0.0", "types-urllib3==1.26.25.12", "vulture==2.7", ] From 839126693976cb733fe38e5d63a49be96e67fcd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 May 2023 11:03:48 +0000 Subject: [PATCH 0114/1638] Bump pdm from 2.5.3 to 2.5.4 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.5.3 to 2.5.4. - [Release notes](https://github.com/pdm-project/pdm/releases) - [Changelog](https://github.com/pdm-project/pdm/blob/2.5.4/CHANGELOG.md) - [Commits](https://github.com/pdm-project/pdm/compare/2.5.3...2.5.4) --- 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 0fc35096f..a73c71e76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.3.27", "mypy==1.2.0", - "pdm==2.5.3", + "pdm==2.5.4", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 5277ff0c34c620efd8c7f69c5f51df474d64c57d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 May 2023 10:28:57 +0000 Subject: [PATCH 0115/1638] Bump ruff from 0.0.264 to 0.0.265 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.264 to 0.0.265. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.264...v0.0.265) --- 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 fc0ea20cf..91c8ed690 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.3.1 ", - "ruff==0.0.264", + "ruff==0.0.265", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 896e6066fbf27f31c427c9f1641fa25895d185df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 May 2023 11:05:35 +0000 Subject: [PATCH 0116/1638] Bump sybil from 5.0.0 to 5.0.1 Bumps [sybil](https://github.com/simplistix/sybil) from 5.0.0 to 5.0.1. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/5.0.0...5.0.1) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc0ea20cf..c8be30e95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", - "sybil==5.0.0", + "sybil==5.0.1", "types-requests==2.29.0.0", "types-urllib3==1.26.25.12", "vulture==2.7", From 3fd2b99b8e3286f37c63931e7e1c8dc26dad1d3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 May 2023 11:05:14 +0000 Subject: [PATCH 0117/1638] Bump pyright from 1.1.306 to 1.1.307 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.306 to 1.1.307. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.306...v1.1.307) --- 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 fc0ea20cf..538219eae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.306", + "pyright==1.1.307", "pylint==2.17.3 ", "pyroma==4.2", "pytest-cov==4.0.0", From 01ac0842d833ecb5f7559f7fb413ab6052d52590 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 11:05:28 +0000 Subject: [PATCH 0118/1638] Bump types-urllib3 from 1.26.25.12 to 1.26.25.13 Bumps [types-urllib3](https://github.com/python/typeshed) from 1.26.25.12 to 1.26.25.13. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-urllib3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc0ea20cf..97cba96ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,7 +258,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.0", "types-requests==2.29.0.0", - "types-urllib3==1.26.25.12", + "types-urllib3==1.26.25.13", "vulture==2.7", ] From 47f80933d949c6d03474a80113cf50aafef8dd2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 11:05:45 +0000 Subject: [PATCH 0119/1638] Bump mypy from 1.2.0 to 1.3.0 Bumps [mypy](https://github.com/python/mypy) from 1.2.0 to 1.3.0. - [Commits](https://github.com/python/mypy/compare/v1.2.0...v1.3.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 fc0ea20cf..1493f2c91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.3.27", - "mypy==1.2.0", + "mypy==1.3.0", "pdm==2.5.4", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", From 4fba38451e37479f431caacd1f62ebb6201b5610 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 12:25:17 +0000 Subject: [PATCH 0120/1638] Bump pdm from 2.5.4 to 2.6.1 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.5.4 to 2.6.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.5.4...2.6.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 1493f2c91..7951e4187 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.3.27", "mypy==1.3.0", - "pdm==2.5.4", + "pdm==2.6.1", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From be0875f75f497c5a81860f261337900f6ff45f3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 12:35:14 +0000 Subject: [PATCH 0121/1638] Bump types-requests from 2.29.0.0 to 2.30.0.0 Bumps [types-requests](https://github.com/python/typeshed) from 2.29.0.0 to 2.30.0.0. - [Commits](https://github.com/python/typeshed/commits) --- 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 d3a02fcee..77bee68da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.1", - "types-requests==2.29.0.0", + "types-requests==2.30.0.0", "types-urllib3==1.26.25.13", "vulture==2.7", ] From 9b6f6dd8aca415a43a18d2554f6ebb0054eef14d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 12:41:50 +0000 Subject: [PATCH 0122/1638] Bump pylint from 2.17.3 to 2.17.4 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.17.3 to 2.17.4. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](https://github.com/PyCQA/pylint/compare/v2.17.3...v2.17.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 502701ef6..d6ee35bfd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.307", - "pylint==2.17.3 ", + "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.3.1 ", From 5846d519bb39d5b2717fc03c3a66dfaebb36add8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 11:09:28 +0000 Subject: [PATCH 0123/1638] Bump ruff from 0.0.265 to 0.0.267 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.265 to 0.0.267. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.265...v0.0.267) --- 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 5ccd2655f..5cf4172cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.3.1 ", - "ruff==0.0.265", + "ruff==0.0.267", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 0c4ae1ccd933c180c7fdfe42e44e14e81d362814 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 11:09:33 +0000 Subject: [PATCH 0124/1638] Bump pyright from 1.1.307 to 1.1.308 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.307 to 1.1.308. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.307...v1.1.308) --- 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 5ccd2655f..80515b2cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.307", + "pyright==1.1.308", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.0.0", From 43b81b11c1f745e5f2830cd0520c650378afdb81 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 16 May 2023 09:13:09 +0100 Subject: [PATCH 0125/1638] Remove types-urllib dependency - urllib3 v2 now ships type hints --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d12f31a9e..62eef03ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,7 +258,6 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.1", "types-requests==2.30.0.0", - "types-urllib3==1.26.25.13", "vulture==2.7", ] From ff82b271e62a38ea3597a2752cedece33b3f1d19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 May 2023 11:05:46 +0000 Subject: [PATCH 0126/1638] Bump pyright from 1.1.308 to 1.1.309 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.308 to 1.1.309. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.308...v1.1.309) --- 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 62eef03ac..e0e4f0f57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.308", + "pyright==1.1.309", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.0.0", From 9a240ee719676cc5e176107411acc5c1c9b07aef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 May 2023 11:05:37 +0000 Subject: [PATCH 0127/1638] Bump sybil from 5.0.1 to 5.0.2 Bumps [sybil](https://github.com/simplistix/sybil) from 5.0.1 to 5.0.2. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/5.0.1...5.0.2) --- 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 e0e4f0f57..14dfb0491 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", - "sybil==5.0.1", + "sybil==5.0.2", "types-requests==2.30.0.0", "vulture==2.7", ] From 056aaf018cf4680c1055ff8e4a25f19bbdf5fee5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 May 2023 11:05:58 +0000 Subject: [PATCH 0128/1638] Bump ruff from 0.0.267 to 0.0.269 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.267 to 0.0.269. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.267...v0.0.269) --- 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 e0e4f0f57..68f31926c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.3.1 ", - "ruff==0.0.267", + "ruff==0.0.269", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From dd1e7e1cb6a44696c43ccd56a95b615b3d209d69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 May 2023 17:34:20 +0000 Subject: [PATCH 0129/1638] Bump furo from 2023.3.27 to 2023.5.20 Bumps [furo](https://github.com/pradyunsg/furo) from 2023.3.27 to 2023.5.20. - [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.03.27...2023.05.20) --- 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 ad41de5b4..ac47522c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "doc8==1.1.1", "dodgy==0.2.1", "freezegun==1.2.2", - "furo==2023.3.27", + "furo==2023.5.20", "mypy==1.3.0", "pdm==2.6.1", "pip_check_reqs==2.4.4", From a038e936172935bfa156c116666546df6377fdf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 May 2023 17:42:29 +0000 Subject: [PATCH 0130/1638] Bump sphinx from 6.2.1 to 7.0.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 6.2.1 to 7.0.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v6.2.1...v7.0.1) --- 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 ac47522c6..6b396754c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0", "Pygments==2.15.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==6.2.1", + "Sphinx==7.0.1", "VWS-Python-Mock==2023.4.8", "VWS-Test-Fixtures==2023.3.5", "black==23.3.0", From bdf6804d4e36cd56226add15036c06bc3d1a2d5a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 21 May 2023 19:38:37 +0100 Subject: [PATCH 0131/1638] Pin PyPI publish Github action --- .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 bccb17bfa..15b26f1d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,7 @@ jobs: python -m build --sdist --wheel --outdir dist/ . - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} verbose: true From 42e6649c040b9b95ca57a3c10b9d72a83e45646e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 21 May 2023 19:54:03 +0100 Subject: [PATCH 0132/1638] Remove ActiveMatchingTargetsDeleteProcessing - VWS no longer has this problem --- CHANGELOG.rst | 2 ++ pyproject.toml | 2 +- src/vws/exceptions/custom_exceptions.py | 7 ------ src/vws/query.py | 6 ----- tests/test_cloud_reco_exceptions.py | 30 +------------------------ 5 files changed, 4 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ac793382f..097a2ae0f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Breaking change: the ``vws.exceptions.custom_exceptions.ActiveMatchingTargetsDeleteProcessing`` exception has been removed as Vuforia no longer returns this error. + 2023.03.25 ------------ diff --git a/pyproject.toml b/pyproject.toml index 6b396754c..62833775f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -234,7 +234,7 @@ dev = [ "Pygments==2.15.1", "Sphinx-Substitution-Extensions==2022.2.16", "Sphinx==7.0.1", - "VWS-Python-Mock==2023.4.8", + "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", "black==23.3.0", "check-manifest==0.49", diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index c66939b9e..edc694f93 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -24,10 +24,3 @@ class TargetProcessingTimeout(Exception): """ Exception raised when waiting for a target to be processed times out. """ - - -class ActiveMatchingTargetsDeleteProcessing(Exception): - """ - Exception raised when a query is made with an image which matches a target - which has recently been deleted. - """ diff --git a/src/vws/query.py b/src/vws/query.py index 22235a419..cca390c15 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -21,7 +21,6 @@ RequestTimeTooSkewed, ) from vws.exceptions.custom_exceptions import ( - ActiveMatchingTargetsDeleteProcessing, RequestEntityTooLarge, ) from vws.include_target_data import CloudRecoIncludeTargetData @@ -95,8 +94,6 @@ 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.ActiveMatchingTargetsDeleteProcessing: - The given image matches a target which was recently deleted. Returns: An ordered list of target details of matching targets. @@ -148,9 +145,6 @@ def query( if "Integer out of range" in response.text: raise MaxNumResultsOutOfRange(response=response) - if "No content to map due to end-of-input" in response.text: - raise ActiveMatchingTargetsDeleteProcessing - result_code = response.json()["result_code"] if result_code != "Success": exception = { diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 67f043c47..7e7261599 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -4,7 +4,6 @@ from __future__ import annotations -import time import uuid from http import HTTPStatus from typing import TYPE_CHECKING @@ -13,7 +12,7 @@ from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase from mock_vws.states import States -from vws import VWS, CloudRecoService +from vws import CloudRecoService from vws.exceptions.base_exceptions import CloudRecoException from vws.exceptions.cloud_reco_exceptions import ( AuthenticationFailure, @@ -23,7 +22,6 @@ RequestTimeTooSkewed, ) from vws.exceptions.custom_exceptions import ( - ActiveMatchingTargetsDeleteProcessing, RequestEntityTooLarge, ) @@ -79,32 +77,6 @@ def test_cloudrecoexception_inheritance() -> None: assert issubclass(subclass, CloudRecoException) -def test_active_matching_targets_delete_processing( - vws_client: VWS, - cloud_reco_client: CloudRecoService, - high_quality_image: io.BytesIO, -) -> None: - """ - A ``ActiveMatchingTargetsDeleteProcessing`` exception is raised when a - target which has recently been deleted is matched. - """ - target_id = vws_client.add_target( - name="x", - width=1, - image=high_quality_image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - vws_client.delete_target(target_id=target_id) - # This matches the "query_recognizes_deletion_seconds" setting to - # ``MockVWS``. - query_recognizes_deletion_seconds = 2 - time.sleep(query_recognizes_deletion_seconds) - with pytest.raises(ActiveMatchingTargetsDeleteProcessing): - cloud_reco_client.query(image=high_quality_image) - - def test_authentication_failure(high_quality_image: io.BytesIO) -> None: """ An ``AuthenticationFailure`` exception is raised when the client access key From 8e1beaf0cc3cb07e03d53d45a15423117b049b2b Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Sun, 21 May 2023 19:03:31 +0000 Subject: [PATCH 0133/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 097a2ae0f..833475c1b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2023.05.21 +------------ + * Breaking change: the ``vws.exceptions.custom_exceptions.ActiveMatchingTargetsDeleteProcessing`` exception has been removed as Vuforia no longer returns this error. 2023.03.25 From c9d3d38ce249a7e49c7f38ec715b90b33c13d059 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 11:05:45 +0000 Subject: [PATCH 0134/1638] Bump types-requests from 2.30.0.0 to 2.31.0.0 Bumps [types-requests](https://github.com/python/typeshed) from 2.30.0.0 to 2.31.0.0. - [Commits](https://github.com/python/typeshed/commits) --- 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 62833775f..1d106989d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.2", - "types-requests==2.30.0.0", + "types-requests==2.31.0.0", "vulture==2.7", ] From 8c9449ffae71160ac0927bc766763d267e833861 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 11:06:54 +0000 Subject: [PATCH 0135/1638] Bump ruff from 0.0.269 to 0.0.270 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.269 to 0.0.270. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.269...v0.0.270) --- 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 62833775f..af70b7f3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.0.0", "pytest==7.3.1 ", - "ruff==0.0.269", + "ruff==0.0.270", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 845689fda9b1a96fec54fcaeea961bc18c42de08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 11:07:21 +0000 Subject: [PATCH 0136/1638] Bump pytest-cov from 4.0.0 to 4.1.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 4.0.0 to 4.1.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v4.0.0...v4.1.0) --- updated-dependencies: - dependency-name: pytest-cov 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 62833775f..79bdb0ce1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -250,7 +250,7 @@ dev = [ "pyright==1.1.309", "pylint==2.17.4 ", "pyroma==4.2", - "pytest-cov==4.0.0", + "pytest-cov==4.1.0", "pytest==7.3.1 ", "ruff==0.0.269", "sphinx-autodoc-typehints==1.23.0", From 1aae1e4fd5a62592133a4af0671d0c132bc2e6a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 11:05:33 +0000 Subject: [PATCH 0137/1638] Bump pyright from 1.1.309 to 1.1.310 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.309 to 1.1.310. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.309...v1.1.310) --- 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 11ae01625..e433e68ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.309", + "pyright==1.1.310", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", From d07892ab6dd0eda267933b677653f2d0eec4fc75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 11:10:38 +0000 Subject: [PATCH 0138/1638] Bump types-requests from 2.31.0.0 to 2.31.0.1 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.0 to 2.31.0.1. - [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 06e7c425a..27eabe0b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.2", - "types-requests==2.31.0.0", + "types-requests==2.31.0.1", "vulture==2.7", ] From 0dd7c06fd7bd6d3ff51c4387e70df2c64409bed4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 11:11:12 +0000 Subject: [PATCH 0139/1638] Bump pdm from 2.6.1 to 2.7.0 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.6.1 to 2.7.0. - [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.6.1...2.7.0) --- 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 06e7c425a..a2e70c5bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.5.20", "mypy==1.3.0", - "pdm==2.6.1", + "pdm==2.7.0", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 04240b18fb9e71911f63ef53cbd4d6c338e61b20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 11:05:38 +0000 Subject: [PATCH 0140/1638] Bump pyright from 1.1.310 to 1.1.311 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.310 to 1.1.311. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.310...v1.1.311) --- 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 ba4544698..c69a7417d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.310", + "pyright==1.1.311", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", From 080433558d04501900236ce8c579217941377304 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jun 2023 11:16:22 +0000 Subject: [PATCH 0141/1638] Bump pyright from 1.1.311 to 1.1.313 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.311 to 1.1.313. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.311...v1.1.313) --- 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 c69a7417d..baa3b2830 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.311", + "pyright==1.1.313", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", From e9e97c37fc8004e7ca3eb5702de97fe4899159ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jun 2023 11:16:49 +0000 Subject: [PATCH 0142/1638] Bump ruff from 0.0.270 to 0.0.272 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.270 to 0.0.272. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.270...v0.0.272) --- 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 c69a7417d..5171411bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.3.1 ", - "ruff==0.0.270", + "ruff==0.0.272", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From b37336e8d47a58df82b13af08fdf55afef95e424 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 11:09:12 +0000 Subject: [PATCH 0143/1638] Bump pytest from 7.3.1 to 7.3.2 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.1 to 7.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/7.3.1...7.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 dfda91550..5d8e67dd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -251,7 +251,7 @@ dev = [ "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", - "pytest==7.3.1 ", + "pytest==7.3.2 ", "ruff==0.0.272", "sphinx-autodoc-typehints==1.23.0", "sphinx-prompt==1.5.0", From 314674352073500d49310bc8c4c72257bec04284 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 11:05:03 +0000 Subject: [PATCH 0144/1638] Bump pdm from 2.7.0 to 2.7.4 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.7.0 to 2.7.4. - [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.7.0...2.7.4) --- 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 5d8e67dd8..b2b60e4b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.5.20", "mypy==1.3.0", - "pdm==2.7.0", + "pdm==2.7.4", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 2fdc67955cb6865821d071e48710d8dbbd9a089b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Jun 2023 11:11:21 +0000 Subject: [PATCH 0145/1638] Bump pyright from 1.1.313 to 1.1.314 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.313 to 1.1.314. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.313...v1.1.314) --- 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 b2b60e4b8..39abfd884 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.313", + "pyright==1.1.314", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", From f31d737b2583f49f2aeb6e9d881b63635f958ea9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jun 2023 11:06:59 +0000 Subject: [PATCH 0146/1638] Bump sphinx-autodoc-typehints from 1.23.0 to 1.23.1 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.23.0 to 1.23.1. - [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.23.0...1.23.1) --- 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 39abfd884..7caffc06f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -253,7 +253,7 @@ dev = [ "pytest-cov==4.1.0", "pytest==7.3.2 ", "ruff==0.0.272", - "sphinx-autodoc-typehints==1.23.0", + "sphinx-autodoc-typehints==1.23.1", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.2", From 21f9b8c4d2a8a49f5641372dd029deb59afe5632 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 11:15:31 +0000 Subject: [PATCH 0147/1638] Bump sphinx-autodoc-typehints from 1.23.1 to 1.23.2 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.23.1 to 1.23.2. - [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.23.1...1.23.2) --- 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 7caffc06f..974e9ab03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -253,7 +253,7 @@ dev = [ "pytest-cov==4.1.0", "pytest==7.3.2 ", "ruff==0.0.272", - "sphinx-autodoc-typehints==1.23.1", + "sphinx-autodoc-typehints==1.23.2", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.2", From 0a2cea6c0880ba1dd1667f5a3fe0a7a24cfe98fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 11:07:52 +0000 Subject: [PATCH 0148/1638] Bump ruff from 0.0.272 to 0.0.274 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.272 to 0.0.274. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.272...v0.0.274) --- 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 974e9ab03..93c95a070 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.3.2 ", - "ruff==0.0.272", + "ruff==0.0.274", "sphinx-autodoc-typehints==1.23.2", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 9fc2ba91ec0b2d7d3dafe8057070bbcecf44e449 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 11:08:12 +0000 Subject: [PATCH 0149/1638] Bump mypy from 1.3.0 to 1.4.0 Bumps [mypy](https://github.com/python/mypy) from 1.3.0 to 1.4.0. - [Commits](https://github.com/python/mypy/compare/v1.3.0...v1.4.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 974e9ab03..b7f1d7586 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.5.20", - "mypy==1.3.0", + "mypy==1.4.0", "pdm==2.7.4", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", From 3464bd3ac8c64ca08b2ea9703e86637e41f6146b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Jun 2023 11:06:18 +0000 Subject: [PATCH 0150/1638] Bump pyright from 1.1.314 to 1.1.315 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.314 to 1.1.315. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.314...v1.1.315) --- 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 69c2060af..4c94fd582 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.314", + "pyright==1.1.315", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", From b7402900472452020ec00e5532adaa256641b0c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 11:07:45 +0000 Subject: [PATCH 0151/1638] Bump ruff from 0.0.274 to 0.0.275 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.274 to 0.0.275. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.274...v0.0.275) --- 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 69c2060af..ad04ecaf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.3.2 ", - "ruff==0.0.274", + "ruff==0.0.275", "sphinx-autodoc-typehints==1.23.2", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 2f4de47b0e2686b0a7b2981b2683fdd6a99b8d54 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 11:08:20 +0000 Subject: [PATCH 0152/1638] Bump mypy from 1.4.0 to 1.4.1 Bumps [mypy](https://github.com/python/mypy) from 1.4.0 to 1.4.1. - [Commits](https://github.com/python/mypy/compare/v1.4.0...v1.4.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 ad04ecaf6..ea60724f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.5.20", - "mypy==1.4.0", + "mypy==1.4.1", "pdm==2.7.4", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", From 11fd9f5fcbc9c5850226511566ffc56224f8d7a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 11:08:42 +0000 Subject: [PATCH 0153/1638] Bump pytest from 7.3.2 to 7.4.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.2 to 7.4.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.3.2...7.4.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 ad04ecaf6..145aa324c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -251,7 +251,7 @@ dev = [ "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", - "pytest==7.3.2 ", + "pytest==7.4.0 ", "ruff==0.0.275", "sphinx-autodoc-typehints==1.23.2", "sphinx-prompt==1.5.0", From a31778027eb9340663505eaa5685a5e784e73439 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Jun 2023 11:05:24 +0000 Subject: [PATCH 0154/1638] Bump sphinx-autodoc-typehints from 1.23.2 to 1.23.3 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.23.2 to 1.23.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.23.2...1.23.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 e839b4960..8ea2f6044 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -253,7 +253,7 @@ dev = [ "pytest-cov==4.1.0", "pytest==7.4.0 ", "ruff==0.0.275", - "sphinx-autodoc-typehints==1.23.2", + "sphinx-autodoc-typehints==1.23.3", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.2", From e51cf1a6591697aa1925fc37bd95998a0b4a4afb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Jun 2023 11:05:37 +0000 Subject: [PATCH 0155/1638] Bump pyright from 1.1.315 to 1.1.316 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.315 to 1.1.316. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.315...v1.1.316) --- 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 e839b4960..d8a7011e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.315", + "pyright==1.1.316", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", From 466e350167ee21ee77dc7db15578635562db656f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 10:36:30 +0000 Subject: [PATCH 0156/1638] Bump ruff from 0.0.275 to 0.0.276 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.275 to 0.0.276. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.275...v0.0.276) --- 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 46dac3971..436a64840 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.275", + "ruff==0.0.276", "sphinx-autodoc-typehints==1.23.3", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From a27106b5a149786a231597091843ba73cccbcb3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 10:32:51 +0000 Subject: [PATCH 0157/1638] Bump ruff from 0.0.276 to 0.0.277 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.276 to 0.0.277. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.276...v0.0.277) --- 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 436a64840..8e278b0a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.276", + "ruff==0.0.277", "sphinx-autodoc-typehints==1.23.3", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 6feeec8f235b256c1524008a01d1d7f6e7112826 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Jul 2023 10:49:12 +0000 Subject: [PATCH 0158/1638] Bump black from 23.3.0 to 23.7.0 Bumps [black](https://github.com/psf/black) from 23.3.0 to 23.7.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.3.0...23.7.0) --- updated-dependencies: - dependency-name: black 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 8e278b0a7..8de7c1d73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Sphinx==7.0.1", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", - "black==23.3.0", + "black==23.7.0", "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", From 7a7c7444c9b4a5716669932eee529999d4be6478 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:25:03 +0000 Subject: [PATCH 0159/1638] Bump ruff from 0.0.277 to 0.0.278 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.277 to 0.0.278. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.277...v0.0.278) --- 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 8de7c1d73..ee78e0c26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.277", + "ruff==0.0.278", "sphinx-autodoc-typehints==1.23.3", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From af32914e1739c8ee9aa2d26659ae599d7a0939d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:25:08 +0000 Subject: [PATCH 0160/1638] Bump pyright from 1.1.316 to 1.1.317 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.316 to 1.1.317. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.316...v1.1.317) --- 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 8de7c1d73..2a9b25903 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.316", + "pyright==1.1.317", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", From 606509129b98e2818cd6c5afaf7c36f925a4aabc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:58:46 +0000 Subject: [PATCH 0161/1638] Bump sybil from 5.0.2 to 5.0.3 Bumps [sybil](https://github.com/simplistix/sybil) from 5.0.2 to 5.0.3. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/5.0.2...5.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 2a9b25903..0b21336d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "sphinx-autodoc-typehints==1.23.3", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", - "sybil==5.0.2", + "sybil==5.0.3", "types-requests==2.31.0.1", "vulture==2.7", ] From 380fc5af87d3f8a6995c749e2ef8393fe2ed310c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 10:14:03 +0000 Subject: [PATCH 0162/1638] Bump pdm from 2.7.4 to 2.8.0 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.7.4 to 2.8.0. - [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.7.4...2.8.0) --- 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 778e2bbda..85c260cab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.5.20", "mypy==1.4.1", - "pdm==2.7.4", + "pdm==2.8.0", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 8837aa6ccae4e5414cfd636a3208c7971803a661 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 10:32:17 +0000 Subject: [PATCH 0163/1638] Bump pyyaml from 6.0 to 6.0.1 Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0 to 6.0.1. - [Changelog](https://github.com/yaml/pyyaml/blob/6.0.1/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/6.0...6.0.1) --- 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 85c260cab..1c4ace161 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -230,7 +230,7 @@ dependencies = [ [project.optional-dependencies] dev = [ - "PyYAML==6.0", + "PyYAML==6.0.1", "Pygments==2.15.1", "Sphinx-Substitution-Extensions==2022.2.16", "Sphinx==7.0.1", From 1794f404339e3b1e480b3ebabe5683a68caf720c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:49:29 +0000 Subject: [PATCH 0164/1638] Bump pyright from 1.1.317 to 1.1.318 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.317 to 1.1.318. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.317...v1.1.318) --- 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 1c4ace161..594bfd110 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.317", + "pyright==1.1.318", "pylint==2.17.4 ", "pyroma==4.2", "pytest-cov==4.1.0", From 07fd6906fc00b2b59a9ca8a1cc925c2cecbef236 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:49:38 +0000 Subject: [PATCH 0165/1638] Bump types-requests from 2.31.0.1 to 2.31.0.2 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.1 to 2.31.0.2. - [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 1c4ace161..484d694be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.1", + "types-requests==2.31.0.2", "vulture==2.7", ] From 9a0a827216ee65e470d68101a465ef64386b117c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 10:54:34 +0000 Subject: [PATCH 0166/1638] Bump ruff from 0.0.278 to 0.0.280 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.278 to 0.0.280. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.278...v0.0.280) --- 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 8cb5c4b18..2a0a4adc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.278", + "ruff==0.0.280", "sphinx-autodoc-typehints==1.23.3", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 107f9e27c795ab7e5547481025ffb36c046c1e8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 06:52:54 +0000 Subject: [PATCH 0167/1638] Bump sphinx-autodoc-typehints from 1.23.3 to 1.24.0 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.23.3 to 1.24.0. - [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.23.3...1.24.0) --- updated-dependencies: - dependency-name: sphinx-autodoc-typehints 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 2a0a4adc2..62c362f94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -253,7 +253,7 @@ dev = [ "pytest-cov==4.1.0", "pytest==7.4.0 ", "ruff==0.0.280", - "sphinx-autodoc-typehints==1.23.3", + "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", From 86bed8ee46cac071a71bb441eeefdd830b1b4c99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:47:13 +0000 Subject: [PATCH 0168/1638] Bump pdm from 2.8.0 to 2.8.1 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.8.0 to 2.8.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.8.0...2.8.1) --- 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 2a0a4adc2..708c4ea74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.5.20", "mypy==1.4.1", - "pdm==2.8.0", + "pdm==2.8.1", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 6fcab42533fbd1a5fb64204644535214950bd936 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:47:20 +0000 Subject: [PATCH 0169/1638] Bump pylint from 2.17.4 to 2.17.5 Bumps [pylint](https://github.com/pylint-dev/pylint) from 2.17.4 to 2.17.5. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v2.17.4...v2.17.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 2a0a4adc2..9e6eba0c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.318", - "pylint==2.17.4 ", + "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", From 6822e02ffe9861b5bd87fce5fdbb23a4fdb5a7fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Jul 2023 11:04:04 +0000 Subject: [PATCH 0170/1638] Bump furo from 2023.5.20 to 2023.7.26 Bumps [furo](https://github.com/pradyunsg/furo) from 2023.5.20 to 2023.7.26. - [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.05.20...2023.07.26) --- 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 b00268e3c..4cbc4ef88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "doc8==1.1.1", "dodgy==0.2.1", "freezegun==1.2.2", - "furo==2023.5.20", + "furo==2023.7.26", "mypy==1.4.1", "pdm==2.8.1", "pip_check_reqs==2.4.4", From 524595317f9e58844bb3cca0b64ec3bb3d7ecc4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 10:22:37 +0000 Subject: [PATCH 0171/1638] Bump sphinx from 7.0.1 to 7.1.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.0.1 to 7.1.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.0.1...v7.1.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 b00268e3c..5237308b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0.1", "Pygments==2.15.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==7.0.1", + "Sphinx==7.1.1", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", "black==23.7.0", From a5ee6fd05e249e72df3139c795e4a9ffa58f1b31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 10:57:37 +0000 Subject: [PATCH 0172/1638] Bump pdm from 2.8.1 to 2.8.2 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.8.1 to 2.8.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.8.1...2.8.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 4cbc4ef88..3336fe3d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.7.26", "mypy==1.4.1", - "pdm==2.8.1", + "pdm==2.8.2", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 94a284d1e8ed68eda442980a7b5e013d6356c3ae Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 31 Jul 2023 14:06:46 +0100 Subject: [PATCH 0173/1638] Remove linkcheck anchors setting which broke automod linkchecking in recent Sphinx --- docs/source/conf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index f3f0c9e3b..229caea15 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -70,10 +70,6 @@ autoclass_content = "both" - -# Don't check anchors because many websites use #! for AJAX magic -# http://sphinx-doc.org/config.html#confval-linkcheck_anchors -linkcheck_anchors = False # Retry link checking to avoid transient network errors. linkcheck_retries = 5 linkcheck_ignore = [ From 62d3d5ecb7e9de80204517858dcd09a2860896eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:13:55 +0000 Subject: [PATCH 0174/1638] Bump ruff from 0.0.280 to 0.0.282 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.280 to 0.0.282. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.280...v0.0.282) --- 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 3336fe3d0..4fd9f51f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.280", + "ruff==0.0.282", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 33dd4d988485187eb55d07e9617fe990d45f31cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:13:52 +0000 Subject: [PATCH 0175/1638] Bump pyright from 1.1.318 to 1.1.320 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.318 to 1.1.320. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.318...v1.1.320) --- 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 3336fe3d0..83158a46e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.318", + "pyright==1.1.320", "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", From 2c66364468d8a4f4a75e9ddbd1bab17464080e54 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 10:22:55 +0000 Subject: [PATCH 0176/1638] Bump pygments from 2.15.1 to 2.16.1 Bumps [pygments](https://github.com/pygments/pygments) from 2.15.1 to 2.16.1. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.15.1...2.16.1) --- 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 3eccc852b..df1f92758 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -231,7 +231,7 @@ dependencies = [ [project.optional-dependencies] dev = [ "PyYAML==6.0.1", - "Pygments==2.15.1", + "Pygments==2.16.1", "Sphinx-Substitution-Extensions==2022.2.16", "Sphinx==7.0.1", "VWS-Python-Mock==2023.5.21", From cc993d6fd441a1aa5c8e98ac45915be19b6b0860 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Aug 2023 09:41:58 +0100 Subject: [PATCH 0177/1638] Update Vuforia link anchors --- 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 afaa56fac..730d1a2a5 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -37,7 +37,7 @@ class VWSException(Exception): Base class for Vuforia Web Services errors. These errors are defined at - https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Interperete-VWS-API-Result-Codes. + https://library.vuforia.com/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 edc694f93..afe9c4b46 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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Interperete-VWS-API-Result-Codes +https://library.vuforia.com/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 daef65bfd..3e080faf3 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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Interperete-VWS-API-Result-Codes. +https://library.vuforia.com/web-api/cloud-targets-web-services-api#result-codes. """ import json diff --git a/src/vws/query.py b/src/vws/query.py index cca390c15..5df811252 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -68,7 +68,7 @@ def query( Use the Vuforia Web Query API to make an Image Recognition Query. See - https://library.vuforia.com/articles/Solution/How-To-Perform-an-Image-Recognition-Query + https://library.vuforia.com/web-api/vuforia-query-web-api for parameter details. Args: diff --git a/src/vws/reports.py b/src/vws/reports.py index d1272f57b..479690cdd 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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Get-a-Database-Summary-Report. + https://library.vuforia.com/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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API.html#How-To-Retrieve-a-Target-Record + https://library.vuforia.com/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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Retrieve-a-Target-Summary-Report. + https://library.vuforia.com/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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Retrieve-a-Target-Record. + https://library.vuforia.com/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/articles/Solution/How-To-Perform-an-Image-Recognition-Query. + https://library.vuforia.com/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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Retrieve-a-Target-Record. + https://library.vuforia.com/web-api/cloud-targets-web-services-api#target-record. """ status: TargetStatuses diff --git a/src/vws/vws.py b/src/vws/vws.py index d54523666..fd339f859 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -154,7 +154,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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API.html#How-To-Interperete-VWS-API-Result-Codes + https://library.vuforia.com/web-api/cloud-targets-web-services-api#result-codes Returns: The response to the request made by `requests`. @@ -219,7 +219,7 @@ def add_target( Add a target to a Vuforia Web Services database. See - https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Add-a-Target + https://library.vuforia.com/web-api/cloud-targets-web-services-api#add for parameter details. Args: @@ -288,7 +288,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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Retrieve-a-Target-Record. + https://library.vuforia.com/web-api/cloud-targets-web-services-api#target-record. Args: target_id: The ID of the target to get details of. @@ -381,7 +381,7 @@ def list_targets(self) -> list[str]: List target IDs. See - https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Get-a-Target-List-for-a-Cloud-Database. + https://library.vuforia.com/web-api/cloud-targets-web-services-api#details-list. Returns: The IDs of all targets in the database. @@ -409,7 +409,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: Get a summary report for a target. See - https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Retrieve-a-Target-Summary-Report. + https://library.vuforia.com/web-api/cloud-targets-web-services-api#summary-report. Args: target_id: The ID of the target to get a summary report for. @@ -453,7 +453,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: Get a summary report for the database. See - https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Get-a-Database-Summary-Report. + https://library.vuforia.com/web-api/cloud-targets-web-services-api#summary-report. Returns: Details of the database. @@ -495,7 +495,7 @@ def delete_target(self, target_id: str) -> None: Delete a given target. See - https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Delete-a-Target. + https://library.vuforia.com/web-api/cloud-targets-web-services-api#delete. Args: target_id: The ID of the target to delete. @@ -525,7 +525,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/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API.html#How-To-Check-for-Duplicate-Targets. + https://library.vuforia.com/web-api/cloud-targets-web-services-api#check. Args: target_id: The ID of the target to delete. @@ -568,7 +568,7 @@ def update_target( Add a target to a Vuforia Web Services database. See - https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Add-a-Target + https://library.vuforia.com/web-api/cloud-targets-web-services-api#add for parameter details. Args: From e17d316aa9bf640dc4b83694ccf0b44b48e78267 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 10:45:56 +0000 Subject: [PATCH 0178/1638] Bump sphinx from 7.1.1 to 7.1.2 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.1.1 to 7.1.2. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.1.1...v7.1.2) --- 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 ce5228048..b36e483f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0.1", "Pygments==2.16.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==7.1.1", + "Sphinx==7.1.2", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", "black==23.7.0", From 815ce09869b17c0b9727a1265dd38e8e2cc6d4d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:10:04 +0000 Subject: [PATCH 0179/1638] Bump ruff from 0.0.282 to 0.0.283 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.282 to 0.0.283. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) --- 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 b36e483f1..779ad25f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.282", + "ruff==0.0.283", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From de5aa0d873f424155a2932502ef0f60cb62379a8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Aug 2023 18:58:21 +0100 Subject: [PATCH 0180/1638] Simpler number type --- src/vws/vws.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index fd339f859..61bd43a9b 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -209,7 +209,7 @@ def _make_request( def add_target( self, name: str, - width: int | float, + width: float, image: BinaryIO, application_metadata: str | None, *, @@ -559,7 +559,7 @@ def update_target( self, target_id: str, name: str | None = None, - width: int | float | None = None, + width: float | None = None, image: io.BytesIO | None = None, active_flag: bool | None = None, application_metadata: str | None = None, From 1cd7216ecae7d33cb0eb258b281e1c801e2d7628 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:07:04 +0000 Subject: [PATCH 0181/1638] Bump pyright from 1.1.320 to 1.1.321 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.320 to 1.1.321. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.320...v1.1.321) --- 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 779ad25f0..f20be8f69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.320", + "pyright==1.1.321", "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", From 9cfd4710e5ce21d396dfd3a1ad23320dffd3f169 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:07:19 +0000 Subject: [PATCH 0182/1638] Bump ruff from 0.0.283 to 0.0.284 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.283 to 0.0.284. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.283...v0.0.284) --- 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 779ad25f0..5ad508de4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.283", + "ruff==0.0.284", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 70ae56c468e6e18939e92df331f80ca2a489495c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:52:44 +0000 Subject: [PATCH 0183/1638] Bump vulture from 2.7 to 2.8 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.7 to 2.8. - [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.7...v2.8) --- 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 221860d86..c176d4053 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,7 +258,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", "types-requests==2.31.0.2", - "vulture==2.7", + "vulture==2.8", ] [project.urls] From 9a91b8225fd5c38a7261933438c9111ef61d7b21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:52:58 +0000 Subject: [PATCH 0184/1638] Bump mypy from 1.4.1 to 1.5.0 Bumps [mypy](https://github.com/python/mypy) from 1.4.1 to 1.5.0. - [Commits](https://github.com/python/mypy/compare/v1.4.1...v1.5.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 221860d86..0667c77b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.7.26", - "mypy==1.4.1", + "mypy==1.5.0", "pdm==2.8.2", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", From dc501f86f40fe22a4cba4847fc8613378ff8ba4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 10:54:27 +0000 Subject: [PATCH 0185/1638] Bump pyright from 1.1.321 to 1.1.322 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.321 to 1.1.322. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.321...v1.1.322) --- 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 a55b8fc92..eabbdfec8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.321", + "pyright==1.1.322", "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", From d3a86f3aa90a9ba59128aeb222d3452e9b4334fe Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 15 Aug 2023 11:28:25 +0100 Subject: [PATCH 0186/1638] Fix GitHub CLI link --- docs/source/release-process.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/release-process.rst b/docs/source/release-process.rst index 8b9f06a23..d947f9fd3 100644 --- a/docs/source/release-process.rst +++ b/docs/source/release-process.rst @@ -19,4 +19,4 @@ Perform a Release gh workflow run release.yml --repo |github-owner|/|github-repository| -.. _Install GitHub CLI: https://cli.github.com/manual/installation +.. _Install GitHub CLI: https://cli.github.com/ From 14628e39ca30485265d4df08c3dd27b484a82b41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 10:59:39 +0000 Subject: [PATCH 0187/1638] Bump mypy from 1.5.0 to 1.5.1 Bumps [mypy](https://github.com/python/mypy) from 1.5.0 to 1.5.1. - [Commits](https://github.com/python/mypy/compare/v1.5.0...v1.5.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 eabbdfec8..72a349f13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.7.26", - "mypy==1.5.0", + "mypy==1.5.1", "pdm==2.8.2", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", From 1c2617482df31736984325ea3a8744956c9e7b63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 10:59:51 +0000 Subject: [PATCH 0188/1638] Bump pyright from 1.1.322 to 1.1.323 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.322 to 1.1.323. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.322...v1.1.323) --- 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 eabbdfec8..45d61f97b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.322", + "pyright==1.1.323", "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", From b3f102276133f9da95d1d6fdd3dd2d194b94340e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 10:18:17 +0000 Subject: [PATCH 0189/1638] Bump sphinx from 7.1.2 to 7.2.2 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.1.2 to 7.2.2. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.1.2...v7.2.2) --- 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 b85d2930f..12111d6b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0.1", "Pygments==2.16.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==7.1.2", + "Sphinx==7.2.2", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", "black==23.7.0", From 61f7e84075b533f29600e939c8791083b140b172 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 10:18:32 +0000 Subject: [PATCH 0190/1638] Bump ruff from 0.0.284 to 0.0.285 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.284 to 0.0.285. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.284...v0.0.285) --- 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 b85d2930f..493ad1672 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.284", + "ruff==0.0.285", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 4880ce654f588228bf3934e1fecd8cbb69be4b46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 10:18:43 +0000 Subject: [PATCH 0191/1638] Bump furo from 2023.7.26 to 2023.8.17 Bumps [furo](https://github.com/pradyunsg/furo) from 2023.7.26 to 2023.8.17. - [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.07.26...2023.08.17) --- 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 b85d2930f..311125d1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "doc8==1.1.1", "dodgy==0.2.1", "freezegun==1.2.2", - "furo==2023.7.26", + "furo==2023.8.17", "mypy==1.5.1", "pdm==2.8.2", "pip_check_reqs==2.4.4", From 21ef1dfe5512cd4b02ab2a8a4e657f0d99cdf893 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 10:43:03 +0000 Subject: [PATCH 0192/1638] Bump furo from 2023.8.17 to 2023.8.19 Bumps [furo](https://github.com/pradyunsg/furo) from 2023.8.17 to 2023.8.19. - [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.08.17...2023.08.19) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a9060ac5..eddddbbf5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "doc8==1.1.1", "dodgy==0.2.1", "freezegun==1.2.2", - "furo==2023.8.17", + "furo==2023.8.19", "mypy==1.5.1", "pdm==2.8.2", "pip_check_reqs==2.4.4", From 4a00e7124faf938609b7bbb466b21ee0f4ce6df3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 10:43:08 +0000 Subject: [PATCH 0193/1638] Bump vulture from 2.8 to 2.9 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.8 to 2.9. - [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.8...v2.9) --- 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 1a9060ac5..2652074dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,7 +258,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", "types-requests==2.31.0.2", - "vulture==2.8", + "vulture==2.9", ] [project.urls] From 626fcb6624a497ef97d4fee8e5b2c90bc4c6732a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 10:52:44 +0000 Subject: [PATCH 0194/1638] Bump vulture from 2.9 to 2.9.1 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.9 to 2.9.1. - [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.9...v2.9.1) --- updated-dependencies: - dependency-name: vulture dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8677db30b..544b1135e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,7 +258,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", "types-requests==2.31.0.2", - "vulture==2.9", + "vulture==2.9.1", ] [project.urls] From 4c5d9cc606e03231314826de6603a1523d4883cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 10:51:06 +0000 Subject: [PATCH 0195/1638] Bump sphinx from 7.2.2 to 7.2.3 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.2 to 7.2.3. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.2...v7.2.3) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 544b1135e..d657dcdbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0.1", "Pygments==2.16.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==7.2.2", + "Sphinx==7.2.3", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", "black==23.7.0", From 1e495a2c84eca1eeb08c953471fa9083221ebd38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 10:51:13 +0000 Subject: [PATCH 0196/1638] Bump pyright from 1.1.323 to 1.1.324 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.323 to 1.1.324. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.323...v1.1.324) --- 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 544b1135e..f733bfecc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.323", + "pyright==1.1.324", "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", From 93235f5db6e2357719018a5dc6f876bd890b6a59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 11:03:50 +0000 Subject: [PATCH 0197/1638] Bump sphinx from 7.2.3 to 7.2.4 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.3 to 7.2.4. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.3...v7.2.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 2d341db19..074dd02e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0.1", "Pygments==2.16.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==7.2.3", + "Sphinx==7.2.4", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", "black==23.7.0", From c3275c0820df5f25601913bcfb2487956a944d50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 11:04:04 +0000 Subject: [PATCH 0198/1638] Bump ruff from 0.0.285 to 0.0.286 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.285 to 0.0.286. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.285...v0.0.286) --- 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 2d341db19..9ef8ac325 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.285", + "ruff==0.0.286", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From a38d2ab0e595d92025e1e550c7f19bbe1b5122e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:13:21 +0000 Subject: [PATCH 0199/1638] Bump pyright from 1.1.324 to 1.1.325 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.324 to 1.1.325. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.324...v1.1.325) --- 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 f5a27a6d0..e2b9738c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.324", + "pyright==1.1.325", "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", From 5bf60d8068a2ee5b510e4100a27effb3fab4ca01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:13:28 +0000 Subject: [PATCH 0200/1638] Bump sphinx from 7.2.4 to 7.2.5 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.4 to 7.2.5. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.4...v7.2.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 f5a27a6d0..ba1c9257b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0.1", "Pygments==2.16.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==7.2.4", + "Sphinx==7.2.5", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", "black==23.7.0", From 979b816b5ab3508cc5149e6a5a79c85977334131 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:13:36 +0000 Subject: [PATCH 0201/1638] Bump pdm from 2.8.2 to 2.9.0 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.8.2 to 2.9.0. - [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.8.2...2.9.0) --- 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 f5a27a6d0..9ee29b219 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.8.19", "mypy==1.5.1", - "pdm==2.8.2", + "pdm==2.9.0", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 7bd3821a32cab992f243d59d67637a4b0bcaa1c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 10:25:04 +0000 Subject: [PATCH 0202/1638] Bump pdm from 2.9.0 to 2.9.1 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.9.0 to 2.9.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.9.0...2.9.1) --- 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 72a840a41..8c1f0ec5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.8.19", "mypy==1.5.1", - "pdm==2.9.0", + "pdm==2.9.1", "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 71b066c9e89f342a956565df29161c1a4cff13e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 10:25:24 +0000 Subject: [PATCH 0203/1638] Bump ruff from 0.0.286 to 0.0.287 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.286 to 0.0.287. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.286...v0.0.287) --- 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 72a840a41..0435be609 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.0 ", - "ruff==0.0.286", + "ruff==0.0.287", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 9361d0c44484a002b9dddb8224a1ba01b5465027 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:45:28 +0000 Subject: [PATCH 0204/1638] Bump pytest from 7.4.0 to 7.4.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.0 to 7.4.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/7.4.0...7.4.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 a753dc835..f3fe1d424 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -251,7 +251,7 @@ dev = [ "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", - "pytest==7.4.0 ", + "pytest==7.4.1 ", "ruff==0.0.287", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", From 37feea633aed421eac0513d99a87bf2920d0ffa9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 10:34:20 +0000 Subject: [PATCH 0205/1638] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/windows-ci.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c9c6946b..fa5e96b6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Set up Python" uses: actions/setup-python@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15b26f1d7..f9faa8379 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: python-version: ["3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Set up Python" uses: actions/setup-python@v4 diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index b97da3ef2..8ac676f60 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Set up Python" uses: actions/setup-python@v4 with: From 7644da4969f4167be259cb4f0c6b547b26669a7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:50:13 +0000 Subject: [PATCH 0206/1638] Bump pyright from 1.1.325 to 1.1.326 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.325 to 1.1.326. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.325...v1.1.326) --- 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 f3fe1d424..99181b52a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.4.4", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.325", + "pyright==1.1.326", "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", From 0762ed504f5db09a4af5d9aaa6b35ca2ea48dd80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 10:23:14 +0000 Subject: [PATCH 0207/1638] Bump pytest from 7.4.1 to 7.4.2 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.1 to 7.4.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/7.4.1...7.4.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 99181b52a..ab55f5810 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -251,7 +251,7 @@ dev = [ "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", - "pytest==7.4.1 ", + "pytest==7.4.2 ", "ruff==0.0.287", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", From d865476fb10d7582793e459bc2b68b1b1f0d48ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:41:36 +0000 Subject: [PATCH 0208/1638] Bump black from 23.7.0 to 23.9.1 Bumps [black](https://github.com/psf/black) from 23.7.0 to 23.9.1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.7.0...23.9.1) --- updated-dependencies: - dependency-name: black 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 ab55f5810..75b765cad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Sphinx==7.2.5", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", - "black==23.7.0", + "black==23.9.1", "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", From be6de1115062e770ff8f4460ca05ea34ad8bfed9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:41:45 +0000 Subject: [PATCH 0209/1638] Bump furo from 2023.8.19 to 2023.9.10 Bumps [furo](https://github.com/pradyunsg/furo) from 2023.8.19 to 2023.9.10. - [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.08.19...2023.09.10) --- 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 ab55f5810..d7235a8bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "doc8==1.1.1", "dodgy==0.2.1", "freezegun==1.2.2", - "furo==2023.8.19", + "furo==2023.9.10", "mypy==1.5.1", "pdm==2.9.1", "pip_check_reqs==2.4.4", From 8321e21fa0a55279838ec8b1232a8e78391afaa6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:41:49 +0000 Subject: [PATCH 0210/1638] Bump pip-check-reqs from 2.4.4 to 2.5.1 Bumps [pip-check-reqs](https://github.com/r1chardj0n3s/pip-check-reqs) from 2.4.4 to 2.5.1. - [Changelog](https://github.com/r1chardj0n3s/pip-check-reqs/blob/master/CHANGELOG.rst) - [Commits](https://github.com/r1chardj0n3s/pip-check-reqs/commits) --- updated-dependencies: - dependency-name: pip-check-reqs 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 ab55f5810..63b12e267 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -244,7 +244,7 @@ dev = [ "furo==2023.8.19", "mypy==1.5.1", "pdm==2.9.1", - "pip_check_reqs==2.4.4", + "pip_check_reqs==2.5.1", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.326", From 5969d4f670b29e9321a81d7deff2c9c857979877 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 12 Sep 2023 10:13:07 +0100 Subject: [PATCH 0211/1638] Use pyright strict mode --- conftest.py | 6 +++--- pyproject.toml | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conftest.py b/conftest.py index 881a76db2..9d744c035 100644 --- a/conftest.py +++ b/conftest.py @@ -2,14 +2,14 @@ from doctest import ELLIPSIS -from sybil import Sybil -from sybil.parsers.rest import ( +from sybil import Sybil # pyright: ignore[reportMissingTypeStubs] +from sybil.parsers.rest import ( # pyright: ignore[reportMissingTypeStubs] ClearNamespaceParser, DocTestParser, PythonCodeBlockParser, ) -pytest_collect_file = Sybil( +pytest_collect_file = Sybil( # pyright: ignore[reportUnknownVariableType] parsers=[ ClearNamespaceParser(), DocTestParser(optionflags=ELLIPSIS), diff --git a/pyproject.toml b/pyproject.toml index fe23a017b..5229dbbea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -277,3 +277,5 @@ vws = ["py.typed"] [tool.setuptools_scm] [tool.pyright] + +typeCheckingMode = "strict" From d8e781142b875ba89de276adfecb7bbb6f18e59e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 12 Sep 2023 10:35:51 +0100 Subject: [PATCH 0212/1638] Add pyright checks to spelling ignores --- spelling_private_dict.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 197ecd7d5..7e665a9fb 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -1,3 +1,4 @@ + AuthenticationFailure BadImage ConnectionErrorPossiblyImageTooLarge @@ -72,6 +73,7 @@ plugins png pragma py +pyright pytest readme readthedocs @@ -79,6 +81,8 @@ recognitions refactoring regex reimplementation +reportMissingTypeStubs +reportUnknownVariableType rfc rgb str From 34a44f1beba6308cd5fe360367c7f0e0c2618040 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:02:46 +0000 Subject: [PATCH 0213/1638] Bump pdm from 2.9.1 to 2.9.2 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.9.1 to 2.9.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.9.1...2.9.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 5229dbbea..0ce1cba6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.9.10", "mypy==1.5.1", - "pdm==2.9.1", + "pdm==2.9.2", "pip_check_reqs==2.5.1", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 4f022146a2e997aea4cdcd9e3052ce865e6833d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:03:26 +0000 Subject: [PATCH 0214/1638] Bump ruff from 0.0.287 to 0.0.288 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.287 to 0.0.288. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.287...v0.0.288) --- 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 5229dbbea..8045dce1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", - "ruff==0.0.287", + "ruff==0.0.288", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From 4486fbd63330aca4d7988eef57bc79f8c6a4e681 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:38:27 +0000 Subject: [PATCH 0215/1638] Bump ruff from 0.0.288 to 0.0.289 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.288 to 0.0.289. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.288...v0.0.289) --- 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 ec1f29b70..56a694be2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", - "ruff==0.0.288", + "ruff==0.0.289", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.5.0", "sphinxcontrib-spelling==8.0.0", From d093c5b1c5d386865f2ad8f0dfd6044197bd8e2e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:38:36 +0000 Subject: [PATCH 0216/1638] Bump pip-check-reqs from 2.5.1 to 2.5.3 Bumps [pip-check-reqs](https://github.com/r1chardj0n3s/pip-check-reqs) from 2.5.1 to 2.5.3. - [Changelog](https://github.com/r1chardj0n3s/pip-check-reqs/blob/master/CHANGELOG.rst) - [Commits](https://github.com/r1chardj0n3s/pip-check-reqs/commits) --- updated-dependencies: - dependency-name: pip-check-reqs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ec1f29b70..6c473f7d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -244,7 +244,7 @@ dev = [ "furo==2023.9.10", "mypy==1.5.1", "pdm==2.9.2", - "pip_check_reqs==2.5.1", + "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.326", From 98eec1858824e25e6b075261f9ef4cf4907708e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:57:12 +0000 Subject: [PATCH 0217/1638] Bump sphinx from 7.2.5 to 7.2.6 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.5 to 7.2.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.2.5...v7.2.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 ac89a3456..fef47068d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,7 +233,7 @@ dev = [ "PyYAML==6.0.1", "Pygments==2.16.1", "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==7.2.5", + "Sphinx==7.2.6", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", "black==23.9.1", From 5935042b7a208661b205afcc2f84ce668050f0ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 10:46:49 +0000 Subject: [PATCH 0218/1638] Bump pyright from 1.1.326 to 1.1.327 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.326 to 1.1.327. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.326...v1.1.327) --- 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 fef47068d..66beede7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.326", + "pyright==1.1.327", "pylint==2.17.5 ", "pyroma==4.2", "pytest-cov==4.1.0", From 05c1e0a1e47d1f28d61ebaa3f2aee7f0ffebcfd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 10:46:58 +0000 Subject: [PATCH 0219/1638] Bump sphinx-prompt from 1.5.0 to 1.8.0 Bumps [sphinx-prompt](https://github.com/sbrunner/sphinx-prompt) from 1.5.0 to 1.8.0. - [Release notes](https://github.com/sbrunner/sphinx-prompt/releases) - [Commits](https://github.com/sbrunner/sphinx-prompt/compare/1.5.0...1.8.0) --- updated-dependencies: - dependency-name: sphinx-prompt 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 fef47068d..ada0d3615 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -254,7 +254,7 @@ dev = [ "pytest==7.4.2 ", "ruff==0.0.289", "sphinx-autodoc-typehints==1.24.0", - "sphinx-prompt==1.5.0", + "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", "types-requests==2.31.0.2", From c2f8246944eed25d073ba1707fe0147bc147c76d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:51:24 +0000 Subject: [PATCH 0220/1638] Bump ruff from 0.0.289 to 0.0.290 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.289 to 0.0.290. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.289...v0.0.290) --- 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 260a0c0ba..252373f95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", - "ruff==0.0.289", + "ruff==0.0.290", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", From 685375010ccfbc0feb175d0f497ed738026b3822 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 10:52:20 +0000 Subject: [PATCH 0221/1638] Bump types-requests from 2.31.0.2 to 2.31.0.3 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.2 to 2.31.0.3. - [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 252373f95..8c380276b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.2", + "types-requests==2.31.0.3", "vulture==2.9.1", ] From c0f991191ae93aa93a6a9eda4fee0242e1cd1d49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:31:20 +0000 Subject: [PATCH 0222/1638] Bump ruff from 0.0.290 to 0.0.291 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.290 to 0.0.291. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.290...v0.0.291) --- 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 8c380276b..3657d8fd4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", - "ruff==0.0.290", + "ruff==0.0.291", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", From f0b9836e1e66bb2bab6e3d3da8109037182b1973 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:31:27 +0000 Subject: [PATCH 0223/1638] Bump types-requests from 2.31.0.3 to 2.31.0.4 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.3 to 2.31.0.4. - [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 8c380276b..2aded9b45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.3", + "types-requests==2.31.0.4", "vulture==2.9.1", ] From a52f5cfbb429065e3a1e2c2317b5eb1389c9b5bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:31:34 +0000 Subject: [PATCH 0224/1638] Bump pdm from 2.9.2 to 2.9.3 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.9.2 to 2.9.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.9.2...2.9.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 8c380276b..ac932f7d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -243,7 +243,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.9.10", "mypy==1.5.1", - "pdm==2.9.2", + "pdm==2.9.3", "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", From 261645a66ca2198922867a01cb7fc76358d4b05b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:59:30 +0000 Subject: [PATCH 0225/1638] Bump pylint from 2.17.5 to 2.17.6 Bumps [pylint](https://github.com/pylint-dev/pylint) from 2.17.5 to 2.17.6. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v2.17.5...v2.17.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 feb25720f..0a4a3b33c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.327", - "pylint==2.17.5 ", + "pylint==2.17.6 ", "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", From 27ac3c4827ed994cb747eac4ccc5b6a1987357ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:59:34 +0000 Subject: [PATCH 0226/1638] Bump types-requests from 2.31.0.4 to 2.31.0.5 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.4 to 2.31.0.5. - [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 feb25720f..b3404b470 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.4", + "types-requests==2.31.0.5", "vulture==2.9.1", ] From 40db562670d3c7c809a5b0219f13b2631d46ea3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 10:20:03 +0000 Subject: [PATCH 0227/1638] Bump types-requests from 2.31.0.5 to 2.31.0.6 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.5 to 2.31.0.6. - [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 dcf34de6e..f39acc588 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.5", + "types-requests==2.31.0.6", "vulture==2.9.1", ] From cbbddfbfbe90ca874c0a2c81cb501ed6d496bda4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:34:16 +0000 Subject: [PATCH 0228/1638] Bump pyright from 1.1.327 to 1.1.329 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.327 to 1.1.329. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.327...v1.1.329) --- 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 dcf34de6e..db4b2c2c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.327", + "pyright==1.1.329", "pylint==2.17.6 ", "pyroma==4.2", "pytest-cov==4.1.0", From 36d3e9ab457c2252f0a854b5ede25e79f37e3458 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 10:48:21 +0000 Subject: [PATCH 0229/1638] Bump pylint from 2.17.6 to 2.17.7 Bumps [pylint](https://github.com/pylint-dev/pylint) from 2.17.6 to 2.17.7. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v2.17.6...v2.17.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 8351ea9d1..702d410e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.329", - "pylint==2.17.6 ", + "pylint==2.17.7 ", "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", From b3525086141589d43c5f2405b18b484176d76edf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 10:48:33 +0000 Subject: [PATCH 0230/1638] Bump types-requests from 2.31.0.6 to 2.31.0.7 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.6 to 2.31.0.7. - [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 8351ea9d1..4737799ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.6", + "types-requests==2.31.0.7", "vulture==2.9.1", ] From ed00d20ab7cd490cce3d5e67dd3ea531f6c33605 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 10:57:50 +0000 Subject: [PATCH 0231/1638] Bump pylint from 2.17.7 to 3.0.0 Bumps [pylint](https://github.com/pylint-dev/pylint) from 2.17.7 to 3.0.0. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v2.17.7...v3.0.0) --- updated-dependencies: - dependency-name: pylint 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 1e03f3fff..005774367 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.329", - "pylint==2.17.7 ", + "pylint==3.0.0 ", "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", From 12aa76e7484571a47fa0bc7cfdbf9a2ac7e76821 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 10:58:09 +0000 Subject: [PATCH 0232/1638] Bump ruff from 0.0.291 to 0.0.292 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.291 to 0.0.292. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.291...v0.0.292) --- 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 1e03f3fff..829b90fd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", - "ruff==0.0.291", + "ruff==0.0.292", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", From 270208ea2c10de6d5400ff4ceeb7077a192eccb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:56:43 +0000 Subject: [PATCH 0233/1638] Bump pylint from 3.0.0 to 3.0.1 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3d4562acd..dd9590ba4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -248,7 +248,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.329", - "pylint==3.0.0 ", + "pylint==3.0.1 ", "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", From 5e9ab197ebfafcbbcb25498da71712746adaf48a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:56:55 +0000 Subject: [PATCH 0234/1638] Bump types-requests from 2.31.0.7 to 2.31.0.8 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.7 to 2.31.0.8. - [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 3d4562acd..156a291bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.7", + "types-requests==2.31.0.8", "vulture==2.9.1", ] From 28f1d130cb7a0298f0b2f2b2baf9311ea1863eca Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 6 Oct 2023 12:07:21 +0100 Subject: [PATCH 0235/1638] Remove unnecessary dependency on setuptools-scm-git-archive. This is now covered by setuptools_scm --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fe23a017b..432c51c83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -154,8 +154,7 @@ ignore_missing_imports = true requires = [ "pip", "setuptools", - "setuptools-scm-git-archive==1.4", - "setuptools_scm[toml]==7.1.0", + "setuptools_scm[toml]>=7.1.0", "wheel", ] build-backend = "setuptools.build_meta" From f5c545008f2fc5ff19f76bc13d14301dc1f4c06e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:12:36 +0000 Subject: [PATCH 0236/1638] Bump stefanzweifel/git-auto-commit-action from 4 to 5 Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4...v5) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-type: direct:production update-type: version-update:semver-major ... 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 f9faa8379..a55d5f763 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: include: "CHANGELOG.rst" regex: false - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v5 id: commit with: commit_message: Bump CHANGELOG From 7b60eaf3d3ebd890bf6a29d9a13b30d25dd3f78f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:59:03 +0000 Subject: [PATCH 0237/1638] Bump vulture from 2.9.1 to 2.10 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.9.1 to 2.10. - [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.9.1...v2.10) --- 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 152409842..610e6b4dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ dev = [ "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", "types-requests==2.31.0.8", - "vulture==2.9.1", + "vulture==2.10", ] [project.urls] From efc388c43f45a0bb75c75365e9cadc01923b8ec1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 10:42:11 +0000 Subject: [PATCH 0238/1638] Bump mypy from 1.5.1 to 1.6.0 Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.6.0. - [Commits](https://github.com/python/mypy/compare/v1.5.1...v1.6.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 610e6b4dd..5d3610d66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.9.10", - "mypy==1.5.1", + "mypy==1.6.0", "pdm==2.9.3", "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", From d2dde7b4fc072d26ff9ef125bbfcde73604c0fc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 10:42:16 +0000 Subject: [PATCH 0239/1638] Bump pyright from 1.1.329 to 1.1.331 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.329 to 1.1.331. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.329...v1.1.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 610e6b4dd..fe50dff34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,7 +246,7 @@ dev = [ "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.329", + "pyright==1.1.331", "pylint==3.0.1 ", "pyroma==4.2", "pytest-cov==4.1.0", From 5f29b97117fc98c214e2f2fe2961dfaf7be8b5ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:43:40 +0000 Subject: [PATCH 0240/1638] Bump types-requests from 2.31.0.8 to 2.31.0.9 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.8 to 2.31.0.9. - [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 76524f094..cc0dad62d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.8", + "types-requests==2.31.0.9", "vulture==2.10", ] From 276ff38d6ee95af894295447728ccca937fd5ff4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:19:51 +0000 Subject: [PATCH 0241/1638] Bump ruff from 0.0.292 to 0.1.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.292 to 0.1.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.0.292...v0.1.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 cc0dad62d..a06567606 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -251,7 +251,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", - "ruff==0.0.292", + "ruff==0.1.0", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", From 0058d20128a4488f130ac5e2dff9b1ecdcaf4be6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:01:34 +0000 Subject: [PATCH 0242/1638] Bump black from 23.9.1 to 23.10.0 Bumps [black](https://github.com/psf/black) from 23.9.1 to 23.10.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.9.1...23.10.0) --- updated-dependencies: - dependency-name: black 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 a06567606..fcf740782 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -235,7 +235,7 @@ dev = [ "Sphinx==7.2.6", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", - "black==23.9.1", + "black==23.10.0", "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", From 5f48d771d37c3dd26c3e0066374165422f56304e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:01:52 +0000 Subject: [PATCH 0243/1638] Bump mypy from 1.6.0 to 1.6.1 Bumps [mypy](https://github.com/python/mypy) from 1.6.0 to 1.6.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.6.0...v1.6.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 a06567606..0e14e7100 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.9.10", - "mypy==1.6.0", + "mypy==1.6.1", "pdm==2.9.3", "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", From 4b0e213d9852ccaa93c5c8ce600288db8379fac2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:02:05 +0000 Subject: [PATCH 0244/1638] Bump types-requests from 2.31.0.9 to 2.31.0.10 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.9 to 2.31.0.10. - [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 a06567606..dff9f74e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", "sybil==5.0.3", - "types-requests==2.31.0.9", + "types-requests==2.31.0.10", "vulture==2.10", ] From 604a067e4d67672f97bff6480e59d05a16090250 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:21:11 +0000 Subject: [PATCH 0245/1638] Bump pyright from 1.1.331 to 1.1.332 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.331 to 1.1.332. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.331...v1.1.332) --- 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 449adeddf..a0e7af3f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,7 +246,7 @@ dev = [ "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.331", + "pyright==1.1.332", "pylint==3.0.1 ", "pyroma==4.2", "pytest-cov==4.1.0", From 486bb55186a16b6491b39489670f79019541baa3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 11:04:33 +0000 Subject: [PATCH 0246/1638] Bump ruff from 0.1.0 to 0.1.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.0 to 0.1.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.1.0...v0.1.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 a0e7af3f5..5b986e211 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -251,7 +251,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", - "ruff==0.1.0", + "ruff==0.1.1", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", From 08eb0fa5f20896e177c572395399c8d3ae6fa396 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Oct 2023 11:21:02 +0100 Subject: [PATCH 0247/1638] Support Python 3.12 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/windows-ci.yml | 2 +- README.rst | 2 +- docs/source/conf.py | 2 +- pyproject.toml | 4 ++-- readthedocs.yaml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa5e96b6c..88e8a6d18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - python-version: ["3.11"] + python-version: ["3.12"] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a55d5f763..4ce5ecca8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - python-version: ["3.11"] + python-version: ["3.12"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 8ac676f60..d5cce0cbd 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - python-version: ["3.11"] + python-version: ["3.12"] platform: [windows-latest] runs-on: ${{ matrix.platform }} diff --git a/README.rst b/README.rst index a1cbf9427..18ec40a04 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ Installation pip install vws-python -This is tested on Python 3.11+. Get in touch with +This is tested on Python 3.12+. Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. diff --git a/docs/source/conf.py b/docs/source/conf.py index 229caea15..c3861a1bf 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,7 +56,7 @@ htmlhelp_basename = "VWSPYTHONdoc" autoclass_content = "init" intersphinx_mapping = { - "python": ("https://docs.python.org/3.11", None), + "python": ("https://docs.python.org/3.12", None), } nitpicky = True warning_is_error = True diff --git a/pyproject.toml b/pyproject.toml index 5b986e211..c926c794e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -210,7 +210,7 @@ authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com"} ] classifiers = [ "Operating System :: POSIX", "Environment :: Web Environment", - "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", "Development Status :: 5 - Production/Stable", ] @@ -220,7 +220,7 @@ keywords = ["vuforia", "vws", "client"] license = { file = "LICENSE" } name = "vws-python" readme = { file = "README.rst", content-type = "text/x-rst"} -requires-python = ">=3.10" +requires-python = ">=3.12" dependencies = [ "VWS-Auth-Tools", "requests", diff --git a/readthedocs.yaml b/readthedocs.yaml index e47cb6624..88e40e66a 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-20.04 tools: - python: "3.11" + python: "3.12" python: install: From 15311bf6b6c1f8ff76ebbe742456ecac7a730ca1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:18:28 +0000 Subject: [PATCH 0248/1638] Bump pylint from 3.0.1 to 3.0.2 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.1 to 3.0.2. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.1...v3.0.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 5b986e211..cee579f23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", "pyright==1.1.332", - "pylint==3.0.1 ", + "pylint==3.0.2 ", "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", From 9db3b14c842aaf405741d3a3f0ab649245e22db9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:56:30 +0000 Subject: [PATCH 0249/1638] Bump black from 23.10.0 to 23.10.1 Bumps [black](https://github.com/psf/black) from 23.10.0 to 23.10.1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.10.0...23.10.1) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cee579f23..059471f64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -235,7 +235,7 @@ dev = [ "Sphinx==7.2.6", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", - "black==23.10.0", + "black==23.10.1", "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", From d77d6ae4e8d2251502685cf2b237f6a73c13efb9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Oct 2023 22:03:49 +0100 Subject: [PATCH 0250/1638] Remove black in favour of ruff format --- Makefile | 2 -- lint.mk | 10 ++-------- pyproject.toml | 8 ++------ 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index a45521c22..60fc258c5 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ SPHINXOPTS := -W .PHONY: lint lint: \ - black \ check-manifest \ doc8 \ linkcheck \ @@ -23,7 +22,6 @@ lint: \ .PHONY: fix-lint fix-lint: \ - fix-black \ fix-ruff .PHONY: docs diff --git a/lint.mk b/lint.mk index b8e3daf5e..cce3c556c 100644 --- a/lint.mk +++ b/lint.mk @@ -2,14 +2,6 @@ SHELL := /bin/bash -euxo pipefail -.PHONY: black -black: - black --check . - -.PHONY: fix-black -fix-black: - black . - .PHONY: mypy mypy: mypy . @@ -25,10 +17,12 @@ doc8: .PHONY: ruff ruff: ruff . + ruff format --check . .PHONY: fix-ruff fix-ruff: ruff --fix . + ruff format . .PHONY: pip-extra-reqs pip-extra-reqs: diff --git a/pyproject.toml b/pyproject.toml index 059471f64..811daca21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,10 +84,6 @@ # --spelling-private-dict-file option instead of raising a message. spelling-store-unknown-words = 'no' -[tool.black] - -line-length = 79 - [tool.coverage.run] branch = true @@ -164,6 +160,7 @@ universal = true [tool.ruff] select = ["ALL"] +line-length = 79 ignore = [ # We do not annotate the type of 'self'. @@ -235,7 +232,6 @@ dev = [ "Sphinx==7.2.6", "VWS-Python-Mock==2023.5.21", "VWS-Test-Fixtures==2023.3.5", - "black==23.10.1", "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", @@ -251,7 +247,7 @@ dev = [ "pyroma==4.2", "pytest-cov==4.1.0", "pytest==7.4.2 ", - "ruff==0.1.1", + "ruff==0.1.2", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.8.0", "sphinxcontrib-spelling==8.0.0", From b90878f3812211d4c0a71fac6414f396ba057424 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 08:06:47 +0000 Subject: [PATCH 0251/1638] Bump pytest from 7.4.2 to 7.4.3 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.2 to 7.4.3. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.2...7.4.3) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 811daca21..ec935374e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,7 +246,7 @@ dev = [ "pylint==3.0.2 ", "pyroma==4.2", "pytest-cov==4.1.0", - "pytest==7.4.2 ", + "pytest==7.4.3 ", "ruff==0.1.2", "sphinx-autodoc-typehints==1.24.0", "sphinx-prompt==1.8.0", From 3ce2431685f2d2b8e65fdd8164e401793f0d3707 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Oct 2023 09:07:04 +0100 Subject: [PATCH 0252/1638] Switch from master to main --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a1cbf9427..c2cef4f4d 100644 --- a/README.rst +++ b/README.rst @@ -96,7 +96,7 @@ documentation `__. .. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg :target: https://github.com/VWS-Python/vws-python/actions -.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/master/graph/badge.svg +.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/main/graph/badge.svg :target: https://codecov.io/gh/VWS-Python/vws-python .. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg :target: https://badge.fury.io/py/VWS-Python From 9bd857c52b30267ad1a508ec164ae16e866eb1b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 11:01:47 +0000 Subject: [PATCH 0253/1638] Bump pyright from 1.1.332 to 1.1.333 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.332 to 1.1.333. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.332...v1.1.333) --- 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 ec935374e..d3c77351a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,7 @@ dev = [ "pip_check_reqs==2.5.3", "pydocstyle==6.3.0 ", "pyenchant==3.2.2 ", - "pyright==1.1.332", + "pyright==1.1.333", "pylint==3.0.2 ", "pyroma==4.2", "pytest-cov==4.1.0", From b3dff1262845aa016e1d9f6498a86f832c6833fb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Oct 2023 18:49:32 +0100 Subject: [PATCH 0254/1638] Run CI on main PRs not master --- .github/workflows/ci.yml | 4 ++-- .github/workflows/windows-ci.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa5e96b6c..d6de023bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,9 @@ name: CI on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] schedule: # * is a special character in YAML so you have to quote this string # Run at 1:00 every day diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 8ac676f60..e643ad139 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -4,9 +4,9 @@ name: Windows CI on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] schedule: # * is a special character in YAML so you have to quote this string # Run at 1:00 every day From fcd0125a3ed03d66e34b777e28511b6dd2d23ae5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Oct 2023 18:51:22 +0100 Subject: [PATCH 0255/1638] Add pyproject.toml required formatting --- Makefile | 2 ++ lint.mk | 8 ++++++ pyproject.toml | 68 ++++++++++++++++++++++++++++---------------------- 3 files changed, 48 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 60fc258c5..320a0bec8 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ lint: \ ruff \ pip-extra-reqs \ pip-missing-reqs \ + pyproject-fmt \ pyright \ pyroma \ spelling \ @@ -22,6 +23,7 @@ lint: \ .PHONY: fix-lint fix-lint: \ + fix-pyproject-fmt \ fix-ruff .PHONY: docs diff --git a/lint.mk b/lint.mk index cce3c556c..a28a66a0d 100644 --- a/lint.mk +++ b/lint.mk @@ -52,6 +52,14 @@ vulture: linkcheck: $(MAKE) -C docs/ linkcheck SPHINXOPTS=$(SPHINXOPTS) +.PHONY: pyproject-fmt + pyproject-fmt: + pyproject-fmt --check --indent=4 pyproject.toml + + .PHONY: fix-pyproject-fmt + fix-pyproject-fmt: + pyproject-fmt --indent=4 pyproject.toml + .PHONY: spelling spelling: $(MAKE) -C docs/ spelling SPHINXOPTS=$(SPHINXOPTS) diff --git a/pyproject.toml b/pyproject.toml index d3c77351a..46d010f96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,13 +147,13 @@ module = [ ignore_missing_imports = true [build-system] +build-backend = "setuptools.build_meta" requires = [ "pip", "setuptools", - "setuptools_scm[toml]>=7.1.0", + "setuptools_scm[toml]>=7.1", "wheel", ] -build-backend = "setuptools.build_meta" [tool.distutils.bdist_wheel] universal = true @@ -203,35 +203,37 @@ unfixable = ["ERA001"] ] [project] +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", +] +license = { file = "LICENSE" } authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com"} ] +requires-python = ">=3.10" classifiers = [ - "Operating System :: POSIX", + "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", - "Programming Language :: Python :: 3.11", "License :: OSI Approved :: MIT License", - "Development Status :: 5 - Production/Stable", + "Operating System :: POSIX", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +dynamic = [ + "version", ] -description = "Interact with the Vuforia Web Services (VWS) API." -dynamic = ["version"] -keywords = ["vuforia", "vws", "client"] -license = { file = "LICENSE" } -name = "vws-python" -readme = { file = "README.rst", content-type = "text/x-rst"} -requires-python = ">=3.10" dependencies = [ - "VWS-Auth-Tools", "requests", "urllib3", + "VWS-Auth-Tools", ] - [project.optional-dependencies] dev = [ - "PyYAML==6.0.1", - "Pygments==2.16.1", - "Sphinx-Substitution-Extensions==2022.2.16", - "Sphinx==7.2.6", - "VWS-Python-Mock==2023.5.21", - "VWS-Test-Fixtures==2023.3.5", "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", @@ -240,25 +242,31 @@ dev = [ "mypy==1.6.1", "pdm==2.9.3", "pip_check_reqs==2.5.3", - "pydocstyle==6.3.0 ", - "pyenchant==3.2.2 ", + "pydocstyle==6.3", + "pyenchant==3.2.2", + "Pygments==2.16.1", + "pylint==3.0.2", + "pyproject-fmt==1.3", "pyright==1.1.333", - "pylint==3.0.2 ", "pyroma==4.2", - "pytest-cov==4.1.0", - "pytest==7.4.3 ", + "pytest==7.4.3", + "pytest-cov==4.1", + "PyYAML==6.0.1", "ruff==0.1.2", - "sphinx-autodoc-typehints==1.24.0", - "sphinx-prompt==1.8.0", - "sphinxcontrib-spelling==8.0.0", + "Sphinx==7.2.6", + "sphinx-autodoc-typehints==1.24", + "sphinx-prompt==1.8", + "Sphinx-Substitution-Extensions==2022.2.16", + "sphinxcontrib-spelling==8", "sybil==5.0.3", "types-requests==2.31.0.10", "vulture==2.10", + "VWS-Python-Mock==2023.5.21", + "VWS-Test-Fixtures==2023.3.5", ] - [project.urls] -Source = "https://github.com/VWS-Python/vws-python" Documentation = "https://vws-python.readthedocs.io/en/latest/" +Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] zip-safe = false From 31be20746b0c2f608da5c11c87ca493608f0923c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:00:18 +0000 Subject: [PATCH 0256/1638] Bump pdm from 2.9.3 to 2.10.0 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.9.3 to 2.10.0. - [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.9.3...2.10.0) --- 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 46d010f96..ca1f75be8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -240,7 +240,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.9.10", "mypy==1.6.1", - "pdm==2.9.3", + "pdm==2.10.0", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From fbce6345ba372a1f061aa5d08d74531d00c5c47e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 26 Oct 2023 13:10:12 +0100 Subject: [PATCH 0257/1638] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ca1f75be8..84d23f180 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -240,7 +240,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.9.10", "mypy==1.6.1", - "pdm==2.10.0", + "pdm==2.10", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From 6abe60eb0e786f0a0713df6499e8894709990754 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Oct 2023 10:08:42 +0000 Subject: [PATCH 0258/1638] Bump ruff from 0.1.2 to 0.1.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.2 to 0.1.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.1.2...v0.1.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 84d23f180..9f880f015 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pytest==7.4.3", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.2", + "ruff==0.1.3", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.24", "sphinx-prompt==1.8", From 41d2524aa439892232c09927013e3a58c3f8c2ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:00:52 +0000 Subject: [PATCH 0259/1638] Bump sphinx-autodoc-typehints from 1.24 to 1.24.1 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.24 to 1.24.1. - [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.24.0...1.24.1) --- 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 9f880f015..d52a578a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -254,7 +254,7 @@ dev = [ "PyYAML==6.0.1", "ruff==0.1.3", "Sphinx==7.2.6", - "sphinx-autodoc-typehints==1.24", + "sphinx-autodoc-typehints==1.24.1", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", From 5c37a87b979b54294d9f935fdd38c151cb6e5a13 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 2 Nov 2023 01:38:39 +0000 Subject: [PATCH 0260/1638] Bump pyproject-fmt and use new --keep-full-version option --- lint.mk | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lint.mk b/lint.mk index a28a66a0d..f0e82e1cc 100644 --- a/lint.mk +++ b/lint.mk @@ -54,11 +54,11 @@ linkcheck: .PHONY: pyproject-fmt pyproject-fmt: - pyproject-fmt --check --indent=4 pyproject.toml + pyproject-fmt --keep-full-version --check --indent=4 pyproject.toml .PHONY: fix-pyproject-fmt fix-pyproject-fmt: - pyproject-fmt --indent=4 pyproject.toml + pyproject-fmt --keep-full-version --indent=4 pyproject.toml .PHONY: spelling spelling: diff --git a/pyproject.toml b/pyproject.toml index 84d23f180..c8b3a9198 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,7 +246,7 @@ dev = [ "pyenchant==3.2.2", "Pygments==2.16.1", "pylint==3.0.2", - "pyproject-fmt==1.3", + "pyproject-fmt==1.4.1", "pyright==1.1.333", "pyroma==4.2", "pytest==7.4.3", From a154ec9c3ad09a27e0781ed8dc75272453d8c286 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 2 Nov 2023 10:31:46 +0000 Subject: [PATCH 0261/1638] Switch to ruff formatter --- .vscode/extensions.json | 1 - .vscode/settings.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index ba237974f..ffeb3778b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,5 @@ { "recommendations": [ - "ms-python.black-formatter", "charliermarsh.ruff", "ms-python.python" ] diff --git a/.vscode/settings.json b/.vscode/settings.json index a3f9997dc..ea61fd4bd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,7 @@ "editor.codeActionsOnSave": { "source.fixAll": true }, - "editor.defaultFormatter": "ms-python.black-formatter", + "editor.defaultFormatter": "charliermarsh.ruff", "editor.formatOnSave": true } } From 51eecff4fbc6457ab70b050669a111c0fac81231 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Nov 2023 10:39:32 +0000 Subject: [PATCH 0262/1638] Bump pyright from 1.1.333 to 1.1.334 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.333 to 1.1.334. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.333...v1.1.334) --- 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 a402aa1f9..38a820878 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "Pygments==2.16.1", "pylint==3.0.2", "pyproject-fmt==1.4.1", - "pyright==1.1.333", + "pyright==1.1.334", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From d8f089456baaa6898eb84c3e9fbfcbce04ea9420 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 10:34:30 +0000 Subject: [PATCH 0263/1638] Bump ruff from 0.1.3 to 0.1.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.3 to 0.1.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.1.3...v0.1.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 38a820878..50a296201 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pytest==7.4.3", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.3", + "ruff==0.1.4", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.24.1", "sphinx-prompt==1.8", From b440a4bdb2389511190412b4aa236030570d605c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:41:13 +0000 Subject: [PATCH 0264/1638] Bump pdm from 2.10 to 2.10.1 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.10 to 2.10.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.10.0...2.10.1) --- 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 50a296201..c8468f404 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -240,7 +240,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.9.10", "mypy==1.6.1", - "pdm==2.10", + "pdm==2.10.1", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From 157e4f6ae34048fa640ff29f8e3dc65e970047a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:57:45 +0000 Subject: [PATCH 0265/1638] Bump pyright from 1.1.334 to 1.1.335 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.334 to 1.1.335. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.334...v1.1.335) --- 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 50a296201..f31ed8cf5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "Pygments==2.16.1", "pylint==3.0.2", "pyproject-fmt==1.4.1", - "pyright==1.1.334", + "pyright==1.1.335", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From d6cb9f4f251a27cefea2867682ae83f8be9ac001 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:31:10 +0000 Subject: [PATCH 0266/1638] Bump ruff from 0.1.4 to 0.1.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.4 to 0.1.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.1.4...v0.1.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 58e4d4fff..668a0ff76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pytest==7.4.3", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.4", + "ruff==0.1.5", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.24.1", "sphinx-prompt==1.8", From bda51eccdf84b7d5b19d25c57fe607df14fbad6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:57:13 +0000 Subject: [PATCH 0267/1638] Bump sphinx-autodoc-typehints from 1.24.1 to 1.25.0 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.24.1 to 1.25.0. - [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.24.1...1.25.0) --- updated-dependencies: - dependency-name: sphinx-autodoc-typehints 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 668a0ff76..ad0bfcbc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -254,7 +254,7 @@ dev = [ "PyYAML==6.0.1", "ruff==0.1.5", "Sphinx==7.2.6", - "sphinx-autodoc-typehints==1.24.1", + "sphinx-autodoc-typehints==1.25.0", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", From ef0c7c9297cd0d6908207b8fd8274da442553ec8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:57:23 +0000 Subject: [PATCH 0268/1638] Bump pyproject-fmt from 1.4.1 to 1.5.1 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 1.4.1 to 1.5.1. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/1.4.1...1.5.1) --- 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 668a0ff76..4221d1e08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,7 +246,7 @@ dev = [ "pyenchant==3.2.2", "Pygments==2.16.1", "pylint==3.0.2", - "pyproject-fmt==1.4.1", + "pyproject-fmt==1.5.1", "pyright==1.1.335", "pyroma==4.2", "pytest==7.4.3", From 6a0f29bdedbfd333916331026a845054bffde079 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:36:48 +0000 Subject: [PATCH 0269/1638] Bump mypy from 1.6.1 to 1.7.0 Bumps [mypy](https://github.com/python/mypy) from 1.6.1 to 1.7.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.6.1...v1.7.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 4ebf42c86..2b7a465a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -239,7 +239,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.9.10", - "mypy==1.6.1", + "mypy==1.7.0", "pdm==2.10.1", "pip_check_reqs==2.5.3", "pydocstyle==6.3", From d65b813c7066c7722504c25e8e97573725c6c0e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:36:56 +0000 Subject: [PATCH 0270/1638] Bump sphinx-autodoc-typehints from 1.25.0 to 1.25.2 Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.25.0 to 1.25.2. - [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.0...1.25.2) --- 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 4ebf42c86..6ea522321 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -254,7 +254,7 @@ dev = [ "PyYAML==6.0.1", "ruff==0.1.5", "Sphinx==7.2.6", - "sphinx-autodoc-typehints==1.25.0", + "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", From 2efcd45d548e748e1b5fda9be025f0d68b13f7f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 11:01:27 +0000 Subject: [PATCH 0271/1638] Bump pyright from 1.1.335 to 1.1.336 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.335 to 1.1.336. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.335...v1.1.336) --- 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 baba10d21..ca03a4c5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "Pygments==2.16.1", "pylint==3.0.2", "pyproject-fmt==1.5.1", - "pyright==1.1.335", + "pyright==1.1.336", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From f8d04a3629bee0a3659b920a241ba1c04aa3188b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 11:01:40 +0000 Subject: [PATCH 0272/1638] Bump pdm from 2.10.1 to 2.10.2 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.10.1 to 2.10.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.10.1...2.10.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 baba10d21..c956a2e13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -240,7 +240,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.9.10", "mypy==1.7.0", - "pdm==2.10.1", + "pdm==2.10.2", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From b306b4cea8a82db441b1d5e3b9b8df161ad40bcd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:03:05 +0000 Subject: [PATCH 0273/1638] Bump pdm from 2.10.2 to 2.10.3 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.10.2 to 2.10.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.10.2...2.10.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 b9bdb3182..b63939575 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -240,7 +240,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.9.10", "mypy==1.7.0", - "pdm==2.10.2", + "pdm==2.10.3", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From dfdabf71ad0f3b7c825b5788397479c326060781 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:34:48 +0000 Subject: [PATCH 0274/1638] Bump ruff from 0.1.5 to 0.1.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.5 to 0.1.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.1.5...v0.1.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 b63939575..b33ecaeac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,7 +252,7 @@ dev = [ "pytest==7.4.3", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.5", + "ruff==0.1.6", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", From 585d0147fd8fd5a14882ef47bb8d030684f968d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:34:55 +0000 Subject: [PATCH 0275/1638] Bump pygments from 2.16.1 to 2.17.1 Bumps [pygments](https://github.com/pygments/pygments) from 2.16.1 to 2.17.1. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.16.1...2.17.1) --- 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 b63939575..4f70f58b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -244,7 +244,7 @@ dev = [ "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", - "Pygments==2.16.1", + "Pygments==2.17.1", "pylint==3.0.2", "pyproject-fmt==1.5.1", "pyright==1.1.336", From 6308293b36a608c5282a0c363435d0f322c18804 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:01:55 +0000 Subject: [PATCH 0276/1638] Bump sybil from 5.0.3 to 6.0.1 Bumps [sybil](https://github.com/simplistix/sybil) from 5.0.3 to 6.0.1. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/5.0.3...6.0.1) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f2a1bd5a8..524a3b91b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,7 +256,7 @@ dev = [ "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", - "sybil==5.0.3", + "sybil==6.0.1", "types-requests==2.31.0.10", "vulture==2.10", "VWS-Python-Mock==2023.5.21", From 5b445f70d59693b1990ae94149f66ea51d465a0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:02:08 +0000 Subject: [PATCH 0277/1638] Bump pygments from 2.17.1 to 2.17.2 Bumps [pygments](https://github.com/pygments/pygments) from 2.17.1 to 2.17.2. - [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.1...2.17.2) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f2a1bd5a8..8718c6d57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,7 @@ dev = [ "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", - "Pygments==2.17.1", + "Pygments==2.17.2", "pylint==3.0.2", "pyproject-fmt==1.5.1", "pyright==1.1.336", From ea68d19e7b374697d1cf7d2231e849a48924ca6d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 22 Nov 2023 11:03:42 +0000 Subject: [PATCH 0278/1638] Remove no-longer-necessary mypy ignore for Sybil --- pyproject.toml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 524a3b91b..66dbc8e74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -137,15 +137,6 @@ ignore_path = [ strict = true -[[tool.mypy.overrides]] - -module = [ - "sybil", - "sybil.parsers.rest", -] - -ignore_missing_imports = true - [build-system] build-backend = "setuptools.build_meta" requires = [ From cbbcf3df953965aa01a7b3d9d7da6382d554e0e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:20:04 +0000 Subject: [PATCH 0279/1638] Bump sybil from 6.0.1 to 6.0.2 Bumps [sybil](https://github.com/simplistix/sybil) from 6.0.1 to 6.0.2. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/6.0.1...6.0.2) --- 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 8a36c6338..aefacee75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,7 @@ dev = [ "sphinx-prompt==1.8", "Sphinx-Substitution-Extensions==2022.2.16", "sphinxcontrib-spelling==8", - "sybil==6.0.1", + "sybil==6.0.2", "types-requests==2.31.0.10", "vulture==2.10", "VWS-Python-Mock==2023.5.21", From ce509e8190a360930ef7cd235fce7f101eddf3dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:20:11 +0000 Subject: [PATCH 0280/1638] Bump pyright from 1.1.336 to 1.1.337 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.336 to 1.1.337. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.336...v1.1.337) --- 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 8a36c6338..77f65629d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.2", "pyproject-fmt==1.5.1", - "pyright==1.1.336", + "pyright==1.1.337", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From 613f1e5e13c7a94d628b3dcee1c69eb2cb465a2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Nov 2023 11:00:00 +0000 Subject: [PATCH 0281/1638] Bump mypy from 1.7.0 to 1.7.1 Bumps [mypy](https://github.com/python/mypy) from 1.7.0 to 1.7.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.7.0...v1.7.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 77f65629d..190468002 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -228,7 +228,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.2.2", "furo==2023.9.10", - "mypy==1.7.0", + "mypy==1.7.1", "pdm==2.10.3", "pip_check_reqs==2.5.3", "pydocstyle==6.3", From 61b256c311152bb2c5172d9be60bf55bc4fcbdf8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 08:06:49 +0000 Subject: [PATCH 0282/1638] Bump pdm from 2.10.3 to 2.10.4 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.10.3 to 2.10.4. - [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.10.3...2.10.4) --- 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 d08bd7f3f..27861737e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -229,7 +229,7 @@ dev = [ "freezegun==1.2.2", "furo==2023.9.10", "mypy==1.7.1", - "pdm==2.10.3", + "pdm==2.10.4", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From 2c5817a00cf775f588d99a592b13e22c38dba899 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 11:04:57 +0000 Subject: [PATCH 0283/1638] Bump pyright from 1.1.337 to 1.1.338 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.337 to 1.1.338. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.337...v1.1.338) --- 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 27861737e..715665881 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.2", "pyproject-fmt==1.5.1", - "pyright==1.1.337", + "pyright==1.1.338", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From 8c0faf4309a6c95593c9d8ac65b2683f3a8fe5d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 10:16:12 +0000 Subject: [PATCH 0284/1638] Bump pyproject-fmt from 1.5.1 to 1.5.2 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/1.5.1...1.5.2) --- 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 715665881..490a3470e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -235,7 +235,7 @@ dev = [ "pyenchant==3.2.2", "Pygments==2.17.2", "pylint==3.0.2", - "pyproject-fmt==1.5.1", + "pyproject-fmt==1.5.2", "pyright==1.1.338", "pyroma==4.2", "pytest==7.4.3", From 6a6daee8bc6ac517e3b70e7581c9378cf5926da3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:16:55 +0000 Subject: [PATCH 0285/1638] Bump freezegun from 1.2.2 to 1.3.0 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.2.2 to 1.3.0. - [Release notes](https://github.com/spulec/freezegun/releases) - [Changelog](https://github.com/spulec/freezegun/blob/master/CHANGELOG) - [Commits](https://github.com/spulec/freezegun/commits/1.3.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 490a3470e..fbbd1a7ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -226,7 +226,7 @@ dev = [ "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", - "freezegun==1.2.2", + "freezegun==1.3.0", "furo==2023.9.10", "mypy==1.7.1", "pdm==2.10.4", From dc546e66c120f03ab077ec66b05b39a96717ad5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:17:08 +0000 Subject: [PATCH 0286/1638] Bump pyproject-fmt from 1.5.2 to 1.5.3 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 1.5.2 to 1.5.3. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/1.5.2...1.5.3) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 490a3470e..1676f9194 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -235,7 +235,7 @@ dev = [ "pyenchant==3.2.2", "Pygments==2.17.2", "pylint==3.0.2", - "pyproject-fmt==1.5.2", + "pyproject-fmt==1.5.3", "pyright==1.1.338", "pyroma==4.2", "pytest==7.4.3", From c79d0ddffae387daca8deeecc7c20675ed4f8e6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 10:20:57 +0000 Subject: [PATCH 0287/1638] Bump freezegun from 1.3.0 to 1.3.1 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.3.0 to 1.3.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.3.0...1.3.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 9d32cfa37..0ff81eda9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -226,7 +226,7 @@ dev = [ "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", - "freezegun==1.3.0", + "freezegun==1.3.1", "furo==2023.9.10", "mypy==1.7.1", "pdm==2.10.4", From 1e71b594d6dd3a11e6c27e02c0401c2175c273f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 10:21:12 +0000 Subject: [PATCH 0288/1638] Bump ruff from 0.1.6 to 0.1.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.6 to 0.1.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.1.6...v0.1.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 9d32cfa37..9ed4ec265 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "pytest==7.4.3", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.6", + "ruff==0.1.7", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", From 80101d4658d60af06b4e6bc13950461c6c78c68f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:02:37 +0000 Subject: [PATCH 0289/1638] Bump pyright from 1.1.338 to 1.1.339 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.338 to 1.1.339. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.338...v1.1.339) --- 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 e1fb7df2b..5a6718415 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,7 +236,7 @@ dev = [ "Pygments==2.17.2", "pylint==3.0.2", "pyproject-fmt==1.5.3", - "pyright==1.1.338", + "pyright==1.1.339", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From 6c9c9f5025cb32667cae15f04e62f9e7735b5935 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 10:34:02 +0000 Subject: [PATCH 0290/1638] Bump actions/setup-python from 4 to 5 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/windows-ci.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4213af7d..22c5f7d90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: "Set up Python" - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ce5ecca8..8974001cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - name: "Set up Python" - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index b0df6966e..c13708757 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: "Set up Python" - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} From 30e0b58fdc9ff75ab2ca702b046eb1feef7aa960 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:40:09 +0000 Subject: [PATCH 0291/1638] Bump pylint from 3.0.2 to 3.0.3 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.2 to 3.0.3. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.2...v3.0.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 5a6718415..e7410ef4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -234,7 +234,7 @@ dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "Pygments==2.17.2", - "pylint==3.0.2", + "pylint==3.0.3", "pyproject-fmt==1.5.3", "pyright==1.1.339", "pyroma==4.2", From aca4556de0e45315f0fa7e699a332e78a691c9c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 10:49:09 +0000 Subject: [PATCH 0292/1638] Bump pyright from 1.1.339 to 1.1.340 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.339 to 1.1.340. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.339...v1.1.340) --- 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 e7410ef4f..1aa13b73c 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.339", + "pyright==1.1.340", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From b6e68d645688ad8ab6353b2a7fad12fadb4e45a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 10:31:46 +0000 Subject: [PATCH 0293/1638] Bump ruff from 0.1.7 to 0.1.8 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.7 to 0.1.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.1.7...v0.1.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 1aa13b73c..46e6af10d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "pytest==7.4.3", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.7", + "ruff==0.1.8", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", From 33701780d2d052146ad5019578d8e883ac362b45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 10:32:03 +0000 Subject: [PATCH 0294/1638] Bump pdm from 2.10.4 to 2.11.0 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.10.4 to 2.11.0. - [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.10.4...2.11.0) --- 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 1aa13b73c..e703fe867 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -229,7 +229,7 @@ dev = [ "freezegun==1.3.1", "furo==2023.9.10", "mypy==1.7.1", - "pdm==2.10.4", + "pdm==2.11.0", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From 3f72b87e0565030ad2166a0c7f7a10e662a0b880 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 10:11:50 +0000 Subject: [PATCH 0295/1638] Bump pdm from 2.11.0 to 2.11.1 Bumps [pdm](https://github.com/pdm-project/pdm) from 2.11.0 to 2.11.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.0...2.11.1) --- 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 28ce39bd4..b9dc8f4d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -229,7 +229,7 @@ dev = [ "freezegun==1.3.1", "furo==2023.9.10", "mypy==1.7.1", - "pdm==2.11.0", + "pdm==2.11.1", "pip_check_reqs==2.5.3", "pydocstyle==6.3", "pyenchant==3.2.2", From 8535755277e810107987ec84c781c2aad0948b3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 10:49:51 +0000 Subject: [PATCH 0296/1638] Bump pyright from 1.1.340 to 1.1.341 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.340 to 1.1.341. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.340...v1.1.341) --- 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 b9dc8f4d6..2560cbba9 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.340", + "pyright==1.1.341", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From e70b4403df14ce1addf6fa0eb3882b107c004514 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 10:51:35 +0000 Subject: [PATCH 0297/1638] Bump freezegun from 1.3.1 to 1.4.0 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.3.1 to 1.4.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.3.1...1.4.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 2560cbba9..6280951cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -226,7 +226,7 @@ dev = [ "check-manifest==0.49", "doc8==1.1.1", "dodgy==0.2.1", - "freezegun==1.3.1", + "freezegun==1.4.0", "furo==2023.9.10", "mypy==1.7.1", "pdm==2.11.1", From d2af357a46f1688295daa108d5e84800c44b6fb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 10:41:05 +0000 Subject: [PATCH 0298/1638] Bump pyright from 1.1.341 to 1.1.342 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.341 to 1.1.342. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.341...v1.1.342) --- 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 6280951cf..ee6a51cea 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.341", + "pyright==1.1.342", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From 2a7aa9bf49863b690999a7c520eddc374354a92c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 10:47:25 +0000 Subject: [PATCH 0299/1638] Bump mypy from 1.7.1 to 1.8.0 Bumps [mypy](https://github.com/python/mypy) from 1.7.1 to 1.8.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.7.1...v1.8.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 ee6a51cea..361d9d35f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -228,7 +228,7 @@ dev = [ "dodgy==0.2.1", "freezegun==1.4.0", "furo==2023.9.10", - "mypy==1.7.1", + "mypy==1.8.0", "pdm==2.11.1", "pip_check_reqs==2.5.3", "pydocstyle==6.3", From 0ceb2208ba5732d2bc6c4663d4e548cc4ffeb996 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 10:47:54 +0000 Subject: [PATCH 0300/1638] Bump ruff from 0.1.8 to 0.1.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.8 to 0.1.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.1.8...v0.1.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 ee6a51cea..63ac4880d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -241,7 +241,7 @@ dev = [ "pytest==7.4.3", "pytest-cov==4.1", "PyYAML==6.0.1", - "ruff==0.1.8", + "ruff==0.1.9", "Sphinx==7.2.6", "sphinx-autodoc-typehints==1.25.2", "sphinx-prompt==1.8", From 1cbf55bf42e6e90b2e29971755fdb69044b4289f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Dec 2023 10:11:17 +0000 Subject: [PATCH 0301/1638] Bump pyright from 1.1.342 to 1.1.343 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.342 to 1.1.343. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.342...v1.1.343) --- 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 9b92328d3..414629242 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.342", + "pyright==1.1.343", "pyroma==4.2", "pytest==7.4.3", "pytest-cov==4.1", From 1cf44598492b50da648a04807bb9b37bc645dbee Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 26 Dec 2023 14:31:38 +0000 Subject: [PATCH 0302/1638] Represent TooManyRequests error --- .vscode/settings.json | 3 ++- spelling_private_dict.txt | 1 + src/vws/exceptions/vws_exceptions.py | 7 +++++++ src/vws/vws.py | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ea61fd4bd..a05041473 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,5 +5,6 @@ }, "editor.defaultFormatter": "charliermarsh.ruff", "editor.formatOnSave": true - } + }, + "esbonio.sphinx.confDir": "" } diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 7e665a9fb..1ff1f7b71 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -19,6 +19,7 @@ TargetProcessingTimeout TargetQuotaReached TargetStatusNotSuccess TargetStatusProcessing +TooManyRequests Ubuntu UnknownTarget UnknownVWSErrorPossiblyBadName diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 3e080faf3..9ff990255 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -56,6 +56,13 @@ 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/vws.py b/src/vws/vws.py index 61bd43a9b..194681895 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -35,6 +35,7 @@ TargetQuotaReached, TargetStatusNotSuccess, TargetStatusProcessing, + TooManyRequests, UnknownTarget, ) from vws.reports import ( @@ -201,6 +202,7 @@ def _make_request( "TargetQuotaReached": TargetQuotaReached, "TargetStatusNotSuccess": TargetStatusNotSuccess, "TargetStatusProcessing": TargetStatusProcessing, + "TooManyRequests": TooManyRequests, "UnknownTarget": UnknownTarget, }[result_code] From 200f9e66e50609da77f0d8b925ec767508c53f09 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 26 Dec 2023 14:37:55 +0000 Subject: [PATCH 0303/1638] Raise error on too many requests even when there is no JSON text --- src/vws/vws.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 194681895..dc6e68cb8 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -8,6 +8,7 @@ import json import time from datetime import date +from http import HTTPStatus from typing import TYPE_CHECKING, BinaryIO from urllib.parse import urljoin @@ -181,6 +182,12 @@ def _make_request( if "Oops, an error occurred" in response.text: raise UnknownVWSErrorPossiblyBadName + 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) + result_code = response.json()["result_code"] if result_code == expected_result_code: @@ -202,7 +209,6 @@ def _make_request( "TargetQuotaReached": TargetQuotaReached, "TargetStatusNotSuccess": TargetStatusNotSuccess, "TargetStatusProcessing": TargetStatusProcessing, - "TooManyRequests": TooManyRequests, "UnknownTarget": UnknownTarget, }[result_code] From 6b107fac68c7f280b4fca66fda21c1e373e07a60 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Tue, 26 Dec 2023 14:45:00 +0000 Subject: [PATCH 0304/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 833475c1b..ecfbc0175 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2023.12.26 +------------ + 2023.05.21 ------------ From 6f40a40828201cf0ede8ad2f66be0b3e5aafc515 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 27 Dec 2023 08:49:07 +0000 Subject: [PATCH 0305/1638] Rename UnknownVWSErrorPossiblyBadName and give it a response param/attribute --- CHANGELOG.rst | 3 +++ spelling_private_dict.txt | 2 +- src/vws/exceptions/custom_exceptions.py | 20 +++++++++++++++++++- src/vws/vws.py | 10 +++++----- tests/test_vws_exceptions.py | 8 +++++--- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ecfbc0175..c613b3514 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +* Breaking change: The ``vws.exceptions.cloud_reco_exceptions.UnknownVWSErrorPossiblyBadName`` is now ``vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName``. +* ``vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName`` now has a ``response`` parameter and attribute. + 2023.12.26 ------------ diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 1ff1f7b71..a11d546a6 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -22,7 +22,7 @@ TargetStatusProcessing TooManyRequests Ubuntu UnknownTarget -UnknownVWSErrorPossiblyBadName +OopsAnErrorOccurredPossiblyBadName admin api args diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index afe9c4b46..ef88d53aa 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -5,7 +5,10 @@ """ -class UnknownVWSErrorPossiblyBadName(Exception): +from requests import Response + + +class OopsAnErrorOccurredPossiblyBadName(Exception): """ Exception raised when VWS returns an HTML page which says "Oops, an error occurred". @@ -13,6 +16,21 @@ class UnknownVWSErrorPossiblyBadName(Exception): This has been seen to happen when the given name includes a bad character. """ + def __init__(self, response: Response) -> None: + """ + Args: + response: The response returned by Vuforia. + """ + super().__init__(response.text) + self._response = response + + @property + def response(self) -> Response: + """ + The response returned by Vuforia which included this error. + """ + return self._response + class RequestEntityTooLarge(Exception): """ diff --git a/src/vws/vws.py b/src/vws/vws.py index dc6e68cb8..267f88411 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -17,8 +17,8 @@ from vws_auth_tools import authorization_header, rfc_1123_date from vws.exceptions.custom_exceptions import ( + OopsAnErrorOccurredPossiblyBadName, TargetProcessingTimeout, - UnknownVWSErrorPossiblyBadName, ) from vws.exceptions.vws_exceptions import ( AuthenticationFailure, @@ -162,8 +162,8 @@ def _make_request( The response to the request made by `requests`. Raises: - ~vws.exceptions.UnknownVWSErrorPossiblyBadName: Vuforia returns an - HTML page with the text "Oops, an error occurred". This has + ~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 character. json.decoder.JSONDecodeError: The server did not respond with valid @@ -180,7 +180,7 @@ def _make_request( ) if "Oops, an error occurred" in response.text: - raise UnknownVWSErrorPossiblyBadName + raise OopsAnErrorOccurredPossiblyBadName(response=response) if ( response.status_code == HTTPStatus.TOO_MANY_REQUESTS @@ -264,7 +264,7 @@ def add_target( inactive. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewed: There is an error with the time sent to Vuforia. - ~vws.exceptions.custom_exceptions.UnknownVWSErrorPossiblyBadName: + ~vws.exceptions.custom_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 character. diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index d6545b2bf..469683f6c 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -13,7 +13,7 @@ from mock_vws.states import States from vws import VWS from vws.exceptions.base_exceptions import VWSException -from vws.exceptions.custom_exceptions import UnknownVWSErrorPossiblyBadName +from vws.exceptions.custom_exceptions import OopsAnErrorOccurredPossiblyBadName from vws.exceptions.vws_exceptions import ( AuthenticationFailure, BadImage, @@ -69,11 +69,11 @@ def test_invalid_given_id(vws_client: VWS) -> None: def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ When a name with a bad character is given, an - ``UnknownVWSErrorPossiblyBadName`` exception is raised. + ``OopsAnErrorOccurredPossiblyBadName`` exception is raised. """ max_char_value = 65535 bad_name = chr(max_char_value + 1) - with pytest.raises(UnknownVWSErrorPossiblyBadName): + with pytest.raises(OopsAnErrorOccurredPossiblyBadName) as exc: vws_client.add_target( name=bad_name, width=1, @@ -82,6 +82,8 @@ def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: application_metadata=None, ) + assert exc.value.response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR + def test_request_quota_reached() -> None: """ From f5ba3c14fa957c0969517f36afb0f7bbd3dff19b Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Wed, 27 Dec 2023 11:00:37 +0000 Subject: [PATCH 0306/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c613b3514..281270708 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2023.12.27 +------------ + * Breaking change: The ``vws.exceptions.cloud_reco_exceptions.UnknownVWSErrorPossiblyBadName`` is now ``vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName``. * ``vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName`` now has a ``response`` parameter and attribute. 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 0307/1638] 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 0308/1638] 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 0309/1638] 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 0310/1638] 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 0311/1638] 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 0312/1638] 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 0313/1638] 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 0314/1638] 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 0315/1638] 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 0316/1638] 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 0317/1638] 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 0318/1638] 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 0319/1638] 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 0320/1638] 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 0321/1638] 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 0322/1638] 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 0323/1638] 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 0324/1638] 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 0325/1638] 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 0326/1638] 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 0327/1638] 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 0328/1638] 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 0329/1638] 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 0330/1638] 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 0331/1638] 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 0332/1638] 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 0333/1638] 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 0334/1638] 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 0335/1638] 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 0336/1638] 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 0337/1638] 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 0338/1638] 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 0339/1638] 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 0340/1638] 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 0341/1638] 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 0342/1638] 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 0343/1638] 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 0344/1638] 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 0345/1638] 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 0346/1638] 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 0347/1638] 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 0348/1638] 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 0349/1638] 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 0350/1638] 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 0351/1638] 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 0352/1638] 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 0353/1638] 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 0354/1638] 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 0355/1638] 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 0356/1638] 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 0357/1638] 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 0358/1638] 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 0359/1638] 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 0360/1638] 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 0361/1638] 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 0362/1638] 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 0363/1638] 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 0364/1638] 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 0365/1638] 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 0366/1638] 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 0367/1638] 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 0368/1638] 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 0369/1638] 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 0370/1638] 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 0371/1638] 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 0372/1638] 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 0373/1638] 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 0374/1638] 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 0375/1638] 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 0376/1638] 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 0377/1638] 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 0378/1638] 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 0379/1638] 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 0380/1638] 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 0381/1638] 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 0382/1638] 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 0383/1638] 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 0384/1638] 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 0385/1638] 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 0386/1638] 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 0387/1638] 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 0388/1638] 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 0389/1638] 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 0390/1638] 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 0391/1638] 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 0392/1638] 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 0393/1638] 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 0394/1638] 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 0395/1638] 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 0396/1638] 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 0397/1638] 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 0398/1638] 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 0399/1638] 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 0400/1638] 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 0401/1638] 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 0402/1638] 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 0403/1638] 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 0404/1638] 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 0405/1638] 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 0406/1638] 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 0407/1638] 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 0408/1638] 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 0409/1638] 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 0410/1638] 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 0411/1638] 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 0412/1638] 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 0413/1638] 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 0414/1638] 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 0415/1638] 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 0416/1638] 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 0417/1638] 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 0418/1638] 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 0419/1638] 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 0420/1638] 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 0421/1638] 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 0422/1638] 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 0423/1638] 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 0424/1638] 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 0425/1638] 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 0426/1638] 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 0427/1638] 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 0428/1638] 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 0429/1638] 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 0430/1638] 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 0431/1638] 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 0432/1638] 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 0433/1638] 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 0434/1638] 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 0435/1638] 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 0436/1638] 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 0437/1638] 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 0438/1638] 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 0439/1638] 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 0440/1638] 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 0441/1638] 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 0442/1638] 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 0443/1638] 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 0444/1638] 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 0445/1638] 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 0446/1638] 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 0447/1638] 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 0448/1638] 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 0449/1638] 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 0450/1638] 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 0451/1638] 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 0452/1638] 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 0453/1638] 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 0454/1638] 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 0455/1638] 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 0456/1638] 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 0457/1638] 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 0458/1638] 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 0459/1638] 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 0460/1638] 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 0461/1638] 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 0462/1638] 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 0463/1638] 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 0464/1638] 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 0465/1638] 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 0466/1638] 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 0467/1638] 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 0468/1638] 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 0469/1638] 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 0470/1638] 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 0471/1638] 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 0472/1638] 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 0473/1638] 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 0474/1638] 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 0475/1638] 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 0476/1638] 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 0477/1638] 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 0478/1638] 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 0479/1638] 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 0480/1638] 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 0481/1638] 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 0482/1638] 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 0483/1638] 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 0484/1638] 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 0485/1638] 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 0486/1638] 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 0487/1638] 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 0488/1638] 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 0489/1638] 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 0490/1638] 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 0491/1638] 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 0492/1638] 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 0493/1638] 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 0494/1638] 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 0495/1638] 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 0496/1638] 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 0497/1638] 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 0498/1638] 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 0499/1638] 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 0500/1638] 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 0501/1638] 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 0502/1638] 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 0503/1638] 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 0504/1638] 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 0505/1638] 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 0506/1638] 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 0507/1638] 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 0508/1638] 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 0509/1638] 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 0510/1638] [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 0511/1638] 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 0512/1638] 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 0513/1638] 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 0514/1638] 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 0515/1638] 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 0516/1638] --- 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 0517/1638] --- 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 0518/1638] 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 0519/1638] [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 0520/1638] --- 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 0521/1638] 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 0522/1638] 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 0523/1638] 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 0524/1638] 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 0525/1638] [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 0526/1638] 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 0527/1638] 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 0528/1638] 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 0529/1638] 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 0530/1638] 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 0531/1638] 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 0532/1638] 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 0533/1638] 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 0534/1638] 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 0535/1638] 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 0536/1638] 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 0537/1638] 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 0538/1638] 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 0539/1638] 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 0540/1638] 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 0541/1638] 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 0542/1638] 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 0543/1638] 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 0544/1638] 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 0545/1638] 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 0546/1638] 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 0547/1638] 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 0548/1638] 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 0549/1638] 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 0550/1638] 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 0551/1638] 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 0552/1638] 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 0553/1638] 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 0554/1638] 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 0555/1638] 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 0556/1638] 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 0557/1638] 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 0558/1638] 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 0559/1638] 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 0560/1638] 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 0561/1638] 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 0562/1638] 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 0563/1638] 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 0564/1638] 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 0565/1638] 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 0566/1638] 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 0567/1638] 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 0568/1638] 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 0569/1638] 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 0570/1638] 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 0571/1638] 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 0572/1638] 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 0573/1638] 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 0574/1638] 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 0575/1638] 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 0576/1638] 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 0577/1638] 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 0578/1638] 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 0579/1638] 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 0580/1638] 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 0581/1638] 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 0582/1638] 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 0583/1638] 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 0584/1638] 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 0585/1638] 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 0586/1638] 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 0587/1638] 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 0588/1638] 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 0589/1638] 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 0590/1638] 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 0591/1638] 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 0592/1638] 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 0593/1638] 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 0594/1638] 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 0595/1638] 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 0596/1638] 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 0597/1638] 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 0598/1638] 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 0599/1638] 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 0600/1638] 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 0601/1638] 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 0602/1638] 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 0603/1638] [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 0604/1638] 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 0605/1638] 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 0606/1638] 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 0607/1638] [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 0608/1638] 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 0609/1638] 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 0610/1638] 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 0611/1638] 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 0612/1638] 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 0613/1638] 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 0614/1638] 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 0615/1638] 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 0616/1638] 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 0617/1638] 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 0618/1638] 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 0619/1638] 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 0620/1638] 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 0621/1638] 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 0622/1638] 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 0623/1638] 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 0624/1638] 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 0625/1638] 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 0626/1638] 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 0627/1638] 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 0628/1638] 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 0629/1638] 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 0630/1638] 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 0631/1638] 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 0632/1638] 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 0633/1638] 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 0634/1638] 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 0635/1638] 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 0636/1638] 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 0637/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 64a9f70a9..82663c55a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.03 +------------ + * Make ``VWS.make_request`` a public method. 2024.09.02 From 26603a60cab9add1d65faa19e10a8ba6a2654970 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 3 Sep 2024 15:59:13 +0100 Subject: [PATCH 0638/1638] Expose content type parameter on VWS.make_request --- src/vws/vws.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 9879102cf..6f622773f 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -64,6 +64,8 @@ def _get_image_data(image: _ImageType) -> bytes: @beartype def _target_api_request( + *, + content_type: str, server_access_key: str, server_secret_key: str, method: str, @@ -75,9 +77,9 @@ def _target_api_request( Make a request to the Vuforia Target API. This uses `requests` to make a request against https://vws.vuforia.com. - The content type of the request will be `application/json`. Args: + content_type: The content type of the request. server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. method: The HTTP method which will be used in the request. @@ -90,7 +92,6 @@ def _target_api_request( The response to the request made by `requests`. """ date_string = rfc_1123_date() - content_type = "application/json" signature_string = authorization_header( access_key=server_access_key, @@ -152,16 +153,17 @@ def __init__( def make_request( self, + *, method: str, data: bytes, request_path: str, expected_result_code: str, + content_type: str, ) -> Response: """ Make a request to the Vuforia Target API. This uses `requests` to make a request against Vuforia. - The content type of the request will be `application/json`. Args: method: The HTTP method which will be used in the request. @@ -170,6 +172,7 @@ def make_request( request. expected_result_code: See "VWS API Result Codes" on https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api. + content_type: The content type of the request. Returns: The response to the request made by `requests`. @@ -190,6 +193,7 @@ def make_request( server. """ response = _target_api_request( + content_type=content_type, server_access_key=self._server_access_key, server_secret_key=self._server_secret_key, method=method, @@ -316,6 +320,7 @@ def add_target( data=content, request_path="/targets", expected_result_code="TargetCreated", + content_type="application/json", ) return str(json.loads(s=response.text)["target_id"]) @@ -353,6 +358,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: data=b"", request_path=f"/targets/{target_id}", expected_result_code="Success", + content_type="application/json", ) result_data = json.loads(s=response.text) @@ -449,6 +455,7 @@ def list_targets(self) -> list[str]: data=b"", request_path="/targets", expected_result_code="Success", + content_type="application/json", ) return list(json.loads(s=response.text)["results"]) @@ -486,6 +493,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: data=b"", request_path=f"/summary/{target_id}", expected_result_code="Success", + content_type="application/json", ) result_data = dict(json.loads(s=response.text)) @@ -529,6 +537,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: data=b"", request_path="/summary", expected_result_code="Success", + content_type="application/json", ) response_data = dict(json.loads(s=response.text)) @@ -579,6 +588,7 @@ def delete_target(self, target_id: str) -> None: data=b"", request_path=f"/targets/{target_id}", expected_result_code="Success", + content_type="application/json", ) def get_duplicate_targets(self, target_id: str) -> list[str]: @@ -616,6 +626,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: data=b"", request_path=f"/duplicates/{target_id}", expected_result_code="Success", + content_type="application/json", ) return list(json.loads(s=response.text)["similar_targets"]) @@ -702,4 +713,5 @@ def update_target( data=content, request_path=f"/targets/{target_id}", expected_result_code="Success", + content_type="application/json", ) From 2cdfc2fefc456b747e94234a14b93c74cc589a45 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Tue, 3 Sep 2024 15:06:22 +0000 Subject: [PATCH 0639/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 82663c55a..00008ff61 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.03.1 +------------ + 2024.09.03 ------------ From f063db055e722616d30cbcfe43bb5ae434fa4783 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 04:15:07 +0100 Subject: [PATCH 0640/1638] Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. --- CHANGELOG.rst | 3 +-- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/{exceptions/response.py => types.py} | 2 +- src/vws/vws.py | 3 +-- 6 files changed, 6 insertions(+), 8 deletions(-) rename src/vws/{exceptions/response.py => types.py} (85%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 00008ff61..913584a1f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,8 +4,7 @@ Changelog Next ---- -2024.09.03.1 ------------- +* Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. 2024.09.03 ------------ diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 9dde05ee2..ad1116708 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,7 @@ from beartype import beartype -from .response import Response +from vws.types import Response @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index d036d8750..cb237abd8 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from .response import Response +from vws.types import Response @beartype diff --git a/src/vws/query.py b/src/vws/query.py index fc42a3ff5..dfa0504f2 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -25,9 +25,9 @@ RequestEntityTooLargeError, ServerError, ) -from vws.exceptions.response import Response from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData +from vws.types import Response _ImageType = io.BytesIO | BinaryIO diff --git a/src/vws/exceptions/response.py b/src/vws/types.py similarity index 85% rename from src/vws/exceptions/response.py rename to src/vws/types.py index 0b3eced88..b3b941e24 100644 --- a/src/vws/exceptions/response.py +++ b/src/vws/types.py @@ -1,4 +1,4 @@ -"""Responses for exceptions.""" +"""Responses for requests to VWS and VWQ.""" from dataclasses import dataclass diff --git a/src/vws/vws.py b/src/vws/vws.py index 6f622773f..987d94fcc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -46,8 +46,7 @@ TargetStatuses, TargetSummaryReport, ) - -from .exceptions.response import Response +from vws.types import Response _ImageType = io.BytesIO | BinaryIO From 4800e8c56bdfee5537b414f0d5b9312e8995b6ce Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 04:16:45 +0100 Subject: [PATCH 0641/1638] Add `raw` to Response --- CHANGELOG.rst | 1 + docs/source/api-reference.rst | 4 ++++ docs/source/exceptions.rst | 7 ------- src/vws/query.py | 1 + src/vws/types.py | 1 + src/vws/vws.py | 1 + 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 913584a1f..b30b9a4d0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,7 @@ Next ---- * Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. +* Add ``raw`` field to ``Response``. 2024.09.03 ------------ diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 3ffbc13da..5b7027550 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -12,3 +12,7 @@ API Reference .. automodule:: vws.include_target_data :undoc-members: :members: + +.. automodule:: vws.types + :undoc-members: + :members: diff --git a/docs/source/exceptions.rst b/docs/source/exceptions.rst index f23ab02b8..f48730bfd 100644 --- a/docs/source/exceptions.rst +++ b/docs/source/exceptions.rst @@ -36,10 +36,3 @@ Custom exceptions :show-inheritance: :inherited-members: Exception :exclude-members: errno, filename, filename2, strerror - -Response --------- - -.. automodule:: vws.exceptions.response - :undoc-members: - :members: diff --git a/src/vws/query.py b/src/vws/query.py index dfa0504f2..17382d600 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -154,6 +154,7 @@ def query( status_code=requests_response.status_code, headers=dict(requests_response.headers), request_body=requests_response.request.body, + raw=requests_response.raw, ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: diff --git a/src/vws/types.py b/src/vws/types.py index b3b941e24..3e5e49aaa 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -17,3 +17,4 @@ class Response: status_code: int headers: dict[str, str] request_body: bytes | str | None + raw: bytes diff --git a/src/vws/vws.py b/src/vws/vws.py index 987d94fcc..2acc2ca07 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -125,6 +125,7 @@ def _target_api_request( status_code=requests_response.status_code, headers=dict(requests_response.headers), request_body=requests_response.request.body, + raw=requests_response.raw, ) From ad7991d099064519a76e6f1b7b8a787ff2078602 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Wed, 4 Sep 2024 03:29:24 +0000 Subject: [PATCH 0642/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b30b9a4d0..288081e00 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.04 +------------ + * Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. * Add ``raw`` field to ``Response``. From 878eff203e5beea150136e15e9c940dda1b1874b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 05:18:42 +0100 Subject: [PATCH 0643/1638] Improve `raw` type --- src/vws/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vws/types.py b/src/vws/types.py index 3e5e49aaa..711da851e 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -1,6 +1,7 @@ """Responses for requests to VWS and VWQ.""" from dataclasses import dataclass +from io import IOBase from beartype import beartype @@ -17,4 +18,4 @@ class Response: status_code: int headers: dict[str, str] request_body: bytes | str | None - raw: bytes + raw: IOBase From abbbb708b5a71f25ae8bb04fbc0e9db51bd759f3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 05:33:10 +0100 Subject: [PATCH 0644/1638] Save tell-position in Response --- src/vws/types.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vws/types.py b/src/vws/types.py index 711da851e..e6f59145a 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -1,7 +1,6 @@ """Responses for requests to VWS and VWQ.""" from dataclasses import dataclass -from io import IOBase from beartype import beartype @@ -18,4 +17,4 @@ class Response: status_code: int headers: dict[str, str] request_body: bytes | str | None - raw: IOBase + tell_position: int From 943b215882fa0fff3e11da091dc449d7ca3d36ab Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Sep 2024 05:34:18 +0100 Subject: [PATCH 0645/1638] Update Response callers --- src/vws/query.py | 2 +- src/vws/vws.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index 17382d600..2380ba962 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -154,7 +154,7 @@ def query( status_code=requests_response.status_code, headers=dict(requests_response.headers), request_body=requests_response.request.body, - raw=requests_response.raw, + tell_position=requests_response.raw.tell(), ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: diff --git a/src/vws/vws.py b/src/vws/vws.py index 2acc2ca07..185af1178 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -125,7 +125,7 @@ def _target_api_request( status_code=requests_response.status_code, headers=dict(requests_response.headers), request_body=requests_response.request.body, - raw=requests_response.raw, + tell_position=requests_response.raw.tell(), ) From 43635b24f4ec169cf220e369d0dd8a4b40cc09a5 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Wed, 4 Sep 2024 04:42:23 +0000 Subject: [PATCH 0646/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 288081e00..2eb9d9a05 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.04.1 +------------ + 2024.09.04 ------------ From 10d94680e0999ede070b87d62644c280831ca025 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:04:06 +0000 Subject: [PATCH 0647/1638] Bump pyright from 1.1.378 to 1.1.379 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.378 to 1.1.379. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.378...v1.1.379) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ebabd99e3..9d9b9118e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.7", "pyproject-fmt==2.2.1", - "pyright==1.1.378", + "pyright==1.1.379", "pyroma==4.2", "pytest==8.3.2", "pytest-cov==5.0.0", From d9e88a68be9393590e5738f8b2daf74ca6efeb05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:11:26 +0000 Subject: [PATCH 0648/1638] Bump types-requests from 2.32.0.20240712 to 2.32.0.20240905 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240712 to 2.32.0.20240905. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d9b9118e..19ea0d5c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.32.0.20240712", + "types-requests==2.32.0.20240905", "vulture==2.11", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", From 9444c4ad23be801d27f955d20ee8a1796da239dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 10:24:36 +0000 Subject: [PATCH 0649/1638] Bump ruff from 0.6.3 to 0.6.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.3 to 0.6.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.3...0.6.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19ea0d5c6..29927ba42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pytest==8.3.2", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.3", + "ruff==0.6.4", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From 72ba608650e49ed85852bc19808bcf5d19aafecf Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 6 Sep 2024 18:51:28 +0100 Subject: [PATCH 0650/1638] Show diff on ruff format errors --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 81166ec44..9a88cd81a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ ci: - deptry - pylint - ruff-check - - ruff-format-check + - ruff-format-diff - ruff-check-fix - ruff-format-fix - doc8 @@ -108,9 +108,9 @@ repos: language: system types_or: [python] - - id: ruff-format-check - name: Ruff format check - entry: ruff format --check + - id: ruff-format-diff + name: Ruff format diff + entry: ruff format --diff language: system types_or: [python] From 834e96259fc5e992aca30289511c2f9dbe468b4d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 8 Sep 2024 02:00:03 +0100 Subject: [PATCH 0651/1638] Add shellcheck pre-commit hook --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9a88cd81a..21aefd9c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,6 +44,11 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace +- repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + args: ["--shell", "bash"] - repo: local hooks: - id: actionlint From 9b8932963a59fa8b1a94d8ef872dddfcd2c3b36b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:15:23 +0100 Subject: [PATCH 0652/1638] Fix the GitHub workflow badge to refer to the right branch --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index cb5f4b116..68af180c6 100644 --- a/README.rst +++ b/README.rst @@ -61,7 +61,7 @@ Full Documentation See the `full documentation `__. -.. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg +.. |Build Status| image:: https://github.com/VWS-Python/vws-python/actions/workflows/ci.yml/badge.svg?branch=main :target: https://github.com/VWS-Python/vws-python/actions .. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/main/graph/badge.svg :target: https://codecov.io/gh/VWS-Python/vws-python From c5ad34df5781a29203a9af2c3a1901c335fbfc83 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:34:08 +0100 Subject: [PATCH 0653/1638] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 21aefd9c6..dcb18efd9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: hooks: - id: actionlint name: actionlint - entry: actionlint + entry: python -m actionlint language: system pass_filenames: false types_or: [yaml] @@ -61,7 +61,7 @@ repos: - id: mypy name: mypy stages: [push] - entry: mypy . + entry: python -m mypy . language: system types_or: [python, toml] pass_filenames: false @@ -69,90 +69,90 @@ repos: - id: check-manifest name: check-manifest stages: [push] - entry: check-manifest . + entry: python -m check-manifest . language: system pass_filenames: false - id: pyright name: pyright stages: [push] - entry: pyright . + entry: python -m pyright . language: system types_or: [python, toml] pass_filenames: false - id: vulture name: vulture - entry: vulture --min-confidence 100 --exclude .eggs + entry: python -m vulture --min-confidence 100 --exclude .eggs language: system types_or: [python] - id: pyroma name: pyroma - entry: pyroma --min 10 . + entry: python -m pyroma --min 10 . language: system pass_filenames: false types_or: [toml] - id: deptry name: deptry - entry: deptry src/ + entry: python -m deptry src/ language: system pass_filenames: false - id: pylint name: pylint - entry: pylint *.py src/ tests/ docs/ + entry: python -m pylint *.py src/ tests/ docs/ language: system stages: [manual] pass_filenames: false - id: ruff-check name: Ruff check - entry: ruff check + entry: python -m ruff check language: system types_or: [python] - id: ruff-format-diff name: Ruff format diff - entry: ruff format --diff + entry: python -m ruff format --diff language: system types_or: [python] - id: ruff-check-fix name: Ruff check fix - entry: ruff check --fix + entry: python -m ruff check --fix language: system types_or: [python] - id: ruff-format-fix name: Ruff format - entry: ruff format + entry: python -m ruff format language: system types_or: [python] - id: doc8 name: doc8 - entry: doc8 + entry: python -m doc8 language: system types_or: [rst] - id: interrogate name: interrogate - entry: interrogate + entry: python -m interrogate language: system types_or: [python] - id: pyproject-fmt-check name: pyproject-fmt check - entry: pyproject-fmt --check + entry: python -m pyproject-fmt --check language: system types_or: [toml] files: pyproject.toml - id: pyproject-fmt-fix name: pyproject-fmt - entry: pyproject-fmt + entry: python -m pyproject-fmt language: system types_or: [toml] files: pyproject.toml @@ -183,7 +183,7 @@ repos: - id: pyright-verifytypes name: pyright-verifytypes stages: [push] - entry: pyright --verifytypes vws + entry: python -m pyright --verifytypes vws language: system pass_filenames: false types_or: [python] From f480c467967a0135610e5a231795b2e1d1f4de7d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:36:32 +0100 Subject: [PATCH 0654/1638] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dcb18efd9..eeddd9cfd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: hooks: - id: actionlint name: actionlint - entry: python -m actionlint + entry: actionlint language: system pass_filenames: false types_or: [yaml] @@ -145,14 +145,14 @@ repos: - id: pyproject-fmt-check name: pyproject-fmt check - entry: python -m pyproject-fmt --check + entry: pyproject-fmt --check language: system types_or: [toml] files: pyproject.toml - id: pyproject-fmt-fix name: pyproject-fmt - entry: python -m pyproject-fmt + entry: pyproject-fmt language: system types_or: [toml] files: pyproject.toml From dd4345095a1d4e3d1776cf8fffaeac7154da41fe Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:40:23 +0100 Subject: [PATCH 0655/1638] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eeddd9cfd..55d22db37 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,7 @@ repos: - id: check-manifest name: check-manifest stages: [push] - entry: python -m check-manifest . + entry: python -m check_manifest . language: system pass_filenames: false From 0afbed237dff456adc863bc36f63c922f66cc498 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:26:39 +0000 Subject: [PATCH 0656/1638] Bump types-requests from 2.32.0.20240905 to 2.32.0.20240907 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240905 to 2.32.0.20240907. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 29927ba42..3aa6e4fe1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==6.1.1", - "types-requests==2.32.0.20240905", + "types-requests==2.32.0.20240907", "vulture==2.11", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", From cd35906d0c3e89ee9e3bd568ebe1c983e5bf22c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:33:08 +0000 Subject: [PATCH 0657/1638] Bump pyproject-fmt from 2.2.1 to 2.2.3 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.2.1...2.2.3) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3aa6e4fe1..6b2a0861e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pyenchant==3.2.2", "pygments==2.18.0", "pylint==3.2.7", - "pyproject-fmt==2.2.1", + "pyproject-fmt==2.2.3", "pyright==1.1.379", "pyroma==4.2", "pytest==8.3.2", From be9353fdb07788d6785099875e8438b33228550a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 11 Sep 2024 02:42:45 +0100 Subject: [PATCH 0658/1638] Switch from code to code-block, for consistency --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 68af180c6..336acd97e 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ Web Query API. Installation ------------ -.. code:: sh +.. code-block:: sh pip install vws-python From 293a15875c3778b6e9f63841e56c4047494e8c43 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 11 Sep 2024 10:37:03 +0100 Subject: [PATCH 0659/1638] Switch from code-block: sh to code-block: shell - get syntax highlighting --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 336acd97e..0f54838e3 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ Web Query API. Installation ------------ -.. code-block:: sh +.. code-block:: shell pip install vws-python From 9f8791567e6b6fda2798cb81a775f5a446a53f8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:42:45 +0000 Subject: [PATCH 0660/1638] Bump pytest from 8.3.2 to 8.3.3 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.2 to 8.3.3. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.2...8.3.3) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6b2a0861e..e13748891 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.2.3", "pyright==1.1.379", "pyroma==4.2", - "pytest==8.3.2", + "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", "ruff==0.6.4", From d563dec5f035b10450dd5af02b93aab10c71aa6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:51:22 +0000 Subject: [PATCH 0661/1638] Bump pyright from 1.1.379 to 1.1.380 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.379 to 1.1.380. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.379...v1.1.380) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e13748891..5a1d96913 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.7", "pyproject-fmt==2.2.3", - "pyright==1.1.379", + "pyright==1.1.380", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 58b9d87dfc228b95280b02187f2847086fb50775 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:28:36 +0000 Subject: [PATCH 0662/1638] Bump pre-commit-ci/lite-action from 1.0.2 to 1.0.3 Bumps [pre-commit-ci/lite-action](https://github.com/pre-commit-ci/lite-action) from 1.0.2 to 1.0.3. - [Release notes](https://github.com/pre-commit-ci/lite-action/releases) - [Commits](https://github.com/pre-commit-ci/lite-action/compare/v1.0.2...v1.0.3) --- updated-dependencies: - dependency-name: pre-commit-ci/lite-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad86deb1b..6f424e7a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,5 +53,5 @@ jobs: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - - uses: pre-commit-ci/lite-action@v1.0.2 + - uses: pre-commit-ci/lite-action@v1.0.3 if: always() From 52d970969303fa83d29a8dfa8766942fb7068c3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:49:00 +0000 Subject: [PATCH 0663/1638] Bump sybil from 6.1.1 to 7.0.0 Bumps [sybil](https://github.com/simplistix/sybil) from 6.1.1 to 7.0.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/6.1.1...7.0.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5a1d96913..0b6da1652 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", - "sybil==6.1.1", + "sybil==7.0.0", "types-requests==2.32.0.20240907", "vulture==2.11", "vws-python-mock==2024.8.30", From 1fcec8ca6fbe3b3f5d301773e6fd974f85840387 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 14 Sep 2024 09:07:10 +0100 Subject: [PATCH 0664/1638] Be careful when releasing to not accidentally commit to a file --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 237858d8b..64761eefa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,6 +59,7 @@ jobs: id: commit with: commit_message: Bump CHANGELOG + file_pattern: CHANGELOG.rst - name: Bump version and push tag id: tag_version From b277d65abd5f3f2df85240e8f6ed1413f4308e0f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 10:03:34 +0100 Subject: [PATCH 0665/1638] Add docrun dependency --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 0b6da1652..26c57fb17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", + "doccmd==2024.9.14.5", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From ab10547df4ee01e8d84f774009d418dcd00aa844 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 10:22:41 +0100 Subject: [PATCH 0666/1638] Add docrun pre-commit hooks --- .pre-commit-config.yaml | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 55d22db37..f82140622 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,6 +66,13 @@ repos: types_or: [python, toml] pass_filenames: false + - id: mypy-docs + name: mypy-docs + stages: [push] + entry: doccmd --language=python --command="mypy" + language: system + types_or: [markdown, rst, python, toml] + - id: check-manifest name: check-manifest stages: [push] @@ -81,6 +88,13 @@ repos: types_or: [python, toml] pass_filenames: false + - id: pyright-docs + name: pyright-docs + stages: [push] + entry: doccmd --language=python --command="pyright" + language: system + types_or: [markdown, rst, python, toml] + - id: vulture name: vulture entry: python -m vulture --min-confidence 100 --exclude .eggs @@ -107,30 +121,61 @@ repos: stages: [manual] pass_filenames: false + - id: pylint-docs + name: pylint-docs + entry: doccmd --language=python --command="pylint" --lowercase-file-name + language: system + stages: [manual] + types_or: [markdown, rst, python, toml] + - id: ruff-check name: Ruff check entry: python -m ruff check language: system types_or: [python] + - id: ruff-check-docs + name: Ruff check docs + entry: doccmd --language=python --command="ruff check" + language: system + types_or: [markdown, rst] + - id: ruff-format-diff name: Ruff format diff entry: python -m ruff format --diff language: system types_or: [python] + - id: ruff-format-diff-docs + name: Ruff format diff docs + entry: doccmd --language=python --no-pad-file --command="ruff format --diff" + language: system + types_or: [markdown, rst] + - id: ruff-check-fix name: Ruff check fix entry: python -m ruff check --fix language: system types_or: [python] + - id: ruff-check-fix-docs + name: Ruff check fix docs + entry: doccmd --language=python --command="ruff check --fix" + language: system + types_or: [markdown, rst] + - id: ruff-format-fix name: Ruff format entry: python -m ruff format language: system types_or: [python] + - id: ruff-format-fix-docs + name: Ruff format docs + entry: doccmd --language=python --no-pad-file --command="ruff format" + language: system + types_or: [markdown, rst] + - id: doc8 name: doc8 entry: python -m doc8 @@ -143,6 +188,12 @@ repos: language: system types_or: [python] + - id: interrogate-docs + name: interrogate docs + entry: doccmd --language=python --command="interrogate" + language: system + types_or: [markdown, rst] + - id: pyproject-fmt-check name: pyproject-fmt check entry: pyproject-fmt --check From 1ed7e80562a03183dc9aad9d8c6a115486fe757e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 10:24:10 +0100 Subject: [PATCH 0667/1638] Ignore docs items in pre-commit config --- .pre-commit-config.yaml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f82140622..9dbe7b746 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,25 +6,32 @@ ci: # We therefore cannot use those dependencies in pre-commit CI. skip: - actionlint - - mypy - check-manifest - - pyright - - vulture - - pyroma - deptry - - pylint - - ruff-check - - ruff-format-diff - - ruff-check-fix - - ruff-format-fix - doc8 + - docs - interrogate + - interrogate-docs + - linkcheck + - mypy + - mypy-docs + - pylint - pyproject-fmt-check - pyproject-fmt-fix - - linkcheck - - spelling - - docs + - pyright + - pyright-docs - pyright-verifytypes + - pyroma + - ruff-check + - ruff-check-docs + - ruff-check-fix + - ruff-check-fix-docs + - ruff-format-diff + - ruff-format-diff-docs + - ruff-format-fix + - ruff-format-fix-docs + - spelling + - vulture default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: From 5113f9d641926c5a249bf2a8c0695e0476b71bad Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 09:24:38 +0000 Subject: [PATCH 0668/1638] [pre-commit.ci lite] apply automatic fixes --- README.rst | 14 ++++++------ docs/source/index.rst | 53 ++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/README.rst b/README.rst index 0f54838e3..aca061a06 100644 --- a/README.rst +++ b/README.rst @@ -26,10 +26,10 @@ Getting Started from vws import VWS, CloudRecoService - server_access_key = '[server-access-key]' - server_secret_key = '[server-secret-key]' - client_access_key = '[client-access-key]' - client_secret_key = '[client-secret-key]' + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" vws_client = VWS( server_access_key=server_access_key, @@ -39,10 +39,10 @@ Getting Started client_access_key=client_access_key, client_secret_key=client_secret_key, ) - name = 'my_image_name' + name = "my_image_name" - image = pathlib.Path('high_quality_image.jpg') - with image.open(mode='rb') as my_image_file: + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: target_id = vws_client.add_target( name=name, width=1, diff --git a/docs/source/index.rst b/docs/source/index.rst index 907096d1d..b81c4c9bb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -22,10 +22,10 @@ See the :doc:`api-reference` for full usage details. from vws import VWS, CloudRecoService - server_access_key = '[server-access-key]' - server_secret_key = '[server-secret-key]' - client_access_key = '[client-access-key]' - client_secret_key = '[client-secret-key]' + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" vws_client = VWS( server_access_key=server_access_key, @@ -36,19 +36,20 @@ See the :doc:`api-reference` for full usage details. client_secret_key=client_secret_key, ) import uuid - name = 'my_image_name' + uuid.uuid4().hex - - image = pathlib.Path('high_quality_image.jpg') - with image.open(mode='rb') as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) + + name = "my_image_name" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) assert matching_targets[0].target_id == target_id a = 1 @@ -84,15 +85,15 @@ To write unit tests for code which uses this library, without using your Vuforia client_secret_key=database.client_secret_key, ) - image = pathlib.Path('high_quality_image.jpg') - with image.open(mode='rb') as my_image_file: - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image_file, - application_metadata=None, - active_flag=True, - ) + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, + ) There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. From a97247ce488dad4376435cc421c375bb4a66bd4c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 10:37:44 +0100 Subject: [PATCH 0669/1638] Fix many lint issues --- .pre-commit-config.yaml | 2 ++ README.rst | 7 ++++++- docs/source/index.rst | 13 +++++++++---- pyproject.toml | 5 +++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9dbe7b746..77321e831 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +fail_fast: true + # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks diff --git a/README.rst b/README.rst index aca061a06..b82abf663 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,10 @@ Getting Started .. code-block:: python + """Add a target to VWS and then query it.""" + import pathlib + import uuid from vws import VWS, CloudRecoService @@ -39,7 +42,8 @@ Getting Started client_access_key=client_access_key, client_secret_key=client_secret_key, ) - name = "my_image_name" + + name = "my_image_name_" + uuid.uuid4().hex image = pathlib.Path("high_quality_image.jpg") with image.open(mode="rb") as my_image_file: @@ -54,6 +58,7 @@ Getting Started matching_targets = cloud_reco_client.query(image=my_image_file) assert matching_targets[0].target_id == target_id + a = 1 Full Documentation ------------------ diff --git a/docs/source/index.rst b/docs/source/index.rst index b81c4c9bb..d085bcc84 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,7 +18,10 @@ See the :doc:`api-reference` for full usage details. .. code-block:: python + """Add a target to VWS and then query it.""" + import pathlib + import uuid from vws import VWS, CloudRecoService @@ -35,9 +38,8 @@ See the :doc:`api-reference` for full usage details. client_access_key=client_access_key, client_secret_key=client_secret_key, ) - import uuid - name = "my_image_name" + uuid.uuid4().hex + name = "my_image_name_" + uuid.uuid4().hex image = pathlib.Path("high_quality_image.jpg") with image.open(mode="rb") as my_image_file: @@ -67,11 +69,14 @@ To write unit tests for code which uses this library, without using your Vuforia .. code-block:: python + """Test adding a target to VWS.""" + import pathlib - from mock_vws.database import VuforiaDatabase from mock_vws import MockVWS - from vws import CloudRecoService, VWS + from mock_vws.database import VuforiaDatabase + + from vws import VWS, CloudRecoService with MockVWS() as mock: database = VuforiaDatabase() diff --git a/pyproject.toml b/pyproject.toml index 26c57fb17..4e152e40b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,6 +123,11 @@ lint.per-file-ignores."conftest.py" = [ "S106", ] +lint.per-file-ignores."doccmd_*.py" = [ + # Allow hardcoded secrets in documentation. + "S105", +] + lint.per-file-ignores."tests/*.py" = [ # Do not require tests to have a one-line summary. "D205", From 74c05e06da166cc3855956669f2e36af16f0b581 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 11:00:04 +0100 Subject: [PATCH 0670/1638] Progress towards passing lint --- README.rst | 70 +++++++++++++++---------- conftest.py | 33 +++++++++++- docs/source/index.rst | 115 +++++++++++++++++++++++++----------------- 3 files changed, 142 insertions(+), 76 deletions(-) diff --git a/README.rst b/README.rst index b82abf663..9e008dc33 100644 --- a/README.rst +++ b/README.rst @@ -28,37 +28,51 @@ Getting Started import uuid from vws import VWS, CloudRecoService + from vws.reports import QueryResult - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" - - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, - ) - - name = "my_image_name_" + uuid.uuid4().hex - - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, + + def add_target() -> str: + """Add a target to VWS and return its ID.""" + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + name = "my_image_name_" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + + return target_id + + + def get_matching_targets() -> list[QueryResult]: + """Query VWS for matching targets.""" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" + + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - assert matching_targets[0].target_id == target_id - a = 1 + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + return cloud_reco_client.query(image=my_image_file) + + + TARGET_ID = add_target() + MATCHING_TARGETS = get_matching_targets() + assert MATCHING_TARGETS[0].target_id == TARGET_ID Full Documentation ------------------ diff --git a/conftest.py b/conftest.py index 059fd0968..8b12e9d09 100644 --- a/conftest.py +++ b/conftest.py @@ -1,6 +1,7 @@ """Setup for Sybil.""" import io +import sys from collections.abc import Generator from doctest import ELLIPSIS from pathlib import Path @@ -12,9 +13,11 @@ from sybil import Sybil from sybil.parsers.rest import ( ClearNamespaceParser, + CodeBlockParser, DocTestParser, PythonCodeBlockParser, ) +from sybil_extras.evaluators.shell_evaluator import ShellCommandEvaluator def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @@ -67,5 +70,33 @@ def mock_vws() -> Generator[None, None, None]: PythonCodeBlockParser(), ], patterns=["*.rst", "*.py"], - fixtures=["make_image_file", "mock_vws"], ).pytest() + +run_code_sybil = Sybil( + parsers=[ + DocTestParser(optionflags=ELLIPSIS), + PythonCodeBlockParser(), + ], + patterns=["*.rst", "*.py"], + fixtures=["make_image_file", "mock_vws"], +) + +pytest_sybil = Sybil( + parsers=[ + CodeBlockParser( + language="python", + evaluator=ShellCommandEvaluator( + args=[sys.executable, "-m", "pytest"], + tempfile_suffixes=[".py"], + pad_file=True, + write_to_file=False, + ), + ), + ], + patterns=["*.rst"], + fixtures=["make_image_file"], +) + +sybils = run_code_sybil + pytest_sybil + +pytest_collect_file = sybils.pytest() diff --git a/docs/source/index.rst b/docs/source/index.rst index d085bcc84..1861a3de0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -24,37 +24,51 @@ See the :doc:`api-reference` for full usage details. import uuid from vws import VWS, CloudRecoService + from vws.reports import QueryResult - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" - - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, - ) - - name = "my_image_name_" + uuid.uuid4().hex - - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, + + def add_target() -> str: + """Add a target to VWS and return its ID.""" + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + name = "my_image_name_" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + + return target_id + + + def get_matching_targets() -> list[QueryResult]: + """Query VWS for matching targets.""" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" + + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, ) - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - assert matching_targets[0].target_id == target_id - a = 1 + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + return cloud_reco_client.query(image=my_image_file) + + + TARGET_ID = add_target() + MATCHING_TARGETS = get_matching_targets() + assert MATCHING_TARGETS[0].target_id == TARGET_ID Testing ------- @@ -78,27 +92,34 @@ To write unit tests for code which uses this library, without using your Vuforia from vws import VWS, CloudRecoService - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, - ) - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image_file, - application_metadata=None, - active_flag=True, + def test_add_target() -> None: + """Test adding a target to VWS.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, + ) + + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) + assert matching_targets[0].target_id == target_id There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. From 0f41e176a32450fabd4e73ce1fa98b677e9be4e5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 11:38:01 +0100 Subject: [PATCH 0671/1638] Progress towards passing lint --- conftest.py | 33 +--------------------- docs/source/index.rst | 66 +++++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 63 deletions(-) diff --git a/conftest.py b/conftest.py index 8b12e9d09..059fd0968 100644 --- a/conftest.py +++ b/conftest.py @@ -1,7 +1,6 @@ """Setup for Sybil.""" import io -import sys from collections.abc import Generator from doctest import ELLIPSIS from pathlib import Path @@ -13,11 +12,9 @@ from sybil import Sybil from sybil.parsers.rest import ( ClearNamespaceParser, - CodeBlockParser, DocTestParser, PythonCodeBlockParser, ) -from sybil_extras.evaluators.shell_evaluator import ShellCommandEvaluator def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @@ -70,33 +67,5 @@ def mock_vws() -> Generator[None, None, None]: PythonCodeBlockParser(), ], patterns=["*.rst", "*.py"], -).pytest() - -run_code_sybil = Sybil( - parsers=[ - DocTestParser(optionflags=ELLIPSIS), - PythonCodeBlockParser(), - ], - patterns=["*.rst", "*.py"], fixtures=["make_image_file", "mock_vws"], -) - -pytest_sybil = Sybil( - parsers=[ - CodeBlockParser( - language="python", - evaluator=ShellCommandEvaluator( - args=[sys.executable, "-m", "pytest"], - tempfile_suffixes=[".py"], - pad_file=True, - write_to_file=False, - ), - ), - ], - patterns=["*.rst"], - fixtures=["make_image_file"], -) - -sybils = run_code_sybil + pytest_sybil - -pytest_collect_file = sybils.pytest() +).pytest() diff --git a/docs/source/index.rst b/docs/source/index.rst index 1861a3de0..912cddc14 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -83,43 +83,47 @@ To write unit tests for code which uses this library, without using your Vuforia .. code-block:: python - """Test adding a target to VWS.""" + """Add a target to VWS and then query it.""" - import pathlib + import pathlib - from mock_vws import MockVWS - from mock_vws.database import VuforiaDatabase + from mock_vws import MockVWS + from mock_vws.database import VuforiaDatabase - from vws import VWS, CloudRecoService + from vws import VWS, CloudRecoService - def test_add_target() -> None: - """Test adding a target to VWS.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, - ) + def test_add_target() -> None: + """Test adding a target to VWS.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, + ) + + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) + + assert matching_targets[0].target_id == target_id + - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image_file, - application_metadata=None, - active_flag=True, - ) - - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - assert matching_targets[0].target_id == target_id + test_add_target() There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. From 3cc9ddbfebca03e3f4fa5fab2183e2968bc9a27f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 16:04:36 +0100 Subject: [PATCH 0672/1638] Get pylint passing --- README.rst | 69 ++++++++++-------------- docs/source/index.rst | 121 ++++++++++++++++++------------------------ pyproject.toml | 6 +++ 3 files changed, 87 insertions(+), 109 deletions(-) diff --git a/README.rst b/README.rst index 9e008dc33..ffccbc916 100644 --- a/README.rst +++ b/README.rst @@ -28,51 +28,40 @@ Getting Started import uuid from vws import VWS, CloudRecoService - from vws.reports import QueryResult - - def add_target() -> str: - """Add a target to VWS and return its ID.""" - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - name = "my_image_name_" + uuid.uuid4().hex - - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - - return target_id - - - def get_matching_targets() -> list[QueryResult]: - """Query VWS for matching targets.""" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" - - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" + + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, + ) + + name = "my_image_name_" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, ) - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - return cloud_reco_client.query(image=my_image_file) + vws_client.wait_for_target_processed(target_id=target_id) + with image.open(mode="rb") as my_image_file: + matching_targets = cloud_reco_client.query(image=my_image_file) - TARGET_ID = add_target() - MATCHING_TARGETS = get_matching_targets() - assert MATCHING_TARGETS[0].target_id == TARGET_ID + assert matching_targets[0].target_id == target_id Full Documentation ------------------ diff --git a/docs/source/index.rst b/docs/source/index.rst index 912cddc14..fe1ee9a9e 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -24,51 +24,40 @@ See the :doc:`api-reference` for full usage details. import uuid from vws import VWS, CloudRecoService - from vws.reports import QueryResult - - def add_target() -> str: - """Add a target to VWS and return its ID.""" - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - vws_client = VWS( - server_access_key=server_access_key, - server_secret_key=server_secret_key, - ) - name = "my_image_name_" + uuid.uuid4().hex - - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name=name, - width=1, - image=my_image_file, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - - return target_id - - - def get_matching_targets() -> list[QueryResult]: - """Query VWS for matching targets.""" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" - - cloud_reco_client = CloudRecoService( - client_access_key=client_access_key, - client_secret_key=client_secret_key, + server_access_key = "[server-access-key]" + server_secret_key = "[server-secret-key]" + client_access_key = "[client-access-key]" + client_secret_key = "[client-secret-key]" + + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + ) + + cloud_reco_client = CloudRecoService( + client_access_key=client_access_key, + client_secret_key=client_secret_key, + ) + + name = "my_image_name_" + uuid.uuid4().hex + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name=name, + width=1, + image=my_image_file, + active_flag=True, + application_metadata=None, ) - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - return cloud_reco_client.query(image=my_image_file) + vws_client.wait_for_target_processed(target_id=target_id) + with image.open(mode="rb") as my_image_file: + matching_targets = cloud_reco_client.query(image=my_image_file) - TARGET_ID = add_target() - MATCHING_TARGETS = get_matching_targets() - assert MATCHING_TARGETS[0].target_id == TARGET_ID + assert matching_targets[0].target_id == target_id Testing ------- @@ -92,38 +81,32 @@ To write unit tests for code which uses this library, without using your Vuforia from vws import VWS, CloudRecoService - - def test_add_target() -> None: - """Test adding a target to VWS.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + image = pathlib.Path("high_quality_image.jpg") + with image.open(mode="rb") as my_image_file: + target_id = vws_client.add_target( + name="example_image_name", + width=1, + image=my_image_file, + application_metadata=None, + active_flag=True, ) - image = pathlib.Path("high_quality_image.jpg") - with image.open(mode="rb") as my_image_file: - target_id = vws_client.add_target( - name="example_image_name", - width=1, - image=my_image_file, - application_metadata=None, - active_flag=True, - ) - - vws_client.wait_for_target_processed(target_id=target_id) - matching_targets = cloud_reco_client.query(image=my_image_file) - - assert matching_targets[0].target_id == target_id - + vws_client.wait_for_target_processed(target_id=target_id) + matching_targets = cloud_reco_client.query(image=my_image_file) - test_add_target() + assert matching_targets[0].target_id == target_id There are some differences between the mock and the real Vuforia. See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. diff --git a/pyproject.toml b/pyproject.toml index 4e152e40b..1251725a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ optional-dependencies.dev = [ "pyenchant==3.2.2", "pygments==2.18.0", "pylint==3.2.7", + "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.3", "pyright==1.1.380", "pyroma==4.2", @@ -154,12 +155,14 @@ jobs = 0 # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. # See https://chezsoi.org/lucas/blog/pylint-strict-base-configuration.html. +# and we also add `pylint_per_file_ignores` to allow per-file ignores. # We do not use the plugins: # - pylint.extensions.code_style # - pylint.extensions.magic_value # - pylint.extensions.while_used # as they seemed to get in the way. load-plugins = [ + "pylint_per_file_ignores", 'pylint.extensions.bad_builtin', 'pylint.extensions.comparison_placement', 'pylint.extensions.consider_refactoring_into_while_condition', @@ -231,6 +234,9 @@ disable = [ 'useless-type-doc', ] +# per-file-ignores = "docs/source/doccmd*.py:invalid-name, \ndoccmd_README:invalid-name" +per-file-ignores = "docs/:invalid-name,\ndoccmd_README_rst.*.py:invalid-name" + [tool.pylint.'FORMAT'] # Allow the body of an if to be on the same line as the test if there is no From 91719e3658fc7955145234e81cd5eac1151d6b85 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 16:19:07 +0100 Subject: [PATCH 0673/1638] Neater per-file-ignores --- pyproject.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1251725a1..da36341d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -234,8 +234,12 @@ disable = [ 'useless-type-doc', ] -# per-file-ignores = "docs/source/doccmd*.py:invalid-name, \ndoccmd_README:invalid-name" -per-file-ignores = "docs/:invalid-name,\ndoccmd_README_rst.*.py:invalid-name" +# This format is described in the following issue: +# https://github.com/christopherpickering/pylint-per-file-ignores/issues/160 +per-file-ignores = """ +docs/:invalid-name +doccmd_README_rst.*.py:invalid-name +""" [tool.pylint.'FORMAT'] From fd3d1ad49bf5aaa0085f5055b19fd21c2224755e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 16:25:16 +0100 Subject: [PATCH 0674/1638] Explain ignores --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index da36341d3..e15800730 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,6 +236,10 @@ disable = [ # This format is described in the following issue: # https://github.com/christopherpickering/pylint-per-file-ignores/issues/160 +# +# We ignore invalid names because: +# - We want to use generated module names, which may not be valid, but are never seen. +# - We want to use global variables in documentation, which may not be uppercase per-file-ignores = """ docs/:invalid-name doccmd_README_rst.*.py:invalid-name From fdcd4730ec7285f36736c701069312c38da5f281 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 16:32:49 +0100 Subject: [PATCH 0675/1638] Remove lowercase option --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 77321e831..a7bfd2ff4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -132,7 +132,7 @@ repos: - id: pylint-docs name: pylint-docs - entry: doccmd --language=python --command="pylint" --lowercase-file-name + entry: doccmd --language=python --command="pylint" language: system stages: [manual] types_or: [markdown, rst, python, toml] From 236a276b22ccc4c86b26648b5c61a25f72e765cb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Sep 2024 17:41:45 +0100 Subject: [PATCH 0676/1638] Reformat some of pre-commit config to be more like others --- .pre-commit-config.yaml | 420 ++++++++++++++++++++-------------------- 1 file changed, 210 insertions(+), 210 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a7bfd2ff4..36a8ffb12 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,213 +37,213 @@ ci: default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 - hooks: - - id: check-added-large-files - - id: check-case-conflict - - id: check-executables-have-shebangs - - id: check-merge-conflict - - id: check-shebang-scripts-are-executable - - id: check-symlinks - - id: check-toml - - id: check-vcs-permalinks - - id: check-yaml - - id: end-of-file-fixer - - id: file-contents-sorter - files: spelling_private_dict\.txt$ - - id: trailing-whitespace -- repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 - hooks: - - id: shellcheck - args: ["--shell", "bash"] -- repo: local - hooks: - - id: actionlint - name: actionlint - entry: actionlint - language: system - pass_filenames: false - types_or: [yaml] - - - id: mypy - name: mypy - stages: [push] - entry: python -m mypy . - language: system - types_or: [python, toml] - pass_filenames: false - - - id: mypy-docs - name: mypy-docs - stages: [push] - entry: doccmd --language=python --command="mypy" - language: system - types_or: [markdown, rst, python, toml] - - - id: check-manifest - name: check-manifest - stages: [push] - entry: python -m check_manifest . - language: system - pass_filenames: false - - - id: pyright - name: pyright - stages: [push] - entry: python -m pyright . - language: system - types_or: [python, toml] - pass_filenames: false - - - id: pyright-docs - name: pyright-docs - stages: [push] - entry: doccmd --language=python --command="pyright" - language: system - types_or: [markdown, rst, python, toml] - - - id: vulture - name: vulture - entry: python -m vulture --min-confidence 100 --exclude .eggs - language: system - types_or: [python] - - - id: pyroma - name: pyroma - entry: python -m pyroma --min 10 . - language: system - pass_filenames: false - types_or: [toml] - - - id: deptry - name: deptry - entry: python -m deptry src/ - language: system - pass_filenames: false - - - id: pylint - name: pylint - entry: python -m pylint *.py src/ tests/ docs/ - language: system - stages: [manual] - pass_filenames: false - - - id: pylint-docs - name: pylint-docs - entry: doccmd --language=python --command="pylint" - language: system - stages: [manual] - types_or: [markdown, rst, python, toml] - - - id: ruff-check - name: Ruff check - entry: python -m ruff check - language: system - types_or: [python] - - - id: ruff-check-docs - name: Ruff check docs - entry: doccmd --language=python --command="ruff check" - language: system - types_or: [markdown, rst] - - - id: ruff-format-diff - name: Ruff format diff - entry: python -m ruff format --diff - language: system - types_or: [python] - - - id: ruff-format-diff-docs - name: Ruff format diff docs - entry: doccmd --language=python --no-pad-file --command="ruff format --diff" - language: system - types_or: [markdown, rst] - - - id: ruff-check-fix - name: Ruff check fix - entry: python -m ruff check --fix - language: system - types_or: [python] - - - id: ruff-check-fix-docs - name: Ruff check fix docs - entry: doccmd --language=python --command="ruff check --fix" - language: system - types_or: [markdown, rst] - - - id: ruff-format-fix - name: Ruff format - entry: python -m ruff format - language: system - types_or: [python] - - - id: ruff-format-fix-docs - name: Ruff format docs - entry: doccmd --language=python --no-pad-file --command="ruff format" - language: system - types_or: [markdown, rst] - - - id: doc8 - name: doc8 - entry: python -m doc8 - language: system - types_or: [rst] - - - id: interrogate - name: interrogate - entry: python -m interrogate - language: system - types_or: [python] - - - id: interrogate-docs - name: interrogate docs - entry: doccmd --language=python --command="interrogate" - language: system - types_or: [markdown, rst] - - - id: pyproject-fmt-check - name: pyproject-fmt check - entry: pyproject-fmt --check - language: system - types_or: [toml] - files: pyproject.toml - - - id: pyproject-fmt-fix - name: pyproject-fmt - entry: pyproject-fmt - language: system - types_or: [toml] - files: pyproject.toml - - - id: linkcheck - name: linkcheck - entry: make -C docs/ linkcheck SPHINXOPTS=-W - language: system - types_or: [rst] - stages: [manual] - pass_filenames: false - - - id: spelling - name: spelling - entry: make -C docs/ spelling SPHINXOPTS=-W - language: system - types_or: [rst] - stages: [manual] - pass_filenames: false - - - id: docs - name: Build Documentation - entry: make docs - language: system - stages: [manual] - pass_filenames: false - - - id: pyright-verifytypes - name: pyright-verifytypes - stages: [push] - entry: python -m pyright --verifytypes vws - language: system - pass_filenames: false - types_or: [python] +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-toml + - id: check-vcs-permalinks + - id: check-yaml + - id: end-of-file-fixer + - id: file-contents-sorter + files: spelling_private_dict\.txt$ + - id: trailing-whitespace +- repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + args: ["--shell", "bash"] +- repo: local + hooks: + - id: actionlint + name: actionlint + entry: actionlint + language: system + pass_filenames: false + types_or: [yaml] + + - id: mypy + name: mypy + stages: [push] + entry: python -m mypy . + language: system + types_or: [python, toml] + pass_filenames: false + + - id: mypy-docs + name: mypy-docs + stages: [push] + entry: doccmd --language=python --command="mypy" + language: system + types_or: [markdown, rst, python, toml] + + - id: check-manifest + name: check-manifest + stages: [push] + entry: python -m check_manifest . + language: system + pass_filenames: false + + - id: pyright + name: pyright + stages: [push] + entry: python -m pyright . + language: system + types_or: [python, toml] + pass_filenames: false + + - id: pyright-docs + name: pyright-docs + stages: [push] + entry: doccmd --language=python --command="pyright" + language: system + types_or: [markdown, rst, python, toml] + + - id: vulture + name: vulture + entry: python -m vulture --min-confidence 100 --exclude .eggs + language: system + types_or: [python] + + - id: pyroma + name: pyroma + entry: python -m pyroma --min 10 . + language: system + pass_filenames: false + types_or: [toml] + + - id: deptry + name: deptry + entry: python -m deptry src/ + language: system + pass_filenames: false + + - id: pylint + name: pylint + entry: python -m pylint *.py src/ tests/ docs/ + language: system + stages: [manual] + pass_filenames: false + + - id: pylint-docs + name: pylint-docs + entry: doccmd --language=python --command="pylint" + language: system + stages: [manual] + types_or: [markdown, rst, python, toml] + + - id: ruff-check + name: Ruff check + entry: python -m ruff check + language: system + types_or: [python] + + - id: ruff-check-docs + name: Ruff check docs + entry: doccmd --language=python --command="ruff check" + language: system + types_or: [markdown, rst] + + - id: ruff-format-diff + name: Ruff format diff + entry: python -m ruff format --diff + language: system + types_or: [python] + + - id: ruff-format-diff-docs + name: Ruff format diff docs + entry: doccmd --language=python --no-pad-file --command="ruff format --diff" + language: system + types_or: [markdown, rst] + + - id: ruff-check-fix + name: Ruff check fix + entry: python -m ruff check --fix + language: system + types_or: [python] + + - id: ruff-check-fix-docs + name: Ruff check fix docs + entry: doccmd --language=python --command="ruff check --fix" + language: system + types_or: [markdown, rst] + + - id: ruff-format-fix + name: Ruff format + entry: python -m ruff format + language: system + types_or: [python] + + - id: ruff-format-fix-docs + name: Ruff format docs + entry: doccmd --language=python --no-pad-file --command="ruff format" + language: system + types_or: [markdown, rst] + + - id: doc8 + name: doc8 + entry: python -m doc8 + language: system + types_or: [rst] + + - id: interrogate + name: interrogate + entry: python -m interrogate + language: system + types_or: [python] + + - id: interrogate-docs + name: interrogate docs + entry: doccmd --language=python --command="interrogate" + language: system + types_or: [markdown, rst] + + - id: pyproject-fmt-check + name: pyproject-fmt check + entry: pyproject-fmt --check + language: system + types_or: [toml] + files: pyproject.toml + + - id: pyproject-fmt-fix + name: pyproject-fmt + entry: pyproject-fmt + language: system + types_or: [toml] + files: pyproject.toml + + - id: linkcheck + name: linkcheck + entry: make -C docs/ linkcheck SPHINXOPTS=-W + language: system + types_or: [rst] + stages: [manual] + pass_filenames: false + + - id: spelling + name: spelling + entry: make -C docs/ spelling SPHINXOPTS=-W + language: system + types_or: [rst] + stages: [manual] + pass_filenames: false + + - id: docs + name: Build Documentation + entry: make docs + language: system + stages: [manual] + pass_filenames: false + + - id: pyright-verifytypes + name: pyright-verifytypes + stages: [push] + entry: python -m pyright --verifytypes vws + language: system + pass_filenames: false + types_or: [python] From 0160f2952192d3cc6fd9d9080fc3d0b482c66b46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:20:04 +0000 Subject: [PATCH 0677/1638] Bump sybil from 7.0.0 to 7.1.0 Bumps [sybil](https://github.com/simplistix/sybil) from 7.0.0 to 7.1.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/7.0.0...7.1.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e15800730..5a967212c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", - "sybil==7.0.0", + "sybil==7.1.0", "types-requests==2.32.0.20240907", "vulture==2.11", "vws-python-mock==2024.8.30", From b4203687eb9b50f014f1594863a66bef3a5b3796 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:24:58 +0000 Subject: [PATCH 0678/1638] Bump types-requests from 2.32.0.20240907 to 2.32.0.20240914 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240907 to 2.32.0.20240914. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5a967212c..e2c71fd57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==7.1.0", - "types-requests==2.32.0.20240907", + "types-requests==2.32.0.20240914", "vulture==2.11", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", From 60f5560d362dbccee065a09d0b6b70010de8d9eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:29:59 +0000 Subject: [PATCH 0679/1638] Bump ruff from 0.6.4 to 0.6.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.4 to 0.6.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.4...0.6.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2c71fd57..e11295038 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.4", + "ruff==0.6.5", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From b8c7a1bcc7a673fb1c5f0efce23608fbd096340f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:41:55 +0000 Subject: [PATCH 0680/1638] Bump doccmd from 2024.9.14.5 to 2024.9.16 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.14.5 to 2024.9.16. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.14.5...2024.09.16) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e11295038..e148e17b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.14.5", + "doccmd==2024.9.16", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 2bb033d5e3a271eb1e1bfacc14d55bcdd3ec74d2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 16 Sep 2024 22:39:04 +0100 Subject: [PATCH 0681/1638] Remove pre-commit hooks for which we have a duplicate with an auto-fix --- .pre-commit-config.yaml | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 36a8ffb12..ddda103be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,18 +18,13 @@ ci: - mypy - mypy-docs - pylint - - pyproject-fmt-check - pyproject-fmt-fix - pyright - pyright-docs - pyright-verifytypes - pyroma - - ruff-check - - ruff-check-docs - ruff-check-fix - ruff-check-fix-docs - - ruff-format-diff - - ruff-format-diff-docs - ruff-format-fix - ruff-format-fix-docs - spelling @@ -137,30 +132,6 @@ repos: stages: [manual] types_or: [markdown, rst, python, toml] - - id: ruff-check - name: Ruff check - entry: python -m ruff check - language: system - types_or: [python] - - - id: ruff-check-docs - name: Ruff check docs - entry: doccmd --language=python --command="ruff check" - language: system - types_or: [markdown, rst] - - - id: ruff-format-diff - name: Ruff format diff - entry: python -m ruff format --diff - language: system - types_or: [python] - - - id: ruff-format-diff-docs - name: Ruff format diff docs - entry: doccmd --language=python --no-pad-file --command="ruff format --diff" - language: system - types_or: [markdown, rst] - - id: ruff-check-fix name: Ruff check fix entry: python -m ruff check --fix @@ -203,13 +174,6 @@ repos: language: system types_or: [markdown, rst] - - id: pyproject-fmt-check - name: pyproject-fmt check - entry: pyproject-fmt --check - language: system - types_or: [toml] - files: pyproject.toml - - id: pyproject-fmt-fix name: pyproject-fmt entry: pyproject-fmt From ccd56a3b38cfc9cc08e05856252b619d5d3738bf Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 16 Sep 2024 23:59:37 +0100 Subject: [PATCH 0682/1638] Add shellcheck-py so that GitHub workflow files get linted for shell issues --- .gitignore | 2 ++ pyproject.toml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index ec1645423..0a4d3ec0c 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,5 @@ secrets.tar # setuptools_scm src/*/_setuptools_scm_version.txt + +uv.lock diff --git a/pyproject.toml b/pyproject.toml index e148e17b2..2546fbd92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,10 @@ optional-dependencies.dev = [ "pytest-cov==5.0.0", "pyyaml==6.0.2", "ruff==0.6.5", + # We add shellcheck-py not only for shell scripts and shell code blocks, + # but also because having it installed means that ``actionlint-py`` will + # use it to lint shell commands in GitHub workflow files. + "shellcheck-py==0.10.0.1", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From f026fbc245c1e9ea592cdd786fc95ffc47ab87b3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 10:44:07 +0100 Subject: [PATCH 0683/1638] Remove no-longer-needed handling of .eggs directory in Vulture --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ddda103be..b158d66eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -101,7 +101,7 @@ repos: - id: vulture name: vulture - entry: python -m vulture --min-confidence 100 --exclude .eggs + entry: python -m vulture --min-confidence 100 language: system types_or: [python] From f5d9ed6423bfe7ab7317733feb6aadb2b21ad52a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 10:58:07 +0100 Subject: [PATCH 0684/1638] Remove requirement to have 100% confidence that code is dead to report it --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b158d66eb..a8fa23a33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -101,7 +101,7 @@ repos: - id: vulture name: vulture - entry: python -m vulture --min-confidence 100 + entry: python -m vulture language: system types_or: [python] From 81aee0888a923cc34f8c3abd03a1dd84cb984e5d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 11:48:27 +0100 Subject: [PATCH 0685/1638] Progress towards satisfying vulture --- .pre-commit-config.yaml | 3 ++- conftest.py | 8 ++++---- docs/source/conf.py | 7 +------ pyproject.toml | 42 +++++++++++++++++++++++++++++++++++++++++ tests/conftest.py | 2 +- 5 files changed, 50 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8fa23a33..d5ebb2c33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -101,9 +101,10 @@ repos: - id: vulture name: vulture - entry: python -m vulture + entry: python -m vulture . language: system types_or: [python] + pass_filenames: false - id: pyroma name: pyroma diff --git a/conftest.py b/conftest.py index 059fd0968..02f059890 100644 --- a/conftest.py +++ b/conftest.py @@ -26,8 +26,8 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: item.obj = beartype(obj=item.obj) -@pytest.fixture -def make_image_file( +@pytest.fixture(name="make_image_file") +def fixture_make_image_file( high_quality_image: io.BytesIO, ) -> Generator[None, None, None]: """ @@ -41,8 +41,8 @@ def make_image_file( new_image.unlink() -@pytest.fixture -def mock_vws() -> Generator[None, None, None]: +@pytest.fixture(name="mock_vws") +def fixture_mock_vws() -> Generator[None, None, None]: """ Yield a mock VWS. diff --git a/docs/source/conf.py b/docs/source/conf.py index c18eb170d..5e3a67830 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -62,12 +62,7 @@ "python": ("https://docs.python.org/3.12", None), } nitpicky = True -nitpick_ignore = ( - ("py:class", "BytesIO"), - ("py:class", "BufferedRandom"), - ("py:class", "_io.BytesIO"), - ("py:class", "_io.BufferedRandom"), -) +nitpick_ignore = (("py:class", "_io.BytesIO"),) warning_is_error = True autoclass_content = "both" diff --git a/pyproject.toml b/pyproject.toml index 2546fbd92..4fc745002 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -342,3 +342,45 @@ ignore_path = [ "./src/*.egg-info/", "./src/*/_setuptools_scm_version.txt", ] + +[tool.vulture] +# Ideally we would limit the paths to the source code where we want to ignore names, +# but Vulture does not enable this. +ignore_names = [ + # pytest configuration + "pytest_collect_file", + "pytest_collection_modifyitems", + "pytest_plugins", + # pytest fixtures - we name fixtures like this for this purpose + "fixture_*", + # Sphinx + "autoclass_content", + "autoclass_content", + "autodoc_member_order", + "copybutton_exclude", + "extensions", + "html_show_copyright", + "html_show_sourcelink", + "html_show_sphinx", + "html_theme", + "html_theme_options", + "html_title", + "htmlhelp_basename", + "intersphinx_mapping", + "language", + "linkcheck_ignore", + "linkcheck_retries", + "master_doc", + "nitpicky", + "nitpick_ignore", + "project_copyright", + "pygments_style", + "rst_prolog", + "source_suffix", + "spelling_word_list_filename", + "templates_path", + "warning_is_error", +] + +# Duplicate some of .gitignore +exclude = [".venv"] diff --git a/tests/conftest.py b/tests/conftest.py index 0ec595e31..6c927cbed 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,7 +15,7 @@ @pytest.fixture(name="_mock_database") -def mock_database() -> Generator[VuforiaDatabase, None, None]: +def fixture_mock_database() -> Generator[VuforiaDatabase, None, None]: """ Yield a mock ``VuforiaDatabase``. """ From ddbb36edb0fb34a3d16b2bc99f2470c826384e5c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 11:48:55 +0100 Subject: [PATCH 0686/1638] Progress towards satisfying vulture --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6c927cbed..d1b122f15 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -49,7 +49,7 @@ def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: @pytest.fixture(name="image_file", params=["r+b", "rb"]) -def image_file_fixture( +def fixture_image_file( high_quality_image: io.BytesIO, tmp_path: Path, request: pytest.FixtureRequest, From b1d36ab5ff3c75fce4519f2fd18cec59fbcf8a71 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 11:53:04 +0100 Subject: [PATCH 0687/1638] Progress towards satisfying vulture --- tests/test_vws.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_vws.py b/tests/test_vws.py index c5761b78a..88bcc17c5 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -248,6 +248,24 @@ def test_get_target(vws_client: VWS) -> None: target_quota=1000, total_recos=0, ) + + assert report.active_images == expected_report.active_images + assert ( + report.current_month_recos == expected_report.current_month_recos + ) + assert report.failed_images == expected_report.failed_images + assert report.inactive_images == expected_report.inactive_images + assert report.name == expected_report.name + assert ( + report.previous_month_recos == expected_report.previous_month_recos + ) + assert report.processing_images == expected_report.processing_images + assert report.reco_threshold == expected_report.reco_threshold + assert report.request_quota == expected_report.request_quota + assert report.request_usage == expected_report.request_usage + assert report.target_quota == expected_report.target_quota + assert report.total_recos == expected_report.total_recos + assert report == expected_report From 4fdf2687eec6a9b830bc6175e2a1940afaa98481 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 11:58:25 +0100 Subject: [PATCH 0688/1638] Progress towards satisfying vulture --- tests/test_vws.py | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/tests/test_vws.py b/tests/test_vws.py index 88bcc17c5..158ad9064 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -206,20 +206,35 @@ def test_get_target_summary_report( application_metadata=None, ) - result = vws_client.get_target_summary_report(target_id=target_id) + report = vws_client.get_target_summary_report(target_id=target_id) expected_report = TargetSummaryReport( status=TargetStatuses.SUCCESS, - database_name=result.database_name, + database_name=report.database_name, target_name=target_name, upload_date=datetime.date(2018, 4, 25), active_flag=True, - tracking_rating=result.tracking_rating, + tracking_rating=report.tracking_rating, total_recos=0, current_month_recos=0, previous_month_recos=0, ) - assert result == expected_report + + assert report.status == expected_report.status + assert report.database_name == expected_report.database_name + assert report.target_name == expected_report.target_name + assert report.upload_date == expected_report.upload_date + assert report.active_flag == expected_report.active_flag + assert report.tracking_rating == expected_report.tracking_rating + assert report.total_recos == expected_report.total_recos + assert ( + report.current_month_recos == expected_report.current_month_recos + ) + assert ( + report.previous_month_recos == expected_report.previous_month_recos + ) + + assert report == expected_report class TestGetDatabaseSummaryReport: @@ -301,6 +316,25 @@ def test_get_target_record( ) assert result.target_record == expected_target_record + + assert ( + result.target_record.target_id == expected_target_record.target_id + ) + assert ( + result.target_record.active_flag + == expected_target_record.active_flag + ) + assert result.target_record.name == expected_target_record.name + assert result.target_record.width == expected_target_record.width + assert ( + result.target_record.tracking_rating + == expected_target_record.tracking_rating + ) + assert ( + result.target_record.reco_rating + == expected_target_record.reco_rating + ) + assert result.status == TargetStatuses.PROCESSING From 4f79d4785a842ede11e5246285dedf0ae809c4ca Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Sep 2024 12:06:12 +0100 Subject: [PATCH 0689/1638] Test TargetStatuses FAILED --- tests/test_cloud_reco_exceptions.py | 6 +++++- tests/test_vws.py | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 5c0a89cd2..d33da8e72 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -116,4 +116,8 @@ def test_inactive_project( with pytest.raises(InactiveProjectError) as exc: cloud_reco_client.query(image=high_quality_image) - assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + response = exc.value.response + assert response.status_code == HTTPStatus.FORBIDDEN + # We need one test which checks tell position + # and so we choose this one almost at random. + assert response.tell_position != 0 diff --git a/tests/test_vws.py b/tests/test_vws.py index 158ad9064..42fdee45a 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -337,6 +337,27 @@ def test_get_target_record( assert result.status == TargetStatuses.PROCESSING + @staticmethod + def test_get_failed( + vws_client: VWS, + image_file_failed_state: io.BytesIO, + ) -> None: + """ + Check that the report works with a failed target. + """ + target_id = vws_client.add_target( + name="x", + width=1, + image=image_file_failed_state, + active_flag=True, + application_metadata=None, + ) + + vws_client.wait_for_target_processed(target_id=target_id) + result = vws_client.get_target_record(target_id=target_id) + + assert result.status == TargetStatuses.FAILED + class TestWaitForTargetProcessed: """ From 080ee97a4be2f26eb9afff8a847f29ae75ebd023 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:07:47 +0000 Subject: [PATCH 0690/1638] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4fc745002..ae5fea28c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -383,4 +383,4 @@ ignore_names = [ ] # Duplicate some of .gitignore -exclude = [".venv"] +exclude = [ ".venv" ] From 53fbdd4c990ea45beba65674f768226ebaa90f92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:12:41 +0000 Subject: [PATCH 0691/1638] Bump sybil from 7.1.0 to 7.1.1 Bumps [sybil](https://github.com/simplistix/sybil) from 7.1.0 to 7.1.1. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/7.1.0...7.1.1) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ae5fea28c..e5468bfed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", - "sybil==7.1.0", + "sybil==7.1.1", "types-requests==2.32.0.20240914", "vulture==2.11", "vws-python-mock==2024.8.30", From e36d374f3ba05951c08cddc6526d9975cf3fe83e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 18 Sep 2024 04:04:01 +0100 Subject: [PATCH 0692/1638] Use vulture on docs --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d5ebb2c33..c7f3f0074 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,7 @@ ci: - ruff-format-fix-docs - spelling - vulture + - vulture-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: @@ -106,6 +107,12 @@ repos: types_or: [python] pass_filenames: false + - id: vulture-docs + name: vulture docs + entry: doccmd --language=python --command="vulture" + language: system + types_or: [markdown, rst] + - id: pyroma name: pyroma entry: python -m pyroma --min 10 . From 2d855358b9ed83913a4ab56d379a122e6d917343 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:56:47 +0000 Subject: [PATCH 0693/1638] Bump vulture from 2.11 to 2.12 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.11 to 2.12. - [Release notes](https://github.com/jendrikseipp/vulture/releases) - [Changelog](https://github.com/jendrikseipp/vulture/blob/main/CHANGELOG.md) - [Commits](https://github.com/jendrikseipp/vulture/compare/v2.11...v2.12) --- updated-dependencies: - dependency-name: vulture dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5468bfed..8c412194a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinxcontrib-spelling==8", "sybil==7.1.1", "types-requests==2.32.0.20240914", - "vulture==2.11", + "vulture==2.12", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] From af827ff3fc3f198603e21d67d1a61f44467b3564 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:57:03 +0000 Subject: [PATCH 0694/1638] Bump pyproject-fmt from 2.2.3 to 2.2.4 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.2.3 to 2.2.4. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.2.3...2.2.4) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5468bfed..00e73cb38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.2.7", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.2.3", + "pyproject-fmt==2.2.4", "pyright==1.1.380", "pyroma==4.2", "pytest==8.3.3", From 0baad7ed36baa543d4feaffe7395c5bf6aff378f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:25:02 +0000 Subject: [PATCH 0695/1638] Bump pyright from 1.1.380 to 1.1.381 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.380 to 1.1.381. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.380...v1.1.381) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 654058d64..14f498296 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.2.7", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.380", + "pyright==1.1.381", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 033daadb512e6b59312852ef592e2e09fcc92d91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:33:21 +0000 Subject: [PATCH 0696/1638] Bump doccmd from 2024.9.16 to 2024.9.18 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.16 to 2024.9.18. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.16...2024.09.18) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 14f498296..a75a7f9e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.16", + "doccmd==2024.9.18", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 8111a3880cb4b911c89b58cf425c3c0dea3cdeaa Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Sep 2024 08:29:07 +0100 Subject: [PATCH 0697/1638] Simplify release script by removing unnecessary intermediary variables --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64761eefa..faf2c7d2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,11 +47,9 @@ jobs: - name: "Update changelog" uses: jacobtomlinson/gha-find-replace@v3 - env: - NEXT_VERSION: ${{ steps.calver.outputs.release }} with: find: "Next\n----" - replace: "Next\n----\n\n${{ env.NEXT_VERSION }}\n------------" + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n------------" include: "CHANGELOG.rst" regex: false From a1c87b57b0df55f8576e0cbf8f6e3b155675a6b7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Sep 2024 08:48:25 +0100 Subject: [PATCH 0698/1638] Simplify release script by removing unnecessary git fetch tags command --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index faf2c7d2e..5c0cd1771 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,8 +78,7 @@ jobs: - name: Build a binary wheel and a source tarball run: | # Checkout the latest tag - the one we just created. - git fetch --tags - git checkout "$(git describe --tags "$(git rev-list --tags --max-count=1)")" + git checkout ${{ steps.tag_version.outputs.new_tag }} python -m pip install build check-wheel-contents python -m build --sdist --wheel --outdir dist/ . check-wheel-contents dist/*.whl From af6cfb79557e78d154fab0c68913561086ef4783 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Sep 2024 09:01:40 +0100 Subject: [PATCH 0699/1638] Add back required part of the command --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c0cd1771..a24d5daff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,6 +78,7 @@ jobs: - name: Build a binary wheel and a source tarball run: | # Checkout the latest tag - the one we just created. + git fetch --tags git checkout ${{ steps.tag_version.outputs.new_tag }} python -m pip install build check-wheel-contents python -m build --sdist --wheel --outdir dist/ . From e9d5f41cc01ddb7078893aefaf38e40d0ed38807 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:44:58 +0000 Subject: [PATCH 0700/1638] Bump doccmd from 2024.9.18 to 2024.9.19.3 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.18 to 2024.9.19.3. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.18...2024.09.19.3) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a75a7f9e7..5a2984164 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.18", + "doccmd==2024.9.19.3", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From d5d07fd13aedf30f2c918f2fd09deb8ef01dc778 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:49:10 +0000 Subject: [PATCH 0701/1638] Bump ruff from 0.6.5 to 0.6.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.5 to 0.6.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.5...0.6.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5a2984164..5082934bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.5", + "ruff==0.6.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 121a925697d930011297444edb392dbe6c3c741b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:53:48 +0000 Subject: [PATCH 0702/1638] Bump sybil from 7.1.1 to 8.0.0 Bumps [sybil](https://github.com/simplistix/sybil) from 7.1.1 to 8.0.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/7.1.1...8.0.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5082934bc..27e70ed6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", - "sybil==7.1.1", + "sybil==8.0.0", "types-requests==2.32.0.20240914", "vulture==2.12", "vws-python-mock==2024.8.30", From 156f46f7c678b469607524d80dbd8dcd4614c455 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 20 Sep 2024 21:13:33 +0100 Subject: [PATCH 0703/1638] Remove lint ignores - do not allow hardcoded secrets in documentation --- README.rst | 9 +++++---- conftest.py | 23 ++++++++++++++++++----- docs/source/index.rst | 9 +++++---- pyproject.toml | 10 ---------- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/README.rst b/README.rst index ffccbc916..ce352e4e5 100644 --- a/README.rst +++ b/README.rst @@ -24,15 +24,16 @@ Getting Started """Add a target to VWS and then query it.""" + import os import pathlib import uuid from vws import VWS, CloudRecoService - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" + server_access_key = os.environ["VWS_SERVER_ACCESS_KEY"] + server_secret_key = os.environ["VWS_SERVER_SECRET_KEY"] + client_access_key = os.environ["VWS_CLIENT_ACCESS_KEY"] + client_secret_key = os.environ["VWS_CLIENT_SECRET_KEY"] vws_client = VWS( server_access_key=server_access_key, diff --git a/conftest.py b/conftest.py index 02f059890..691dcbe0e 100644 --- a/conftest.py +++ b/conftest.py @@ -1,6 +1,7 @@ """Setup for Sybil.""" import io +import uuid from collections.abc import Generator from doctest import ELLIPSIS from pathlib import Path @@ -42,18 +43,30 @@ def fixture_make_image_file( @pytest.fixture(name="mock_vws") -def fixture_mock_vws() -> Generator[None, None, None]: +def fixture_mock_vws( + monkeypatch: pytest.MonkeyPatch, +) -> Generator[None, None, None]: """ Yield a mock VWS. The keys used here match the keys in the documentation. """ + server_access_key = uuid.uuid4().hex + server_secret_key = uuid.uuid4().hex + client_access_key = uuid.uuid4().hex + client_secret_key = uuid.uuid4().hex + database = VuforiaDatabase( - server_access_key="[server-access-key]", - server_secret_key="[server-secret-key]", - client_access_key="[client-access-key]", - client_secret_key="[client-secret-key]", + server_access_key=server_access_key, + server_secret_key=server_secret_key, + client_access_key=client_access_key, + client_secret_key=client_secret_key, ) + + monkeypatch.setenv(name="VWS_SERVER_ACCESS_KEY", value=server_access_key) + monkeypatch.setenv(name="VWS_SERVER_SECRET_KEY", value=server_secret_key) + monkeypatch.setenv(name="VWS_CLIENT_ACCESS_KEY", value=client_access_key) + monkeypatch.setenv(name="VWS_CLIENT_SECRET_KEY", value=client_secret_key) # We use a low processing time so that tests run quickly. with MockVWS(processing_time_seconds=0.2) as mock: mock.add_database(database=database) diff --git a/docs/source/index.rst b/docs/source/index.rst index fe1ee9a9e..fe0f8584a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -20,15 +20,16 @@ See the :doc:`api-reference` for full usage details. """Add a target to VWS and then query it.""" + import os import pathlib import uuid from vws import VWS, CloudRecoService - server_access_key = "[server-access-key]" - server_secret_key = "[server-secret-key]" - client_access_key = "[client-access-key]" - client_secret_key = "[client-secret-key]" + server_access_key = os.environ["VWS_SERVER_ACCESS_KEY"] + server_secret_key = os.environ["VWS_SERVER_SECRET_KEY"] + client_access_key = os.environ["VWS_CLIENT_ACCESS_KEY"] + client_secret_key = os.environ["VWS_CLIENT_SECRET_KEY"] vws_client = VWS( server_access_key=server_access_key, diff --git a/pyproject.toml b/pyproject.toml index 27e70ed6c..71ab39eee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,16 +123,6 @@ lint.ignore = [ "S101", ] -lint.per-file-ignores."conftest.py" = [ - # Allow hardcoded secrets in tests. - "S106", -] - -lint.per-file-ignores."doccmd_*.py" = [ - # Allow hardcoded secrets in documentation. - "S105", -] - lint.per-file-ignores."tests/*.py" = [ # Do not require tests to have a one-line summary. "D205", From ce03744bd22e28dbf74c59e98317847de67f8881 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Sep 2024 00:23:42 +0100 Subject: [PATCH 0704/1638] Bump version of Python mentioned in docs --- docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index fe0f8584a..661814708 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -8,7 +8,7 @@ Installation $ pip install vws-python -This is tested on Python 3.8+. +This is tested on Python 3.12+. Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. Usage From bdf672a8260d4c87480c1c5a3386aabbd072b1e6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Sep 2024 09:52:44 +0100 Subject: [PATCH 0705/1638] Test shell snippets in documentation code blocks --- .pre-commit-config.yaml | 18 +++++++++++++----- docs/source/release-process.rst | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7f3f0074..1b9f9b56b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,11 +49,6 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace -- repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 - hooks: - - id: shellcheck - args: ["--shell", "bash"] - repo: local hooks: - id: actionlint @@ -63,6 +58,19 @@ repos: pass_filenames: false types_or: [yaml] + - id: shellcheck + name: shellcheck + entry: shellcheck --shell bash + language: system + pass_filenames: false + types_or: [shell] + + - id: shellcheck-docs + name: shellcheck-docs + entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash" + language: system + types_or: [markdown, rst] + - id: mypy name: mypy stages: [push] diff --git a/docs/source/release-process.rst b/docs/source/release-process.rst index 0c662f553..db1744feb 100644 --- a/docs/source/release-process.rst +++ b/docs/source/release-process.rst @@ -17,6 +17,6 @@ Perform a Release .. code-block:: console :substitutions: - $ gh workflow run release.yml --repo |github-owner|/|github-repository| + $ gh workflow run release.yml --repo "|github-owner|/|github-repository|" .. _Install GitHub CLI: https://cli.github.com/ From a78c28a5afc14a76e2a3e09cee1ac8296ac7f519 Mon Sep 17 00:00:00 2001 From: adamtheturtle Date: Sat, 21 Sep 2024 08:53:13 +0000 Subject: [PATCH 0706/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2eb9d9a05..b18bc5e4f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2024.09.21 +------------ + 2024.09.04.1 ------------ From 7101f9eeb6d3da63383e98fc7b1ee46394e8f705 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Sep 2024 09:53:40 +0100 Subject: [PATCH 0707/1638] Do not run new hooks on pre-commit CI --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b9f9b56b..f71de6b92 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,8 @@ ci: - spelling - vulture - vulture-docs + - shellcheck + - shellcheck-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: From b7a2e47860753f6f05ca5a73d8ac6a9284e06b4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:12:41 +0000 Subject: [PATCH 0708/1638] Bump ruff from 0.6.6 to 0.6.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.6 to 0.6.7. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.6...0.6.7) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 71ab39eee..4e70acc0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.6", + "ruff==0.6.7", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From c05549a18d3c0710420dd17bbda917890878e95e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:17:33 +0000 Subject: [PATCH 0709/1638] Bump pylint from 3.2.7 to 3.3.0 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.7 to 3.3.0. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.7...v3.3.0) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4e70acc0d..8f50326bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.2.7", + "pylint==3.3.0", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", "pyright==1.1.381", From cd819da5a467a4f8272f51d16aec2cfa9e81d354 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:17:33 +0000 Subject: [PATCH 0710/1638] Bump doccmd from 2024.9.19.3 to 2024.9.21 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.19.3 to 2024.9.21. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.19.3...2024.09.21) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4e70acc0d..29c20d514 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.19.3", + "doccmd==2024.9.21", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 4616984c0b063cc6a7fc3273be3bee0ee1a9605d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Sep 2024 11:26:05 +0100 Subject: [PATCH 0711/1638] Satisfy pylint --- conftest.py | 4 ++-- docs/source/conf.py | 2 -- src/vws/vws.py | 1 + tests/conftest.py | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/conftest.py b/conftest.py index 691dcbe0e..05d6727f2 100644 --- a/conftest.py +++ b/conftest.py @@ -30,7 +30,7 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @pytest.fixture(name="make_image_file") def fixture_make_image_file( high_quality_image: io.BytesIO, -) -> Generator[None, None, None]: +) -> Generator[None]: """ Make an image file available in the test directory. The path of this file matches the path in the documentation. @@ -45,7 +45,7 @@ def fixture_make_image_file( @pytest.fixture(name="mock_vws") def fixture_mock_vws( monkeypatch: pytest.MonkeyPatch, -) -> Generator[None, None, None]: +) -> Generator[None]: """ Yield a mock VWS. diff --git a/docs/source/conf.py b/docs/source/conf.py index 5e3a67830..9c88cea7d 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,8 +3,6 @@ Configuration for Sphinx. """ -# pylint: disable=invalid-name - import datetime import importlib.metadata diff --git a/src/vws/vws.py b/src/vws/vws.py index 185af1178..9e40655d2 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -633,6 +633,7 @@ def get_duplicate_targets(self, target_id: str) -> list[str]: def update_target( self, + *, target_id: str, name: str | None = None, width: float | None = None, diff --git a/tests/conftest.py b/tests/conftest.py index d1b122f15..ed50f2e7b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,7 +15,7 @@ @pytest.fixture(name="_mock_database") -def fixture_mock_database() -> Generator[VuforiaDatabase, None, None]: +def fixture_mock_database() -> Generator[VuforiaDatabase]: """ Yield a mock ``VuforiaDatabase``. """ @@ -53,7 +53,7 @@ def fixture_image_file( high_quality_image: io.BytesIO, tmp_path: Path, request: pytest.FixtureRequest, -) -> Generator[BinaryIO, None, None]: +) -> Generator[BinaryIO]: """An image file object.""" file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() From 2ce2199b0fd0895456ff5b48ab4ec0dbacea15b6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Sep 2024 21:40:31 +0100 Subject: [PATCH 0712/1638] Add check-json and meta pre-commit hooks --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f71de6b92..621e643b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,9 @@ ci: default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: +- repo: meta + hooks: + - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: @@ -44,6 +47,7 @@ repos: - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: check-symlinks + - id: check-json - id: check-toml - id: check-vcs-permalinks - id: check-yaml From c4f2e11613cf08fa7b358689d533b8172b7fd7a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:19:18 +0000 Subject: [PATCH 0713/1638] Bump doccmd from 2024.9.21 to 2024.9.23 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.21 to 2024.9.23. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.21...2024.09.23) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0533d97b..82bb8c825 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.21", + "doccmd==2024.9.23", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 7a1fbd9fd4af7170c6c170656591b72cf0c58bfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:24:41 +0000 Subject: [PATCH 0714/1638] Bump actionlint-py from 1.7.1.15 to 1.7.2.16 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.1.15 to 1.7.2.16. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.1.15...v1.7.2.16) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 82bb8c825..c65ef4771 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools", ] optional-dependencies.dev = [ - "actionlint-py==1.7.1.15", + "actionlint-py==1.7.2.16", "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", From 64ded7f8648a0e3237c6b73621b1cd36636760ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:18:41 +0000 Subject: [PATCH 0715/1638] Bump pylint from 3.3.0 to 3.3.1 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c65ef4771..757113f9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.2.2", "pygments==2.18.0", - "pylint==3.3.0", + "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", "pyright==1.1.381", From 3e13270c37feab6a6177a7981b192c05f6fa8651 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:24:23 +0000 Subject: [PATCH 0716/1638] Bump pyright from 1.1.381 to 1.1.382 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.381 to 1.1.382. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.381...v1.1.382) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 757113f9b..71dcd0270 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.381", + "pyright==1.1.382", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 9e7a7e3c988e9cf9cbd450875bd1894cef8801af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:30:31 +0000 Subject: [PATCH 0717/1638] Bump doccmd from 2024.9.23 to 2024.9.24 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.23 to 2024.9.24. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.23...2024.09.24) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 71dcd0270..e13d7b1ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.23", + "doccmd==2024.9.24", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 25cee00767dd5023f6fbdbffd2970d28f491b49a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Sep 2024 12:46:10 +0100 Subject: [PATCH 0718/1638] Update RTD build OS --- readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yaml b/readthedocs.yaml index 88e40e66a..d3bd4fd21 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -1,7 +1,7 @@ version: 2 build: - os: ubuntu-20.04 + os: ubuntu-24.04 tools: python: "3.12" From dfd4798d915586cf4d60270981f2d1a8835b236c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 26 Sep 2024 08:50:23 +0100 Subject: [PATCH 0719/1638] Remove ignores of deprecated ruff rules --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e13d7b1ad..c881eaf5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,8 +103,6 @@ lint.select = [ "ALL", ] lint.ignore = [ - # We do not annotate the type of 'self'. - "ANN101", # We are happy to manage our own "complexity". "C901", # Ruff warns that this conflicts with the formatter. From 8e8562436fb3e808c05a2cf633ce201b9e3320c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:14:35 +0000 Subject: [PATCH 0720/1638] Bump doccmd from 2024.9.24 to 2024.9.26 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.24 to 2024.9.26. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.24...2024.09.26) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c881eaf5a..b1d52d097 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.24", + "doccmd==2024.9.26", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 3a94c400228a2d6c64ce9f69ff7f68ffd3e5a09b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:21:46 +0000 Subject: [PATCH 0721/1638] Bump pyright from 1.1.382 to 1.1.382.post0 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.382 to 1.1.382.post0. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.382...v1.1.382.post0) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b1d52d097..e79e38925 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.382", + "pyright==1.1.382.post0", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From c3a52d1c883ba04815ca96e04ae210781986b496 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:42:03 +0000 Subject: [PATCH 0722/1638] Bump ruff from 0.6.7 to 0.6.8 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.7 to 0.6.8. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.7...0.6.8) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e79e38925..0680b1e1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.7", + "ruff==0.6.8", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 5607425d89fb79469fd2a582d937f097c29aa945 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 28 Sep 2024 12:27:26 +0100 Subject: [PATCH 0723/1638] Make it possible create sets of our custom types --- src/vws/reports.py | 12 ++++++------ src/vws/types.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vws/reports.py b/src/vws/reports.py index 3d157a783..431cfcaa6 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -10,7 +10,7 @@ @beartype -@dataclass +@dataclass(frozen=True) class DatabaseSummaryReport: """ A database summary report. @@ -47,7 +47,7 @@ class TargetStatuses(Enum): @beartype -@dataclass +@dataclass(frozen=True) class TargetSummaryReport: """ A target summary report. @@ -68,7 +68,7 @@ class TargetSummaryReport: @beartype(conf=BeartypeConf(is_pep484_tower=True)) -@dataclass +@dataclass(frozen=True) class TargetRecord: """ A target record. @@ -86,7 +86,7 @@ class TargetRecord: @beartype -@dataclass +@dataclass(frozen=True) class TargetData: """ The target data optionally included with a query match. @@ -98,7 +98,7 @@ class TargetData: @beartype -@dataclass +@dataclass(frozen=True) class QueryResult: """ One query match result. @@ -112,7 +112,7 @@ class QueryResult: @beartype -@dataclass +@dataclass(frozen=True) class TargetStatusAndRecord: """ The target status and a target record. diff --git a/src/vws/types.py b/src/vws/types.py index e6f59145a..22e912607 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -5,7 +5,7 @@ from beartype import beartype -@dataclass +@dataclass(frozen=True) @beartype class Response: """ From 05323e4c6d0ca6b1e34ed90dc46de3fb30014c3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:19:44 +0000 Subject: [PATCH 0724/1638] Bump doccmd from 2024.9.26 to 2024.9.27 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.26 to 2024.9.27. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.26...2024.09.27) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0680b1e1b..19b7ac353 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.26", + "doccmd==2024.9.27", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From fc7327548f72d495c3b72c3e32cafee14e83798d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:25:39 +0000 Subject: [PATCH 0725/1638] Bump pyright from 1.1.382.post0 to 1.1.382.post1 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.382.post0 to 1.1.382.post1. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.382.post0...v1.1.382.post1) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19b7ac353..35b86716b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.382.post0", + "pyright==1.1.382.post1", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 262376afbdf65344e92ffd4932b69775492318dd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 2 Oct 2024 10:51:34 +0100 Subject: [PATCH 0726/1638] Work out minimum Python version so that fewer replacements are needed when we bump the version --- README.rst | 3 ++- docs/source/conf.py | 13 ++++++++++++- docs/source/index.rst | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index ce352e4e5..730535169 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ Installation pip install vws-python -This is tested on Python 3.12+. Get in touch with +This is tested on Python |minimum-python-version|\+. Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. @@ -78,3 +78,4 @@ documentation `__. :target: https://badge.fury.io/py/VWS-Python .. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest :target: https://vws-python.readthedocs.io/en/latest/?badge=latest +.. |minimum-python-version| replace:: 3.12 diff --git a/docs/source/conf.py b/docs/source/conf.py index 9c88cea7d..6f96be9c4 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,6 +6,8 @@ import datetime import importlib.metadata +from packaging.specifiers import SpecifierSet + project = "VWS-Python" author = "Adam Dangoor" @@ -39,6 +41,14 @@ _month, _day, _year, *_ = version.split(".") release = f"{_month}.{_day}.{_year}" + +project_metadata = importlib.metadata.metadata(distribution_name=project) +requires_python = project_metadata["Requires-Python"] +specifiers = SpecifierSet(specifiers=requires_python) +(specifier,) = specifiers +assert specifier.operator == ">=" +minimum_python_version = specifier.version + language = "en" # The name of the syntax highlighting style to use. @@ -57,7 +67,7 @@ htmlhelp_basename = "VWSPYTHONdoc" autoclass_content = "init" intersphinx_mapping = { - "python": ("https://docs.python.org/3.12", None), + "python": (f"https://docs.python.org/{minimum_python_version}", None), } nitpicky = True nitpick_ignore = (("py:class", "_io.BytesIO"),) @@ -75,6 +85,7 @@ rst_prolog = f""" .. |project| replace:: {project} .. |release| replace:: {release} +.. |minimum-python-version| replace:: {minimum_python_version} .. |github-owner| replace:: VWS-Python .. |github-repository| replace:: vws-python """ diff --git a/docs/source/index.rst b/docs/source/index.rst index 661814708..3c89de779 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -8,7 +8,7 @@ Installation $ pip install vws-python -This is tested on Python 3.12+. +This is tested on Python |minimum-python-version|\+. Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language. Usage From fff2e20c8ab7151e735f9ef01be7438fe32c7fb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:46:33 +0000 Subject: [PATCH 0727/1638] Bump pyright from 1.1.382.post1 to 1.1.383 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.382.post1 to 1.1.383. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.382.post1...v1.1.383) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 35b86716b..76c134517 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.382.post1", + "pyright==1.1.383", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 44806d048401875a07fe5b014d9e34d3c9b908e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:25:23 +0000 Subject: [PATCH 0728/1638] Bump actionlint-py from 1.7.2.16 to 1.7.3.17 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.2.16 to 1.7.3.17. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.2.16...v1.7.3.17) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 76c134517..5eb8f84a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools", ] optional-dependencies.dev = [ - "actionlint-py==1.7.2.16", + "actionlint-py==1.7.3.17", "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", From f25a4b4f2b5661b676ed5cad6b3cb5950e7c2238 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:29:39 +0000 Subject: [PATCH 0729/1638] Bump vulture from 2.12 to 2.13 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.12 to 2.13. - [Release notes](https://github.com/jendrikseipp/vulture/releases) - [Changelog](https://github.com/jendrikseipp/vulture/blob/main/CHANGELOG.md) - [Commits](https://github.com/jendrikseipp/vulture/compare/v2.12...v2.13) --- updated-dependencies: - dependency-name: vulture dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5eb8f84a9..f5aa17b71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinxcontrib-spelling==8", "sybil==8.0.0", "types-requests==2.32.0.20240914", - "vulture==2.12", + "vulture==2.13", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] From e8462d53374bec0483c759802df3a4fc43768631 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 4 Oct 2024 23:40:08 +0100 Subject: [PATCH 0730/1638] Add shfmt to pre-commit --- .pre-commit-config.yaml | 15 +++++++++++++++ pyproject.toml | 1 + 2 files changed, 16 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 621e643b9..424fb2551 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,6 +32,8 @@ ci: - vulture-docs - shellcheck - shellcheck-docs + - shfmt + - shfmt-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: @@ -77,6 +79,19 @@ repos: language: system types_or: [markdown, rst] + - id: shfmt + name: shfmt + entry: shfmt --write + language: system + pass_filenames: false + types_or: [shell] + + - id: shfmt-docs + name: shfmt-docs + entry: doccmd --language=shell --language=console --no-pad-file --command="shfmt --write" + language: system + types_or: [markdown, rst] + - id: mypy name: mypy stages: [push] diff --git a/pyproject.toml b/pyproject.toml index f5aa17b71..72d010d30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ optional-dependencies.dev = [ # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", + "shfmt-py==3.7.0.1", "sphinx==8.0.2", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", From cb1a73994bcac505f7f570a42793649e84948410 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 5 Oct 2024 00:25:06 +0100 Subject: [PATCH 0731/1638] Update shfmt command to work on more inputs --- .pre-commit-config.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 424fb2551..df7c059cb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -81,14 +81,13 @@ repos: - id: shfmt name: shfmt - entry: shfmt --write + entry: shfmt --write --space-redirects --indent=4 language: system - pass_filenames: false types_or: [shell] - id: shfmt-docs name: shfmt-docs - entry: doccmd --language=shell --language=console --no-pad-file --command="shfmt --write" + entry: doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: system types_or: [markdown, rst] From 63e5cbd755ec88ac0880d9ef06076b65ff00ca64 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:05:58 +0100 Subject: [PATCH 0732/1638] Start using uv for Python in CI --- .github/workflows/ci.yml | 19 +++++++++++-------- .github/workflows/release.yml | 1 + .github/workflows/windows-ci.yml | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f424e7a3..855fc0b6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,28 +24,31 @@ jobs: steps: - uses: actions/checkout@v4 - - name: "Set up Python" - uses: actions/setup-python@v5 + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v3 with: - python-version: ${{ matrix.python-version }} + enable-cache: true + + - name: Install Python 3.12 + run: uv python install ${{ matrix.python-version }} # We do not use the cache action as uv is faster than the cache action. - name: "Install dependencies" run: | - curl -LsSf https://astral.sh/uv/install.sh | sh uv pip install --system --upgrade --editable .[dev] - name: "Lint" run: | - pre-commit run --all-files --hook-stage commit --verbose - pre-commit run --all-files --hook-stage push --verbose - pre-commit run --all-files --hook-stage manual --verbose + uv run --all-extras pre-commit run --all-files --hook-stage commit --verbose + uv run --all-extras pre-commit run --all-files --hook-stage push --verbose + uv run --all-extras pre-commit run --all-files --hook-stage manual --verbose - name: "Run tests" run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v4" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a24d5daff..a0f9e80f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches token: ${{ secrets.RELEASE_PAT }} + # TODO use UV here - name: "Set up Python" uses: actions/setup-python@v5 with: diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 16bf4706a..bb4fdb566 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -29,6 +29,7 @@ jobs: with: python-version: ${{ matrix.python-version }} + # TODO Here (or maybe get rid of this and use the ci yml?) # We do not use the cache action as uv is faster than the cache action. - name: "Install dependencies" run: | From 82795ca377a55defbfaf7d18082970800c7ce40f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:09:04 +0100 Subject: [PATCH 0733/1638] Disable cache for now --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 855fc0b6a..83aec1393 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,6 @@ jobs: - name: Install the latest version of uv uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - name: Install Python 3.12 run: uv python install ${{ matrix.python-version }} From 9b540e7c7712bf3b133dfd05deb8b5b626de9d9b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:09:25 +0100 Subject: [PATCH 0734/1638] Remove unnecessary setup --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83aec1393..e515c9de4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,11 +31,6 @@ jobs: - name: Install Python 3.12 run: uv python install ${{ matrix.python-version }} - # We do not use the cache action as uv is faster than the cache action. - - name: "Install dependencies" - run: | - uv pip install --system --upgrade --editable .[dev] - - name: "Lint" run: | uv run --all-extras pre-commit run --all-files --hook-stage commit --verbose From 36f8282322abd23d159e682238f246ae41c5db9f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:14:50 +0100 Subject: [PATCH 0735/1638] Remove duplicate Python version spec --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e515c9de4..19856ca36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Install the latest version of uv uses: astral-sh/setup-uv@v3 - - name: Install Python 3.12 + - name: Install Python run: uv python install ${{ matrix.python-version }} - name: "Lint" From e63a99a6e05d226a13ea4f988183ee5a5168f6de Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 13:59:47 +0100 Subject: [PATCH 0736/1638] Use uv in move CI places --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 17 ++++++++--------- .github/workflows/windows-ci.yml | 19 +++++++------------ 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19856ca36..ff6b3002b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,14 +18,14 @@ jobs: strategy: matrix: python-version: ["3.12"] - platform: [ubuntu-latest] + platform: ["ubuntu-latest", "windows-latest"] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 - - name: Install the latest version of uv + - name: Install uv uses: astral-sh/setup-uv@v3 - name: Install Python diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0f9e80f5..b7eae4b80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,11 +31,11 @@ jobs: # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches token: ${{ secrets.RELEASE_PAT }} - # TODO use UV here - - name: "Set up Python" - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Install Python + run: uv python install ${{ matrix.python-version }} - name: "Calver calculate version" uses: StephaneBour/actions-calver@master @@ -78,12 +78,11 @@ jobs: - name: Build a binary wheel and a source tarball run: | - # Checkout the latest tag - the one we just created. git fetch --tags git checkout ${{ steps.tag_version.outputs.new_tag }} - python -m pip install build check-wheel-contents - python -m build --sdist --wheel --outdir dist/ . - check-wheel-contents dist/*.whl + uv run pip install build check-wheel-contents + uv run python -m build --sdist --wheel --outdir dist/ . + uv run check-wheel-contents dist/*.whl # We use PyPI trusted publishing rather than a PyPI API token. # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index bb4fdb566..bbd432c32 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -24,20 +24,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: "Set up Python" - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - # TODO Here (or maybe get rid of this and use the ci yml?) - # We do not use the cache action as uv is faster than the cache action. - - name: "Install dependencies" - run: | - irm https://astral.sh/uv/install.ps1 | iex - uv pip install --system --upgrade --editable .[dev] + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Install Python + run: uv python install ${{ matrix.python-version }} - name: "Run tests" run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + uv run pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 10c2f9002322401d3bcf899cf58f8423752a63e1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:06:43 +0100 Subject: [PATCH 0737/1638] Update calling method for shellcheck shell option to be consistent amoung projects --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df7c059cb..07471f79c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: hooks: - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -68,7 +68,7 @@ repos: - id: shellcheck name: shellcheck - entry: shellcheck --shell bash + entry: shellcheck --shell=bash language: system pass_filenames: false types_or: [shell] From 0d9b3f7e4577662f1fa3b539009666da2792287f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:12:35 +0100 Subject: [PATCH 0738/1638] Exclude shellcheck error which prevents it from working on Windows --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07471f79c..2dcd8d24f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,14 +68,14 @@ repos: - id: shellcheck name: shellcheck - entry: shellcheck --shell=bash + entry: shellcheck --shell=bash --exclude=SC1017 language: system pass_filenames: false types_or: [shell] - id: shellcheck-docs name: shellcheck-docs - entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash" + entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" language: system types_or: [markdown, rst] From db39ad0c9815b1cd64fe00f2aff2e0218db21f12 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:20:19 +0100 Subject: [PATCH 0739/1638] Use --all-extras in Windows CI setup --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index bbd432c32..a8d11ed69 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -35,4 +35,4 @@ jobs: run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - uv run pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml + uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From fe7c11ee7b622adae553b802d20c374bc9c77bbe Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:29:11 +0100 Subject: [PATCH 0740/1638] Ignore D004 errors in doc8 so it works on Windows --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 72d010d30..69483b9fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -332,6 +332,9 @@ ignore_path = [ "./src/*/_setuptools_scm_version.txt", ] +# See https://github.com/PyCQA/doc8/issues/78 +ignore = [ "D004" ] + [tool.vulture] # Ideally we would limit the paths to the source code where we want to ignore names, # but Vulture does not enable this. From 0c5de9d6b57cba66d47c5f2393c0ac1c7d47bc83 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:42:59 +0100 Subject: [PATCH 0741/1638] Try to work around Windows line endings issue --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 00a7b00c9..b5c2d0d58 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ .git_archival.txt export-subst +*.txt text eol=lf From 5bc6c372b2a9529f434f35e4486b312282853099 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 14:44:20 +0100 Subject: [PATCH 0742/1638] Remove duplicate Windows CI setup --- .github/workflows/windows-ci.yml | 38 -------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/windows-ci.yml diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml deleted file mode 100644 index a8d11ed69..000000000 --- a/.github/workflows/windows-ci.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- - -name: Windows CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - schedule: - # * is a special character in YAML so you have to quote this string - # Run at 1:00 every day - - cron: '0 1 * * *' - -jobs: - build: - - strategy: - matrix: - python-version: ["3.12"] - platform: [windows-latest] - - runs-on: ${{ matrix.platform }} - - steps: - - uses: actions/checkout@v4 - - - name: Install uv - uses: astral-sh/setup-uv@v3 - - - name: Install Python - run: uv python install ${{ matrix.python-version }} - - - name: "Run tests" - run: | - # We run tests against "." and not the tests directory as we test the README - # and documentation. - uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml From 1cc5ea02c9994487ad92b22378e0a124c36269e9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 17:09:21 +0100 Subject: [PATCH 0743/1638] Use setup-uv GitHub Action --- .github/workflows/ci.yml | 11 ++++------- .github/workflows/release.yml | 3 --- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff6b3002b..497045078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,20 +28,17 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: Install Python - run: uv python install ${{ matrix.python-version }} - - name: "Lint" run: | - uv run --all-extras pre-commit run --all-files --hook-stage commit --verbose - uv run --all-extras pre-commit run --all-files --hook-stage push --verbose - uv run --all-extras pre-commit run --all-files --hook-stage manual --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage commit --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage push --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose - name: "Run tests" run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml + uv run --all-extras --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v4" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7eae4b80..c38a38adc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,9 +34,6 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: Install Python - run: uv python install ${{ matrix.python-version }} - - name: "Calver calculate version" uses: StephaneBour/actions-calver@master id: calver From 105496609fb81ef3960ca3934aba564ede94bff0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 17:20:45 +0100 Subject: [PATCH 0744/1638] Move release dependencies to pyproject.toml --- .github/workflows/release.yml | 3 +-- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c38a38adc..bdca6c419 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,8 +77,7 @@ jobs: run: | git fetch --tags git checkout ${{ steps.tag_version.outputs.new_tag }} - uv run pip install build check-wheel-contents - uv run python -m build --sdist --wheel --outdir dist/ . + uv run --extra=release python -m build --sdist --wheel --outdir dist/ . uv run check-wheel-contents dist/*.whl # We use PyPI trusted publishing rather than a PyPI API token. diff --git a/pyproject.toml b/pyproject.toml index 69483b9fa..ca54e17c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,6 +77,7 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" +optional-dependencies.release = ["build", "check-wheel-contents"] urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] From 5f5ab26714453475b7d0b546f3796237ee1d3b2b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 17:26:03 +0100 Subject: [PATCH 0745/1638] Ignore release dependency group in deptry --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index ca54e17c1..014a99631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -287,6 +287,7 @@ ignore = [ [tool.deptry] pep621_dev_dependency_groups = [ "dev", + "release", ] [tool.pyproject-fmt] From b11da61d835d1395e8644cd6d2cfc0ed310d818c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 6 Oct 2024 16:28:10 +0000 Subject: [PATCH 0746/1638] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 014a99631..9160b5793 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,8 +76,8 @@ optional-dependencies.dev = [ "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] +optional-dependencies.release = [ "build", "check-wheel-contents" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" -optional-dependencies.release = ["build", "check-wheel-contents"] urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] From 71c7d3b9f10d4bcf77358d7fed864f67f911e969 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 23:07:06 +0100 Subject: [PATCH 0747/1638] Use uv to run actionlint --- .pre-commit-config.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2dcd8d24f..98066432a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,6 @@ ci: # We use system Python, with required dependencies specified in pyproject.toml. # We therefore cannot use those dependencies in pre-commit CI. skip: - - actionlint - check-manifest - deptry - doc8 @@ -61,8 +60,8 @@ repos: hooks: - id: actionlint name: actionlint - entry: actionlint - language: system + entry: uv run --all-extras actionlint + language: python pass_filenames: false types_or: [yaml] From efc20c088c77d65d47411358cc0aafcb41e55618 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 23:08:23 +0100 Subject: [PATCH 0748/1638] Add the uv dependency --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 98066432a..8ab4682c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,6 +64,7 @@ repos: language: python pass_filenames: false types_or: [yaml] + additional_dependencies: ["uv"] - id: shellcheck name: shellcheck From 099f7ae93242a791048246cc6d577bae7d6526a0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 6 Oct 2024 23:37:05 +0100 Subject: [PATCH 0749/1638] Make pre-commit work without activating a virtualenv --- .pre-commit-config.yaml | 138 ++++++++++++++++++++++++---------------- pyproject.toml | 2 +- 2 files changed, 84 insertions(+), 56 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ab4682c0..c91592406 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,7 @@ ci: # We use system Python, with required dependencies specified in pyproject.toml. # We therefore cannot use those dependencies in pre-commit CI. skip: + - actionlint - check-manifest - deptry - doc8 @@ -60,7 +61,7 @@ repos: hooks: - id: actionlint name: actionlint - entry: uv run --all-extras actionlint + entry: uv run --extra=dev actionlint language: python pass_filenames: false types_or: [yaml] @@ -68,182 +69,209 @@ repos: - id: shellcheck name: shellcheck - entry: shellcheck --shell=bash --exclude=SC1017 - language: system + entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 + language: python pass_filenames: false types_or: [shell] + additional_dependencies: ["uv"] - id: shellcheck-docs name: shellcheck-docs - entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" - language: system + entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: shfmt name: shfmt - entry: shfmt --write --space-redirects --indent=4 - language: system + entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 + language: python types_or: [shell] + additional_dependencies: ["uv"] - id: shfmt-docs name: shfmt-docs - entry: doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" - language: system + entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: mypy name: mypy stages: [push] - entry: python -m mypy . - language: system + entry: uv run --extra=dev -m mypy . + language: python types_or: [python, toml] pass_filenames: false + additional_dependencies: ["uv"] - id: mypy-docs name: mypy-docs stages: [push] - entry: doccmd --language=python --command="mypy" - language: system + entry: uv run --extra=dev doccmd --language=python --command="mypy" + language: python types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - id: check-manifest name: check-manifest stages: [push] - entry: python -m check_manifest . - language: system + entry: uv run --extra=dev -m check_manifest . + language: python pass_filenames: false + additional_dependencies: ["uv"] - id: pyright name: pyright stages: [push] - entry: python -m pyright . - language: system + entry: uv run --extra=dev -m pyright . + language: python types_or: [python, toml] pass_filenames: false + additional_dependencies: ["uv"] - id: pyright-docs name: pyright-docs stages: [push] - entry: doccmd --language=python --command="pyright" - language: system + entry: uv run --extra=dev doccmd --language=python --command="pyright" + language: python types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - id: vulture name: vulture - entry: python -m vulture . - language: system + entry: uv run --extra=dev -m vulture . + language: python types_or: [python] pass_filenames: false + additional_dependencies: ["uv"] - id: vulture-docs name: vulture docs - entry: doccmd --language=python --command="vulture" - language: system + entry: uv run --extra=dev doccmd --language=python --command="vulture" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: pyroma name: pyroma - entry: python -m pyroma --min 10 . - language: system + entry: uv run --extra=dev -m pyroma --min 10 . + language: python pass_filenames: false types_or: [toml] + additional_dependencies: ["uv"] - id: deptry name: deptry - entry: python -m deptry src/ - language: system + entry: uv run --extra=dev -m deptry src/ + language: python pass_filenames: false + additional_dependencies: ["uv"] - id: pylint name: pylint - entry: python -m pylint *.py src/ tests/ docs/ - language: system + entry: uv run --extra=dev -m pylint *.py src/ tests/ docs/ + language: python stages: [manual] pass_filenames: false + additional_dependencies: ["uv"] - id: pylint-docs name: pylint-docs - entry: doccmd --language=python --command="pylint" - language: system + entry: uv run --extra=dev doccmd --language=python --command="pylint" + language: python stages: [manual] types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - id: ruff-check-fix name: Ruff check fix - entry: python -m ruff check --fix - language: system + entry: uv run --extra=dev -m ruff check --fix + language: python types_or: [python] + additional_dependencies: ["uv"] - id: ruff-check-fix-docs name: Ruff check fix docs - entry: doccmd --language=python --command="ruff check --fix" - language: system + entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: ruff-format-fix name: Ruff format - entry: python -m ruff format - language: system + entry: uv run --extra=dev -m ruff format + language: python types_or: [python] + additional_dependencies: ["uv"] - id: ruff-format-fix-docs name: Ruff format docs - entry: doccmd --language=python --no-pad-file --command="ruff format" - language: system + entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: doc8 name: doc8 - entry: python -m doc8 - language: system + entry: uv run --extra=dev -m doc8 + language: python types_or: [rst] + additional_dependencies: ["uv"] - id: interrogate name: interrogate - entry: python -m interrogate - language: system + entry: uv run --extra=dev -m interrogate + language: python types_or: [python] + additional_dependencies: ["uv"] - id: interrogate-docs name: interrogate docs - entry: doccmd --language=python --command="interrogate" - language: system + entry: uv run --extra=dev doccmd --language=python --command="interrogate" + language: python types_or: [markdown, rst] + additional_dependencies: ["uv"] - id: pyproject-fmt-fix name: pyproject-fmt - entry: pyproject-fmt - language: system + entry: uv run --extra=dev pyproject-fmt + language: python types_or: [toml] files: pyproject.toml + additional_dependencies: ["uv"] - id: linkcheck name: linkcheck - entry: make -C docs/ linkcheck SPHINXOPTS=-W - language: system + entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M linkcheck docs/source/ docs/build/ -W + language: python types_or: [rst] stages: [manual] pass_filenames: false + additional_dependencies: ["uv"] - id: spelling name: spelling - entry: make -C docs/ spelling SPHINXOPTS=-W - language: system + entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M spelling docs/source/ docs/build/ -W + language: python types_or: [rst] stages: [manual] pass_filenames: false + additional_dependencies: ["uv"] - id: docs name: Build Documentation - entry: make docs - language: system + entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M html docs/source/ docs/build/ -W + language: python stages: [manual] pass_filenames: false + additional_dependencies: ["uv"] - id: pyright-verifytypes name: pyright-verifytypes stages: [push] - entry: python -m pyright --verifytypes vws - language: system + entry: uv run --extra=dev -m pyright --verifytypes vws + language: python pass_filenames: false types_or: [python] + additional_dependencies: ["uv"] diff --git a/pyproject.toml b/pyproject.toml index 9160b5793..d1619c959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "mypy==1.11.2", "pre-commit==3.8.0", "pydocstyle==6.3", - "pyenchant==3.2.2", + "pyenchant==3.3.0rc1", "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", From 7775e637ed1edcc8bbacab115de05940effab608 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 10:01:51 +0100 Subject: [PATCH 0750/1638] Bump pyenchant to a macOS ARM compatible RC --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9160b5793..d1619c959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "mypy==1.11.2", "pre-commit==3.8.0", "pydocstyle==6.3", - "pyenchant==3.2.2", + "pyenchant==3.3.0rc1", "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", From 6407bd18c983716d4ce4de5a67bc57c464d9320f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 10:38:05 +0100 Subject: [PATCH 0751/1638] Update pre-commit config --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c91592406..298105352 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -98,7 +98,7 @@ repos: - id: mypy name: mypy - stages: [push] + stages: [pre-push] entry: uv run --extra=dev -m mypy . language: python types_or: [python, toml] @@ -107,7 +107,7 @@ repos: - id: mypy-docs name: mypy-docs - stages: [push] + stages: [pre-push] entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst, python, toml] @@ -115,7 +115,7 @@ repos: - id: check-manifest name: check-manifest - stages: [push] + stages: [pre-push] entry: uv run --extra=dev -m check_manifest . language: python pass_filenames: false @@ -123,7 +123,7 @@ repos: - id: pyright name: pyright - stages: [push] + stages: [pre-push] entry: uv run --extra=dev -m pyright . language: python types_or: [python, toml] @@ -132,7 +132,7 @@ repos: - id: pyright-docs name: pyright-docs - stages: [push] + stages: [pre-push] entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst, python, toml] @@ -269,7 +269,7 @@ repos: - id: pyright-verifytypes name: pyright-verifytypes - stages: [push] + stages: [pre-push] entry: uv run --extra=dev -m pyright --verifytypes vws language: python pass_filenames: false From 195f9b3520c851845c725af0063ba0dbdba3ecc3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 10:40:44 +0100 Subject: [PATCH 0752/1638] Use new hook stage names --- .github/workflows/ci.yml | 4 ++-- docs/source/contributing.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 497045078..a0823870e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,8 @@ jobs: - name: "Lint" run: | - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage commit --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage push --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose - name: "Run tests" diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 2a61da727..21e5dbe82 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -40,8 +40,8 @@ Run lint tools either by committing, or with: .. code-block:: console - $ pre-commit run --all-files --hook-stage commit --verbose - $ pre-commit run --all-files --hook-stage push --verbose + $ pre-commit run --all-files --hook-stage pre-commit --verbose + $ pre-commit run --all-files --hook-stage pre-push --verbose $ pre-commit run --all-files --hook-stage manual --verbose .. _Homebrew: https://brew.sh From 83b8110112ebaeed1da3496b5c1475706d0a2bc9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 11:18:12 +0100 Subject: [PATCH 0753/1638] Simplify docs setup --- .pre-commit-config.yaml | 6 +++--- docs/Makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 298105352..ef2edf370 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -243,7 +243,7 @@ repos: - id: linkcheck name: linkcheck - entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M linkcheck docs/source/ docs/build/ -W + entry: make -C docs/ linkcheck SPHINXOPTS=-W language: python types_or: [rst] stages: [manual] @@ -252,7 +252,7 @@ repos: - id: spelling name: spelling - entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M spelling docs/source/ docs/build/ -W + entry: make -C docs/ spelling SPHINXOPTS=-W language: python types_or: [rst] stages: [manual] @@ -261,7 +261,7 @@ repos: - id: docs name: Build Documentation - entry: uv run --extra=dev sphinx-build -M clean docs/source/ docs/build/ -W && uv run --extra=dev sphinx-build -M html docs/source/ docs/build/ -W + entry: make docs language: python stages: [manual] pass_filenames: false diff --git a/docs/Makefile b/docs/Makefile index 6225d81e0..e8f3118ce 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -17,4 +17,4 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @uv run --extra=dev $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) From 54cdd7f9b86bd10ef8484f4f9256e22513a99a2a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 11:19:54 +0100 Subject: [PATCH 0754/1638] Make it possible to run docs help without virtualenv --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index e8f3118ce..15e9c44b1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -10,7 +10,7 @@ BUILDDIR = build # Put it first so that "make" without argument is like "make help". help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @uv run --extra=dev $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile From f8d59b51c22c4110cbb9ab0ff2a004159127d313 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:40:00 +0000 Subject: [PATCH 0755/1638] Bump pre-commit from 3.8.0 to 4.0.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.8.0 to 4.0.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.8.0...v4.0.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1619c959..82c5d548c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy==1.11.2", - "pre-commit==3.8.0", + "pre-commit==4.0.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.18.0", From 87b670f930bd9fb1f1d3d268fcc4d1e9e08df08d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:46:42 +0000 Subject: [PATCH 0756/1638] Bump ruff from 0.6.8 to 0.6.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.8 to 0.6.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.8...0.6.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 82c5d548c..99059f736 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.8", + "ruff==0.6.9", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From adf881808c0d5dcce241c8ead6a15dc0c2e97c61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:57:10 +0000 Subject: [PATCH 0757/1638] Bump doccmd from 2024.9.27 to 2024.10.6 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.9.27 to 2024.10.6. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.09.27...2024.10.06) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 99059f736..1a9fcd24e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.9.27", + "doccmd==2024.10.6", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From 08f911851937987f6bd30e77a922b391ee998766 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 13:18:52 +0100 Subject: [PATCH 0758/1638] Use Sphinx feature to simplify setting copyright --- docs/source/conf.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 6f96be9c4..0fa6f6f69 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,7 +3,6 @@ Configuration for Sphinx. """ -import datetime import importlib.metadata from packaging.specifiers import SpecifierSet @@ -24,8 +23,7 @@ source_suffix = ".rst" master_doc = "index" -year = datetime.datetime.now(tz=datetime.UTC).year -project_copyright = f"{year}, {author}" +project_copyright = f"%Y, {author}" # Exclude the prompt from copied code with sphinx_copybutton. # https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies. From e7e5f48254aa657cb0425d6912209dc101932da6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 22:53:05 +0100 Subject: [PATCH 0759/1638] Separate test and lint CI build --- .github/workflows/ci.yml | 9 --------- .github/workflows/lint.yml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0823870e..f7f4e9bf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,12 +28,6 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: "Lint" - run: | - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose - - name: "Run tests" run: | # We run tests against "." and not the tests directory as we test the README @@ -45,6 +39,3 @@ jobs: with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - - - uses: pre-commit-ci/lite-action@v1.0.3 - if: always() diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..a3caafacf --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +--- + +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + # * is a special character in YAML so you have to quote this string + # Run at 1:00 every day + - cron: '0 1 * * *' + +jobs: + build: + + strategy: + matrix: + python-version: ["3.12"] + platform: ["ubuntu-latest", "windows-latest"] + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: "Lint" + run: | + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose + uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose + + - uses: pre-commit-ci/lite-action@v1.0.3 + if: always() From 263e2bcf9db8271446c896020f99cf70ce40b368 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 7 Oct 2024 22:55:17 +0100 Subject: [PATCH 0760/1638] Change build names --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7f4e9bf1..ad53968be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ --- -name: CI +name: Test on: push: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a3caafacf..41109f7d5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ --- -name: CI +name: Lint on: push: From 526817e71375263fbe3f079faf168cd3e4cee666 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 02:02:02 +0100 Subject: [PATCH 0761/1638] Pin build and check-wheel-contents --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a9fcd24e..f3fd720a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] -optional-dependencies.release = [ "build", "check-wheel-contents" ] +optional-dependencies.release = [ "build==1.2.2.post1", "check-wheel-contents==0.6.0" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" urls.Source = "https://github.com/VWS-Python/vws-python" From 287c006f09ef0653622c0cac374010f1bcd2a673 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 02:55:10 +0100 Subject: [PATCH 0762/1638] Use uv instead of 'build' for building --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdca6c419..25de8e0ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,8 +77,8 @@ jobs: run: | git fetch --tags git checkout ${{ steps.tag_version.outputs.new_tag }} - uv run --extra=release python -m build --sdist --wheel --outdir dist/ . - uv run check-wheel-contents dist/*.whl + uv build --sdist --wheel --out-dir dist/ + uv run --extra=release check-wheel-contents dist/*.whl # We use PyPI trusted publishing rather than a PyPI API token. # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. From 8ae14320b9804244d24c387dd473b04384c0d732 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 02:56:38 +0100 Subject: [PATCH 0763/1638] Use uv instead of 'build' for building --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3fd720a3..b458a89db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", ] -optional-dependencies.release = [ "build==1.2.2.post1", "check-wheel-contents==0.6.0" ] +optional-dependencies.release = [ "check-wheel-contents==0.6.0" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" urls.Source = "https://github.com/VWS-Python/vws-python" From 2cf3c493d22eac70f5227883df28fb4ff958c2ed Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 04:12:36 +0100 Subject: [PATCH 0764/1638] Use environment variables to remove duplication in uv commands --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad53968be..9c36d9c0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - uv run --all-extras --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml + uv run --extra=dev --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v4" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 41109f7d5..9c52e9b2e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,9 +30,11 @@ jobs: - name: "Lint" run: | - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose - uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose + uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose + uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose + uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose + env: + UV_PYTHON: ${{ matrix.python-version }} - uses: pre-commit-ci/lite-action@v1.0.3 if: always() From 462db7033ad09f67c393f8bddc203ff4280646eb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 04:23:41 +0100 Subject: [PATCH 0765/1638] Update release process to support >= 10 releases in a day --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25de8e0ee..2074d8655 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,11 +43,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get the changelog underline + id: changelog_underline + run: | + underline="$(echo "${{ steps.calver.outputs.release }}" | tr -c '\n' '-')" + echo "underline=${underline}" >> "$GITHUB_OUTPUT" + - name: "Update changelog" uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n------------" + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}" include: "CHANGELOG.rst" regex: false From 2e78c52033aeff5f652e3857580992985bac9763 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 05:00:25 +0100 Subject: [PATCH 0766/1638] Format some yaml files --- .github/dependabot.yml | 21 +- .pre-commit-config.yaml | 483 ++++++++++++++++++++-------------------- 2 files changed, 253 insertions(+), 251 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a04c486d6..76027ef36 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,13 @@ +--- version: 2 updates: -- package-ecosystem: pip - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 + - package-ecosystem: pip + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef2edf370..b0538c0b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,277 +1,278 @@ +--- fail_fast: true # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks ci: - # We use system Python, with required dependencies specified in pyproject.toml. - # We therefore cannot use those dependencies in pre-commit CI. - skip: - - actionlint - - check-manifest - - deptry - - doc8 - - docs - - interrogate - - interrogate-docs - - linkcheck - - mypy - - mypy-docs - - pylint - - pyproject-fmt-fix - - pyright - - pyright-docs - - pyright-verifytypes - - pyroma - - ruff-check-fix - - ruff-check-fix-docs - - ruff-format-fix - - ruff-format-fix-docs - - spelling - - vulture - - vulture-docs - - shellcheck - - shellcheck-docs - - shfmt - - shfmt-docs + # We use system Python, with required dependencies specified in pyproject.toml. + # We therefore cannot use those dependencies in pre-commit CI. + skip: + - actionlint + - check-manifest + - deptry + - doc8 + - docs + - interrogate + - interrogate-docs + - linkcheck + - mypy + - mypy-docs + - pylint + - pyproject-fmt-fix + - pyright + - pyright-docs + - pyright-verifytypes + - pyroma + - ruff-check-fix + - ruff-check-fix-docs + - ruff-format-fix + - ruff-format-fix-docs + - spelling + - vulture + - vulture-docs + - shellcheck + - shellcheck-docs + - shfmt + - shfmt-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: -- repo: meta - hooks: - - id: check-useless-excludes -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - - id: check-case-conflict - - id: check-executables-have-shebangs - - id: check-merge-conflict - - id: check-shebang-scripts-are-executable - - id: check-symlinks - - id: check-json - - id: check-toml - - id: check-vcs-permalinks - - id: check-yaml - - id: end-of-file-fixer - - id: file-contents-sorter - files: spelling_private_dict\.txt$ - - id: trailing-whitespace -- repo: local - hooks: - - id: actionlint - name: actionlint - entry: uv run --extra=dev actionlint - language: python - pass_filenames: false - types_or: [yaml] - additional_dependencies: ["uv"] + - repo: meta + hooks: + - id: check-useless-excludes + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-json + - id: check-toml + - id: check-vcs-permalinks + - id: check-yaml + - id: end-of-file-fixer + - id: file-contents-sorter + files: spelling_private_dict\.txt$ + - id: trailing-whitespace + - repo: local + hooks: + - id: actionlint + name: actionlint + entry: uv run --extra=dev actionlint + language: python + pass_filenames: false + types_or: [yaml] + additional_dependencies: ["uv"] - - id: shellcheck - name: shellcheck - entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 - language: python - pass_filenames: false - types_or: [shell] - additional_dependencies: ["uv"] + - id: shellcheck + name: shellcheck + entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 + language: python + pass_filenames: false + types_or: [shell] + additional_dependencies: ["uv"] - - id: shellcheck-docs - name: shellcheck-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: shellcheck-docs + name: shellcheck-docs + entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: shfmt - name: shfmt - entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 - language: python - types_or: [shell] - additional_dependencies: ["uv"] + - id: shfmt + name: shfmt + entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 + language: python + types_or: [shell] + additional_dependencies: ["uv"] - - id: shfmt-docs - name: shfmt-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: shfmt-docs + name: shfmt-docs + entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: mypy - name: mypy - stages: [pre-push] - entry: uv run --extra=dev -m mypy . - language: python - types_or: [python, toml] - pass_filenames: false - additional_dependencies: ["uv"] + - id: mypy + name: mypy + stages: [pre-push] + entry: uv run --extra=dev -m mypy . + language: python + types_or: [python, toml] + pass_filenames: false + additional_dependencies: ["uv"] - - id: mypy-docs - name: mypy-docs - stages: [pre-push] - entry: uv run --extra=dev doccmd --language=python --command="mypy" - language: python - types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + - id: mypy-docs + name: mypy-docs + stages: [pre-push] + entry: uv run --extra=dev doccmd --language=python --command="mypy" + language: python + types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - - id: check-manifest - name: check-manifest - stages: [pre-push] - entry: uv run --extra=dev -m check_manifest . - language: python - pass_filenames: false - additional_dependencies: ["uv"] + - id: check-manifest + name: check-manifest + stages: [pre-push] + entry: uv run --extra=dev -m check_manifest . + language: python + pass_filenames: false + additional_dependencies: ["uv"] - - id: pyright - name: pyright - stages: [pre-push] - entry: uv run --extra=dev -m pyright . - language: python - types_or: [python, toml] - pass_filenames: false - additional_dependencies: ["uv"] + - id: pyright + name: pyright + stages: [pre-push] + entry: uv run --extra=dev -m pyright . + language: python + types_or: [python, toml] + pass_filenames: false + additional_dependencies: ["uv"] - - id: pyright-docs - name: pyright-docs - stages: [pre-push] - entry: uv run --extra=dev doccmd --language=python --command="pyright" - language: python - types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + - id: pyright-docs + name: pyright-docs + stages: [pre-push] + entry: uv run --extra=dev doccmd --language=python --command="pyright" + language: python + types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - - id: vulture - name: vulture - entry: uv run --extra=dev -m vulture . - language: python - types_or: [python] - pass_filenames: false - additional_dependencies: ["uv"] + - id: vulture + name: vulture + entry: uv run --extra=dev -m vulture . + language: python + types_or: [python] + pass_filenames: false + additional_dependencies: ["uv"] - - id: vulture-docs - name: vulture docs - entry: uv run --extra=dev doccmd --language=python --command="vulture" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: vulture-docs + name: vulture docs + entry: uv run --extra=dev doccmd --language=python --command="vulture" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: pyroma - name: pyroma - entry: uv run --extra=dev -m pyroma --min 10 . - language: python - pass_filenames: false - types_or: [toml] - additional_dependencies: ["uv"] + - id: pyroma + name: pyroma + entry: uv run --extra=dev -m pyroma --min 10 . + language: python + pass_filenames: false + types_or: [toml] + additional_dependencies: ["uv"] - - id: deptry - name: deptry - entry: uv run --extra=dev -m deptry src/ - language: python - pass_filenames: false - additional_dependencies: ["uv"] + - id: deptry + name: deptry + entry: uv run --extra=dev -m deptry src/ + language: python + pass_filenames: false + additional_dependencies: ["uv"] - - id: pylint - name: pylint - entry: uv run --extra=dev -m pylint *.py src/ tests/ docs/ - language: python - stages: [manual] - pass_filenames: false - additional_dependencies: ["uv"] + - id: pylint + name: pylint + entry: uv run --extra=dev -m pylint *.py src/ tests/ docs/ + language: python + stages: [manual] + pass_filenames: false + additional_dependencies: ["uv"] - - id: pylint-docs - name: pylint-docs - entry: uv run --extra=dev doccmd --language=python --command="pylint" - language: python - stages: [manual] - types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + - id: pylint-docs + name: pylint-docs + entry: uv run --extra=dev doccmd --language=python --command="pylint" + language: python + stages: [manual] + types_or: [markdown, rst, python, toml] + additional_dependencies: ["uv"] - - id: ruff-check-fix - name: Ruff check fix - entry: uv run --extra=dev -m ruff check --fix - language: python - types_or: [python] - additional_dependencies: ["uv"] + - id: ruff-check-fix + name: Ruff check fix + entry: uv run --extra=dev -m ruff check --fix + language: python + types_or: [python] + additional_dependencies: ["uv"] - - id: ruff-check-fix-docs - name: Ruff check fix docs - entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: ruff-check-fix-docs + name: Ruff check fix docs + entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: ruff-format-fix - name: Ruff format - entry: uv run --extra=dev -m ruff format - language: python - types_or: [python] - additional_dependencies: ["uv"] + - id: ruff-format-fix + name: Ruff format + entry: uv run --extra=dev -m ruff format + language: python + types_or: [python] + additional_dependencies: ["uv"] - - id: ruff-format-fix-docs - name: Ruff format docs - entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: ruff-format-fix-docs + name: Ruff format docs + entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: doc8 - name: doc8 - entry: uv run --extra=dev -m doc8 - language: python - types_or: [rst] - additional_dependencies: ["uv"] + - id: doc8 + name: doc8 + entry: uv run --extra=dev -m doc8 + language: python + types_or: [rst] + additional_dependencies: ["uv"] - - id: interrogate - name: interrogate - entry: uv run --extra=dev -m interrogate - language: python - types_or: [python] - additional_dependencies: ["uv"] + - id: interrogate + name: interrogate + entry: uv run --extra=dev -m interrogate + language: python + types_or: [python] + additional_dependencies: ["uv"] - - id: interrogate-docs - name: interrogate docs - entry: uv run --extra=dev doccmd --language=python --command="interrogate" - language: python - types_or: [markdown, rst] - additional_dependencies: ["uv"] + - id: interrogate-docs + name: interrogate docs + entry: uv run --extra=dev doccmd --language=python --command="interrogate" + language: python + types_or: [markdown, rst] + additional_dependencies: ["uv"] - - id: pyproject-fmt-fix - name: pyproject-fmt - entry: uv run --extra=dev pyproject-fmt - language: python - types_or: [toml] - files: pyproject.toml - additional_dependencies: ["uv"] + - id: pyproject-fmt-fix + name: pyproject-fmt + entry: uv run --extra=dev pyproject-fmt + language: python + types_or: [toml] + files: pyproject.toml + additional_dependencies: ["uv"] - - id: linkcheck - name: linkcheck - entry: make -C docs/ linkcheck SPHINXOPTS=-W - language: python - types_or: [rst] - stages: [manual] - pass_filenames: false - additional_dependencies: ["uv"] + - id: linkcheck + name: linkcheck + entry: make -C docs/ linkcheck SPHINXOPTS=-W + language: python + types_or: [rst] + stages: [manual] + pass_filenames: false + additional_dependencies: ["uv"] - - id: spelling - name: spelling - entry: make -C docs/ spelling SPHINXOPTS=-W - language: python - types_or: [rst] - stages: [manual] - pass_filenames: false - additional_dependencies: ["uv"] + - id: spelling + name: spelling + entry: make -C docs/ spelling SPHINXOPTS=-W + language: python + types_or: [rst] + stages: [manual] + pass_filenames: false + additional_dependencies: ["uv"] - - id: docs - name: Build Documentation - entry: make docs - language: python - stages: [manual] - pass_filenames: false - additional_dependencies: ["uv"] + - id: docs + name: Build Documentation + entry: make docs + language: python + stages: [manual] + pass_filenames: false + additional_dependencies: ["uv"] - - id: pyright-verifytypes - name: pyright-verifytypes - stages: [pre-push] - entry: uv run --extra=dev -m pyright --verifytypes vws - language: python - pass_filenames: false - types_or: [python] - additional_dependencies: ["uv"] + - id: pyright-verifytypes + name: pyright-verifytypes + stages: [pre-push] + entry: uv run --extra=dev -m pyright --verifytypes vws + language: python + pass_filenames: false + types_or: [python] + additional_dependencies: ["uv"] From 21ab5e8513a4da1386910bf607a9df8808e2e3b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:15:25 +0000 Subject: [PATCH 0767/1638] Bump doccmd from 2024.10.6 to 2024.10.8.12 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.6 to 2024.10.8.12. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.06...2024.10.08.12) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b458a89db..3bef30376 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.49", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.6", + "doccmd==2024.10.8.12", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From fd8c70cd4eacdf2f60542c876187ece0f4f2e3d7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 12:50:01 +0100 Subject: [PATCH 0768/1638] Add YAML formatting --- .pre-commit-config.yaml | 4 ++++ .yamlfmt | 5 +++++ codecov.yaml | 1 + readthedocs.yaml | 9 +++++---- 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .yamlfmt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0538c0b1..27090c9f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,6 +58,10 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace + - repo: https://github.com/google/yamlfmt + rev: v0.13.0 + hooks: + - id: yamlfmt - repo: local hooks: - id: actionlint diff --git a/.yamlfmt b/.yamlfmt new file mode 100644 index 000000000..fbb6dd434 --- /dev/null +++ b/.yamlfmt @@ -0,0 +1,5 @@ +formatter: + include_document_start: true + retain_line_breaks_single: true + trim_trailing_whitespace: true + end_of_file_newline: true diff --git a/codecov.yaml b/codecov.yaml index e49034f39..5c35baac9 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -1,3 +1,4 @@ +--- coverage: status: patch: diff --git a/readthedocs.yaml b/readthedocs.yaml index d3bd4fd21..4b8a4eb2b 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -1,3 +1,4 @@ +--- version: 2 build: @@ -7,10 +8,10 @@ build: python: install: - - method: pip - path: . - extra_requirements: - - dev + - method: pip + path: . + extra_requirements: + - dev sphinx: builder: html From 04d8fcd9d83557e4761ca7aee2d40183b8e598f8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 12:54:11 +0100 Subject: [PATCH 0769/1638] Add checkmake --- .checkmake-config.ini | 2 ++ .pre-commit-config.yaml | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 .checkmake-config.ini diff --git a/.checkmake-config.ini b/.checkmake-config.ini new file mode 100644 index 000000000..f2ac3c91b --- /dev/null +++ b/.checkmake-config.ini @@ -0,0 +1,2 @@ +[minphony] +disabled = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 27090c9f6..655b9afb3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,6 +58,11 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace + - repo: https://github.com/mrtazz/checkmake.git + rev: 0.2.2 + hooks: + - id: checkmake + args: ["--config", ".checkmake-config.ini"] - repo: https://github.com/google/yamlfmt rev: v0.13.0 hooks: From 7ba119cf11ee3a48fef77ffd8005aa7c214e4446 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 12:56:16 +0100 Subject: [PATCH 0770/1638] Add pygrep hooks --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 655b9afb3..706c7aede 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,6 +58,13 @@ repos: - id: file-contents-sorter files: spelling_private_dict\.txt$ - id: trailing-whitespace + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 # Use the ref you want to point at + hooks: + - id: rst-directive-colons + - id: rst-inline-touching-normal + - id: text-unicode-replacement-char + - id: rst-backticks - repo: https://github.com/mrtazz/checkmake.git rev: 0.2.2 hooks: From 464b398a12906a7f0bbd4fad795e9f6b66f7de99 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 13:03:05 +0100 Subject: [PATCH 0771/1638] Add docformatter pre-commit --- .pre-commit-config.yaml | 9 +++++- conftest.py | 11 +++---- docs/source/__init__.py | 4 ++- pyproject.toml | 4 +++ src/vws/exceptions/base_exceptions.py | 3 +- src/vws/exceptions/custom_exceptions.py | 8 +++--- src/vws/exceptions/vws_exceptions.py | 3 +- src/vws/query.py | 7 +++-- src/vws/reports.py | 15 ++++------ src/vws/types.py | 4 ++- src/vws/vws.py | 38 ++++++++++--------------- tests/__init__.py | 4 ++- tests/conftest.py | 8 ++++-- tests/test_vws.py | 3 +- tests/test_vws_exceptions.py | 8 +++--- 15 files changed, 68 insertions(+), 61 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 706c7aede..ddcbc74cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,7 +59,7 @@ repos: files: spelling_private_dict\.txt$ - id: trailing-whitespace - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.10.0 # Use the ref you want to point at + rev: v1.10.0 hooks: - id: rst-directive-colons - id: rst-inline-touching-normal @@ -84,6 +84,13 @@ repos: types_or: [yaml] additional_dependencies: ["uv"] + - id: docformatter + name: docformatter + entry: uv run --extra=dev -m docformatter + language: python + types_or: [python] + additional_dependencies: ["uv"] + - id: shellcheck name: shellcheck entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 diff --git a/conftest.py b/conftest.py index 05d6727f2..1d776f8db 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,6 @@ -"""Setup for Sybil.""" +""" +Setup for Sybil. +""" import io import uuid @@ -31,8 +33,8 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: def fixture_make_image_file( high_quality_image: io.BytesIO, ) -> Generator[None]: - """ - Make an image file available in the test directory. + """Make an image file available in the test directory. + The path of this file matches the path in the documentation. """ new_image = Path("high_quality_image.jpg") @@ -46,8 +48,7 @@ def fixture_make_image_file( def fixture_mock_vws( monkeypatch: pytest.MonkeyPatch, ) -> Generator[None]: - """ - Yield a mock VWS. + """Yield a mock VWS. The keys used here match the keys in the documentation. """ diff --git a/docs/source/__init__.py b/docs/source/__init__.py index 535ceb2ec..b63eed5fb 100644 --- a/docs/source/__init__.py +++ b/docs/source/__init__.py @@ -1 +1,3 @@ -"""Documentation.""" +""" +Documentation. +""" diff --git a/pyproject.toml b/pyproject.toml index 3bef30376..06e8c93b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ optional-dependencies.dev = [ "deptry==0.20.0", "doc8==1.1.2", "doccmd==2024.10.8.12", + "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", @@ -258,6 +259,9 @@ spelling-private-dict-file = 'spelling_private_dict.txt' # --spelling-private-dict-file option instead of raising a message. spelling-store-unknown-words = 'no' +[tool.docformatter] +make-summary-multi-line = true + [tool.check-manifest] ignore = [ diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index ad1116708..b0888f93f 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -32,8 +32,7 @@ def response(self) -> Response: @beartype class VWSError(Exception): - """ - Base class for Vuforia Web Services errors. + """Base class for Vuforia Web Services errors. These errors are defined at https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes. diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index cb237abd8..f05d59b41 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -11,11 +11,11 @@ @beartype class OopsAnErrorOccurredPossiblyBadNameError(Exception): - """ - Exception raised when VWS returns an HTML page which says "Oops, an error - occurred". + """Exception raised when VWS returns an HTML page which says "Oops, an + error occurred". - This has been seen to happen when the given name includes a bad character. + This has been seen to happen when the given name includes a bad + character. """ def __init__(self, response: Response) -> None: diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index bf6d5fc4d..b0e3dcbda 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -33,8 +33,7 @@ def target_id(self) -> str: @beartype class FailError(VWSError): """ - Exception raised when Vuforia returns a response with a result code - 'Fail'. + Exception raised when Vuforia returns a response with a result code 'Fail'. """ diff --git a/src/vws/query.py b/src/vws/query.py index 2380ba962..84144691c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -34,7 +34,9 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """Get the data of an image file.""" + """ + Get the data of an image file. + """ original_tell = image.tell() image.seek(0) image_data = image.read() @@ -72,8 +74,7 @@ def query( CloudRecoIncludeTargetData.TOP ), ) -> list[QueryResult]: - """ - Use the Vuforia Web Query API to make an Image Recognition Query. + """Use the Vuforia Web Query API to make an Image Recognition Query. See https://developer.vuforia.com/library/web-api/vuforia-query-web-api diff --git a/src/vws/reports.py b/src/vws/reports.py index 431cfcaa6..85b5d9133 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -12,8 +12,7 @@ @beartype @dataclass(frozen=True) class DatabaseSummaryReport: - """ - A database summary report. + """A database summary report. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. @@ -49,8 +48,7 @@ class TargetStatuses(Enum): @beartype @dataclass(frozen=True) class TargetSummaryReport: - """ - A target summary report. + """A target summary report. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. @@ -70,8 +68,7 @@ class TargetSummaryReport: @beartype(conf=BeartypeConf(is_pep484_tower=True)) @dataclass(frozen=True) class TargetRecord: - """ - A target record. + """A target record. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. @@ -100,8 +97,7 @@ class TargetData: @beartype @dataclass(frozen=True) class QueryResult: - """ - One query match result. + """One query match result. See https://developer.vuforia.com/library/web-api/vuforia-query-web-api. @@ -114,8 +110,7 @@ class QueryResult: @beartype @dataclass(frozen=True) class TargetStatusAndRecord: - """ - The target status and a target record. + """The target status and a target record. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. diff --git a/src/vws/types.py b/src/vws/types.py index 22e912607..269f2e23f 100644 --- a/src/vws/types.py +++ b/src/vws/types.py @@ -1,4 +1,6 @@ -"""Responses for requests to VWS and VWQ.""" +""" +Responses for requests to VWS and VWQ. +""" from dataclasses import dataclass diff --git a/src/vws/vws.py b/src/vws/vws.py index 9e40655d2..492bef5cf 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -53,7 +53,9 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """Get the data of an image file.""" + """ + Get the data of an image file. + """ original_tell = image.tell() image.seek(0) image_data = image.read() @@ -72,8 +74,7 @@ def _target_api_request( request_path: str, base_vws_url: str, ) -> Response: - """ - Make a request to the Vuforia Target API. + """Make a request to the Vuforia Target API. This uses `requests` to make a request against https://vws.vuforia.com. @@ -160,8 +161,7 @@ def make_request( expected_result_code: str, content_type: str, ) -> Response: - """ - Make a request to the Vuforia Target API. + """Make a request to the Vuforia Target API. This uses `requests` to make a request against Vuforia. @@ -251,8 +251,7 @@ def add_target( *, active_flag: bool, ) -> str: - """ - Add a target to a Vuforia Web Services database. + """Add a target to a Vuforia Web Services database. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#add @@ -326,8 +325,8 @@ def add_target( return str(json.loads(s=response.text)["target_id"]) def get_target_record(self, target_id: str) -> TargetStatusAndRecord: - """ - Get a given target's target record from the Target Management System. + """Get a given target's target record from the Target Management + System. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. @@ -383,8 +382,7 @@ def wait_for_target_processed( seconds_between_requests: float = 0.2, timeout_seconds: float = 60 * 5, ) -> None: - """ - Wait up to five minutes (arbitrary) for a target to get past the + """Wait up to five minutes (arbitrary) for a target to get past the processing stage. Args: @@ -428,8 +426,7 @@ def wait_for_target_processed( time.sleep(seconds_between_requests) def list_targets(self) -> list[str]: - """ - List target IDs. + """List target IDs. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#details-list. @@ -461,8 +458,7 @@ def list_targets(self) -> list[str]: return list(json.loads(s=response.text)["results"]) def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: - """ - Get a summary report for a target. + """Get a summary report for a target. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. @@ -510,8 +506,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: ) def get_database_summary_report(self) -> DatabaseSummaryReport: - """ - Get a summary report for the database. + """Get a summary report for the database. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. @@ -557,8 +552,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: ) def delete_target(self, target_id: str) -> None: - """ - Delete a given target. + """Delete a given target. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#delete. @@ -592,8 +586,7 @@ def delete_target(self, target_id: str) -> None: ) def get_duplicate_targets(self, target_id: str) -> list[str]: - """ - Get targets which may be considered duplicates of a given target. + """Get targets which may be considered duplicates of a given target. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#check. @@ -641,8 +634,7 @@ def update_target( active_flag: bool | None = None, application_metadata: str | None = None, ) -> None: - """ - Update a target in a Vuforia Web Services database. + """Update a target in a Vuforia Web Services database. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#update diff --git a/tests/__init__.py b/tests/__init__.py index 3502d86d5..c7e38a862 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1,3 @@ -"""Tests for ``vws``.""" +""" +Tests for ``vws``. +""" diff --git a/tests/conftest.py b/tests/conftest.py index ed50f2e7b..74c6fc56d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -54,7 +54,9 @@ def fixture_image_file( tmp_path: Path, request: pytest.FixtureRequest, ) -> Generator[BinaryIO]: - """An image file object.""" + """ + An image file object. + """ file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() file.write_bytes(data=buffer) @@ -69,7 +71,9 @@ def image( high_quality_image: io.BytesIO, image_file: BinaryIO, ) -> io.BytesIO | BinaryIO: - """An image in any of the types that the API accepts.""" + """ + An image in any of the types that the API accepts. + """ if request.param == "high_quality_image": return high_quality_image return image_file diff --git a/tests/test_vws.py b/tests/test_vws.py index 42fdee45a..500320c0a 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -80,8 +80,7 @@ def test_add_two_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - No exception is raised when adding two targets with different names. + """No exception is raised when adding two targets with different names. This demonstrates that the image seek position is not changed. """ diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 0c9de2d29..8f422615d 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -139,8 +139,8 @@ def test_target_name_exist( high_quality_image: io.BytesIO, ) -> None: """ - A ``TargetNameExist`` exception is raised after adding two targets with - the same name. + A ``TargetNameExist`` exception is raised after adding two targets with the + same name. """ vws_client.add_target( name="x", @@ -166,8 +166,8 @@ def test_project_inactive( high_quality_image: io.BytesIO, ) -> None: """ - A ``ProjectInactive`` exception is raised if adding a target to an - inactive database. + A ``ProjectInactive`` exception is raised if adding a target to an inactive + database. """ database = VuforiaDatabase(state=States.PROJECT_INACTIVE) with MockVWS() as mock: From 590a61bb8c1b4f0c44dbf84c9bdd56ad7f1a0002 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 8 Oct 2024 13:06:44 +0100 Subject: [PATCH 0772/1638] Do not run docformatter on pre-commit.ci --- .pre-commit-config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ddcbc74cc..7c9012062 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,7 @@ ci: - check-manifest - deptry - doc8 + - docformatter - docs - interrogate - interrogate-docs @@ -28,13 +29,13 @@ ci: - ruff-check-fix-docs - ruff-format-fix - ruff-format-fix-docs - - spelling - - vulture - - vulture-docs - shellcheck - shellcheck-docs - shfmt - shfmt-docs + - spelling + - vulture + - vulture-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: From 4cb28c0a6540df059dd9ed2d289f59264ad9f090 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:10:06 +0000 Subject: [PATCH 0773/1638] [pre-commit.ci lite] apply automatic fixes --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2074d8655..2ea1e6aa7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,9 +86,9 @@ jobs: uv build --sdist --wheel --out-dir dist/ uv run --extra=release check-wheel-contents dist/*.whl - # We use PyPI trusted publishing rather than a PyPI API token. - # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. - name: Publish distribution 📦 to PyPI + # We use PyPI trusted publishing rather than a PyPI API token. + # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing. uses: pypa/gh-action-pypi-publish@release/v1 with: verbose: true From 6a9c7f0bde39421d2cd36eec52dab2049caa67f6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 09:11:51 +0100 Subject: [PATCH 0774/1638] Run docformatter in place --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c9012062..d774662ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -87,7 +87,7 @@ repos: - id: docformatter name: docformatter - entry: uv run --extra=dev -m docformatter + entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] additional_dependencies: ["uv"] diff --git a/pyproject.toml b/pyproject.toml index 06e8c93b0..801d197b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,6 +265,8 @@ make-summary-multi-line = true [tool.check-manifest] ignore = [ + ".checkmake-config.ini", + ".yamlfmt", "*.enc", ".pre-commit-config.yaml", "readthedocs.yaml", From 522efd9611e6eaf38941d140f2828e5234c8cfa5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:24:12 +0000 Subject: [PATCH 0775/1638] Bump pre-commit from 4.0.0 to 4.0.1 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.0.0...v4.0.1) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 801d197b0..1eae0bf50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy==1.11.2", - "pre-commit==4.0.0", + "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.18.0", From da5af35f35c27ac1e2c9e194e033cc86b3225e1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:29:30 +0000 Subject: [PATCH 0776/1638] Bump check-manifest from 0.49 to 0.50 Bumps [check-manifest](https://github.com/mgedmin/check-manifest) from 0.49 to 0.50. - [Changelog](https://github.com/mgedmin/check-manifest/blob/master/CHANGES.rst) - [Commits](https://github.com/mgedmin/check-manifest/compare/0.49...0.50) --- updated-dependencies: - dependency-name: check-manifest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1eae0bf50..187a88381 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ ] optional-dependencies.dev = [ "actionlint-py==1.7.3.17", - "check-manifest==0.49", + "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", "doccmd==2024.10.8.12", From bf034b3f9c45dd44dc0a4cbc6f9b5563bca150e6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 14:31:36 +0100 Subject: [PATCH 0777/1638] Specify Windows support in classifiers --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 187a88381..074d754b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", + "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", From b5f707d8c3ed9a95610ed50da3ecadccdc40b093 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 15:37:09 +0100 Subject: [PATCH 0778/1638] Switch from yamlfmt to yamlfix --- .github/dependabot.yml | 7 ++- .github/workflows/ci.yml | 12 ++-- .github/workflows/dependabot-merge.yml | 2 +- .github/workflows/lint.yml | 8 +-- .github/workflows/release.yml | 15 ++--- .pre-commit-config.yaml | 83 ++++++++++++++------------ pyproject.toml | 5 ++ readthedocs.yaml | 5 +- 8 files changed, 76 insertions(+), 61 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 76027ef36..610da79f8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,13 +1,14 @@ --- version: 2 + updates: - package-ecosystem: pip - directory: "/" + directory: / schedule: interval: daily open-pull-requests-limit: 10 - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: interval: daily open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c36d9c0d..71a07849e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,15 +10,15 @@ on: schedule: # * is a special character in YAML so you have to quote this string # Run at 1:00 every day - - cron: '0 1 * * *' + - cron: 0 1 * * * jobs: build: strategy: matrix: - python-version: ["3.12"] - platform: ["ubuntu-latest", "windows-latest"] + python-version: ['3.12'] + platform: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} @@ -28,14 +28,14 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: "Run tests" + - name: Run tests run: | # We run tests against "." and not the tests directory as we test the README # and documentation. uv run --extra=dev --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - - name: "Upload coverage to Codecov" - uses: "codecov/codecov-action@v4" + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml index 1c75ca282..5238c9f68 100644 --- a/.github/workflows/dependabot-merge.yml +++ b/.github/workflows/dependabot-merge.yml @@ -16,7 +16,7 @@ jobs: id: metadata uses: dependabot/fetch-metadata@v2 with: - github-token: "${{ secrets.GITHUB_TOKEN }}" + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Enable auto-merge for Dependabot PRs run: gh pr merge --auto --merge "$PR_URL" env: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9c52e9b2e..630311fc3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,15 +10,15 @@ on: schedule: # * is a special character in YAML so you have to quote this string # Run at 1:00 every day - - cron: '0 1 * * *' + - cron: 0 1 * * * jobs: build: strategy: matrix: - python-version: ["3.12"] - platform: ["ubuntu-latest", "windows-latest"] + python-version: ['3.12'] + platform: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} @@ -28,7 +28,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: "Lint" + - name: Lint run: | uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ea1e6aa7..8fd8c1ce9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: - python-version: ["3.12"] + python-version: ['3.12'] steps: - uses: actions/checkout@v4 @@ -34,11 +34,11 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 - - name: "Calver calculate version" + - name: Calver calculate version uses: StephaneBour/actions-calver@master id: calver with: - date_format: "%Y.%m.%d" + date_format: '%Y.%m.%d' release: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -49,12 +49,13 @@ jobs: underline="$(echo "${{ steps.calver.outputs.release }}" | tr -c '\n' '-')" echo "underline=${underline}" >> "$GITHUB_OUTPUT" - - name: "Update changelog" + - name: Update changelog uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}" - include: "CHANGELOG.rst" + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\ + \ }}" + include: CHANGELOG.rst regex: false - uses: stefanzweifel/git-auto-commit-action@v5 @@ -69,7 +70,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} custom_tag: ${{ steps.calver.outputs.release }} - tag_prefix: "" + tag_prefix: '' commit_sha: ${{ steps.commit.outputs.commit_hash }} - name: Create a GitHub release diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d774662ab..8ff06fc0c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,8 +36,10 @@ ci: - spelling - vulture - vulture-docs + - yamlfix default_install_hook_types: [pre-commit, pre-push, commit-msg] + repos: - repo: meta hooks: @@ -70,11 +72,8 @@ repos: rev: 0.2.2 hooks: - id: checkmake - args: ["--config", ".checkmake-config.ini"] - - repo: https://github.com/google/yamlfmt - rev: v0.13.0 - hooks: - - id: yamlfmt + args: [--config, .checkmake-config.ini] + - repo: local hooks: - id: actionlint @@ -83,14 +82,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: shellcheck name: shellcheck @@ -98,28 +97,30 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC1017" + entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck + --shell=bash --exclude=SC1017" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: shfmt-docs name: shfmt-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" + entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt + --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: mypy name: mypy @@ -128,7 +129,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: mypy-docs name: mypy-docs @@ -136,7 +137,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: check-manifest name: check-manifest @@ -144,7 +145,7 @@ repos: entry: uv run --extra=dev -m check_manifest . language: python pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyright name: pyright @@ -153,7 +154,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyright-docs name: pyright-docs @@ -161,7 +162,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: vulture name: vulture @@ -169,14 +170,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyroma name: pyroma @@ -184,14 +185,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pylint name: pylint @@ -199,7 +200,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pylint-docs name: pylint-docs @@ -207,56 +208,57 @@ repos: language: python stages: [manual] types_or: [markdown, rst, python, toml] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: ruff-format-fix-docs name: Ruff format docs - entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" + entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff + format" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyproject-fmt-fix name: pyproject-fmt @@ -264,7 +266,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: linkcheck name: linkcheck @@ -273,7 +275,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: spelling name: spelling @@ -282,7 +284,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: docs name: Build Documentation @@ -290,7 +292,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: ["uv"] + additional_dependencies: [uv] - id: pyright-verifytypes name: pyright-verifytypes @@ -299,4 +301,11 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: ["uv"] + additional_dependencies: [uv] + + - id: yamlfix + name: pyproject-fmt + entry: uv run --extra=dev yamlfix + language: python + types_or: [yaml] + additional_dependencies: [uv] diff --git a/pyproject.toml b/pyproject.toml index 187a88381..aefcc61cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,7 @@ optional-dependencies.dev = [ "vulture==2.13", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", + "yamlfix==1.17.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.0" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" @@ -384,3 +385,7 @@ ignore_names = [ # Duplicate some of .gitignore exclude = [ ".venv" ] + +[tool.yamlfix] +section_whitelines = 1 +whitelines = 1 diff --git a/readthedocs.yaml b/readthedocs.yaml index 4b8a4eb2b..bdd2bf053 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -4,14 +4,13 @@ version: 2 build: os: ubuntu-24.04 tools: - python: "3.12" + python: '3.12' python: install: - method: pip path: . - extra_requirements: - - dev + extra_requirements: [dev] sphinx: builder: html From c1da067b33c0197311848b1530458bafd210b680 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 15:47:52 +0100 Subject: [PATCH 0779/1638] Remove checkmake - it is flaky on Windows --- .checkmake-config.ini | 2 -- .pre-commit-config.yaml | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 .checkmake-config.ini diff --git a/.checkmake-config.ini b/.checkmake-config.ini deleted file mode 100644 index f2ac3c91b..000000000 --- a/.checkmake-config.ini +++ /dev/null @@ -1,2 +0,0 @@ -[minphony] -disabled = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ff06fc0c..94dbbfd07 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,11 +68,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - id: rst-backticks - - repo: https://github.com/mrtazz/checkmake.git - rev: 0.2.2 - hooks: - - id: checkmake - args: [--config, .checkmake-config.ini] + - repo: local hooks: From a04341e24d8538f408937965eff577d677249173 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:50:12 +0000 Subject: [PATCH 0780/1638] [pre-commit.ci lite] apply automatic fixes --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 94dbbfd07..7e7426899 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,6 @@ repos: - id: text-unicode-replacement-char - id: rst-backticks - - repo: local hooks: - id: actionlint From bf6fe462c8e17d6f7571c30dda4ffdd93de273a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:55:12 +0000 Subject: [PATCH 0781/1638] Bump pyright from 1.1.383 to 1.1.384 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.383 to 1.1.384. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.383...v1.1.384) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aefcc61cb..5c505ece7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", - "pyright==1.1.383", + "pyright==1.1.384", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 645d2a3682d3736407b61d03ca73bed430ff8ab8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 15:56:11 +0100 Subject: [PATCH 0782/1638] Remove yamlfmt config --- .yamlfmt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .yamlfmt diff --git a/.yamlfmt b/.yamlfmt deleted file mode 100644 index fbb6dd434..000000000 --- a/.yamlfmt +++ /dev/null @@ -1,5 +0,0 @@ -formatter: - include_document_start: true - retain_line_breaks_single: true - trim_trailing_whitespace: true - end_of_file_newline: true From dad0faf59ac761179a00e382af24182a9eebdc21 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 9 Oct 2024 22:53:31 +0100 Subject: [PATCH 0783/1638] Add Windows classifier --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 5c505ece7..11acd2531 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", + "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", From 91a46c92f822a823799e23334bddea14b7f7919a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 10:09:44 +0100 Subject: [PATCH 0784/1638] Use max supported Python version for explicit pyproject-fmt configuration --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 11acd2531..6311092d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -301,6 +301,7 @@ pep621_dev_dependency_groups = [ [tool.pyproject-fmt] indent = 4 keep_full_version = true +max_supported_python = "3.12" [tool.pytest.ini_options] From 1c5572c1fd3e1c2b482f25599dcfdfde56032742 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:15:38 +0000 Subject: [PATCH 0785/1638] Bump sphinx from 8.0.2 to 8.1.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.0.2 to 8.1.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.0.2...v8.1.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6311092d3..7f23c7ffd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.0.2", + "sphinx==8.1.0", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", From 807a87855910dffda050130af43a150753d7aace Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:20:22 +0000 Subject: [PATCH 0786/1638] Bump pyproject-fmt from 2.2.4 to 2.3.0 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.2.4 to 2.3.0. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.2.4...2.3.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f23c7ffd..097ffe582 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.2.4", + "pyproject-fmt==2.3.0", "pyright==1.1.384", "pyroma==4.2", "pytest==8.3.3", From cc684da5da89565721ae44aaf5f9c75ee9649af9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 13:24:39 +0100 Subject: [PATCH 0787/1638] Remove workaround for CRLF line endings now we tell git to check out with lf --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 097ffe582..35f7cb6fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -343,8 +343,7 @@ ignore_path = [ "./src/*/_setuptools_scm_version.txt", ] -# See https://github.com/PyCQA/doc8/issues/78 -ignore = [ "D004" ] + [tool.vulture] # Ideally we would limit the paths to the source code where we want to ignore names, From 2815ef71af7a4c26c2640c722e45e054e57d42cf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 12:27:05 +0000 Subject: [PATCH 0788/1638] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 35f7cb6fd..859c191d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -343,8 +343,6 @@ ignore_path = [ "./src/*/_setuptools_scm_version.txt", ] - - [tool.vulture] # Ideally we would limit the paths to the source code where we want to ignore names, # but Vulture does not enable this. From 2bc9f573673e00695536249008f7de3750424536 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 13:39:25 +0100 Subject: [PATCH 0789/1638] Update git attributes --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index b5c2d0d58..ee0f759ba 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ .git_archival.txt export-subst -*.txt text eol=lf +* text=auto eol=lf From b935b983b4da493d38b1bbb3745766e92f163ad0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 13:59:19 +0100 Subject: [PATCH 0790/1638] Move shellcheck settings to rc file --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e7426899..685d83135 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,7 +88,7 @@ repos: - id: shellcheck name: shellcheck - entry: uv run --extra=dev shellcheck --shell=bash --exclude=SC1017 + entry: uv run --extra=dev shellcheck --shell=bash language: python pass_filenames: false types_or: [shell] @@ -97,7 +97,7 @@ repos: - id: shellcheck-docs name: shellcheck-docs entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck - --shell=bash --exclude=SC1017" + --shell=bash" language: python types_or: [markdown, rst] additional_dependencies: [uv] From 68cd32fa1ee89aac6b5e6d2c569e7041e71c2d9e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 11 Oct 2024 21:15:39 +0100 Subject: [PATCH 0791/1638] Bump doccmd --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 859c191d2..4f4413514 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.8.12", + "doccmd==2024.10.11", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 14c89176ba5a3fac78f3718e60a9922049446830 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:23:59 +0000 Subject: [PATCH 0792/1638] Bump sphinx from 8.1.0 to 8.1.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.1.0 to 8.1.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.1.0...v8.1.1) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4f4413514..0c4bd0c16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.1.0", + "sphinx==8.1.1", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", From 14cb8b8a1f519778e8a6d8c9ed32d519bfc95317 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:37:42 +0000 Subject: [PATCH 0793/1638] Bump doccmd from 2024.10.11 to 2024.10.12 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.11 to 2024.10.12. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.11...2024.10.12) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0c4bd0c16..83fade1c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.11", + "doccmd==2024.10.12", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 2b2065c751ebcfc66214a4abbd75ae461174218a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Oct 2024 15:58:06 +0100 Subject: [PATCH 0794/1638] Configure VSCode to run tests in its UI --- .vscode/settings.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 9f41e3120..69abf060e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,10 @@ "editor.defaultFormatter": "charliermarsh.ruff", "editor.formatOnSave": true }, - "esbonio.sphinx.confDir": "" + "esbonio.sphinx.confDir": "", + "python.testing.pytestArgs": [ + "." + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true } From 2cdb39022ea3baa1f91f657e31ab5c66a71348de Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Oct 2024 16:34:49 +0100 Subject: [PATCH 0795/1638] Add lower bounds to all requirements --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 83fade1c0..cff439de0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,9 +35,9 @@ dynamic = [ ] dependencies = [ "beartype>=0.18.5", - "requests", - "urllib3", - "vws-auth-tools", + "requests>=2.32.3", + "urllib3>=2.2.3", + "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ "actionlint-py==1.7.3.17", From bb103d18d7eaaf258c78f19424bdc681fc27424b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Oct 2024 17:07:41 +0100 Subject: [PATCH 0796/1638] Move mypy file definitions to pyproject.toml --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 685d83135..2d174ed65 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -120,7 +120,7 @@ repos: - id: mypy name: mypy stages: [pre-push] - entry: uv run --extra=dev -m mypy . + entry: uv run --extra=dev -m mypy language: python types_or: [python, toml] pass_filenames: false diff --git a/pyproject.toml b/pyproject.toml index cff439de0..89061bec7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -320,6 +320,8 @@ exclude_also = [ [tool.mypy] strict = true +files = [ "." ] +exclude = [ "build" ] [tool.pyright] From 7b9bf892452eb78d632252cd7e93d36f6682b446 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Oct 2024 17:48:16 +0100 Subject: [PATCH 0797/1638] No need to give directory to check-manifest --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2d174ed65..beedacfcc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -137,7 +137,7 @@ repos: - id: check-manifest name: check-manifest stages: [pre-push] - entry: uv run --extra=dev -m check_manifest . + entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false additional_dependencies: [uv] From dc8263655eefbf83ada9406f24f99dddc4469103 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:43:20 +0000 Subject: [PATCH 0798/1638] Bump pre-commit-ci/lite-action from 1.0.3 to 1.1.0 Bumps [pre-commit-ci/lite-action](https://github.com/pre-commit-ci/lite-action) from 1.0.3 to 1.1.0. - [Release notes](https://github.com/pre-commit-ci/lite-action/releases) - [Commits](https://github.com/pre-commit-ci/lite-action/compare/v1.0.3...v1.1.0) --- updated-dependencies: - dependency-name: pre-commit-ci/lite-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 630311fc3..9e70657b7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,5 +36,5 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - - uses: pre-commit-ci/lite-action@v1.0.3 + - uses: pre-commit-ci/lite-action@v1.1.0 if: always() From 4fd84ff4badd1a4c96693a09acdc87eea5b76621 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:58:13 +0000 Subject: [PATCH 0799/1638] Bump doccmd from 2024.10.12 to 2024.10.13.1 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.12 to 2024.10.13.1. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.12...2024.10.13.1) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 89061bec7..d1f29501a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.12", + "doccmd==2024.10.13.1", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 13198d45ddabd6e52a9d17aea65fb10d188d8b80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:58:21 +0000 Subject: [PATCH 0800/1638] Bump sphinx from 8.1.1 to 8.1.3 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.1.1 to 8.1.3. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.1.1...v8.1.3) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 89061bec7..1dc192d0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.1.1", + "sphinx==8.1.3", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", From ff4deced2935ddff9d6a119c77d4c1e500e0f886 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 15 Oct 2024 10:56:24 +0100 Subject: [PATCH 0801/1638] Fix the version in Sphinx to be the last released version --- docs/source/conf.py | 6 ++++-- pyproject.toml | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 0fa6f6f69..da1b8193b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -36,8 +36,10 @@ # Use ``importlib.metadata.version`` as per # https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx version = importlib.metadata.version(distribution_name=project) -_month, _day, _year, *_ = version.split(".") -release = f"{_month}.{_day}.{_year}" +# This method of getting the release from the version goes hand in hand with +# the ``post-release`` versioning scheme chosen in the ``setuptools-scm`` +# configuration. +release = version.split(".post")[0] project_metadata = importlib.metadata.metadata(distribution_name=project) diff --git a/pyproject.toml b/pyproject.toml index 133dc39af..7bfac91d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,13 @@ universal = true [tool.setuptools_scm] +# This keeps the start of the version the same as the last release. +# This is useful for our documentation to include e.g. binary links +# to the latest released binary. +# +# Code to match this is in ``conf.py``. +version_scheme = "post-release" + [tool.ruff] line-length = 79 From 5d33d0fc9ecfa38090d2fec259f25f167bdf6dce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:26:23 +0000 Subject: [PATCH 0802/1638] Bump mypy from 1.11.2 to 1.12.0 Bumps [mypy](https://github.com/python/mypy) from 1.11.2 to 1.12.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11.2...v1.12.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7bfac91d8..62bc754b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy==1.11.2", + "mypy==1.12.0", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From dd59c3d91f33810452b92c8bbff00b29ea752a6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:26:30 +0000 Subject: [PATCH 0803/1638] Bump pyproject-fmt from 2.3.0 to 2.3.1 Bumps [pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/2.3.0...2.3.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7bfac91d8..8806a6e66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.3.0", + "pyproject-fmt==2.3.1", "pyright==1.1.384", "pyroma==4.2", "pytest==8.3.3", From f07f73ac88655e902e5641751852f411d318707f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:26:41 +0000 Subject: [PATCH 0804/1638] Bump doccmd from 2024.10.13.1 to 2024.10.14.2 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.13.1 to 2024.10.14.2. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.13.1...2024.10.14.2) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7bfac91d8..dfe4c79dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.13.1", + "doccmd==2024.10.14.2", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 2cd5a89085f1ab1b0972f66fb04e095a9bf2871c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:23:16 +0000 Subject: [PATCH 0805/1638] Bump types-requests from 2.32.0.20240914 to 2.32.0.20241016 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240914 to 2.32.0.20241016. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5da09aeb5..e5bc87b45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2024.8.6", "sphinxcontrib-spelling==8", "sybil==8.0.0", - "types-requests==2.32.0.20240914", + "types-requests==2.32.0.20241016", "vulture==2.13", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", From dc74630c01e7dc7ec6fc57905e569951105df3ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:23:24 +0000 Subject: [PATCH 0806/1638] Bump pyright from 1.1.384 to 1.1.385 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.384 to 1.1.385. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.384...v1.1.385) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5da09aeb5..52d907df4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.3.1", - "pyright==1.1.384", + "pyright==1.1.385", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From ce8962edd5c77071d07cadda6e54f4ddd61f3448 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:36:17 +0000 Subject: [PATCH 0807/1638] Bump pyproject-fmt from 2.3.1 to 2.4.2 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.3.1 to 2.4.2. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/commits/pyproject-fmt/2.4.2) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 519eaefc0..ef9fd64dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.3.1", + "pyproject-fmt==2.4.2", "pyright==1.1.385", "pyroma==4.2", "pytest==8.3.3", From 2509610c91acdc8670d240430adcbe41c9fb60cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:46:33 +0000 Subject: [PATCH 0808/1638] Bump sphinx-substitution-extensions from 2024.8.6 to 2024.10.17 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2024.8.6 to 2024.10.17. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2024.08.06...2024.10.17) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef9fd64dd..5cbd0e67c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ optional-dependencies.dev = [ "shfmt-py==3.7.0.1", "sphinx==8.1.3", "sphinx-copybutton==0.5.2", - "sphinx-substitution-extensions==2024.8.6", + "sphinx-substitution-extensions==2024.10.17", "sphinxcontrib-spelling==8", "sybil==8.0.0", "types-requests==2.32.0.20241016", From 9c43fd596543e6a10c944839f7d9655c504c9fdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:46:53 +0000 Subject: [PATCH 0809/1638] Bump ruff from 0.6.9 to 0.7.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.9 to 0.7.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.9...0.7.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef9fd64dd..8a572334a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.6.9", + "ruff==0.7.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 8a4cc589e17ed655267a314d781fb7c08cc58709 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:46:58 +0000 Subject: [PATCH 0810/1638] Bump pyproject-fmt from 2.4.2 to 2.4.3 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.4.2 to 2.4.3. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.4.2...pyproject-fmt/2.4.3) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef9fd64dd..751bf3d06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.4.2", + "pyproject-fmt==2.4.3", "pyright==1.1.385", "pyroma==4.2", "pytest==8.3.3", From f1abe8355a2b0dcede791e32ba3719ca5ab2d01b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 20 Oct 2024 11:00:38 +0200 Subject: [PATCH 0811/1638] Fix the name of the yamlfix pre-commit hook --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index beedacfcc..77643a13e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -299,7 +299,7 @@ repos: additional_dependencies: [uv] - id: yamlfix - name: pyproject-fmt + name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] From 075cc5a7b0b82957c58f1ae5a10924c327d4975d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:59:45 +0000 Subject: [PATCH 0812/1638] Bump doccmd from 2024.10.14.2 to 2024.10.18 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.14.2 to 2024.10.18. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.14.2...2024.10.18) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e9fdc41f0..7af4baf7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.14.2", + "doccmd==2024.10.18", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From f0af2c3e981bcda770435fee34ac3d1e246e1f0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:59:56 +0000 Subject: [PATCH 0813/1638] Bump mypy from 1.12.0 to 1.12.1 Bumps [mypy](https://github.com/python/mypy) from 1.12.0 to 1.12.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.12.0...v1.12.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e9fdc41f0..454abbc44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy==1.12.0", + "mypy==1.12.1", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From e8083dd412058de0c87a66e5d6ab5c272b8f0d90 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 21 Oct 2024 23:09:22 +0100 Subject: [PATCH 0814/1638] Pin uv for pre-commit hook --- .pre-commit-config.yaml | 60 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 77643a13e..0812bf573 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -77,14 +77,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: shellcheck name: shellcheck @@ -92,7 +92,7 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: shellcheck-docs name: shellcheck-docs @@ -100,14 +100,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: shfmt-docs name: shfmt-docs @@ -115,7 +115,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: mypy name: mypy @@ -124,7 +124,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: mypy-docs name: mypy-docs @@ -132,7 +132,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst, python, toml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: check-manifest name: check-manifest @@ -140,7 +140,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyright name: pyright @@ -149,7 +149,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyright-docs name: pyright-docs @@ -157,7 +157,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst, python, toml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: vulture name: vulture @@ -165,14 +165,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyroma name: pyroma @@ -180,14 +180,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pylint name: pylint @@ -195,7 +195,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pylint-docs name: pylint-docs @@ -203,28 +203,28 @@ repos: language: python stages: [manual] types_or: [markdown, rst, python, toml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: ruff-format-fix-docs name: Ruff format docs @@ -232,28 +232,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyproject-fmt-fix name: pyproject-fmt @@ -261,7 +261,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: linkcheck name: linkcheck @@ -270,7 +270,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: spelling name: spelling @@ -279,7 +279,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: docs name: Build Documentation @@ -287,7 +287,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: pyright-verifytypes name: pyright-verifytypes @@ -296,11 +296,11 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv] + additional_dependencies: [uv==0.4.25] From 407d9ecc1f0b70b5bf4c529ebe9df957bd3962d9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 23 Oct 2024 07:57:24 +0100 Subject: [PATCH 0815/1638] Remove unnecessary build dependency - pip --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 553586bff..ec7ab4e74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,6 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "pip", "setuptools", "setuptools-scm[toml]>=7.1", "wheel", From e593d7ae219cfdf85179b3ae5d18b47dbe3f1ccb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 23 Oct 2024 08:36:21 +0100 Subject: [PATCH 0816/1638] Use faster mypy cache --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ec7ab4e74..615d3f72a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy==1.12.1", + "mypy[faster-cache]==1.13.0", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From afeaa00ad4f55be98e2c418188e5e6337f67be9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:54:47 +0000 Subject: [PATCH 0817/1638] Bump pyright from 1.1.385 to 1.1.386 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.385 to 1.1.386. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.385...v1.1.386) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 615d3f72a..a9a05c103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.4.3", - "pyright==1.1.385", + "pyright==1.1.386", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 2ec44c07ce746abf172314d9afca7c837e0b198a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:17:06 +0000 Subject: [PATCH 0818/1638] Bump ruff from 0.7.0 to 0.7.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.0 to 0.7.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.0...0.7.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a9a05c103..80d64af0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==5.0.0", "pyyaml==6.0.2", - "ruff==0.7.0", + "ruff==0.7.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 2aa33f520fb7e3de6144a773a932d1731f430cdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:25:18 +0000 Subject: [PATCH 0819/1638] Bump pytest-cov from 5.0.0 to 6.0.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 5.0.0 to 6.0.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v5.0.0...v6.0.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 80d64af0f..0ca2be15e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pyright==1.1.386", "pyroma==4.2", "pytest==8.3.3", - "pytest-cov==5.0.0", + "pytest-cov==6.0.0", "pyyaml==6.0.2", "ruff==0.7.1", # We add shellcheck-py not only for shell scripts and shell code blocks, From 96e8221a17383cbebaad402b70b4bbb898e71245 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:25:36 +0000 Subject: [PATCH 0820/1638] Bump pyright from 1.1.386 to 1.1.387 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.386 to 1.1.387. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.386...v1.1.387) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 80d64af0f..69b992507 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.4.3", - "pyright==1.1.386", + "pyright==1.1.387", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==5.0.0", From 980ff1d2402218532a644b6a5a00cdeab4e57d86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:44:27 +0000 Subject: [PATCH 0821/1638] Bump pyproject-fmt from 2.4.3 to 2.5.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.4.3 to 2.5.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.4.3...pyproject-fmt/2.5.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2424d52f4..4275ca7b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.18.0", "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", - "pyproject-fmt==2.4.3", + "pyproject-fmt==2.5.0", "pyright==1.1.387", "pyroma==4.2", "pytest==8.3.3", From de9ab9c39e10ae51a9e280e10d00e64b96a467db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:44:45 +0000 Subject: [PATCH 0822/1638] Bump sybil from 8.0.0 to 8.0.1 Bumps [sybil](https://github.com/simplistix/sybil) from 8.0.0 to 8.0.1. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/8.0.0...8.0.1) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2424d52f4..6ad7ab7d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.10.17", "sphinxcontrib-spelling==8", - "sybil==8.0.0", + "sybil==8.0.1", "types-requests==2.32.0.20241016", "vulture==2.13", "vws-python-mock==2024.8.30", From b12077eae7ae2e50ce7346601f5efcd46af58cf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:12:38 +0000 Subject: [PATCH 0823/1638] Bump ruff from 0.7.1 to 0.7.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.1 to 0.7.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.1...0.7.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad5efe8d8..298a0df4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.7.1", + "ruff==0.7.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 1daef9ab15f2e4a64138073def7097902e8dace0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 4 Nov 2024 16:16:29 +0000 Subject: [PATCH 0824/1638] Use @unique to ensure and communicate enum uniqueness --- src/vws/include_target_data.py | 3 ++- src/vws/reports.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vws/include_target_data.py b/src/vws/include_target_data.py index e259f654a..37682e08a 100644 --- a/src/vws/include_target_data.py +++ b/src/vws/include_target_data.py @@ -2,12 +2,13 @@ Tools for managing ``CloudRecoService.query``'s ``include_target_data``. """ -from enum import StrEnum, auto +from enum import StrEnum, auto, unique from beartype import beartype @beartype +@unique class CloudRecoIncludeTargetData(StrEnum): """ Options for the ``include_target_data`` parameter of diff --git a/src/vws/reports.py b/src/vws/reports.py index 85b5d9133..f6a77133c 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -4,7 +4,7 @@ import datetime from dataclasses import dataclass -from enum import Enum +from enum import Enum, unique from beartype import BeartypeConf, beartype @@ -33,6 +33,7 @@ class DatabaseSummaryReport: @beartype +@unique class TargetStatuses(Enum): """Constants representing VWS target statuses. From 9739a24ee72fad19fedba0818f93545226e2595f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:18:06 +0000 Subject: [PATCH 0825/1638] Bump actionlint-py from 1.7.3.17 to 1.7.4.18 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.3.17 to 1.7.4.18. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.3.17...v1.7.4.18) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 298a0df4f..690657ec4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.3.17", + "actionlint-py==1.7.4.18", "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", From 2f618b920c1748a34d6d30137d0b99a67103d334 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 5 Nov 2024 20:13:08 +0000 Subject: [PATCH 0826/1638] Do not run doccmd against Python or toml files --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0812bf573..1f294554b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -131,7 +131,7 @@ repos: stages: [pre-push] entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python - types_or: [markdown, rst, python, toml] + types_or: [markdown, rst] additional_dependencies: [uv==0.4.25] - id: check-manifest @@ -156,7 +156,7 @@ repos: stages: [pre-push] entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python - types_or: [markdown, rst, python, toml] + types_or: [markdown, rst] additional_dependencies: [uv==0.4.25] - id: vulture @@ -202,7 +202,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pylint" language: python stages: [manual] - types_or: [markdown, rst, python, toml] + types_or: [markdown, rst] additional_dependencies: [uv==0.4.25] - id: ruff-check-fix From 5af1a602dd67a6ebf65debd4369513cf3ddc7943 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:36:52 +0000 Subject: [PATCH 0827/1638] Bump doccmd from 2024.10.18 to 2024.11.5 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.10.18 to 2024.11.5. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.10.18...2024.11.05) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 690657ec4..6c39d3d01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.10.18", + "doccmd==2024.11.5", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 5e78ef0673387e37b610a12f1b4026676d347d91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:02:21 +0000 Subject: [PATCH 0828/1638] Bump pyright from 1.1.387 to 1.1.388 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.387 to 1.1.388. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.387...v1.1.388) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c39d3d01..bd1705d9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.387", + "pyright==1.1.388", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==6.0.0", From 2a8852858c4f9b218ce7d1df67b8cc7543f5c02a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:06:42 +0000 Subject: [PATCH 0829/1638] Bump doccmd from 2024.11.5 to 2024.11.6.1 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.11.5 to 2024.11.6.1. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.11.05...2024.11.06.1) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bd1705d9a..eec897621 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.11.5", + "doccmd==2024.11.6.1", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 9e88c0dd62aa91d30e328cd988b9bf95673e3a96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:16:45 +0000 Subject: [PATCH 0830/1638] Bump doccmd from 2024.11.6.1 to 2024.11.7 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.11.6.1 to 2024.11.7. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.11.06.1...2024.11.07) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eec897621..c399ae48b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.20.0", "doc8==1.1.2", - "doccmd==2024.11.6.1", + "doccmd==2024.11.7", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From a6d114b11d3a11f95a4fe94eb2f06264da8c233a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:17:09 +0000 Subject: [PATCH 0831/1638] Bump ruff from 0.7.2 to 0.7.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.2 to 0.7.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.2...0.7.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c399ae48b..3aff29e7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.7.2", + "ruff==0.7.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 74bb998ca19f486b24e556b86ab662193363853d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:17:19 +0000 Subject: [PATCH 0832/1638] Bump deptry from 0.20.0 to 0.21.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.20.0 to 0.21.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.20.0...0.21.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c399ae48b..e9db15c79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.4.18", "check-manifest==0.50", - "deptry==0.20.0", + "deptry==0.21.0", "doc8==1.1.2", "doccmd==2024.11.7", "docformatter==1.7.5", From 9f406c2deea7538e323d3cf039988e326ac00c69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:58:19 +0000 Subject: [PATCH 0833/1638] Bump sybil from 8.0.1 to 9.0.0 Bumps [sybil](https://github.com/simplistix/sybil) from 8.0.1 to 9.0.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/8.0.1...9.0.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9e8090be7..7004063b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.10.17", "sphinxcontrib-spelling==8", - "sybil==8.0.1", + "sybil==9.0.0", "types-requests==2.32.0.20241016", "vulture==2.13", "vws-python-mock==2024.8.30", From b55458e1edb758d2fd3fcfea657455d55beafe17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:04:35 +0000 Subject: [PATCH 0834/1638] Bump doccmd from 2024.11.7 to 2024.11.14 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.11.7 to 2024.11.14. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.11.07...2024.11.14) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7004063b0..ad76b0516 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.21.0", "doc8==1.1.2", - "doccmd==2024.11.7", + "doccmd==2024.11.14", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 445526966b2ced8c55671dfd0c8ff6056a6922bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:04:47 +0000 Subject: [PATCH 0835/1638] Bump pyright from 1.1.388 to 1.1.389 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.388 to 1.1.389. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.388...v1.1.389) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7004063b0..60f545b93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.1", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.388", + "pyright==1.1.389", "pyroma==4.2", "pytest==8.3.3", "pytest-cov==6.0.0", From 86f74a13c7c7317b58d6e8d8d6d4c505d96d2708 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:57:05 +0000 Subject: [PATCH 0836/1638] Bump ruff from 0.7.3 to 0.7.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.3 to 0.7.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.3...0.7.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d385dc6e0..7f533a20d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.7.3", + "ruff==0.7.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From abc954d08269297e30f7daf9a719e8e5375b3ee1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:57:22 +0000 Subject: [PATCH 0837/1638] Bump deptry from 0.21.0 to 0.21.1 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.21.0 to 0.21.1. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.21.0...0.21.1) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d385dc6e0..e83bb2c7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.4.18", "check-manifest==0.50", - "deptry==0.21.0", + "deptry==0.21.1", "doc8==1.1.2", "doccmd==2024.11.14", "docformatter==1.7.5", From 3c55fb81a5eee8e9ae0372e34c801c0eef99ae64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:26:54 +0000 Subject: [PATCH 0838/1638] Bump codecov/codecov-action from 4 to 5 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71a07849e..bb73eadda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: uv run --extra=dev --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} From 0576a32161e431dbf7073a44015ecf191a660542 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:34:18 +0000 Subject: [PATCH 0839/1638] Bump ruff from 0.7.4 to 0.8.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.4 to 0.8.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.4...0.8.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 36cd9d384..3d7623855 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.7.4", + "ruff==0.8.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From fa0addc8db76ca85b4639eca91189b84c2243c70 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 22 Nov 2024 12:46:30 +0000 Subject: [PATCH 0840/1638] Autofix ruff issue --- src/vws/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vws/__init__.py b/src/vws/__init__.py index 9e4633af8..42788b92d 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -6,6 +6,6 @@ from .vws import VWS __all__ = [ - "CloudRecoService", "VWS", + "CloudRecoService", ] From fdf5a16f77b5a3bb33285173b0729fa4314434da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:00:28 +0000 Subject: [PATCH 0841/1638] Bump astral-sh/setup-uv from 3 to 4 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 3 to 4. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v3...v4) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb73eadda..35cc026b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 - name: Run tests run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9e70657b7..0a55727a1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 - name: Lint run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8fd8c1ce9..5e6f15e6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: token: ${{ secrets.RELEASE_PAT }} - name: Install uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 - name: Calver calculate version uses: StephaneBour/actions-calver@master From 34b4b9aab0de114073858f0359f521e8ae9c9064 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:30:19 +0000 Subject: [PATCH 0842/1638] Bump actionlint-py from 1.7.4.18 to 1.7.4.20 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.4.18 to 1.7.4.20. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.4.18...v1.7.4.20) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3d7623855..2c8142542 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.4.18", + "actionlint-py==1.7.4.20", "check-manifest==0.50", "deptry==0.21.1", "doc8==1.1.2", From 20e0b07a7394b3ff4b69f6360874167a30680ca2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:04:08 +0000 Subject: [PATCH 0843/1638] Bump ruff from 0.8.0 to 0.8.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.0 to 0.8.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.0...0.8.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2c8142542..d0ee6f44f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.3", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.0", + "ruff==0.8.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 370c8a5a66a6753c7ecd299de78839d56bdda1ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:53:21 +0000 Subject: [PATCH 0844/1638] Bump pytest from 8.3.3 to 8.3.4 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.3 to 8.3.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.3...8.3.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0ee6f44f..b74b6a66e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.5.0", "pyright==1.1.389", "pyroma==4.2", - "pytest==8.3.3", + "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", "ruff==0.8.1", From 1cce0971b880daf4bdf879fadb2244dfc97f3549 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:53:35 +0000 Subject: [PATCH 0845/1638] Bump pylint from 3.3.1 to 3.3.2 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0ee6f44f..bf0c961b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.18.0", - "pylint==3.3.1", + "pylint==3.3.2", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", "pyright==1.1.389", From b3ff7cc12c2c94fa9e230e4244d7c644da4f4d27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:53:48 +0000 Subject: [PATCH 0846/1638] Bump check-wheel-contents from 0.6.0 to 0.6.1 Bumps [check-wheel-contents](https://github.com/jwodder/check-wheel-contents) from 0.6.0 to 0.6.1. - [Release notes](https://github.com/jwodder/check-wheel-contents/releases) - [Changelog](https://github.com/jwodder/check-wheel-contents/blob/master/CHANGELOG.md) - [Commits](https://github.com/jwodder/check-wheel-contents/compare/v0.6.0...v0.6.1) --- updated-dependencies: - dependency-name: check-wheel-contents dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0ee6f44f..56ca35d84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,7 +78,7 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] -optional-dependencies.release = [ "check-wheel-contents==0.6.0" ] +optional-dependencies.release = [ "check-wheel-contents==0.6.1" ] urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" urls.Source = "https://github.com/VWS-Python/vws-python" From e74039ad71083e9a470cdb3fe0e52347e83d785f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:28:43 +0000 Subject: [PATCH 0847/1638] Bump pyright from 1.1.389 to 1.1.390 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.389 to 1.1.390. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.389...v1.1.390) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e0a07199d..ecca88562 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.2", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.389", + "pyright==1.1.390", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From bb992fd87907d12b0deae55e53f7a54c9823e51b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:26:59 +0000 Subject: [PATCH 0848/1638] Bump ruff from 0.8.1 to 0.8.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.1 to 0.8.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.1...0.8.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ecca88562..edd1c2c55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.1", + "ruff==0.8.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From aeb05ee1cfc608ee9da9ccd954b86064af84badb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:01:10 +0000 Subject: [PATCH 0849/1638] Bump vulture from 2.13 to 2.14 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.13 to 2.14. - [Release notes](https://github.com/jendrikseipp/vulture/releases) - [Changelog](https://github.com/jendrikseipp/vulture/blob/main/CHANGELOG.md) - [Commits](https://github.com/jendrikseipp/vulture/compare/v2.13...v2.14) --- updated-dependencies: - dependency-name: vulture dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index edd1c2c55..3e2a979d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinxcontrib-spelling==8", "sybil==9.0.0", "types-requests==2.32.0.20241016", - "vulture==2.13", + "vulture==2.14", "vws-python-mock==2024.8.30", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", From ed3817c454fc26bbcf0a7b7498cbb604dc82ea32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:59:27 +0000 Subject: [PATCH 0850/1638] Bump ruff from 0.8.2 to 0.8.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.2 to 0.8.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.2...0.8.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3e2a979d2..6b81fed6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.2", + "ruff==0.8.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From ff43aad37a966384ac97cf9f6f890c94a17b4b93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 10:49:38 +0000 Subject: [PATCH 0851/1638] Bump pyright from 1.1.390 to 1.1.391 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.390 to 1.1.391. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.390...v1.1.391) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6b81fed6c..52d8d147a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.2", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.390", + "pyright==1.1.391", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From f52e3e4701c2fd4d702250d84bf99581e9404199 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 18 Dec 2024 16:17:28 +0000 Subject: [PATCH 0852/1638] Update RTD config with new requirements --- readthedocs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/readthedocs.yaml b/readthedocs.yaml index bdd2bf053..8f093abcc 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -14,4 +14,5 @@ python: sphinx: builder: html + configuration: docs/source/conf.py fail_on_warning: true From f6c4ec183632c1df4730e8c8c00ec969d0902f64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:32:42 +0000 Subject: [PATCH 0853/1638] Bump deptry from 0.21.1 to 0.21.2 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.21.1 to 0.21.2. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.21.1...0.21.2) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 52d8d147a..3b7b2568a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.4.20", "check-manifest==0.50", - "deptry==0.21.1", + "deptry==0.21.2", "doc8==1.1.2", "doccmd==2024.11.14", "docformatter==1.7.5", From c1532193ffbfdcc6c0e2c4091ebec0b6c8cf7bd9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:33:01 +0000 Subject: [PATCH 0854/1638] Bump ruff from 0.8.3 to 0.8.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.3 to 0.8.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.3...0.8.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 52d8d147a..7e830040f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.3", + "ruff==0.8.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 0937e2a0f7ec5abe592ac7000fc7d41ef7af5408 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:33:06 +0000 Subject: [PATCH 0855/1638] Bump sphinxcontrib-spelling from 8 to 8.0.1 Bumps [sphinxcontrib-spelling](https://github.com/sphinx-contrib/spelling) from 8 to 8.0.1. - [Release notes](https://github.com/sphinx-contrib/spelling/releases) - [Commits](https://github.com/sphinx-contrib/spelling/compare/8.0.0...8.0.1) --- updated-dependencies: - dependency-name: sphinxcontrib-spelling dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 52d8d147a..f25340ce1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ optional-dependencies.dev = [ "sphinx==8.1.3", "sphinx-copybutton==0.5.2", "sphinx-substitution-extensions==2024.10.17", - "sphinxcontrib-spelling==8", + "sphinxcontrib-spelling==8.0.1", "sybil==9.0.0", "types-requests==2.32.0.20241016", "vulture==2.14", From d8ebbab8d077f76a6ecc4179e7ef787223096a49 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Dec 2024 11:48:06 +0000 Subject: [PATCH 0856/1638] Do not use now-useless toml specifier for setuptools-scm --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 32e9f8f46..4016997ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "setuptools.build_meta" requires = [ "setuptools", - "setuptools-scm[toml]>=7.1", + "setuptools-scm>=8.1.0", "wheel", ] From 6cd662ccaa746c47197b59dff99f7bf4de88669a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 21 Dec 2024 22:50:23 +0000 Subject: [PATCH 0857/1638] Bump astral-sh/setup-uv from 4 to 5 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 5. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v4...v5) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35cc026b6..a97d1ec58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Run tests run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0a55727a1..2a3910dd7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Lint run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e6f15e6a..14bba54cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: token: ${{ secrets.RELEASE_PAT }} - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Calver calculate version uses: StephaneBour/actions-calver@master From fd30fbd5debf5f819829fcfb67a020a2e318f0a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:14:45 +0000 Subject: [PATCH 0858/1638] Bump mypy[faster-cache] from 1.13.0 to 1.14.0 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.13.0 to 1.14.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4016997ec..687e6593a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.13.0", + "mypy[faster-cache]==1.14.0", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From f53424b1e183dc3e938fd91407980115b751753f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Dec 2024 12:00:13 +0000 Subject: [PATCH 0859/1638] Use new follow_untyped_imports mypy setting --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 687e6593a..aa3600e57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -328,6 +328,7 @@ exclude_also = [ strict = true files = [ "." ] exclude = [ "build" ] +follow_untyped_imports = true [tool.pyright] From 05d54c857511795806262026f17bb4b5b114a515 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:14:18 +0000 Subject: [PATCH 0860/1638] Remove duplicated ruff configuration --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa3600e57..90290dc5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -132,11 +132,6 @@ lint.ignore = [ "S101", ] -lint.per-file-ignores."tests/*.py" = [ - # Do not require tests to have a one-line summary. - "D205", -] - # Do not automatically remove commented out code. # We comment out code during development, and with VSCode auto-save, this code # is sometimes annoyingly removed. From d6d66a410b074f927df04f90ed8962c788648683 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:14:48 +0000 Subject: [PATCH 0861/1638] Remove unnecessary ruff ignore --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 90290dc5f..99df439da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,8 +114,6 @@ lint.select = [ "ALL", ] lint.ignore = [ - # We are happy to manage our own "complexity". - "C901", # Ruff warns that this conflicts with the formatter. "COM812", # Allow our chosen docstring line-style - no one-line summary. From 539d225043c1750e53413d048bf4df8b3132058a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:15:02 +0000 Subject: [PATCH 0862/1638] Remove unnecessary ruff ignore --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 99df439da..9a62370da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,7 +120,6 @@ lint.ignore = [ "D200", "D205", "D212", - "D415", # Ruff warns that this conflicts with the formatter. "ISC001", # Ignore "too-many-*" errors as they seem to get in the way more than From 8b5a6897701bf5ec402e415b27609f5d7199dad9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:15:48 +0000 Subject: [PATCH 0863/1638] Remove unnecessary ruff ignore --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9a62370da..5f5c1db89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,8 +120,6 @@ lint.ignore = [ "D200", "D205", "D212", - # Ruff warns that this conflicts with the formatter. - "ISC001", # Ignore "too-many-*" errors as they seem to get in the way more than # helping. "PLR0913", From b4f25c8dacdbe762958d1c67b6c7fe3d58d2d4a1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:18:47 +0000 Subject: [PATCH 0864/1638] Only allow assert in tests --- docs/source/conf.py | 6 +++++- pyproject.toml | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index da1b8193b..99ef1ff1c 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -46,7 +46,11 @@ requires_python = project_metadata["Requires-Python"] specifiers = SpecifierSet(specifiers=requires_python) (specifier,) = specifiers -assert specifier.operator == ">=" +if specifier.operator != ">=": + msg = ( + f"We only support '>=' for Requires-Python, got {specifier.operator}." + ) + raise ValueError(msg) minimum_python_version = specifier.version language = "en" diff --git a/pyproject.toml b/pyproject.toml index 5f5c1db89..ae5990b27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,7 +123,10 @@ lint.ignore = [ # Ignore "too-many-*" errors as they seem to get in the way more than # helping. "PLR0913", - # Allow 'assert' as we use it for tests. +] + +lint.per-file-ignores."tests/*.py" = [ + # Do not require tests to have a one-line summary. "S101", ] From 4e1d021c82a6adf8dc8887687a5e7bf5a935f2f1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:20:05 +0000 Subject: [PATCH 0865/1638] Put back conflict ignore --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index ae5990b27..75c51e73e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,6 +120,8 @@ lint.ignore = [ "D200", "D205", "D212", + # Ruff warns that this conflicts with the formatter. + "ISC001", # Ignore "too-many-*" errors as they seem to get in the way more than # helping. "PLR0913", From 16bc9a915c058a8bb4a2c83ca96e553f11fd7d4d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:35:15 +0000 Subject: [PATCH 0866/1638] Allow asserts in docs --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 75c51e73e..cb6b2568c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,8 +127,13 @@ lint.ignore = [ "PLR0913", ] +lint.per-file-ignores."docs/source/*.py" = [ + # Allow asserts in docs. + "S101", +] + lint.per-file-ignores."tests/*.py" = [ - # Do not require tests to have a one-line summary. + # Allow asserts in tests. "S101", ] From 1df656fc3ee2d8ed0f7de88eae3b44e21b37e8e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:41:22 +0000 Subject: [PATCH 0867/1638] Bump pylint from 3.3.2 to 3.3.3 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.2 to 3.3.3. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.2...v3.3.3) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aa3600e57..549871ba9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.18.0", - "pylint==3.3.2", + "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", "pyright==1.1.391", From 21318569f938c843a1058a6dfd18ef4ff9bb97bd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 11:56:53 +0000 Subject: [PATCH 0868/1638] Allow asserts in README --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index cb6b2568c..161471daa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,6 +127,11 @@ lint.ignore = [ "PLR0913", ] +lint.per-file-ignores."doccmd_*.py" = [ + # Allow asserts in docs. + "S101", +] + lint.per-file-ignores."docs/source/*.py" = [ # Allow asserts in docs. "S101", From c88618247a7462144d33d3e5b608f584cdf83e35 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 23:13:32 +0000 Subject: [PATCH 0869/1638] Use new mypy plugin for strict kwargs --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index eb9b6e3e1..6db511fff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.14.0", + "mypy-strict-kwargs==2024.12.24", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", @@ -334,6 +335,9 @@ strict = true files = [ "." ] exclude = [ "build" ] follow_untyped_imports = true +plugins = [ + "mypy_strict_kwargs", +] [tool.pyright] From b9f8f7cc2204b09d4ae04c085f7c433813424395 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 23:19:11 +0000 Subject: [PATCH 0870/1638] Use one more kwarg --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 99ef1ff1c..3255877d6 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -39,7 +39,7 @@ # This method of getting the release from the version goes hand in hand with # the ``post-release`` versioning scheme chosen in the ``setuptools-scm`` # configuration. -release = version.split(".post")[0] +release = version.split(sep=".post")[0] project_metadata = importlib.metadata.metadata(distribution_name=project) From b1adac283828212f3681713592745a88940dbb6c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 23:25:59 +0000 Subject: [PATCH 0871/1638] Use keyword args all over --- src/vws/exceptions/vws_exceptions.py | 2 +- src/vws/vws.py | 2 +- tests/test_cloud_reco_exceptions.py | 12 ++++++----- tests/test_vws.py | 13 ++++++++---- tests/test_vws_exceptions.py | 30 ++++++++++++++++------------ 5 files changed, 35 insertions(+), 24 deletions(-) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index b0e3dcbda..482223766 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -154,7 +154,7 @@ def target_name(self) -> str: """ response_body = self.response.request_body or b"" request_json = json.loads(s=response_body) - return str(request_json["name"]) + return str(object=request_json["name"]) @beartype diff --git a/src/vws/vws.py b/src/vws/vws.py index 492bef5cf..f101a7ecc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -322,7 +322,7 @@ def add_target( content_type="application/json", ) - return str(json.loads(s=response.text)["target_id"]) + return str(object=json.loads(s=response.text)["target_id"]) def get_target_record(self, target_id: str) -> TargetStatusAndRecord: """Get a given target's target record from the Target Management diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index d33da8e72..3515b0d22 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -33,7 +33,7 @@ def test_too_many_max_results( A ``MaxNumResultsOutOfRange`` error is raised if the given ``max_num_results`` is out of range. """ - with pytest.raises(MaxNumResultsOutOfRangeError) as exc: + with pytest.raises(expected_exception=MaxNumResultsOutOfRangeError) as exc: cloud_reco_client.query( image=high_quality_image, max_num_results=51, @@ -43,7 +43,7 @@ def test_too_many_max_results( "Integer out of range (51) in form data part 'max_result'. " "Accepted range is from 1 to 50 (inclusive)." ) - assert str(exc.value) == exc.value.response.text == expected_value + assert str(object=exc.value) == exc.value.response.text == expected_value def test_image_too_large( @@ -54,7 +54,7 @@ def test_image_too_large( A ``RequestEntityTooLarge`` exception is raised if an image which is too large is given. """ - with pytest.raises(RequestEntityTooLargeError) as exc: + with pytest.raises(expected_exception=RequestEntityTooLargeError) as exc: cloud_reco_client.query(image=png_too_large) assert ( @@ -92,7 +92,9 @@ def test_authentication_failure( with MockVWS() as mock: mock.add_database(database=database) - with pytest.raises(AuthenticationFailureError) as exc: + with pytest.raises( + expected_exception=AuthenticationFailureError + ) as exc: cloud_reco_client.query(image=high_quality_image) assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED @@ -113,7 +115,7 @@ def test_inactive_project( client_secret_key=database.client_secret_key, ) - with pytest.raises(InactiveProjectError) as exc: + with pytest.raises(expected_exception=InactiveProjectError) as exc: cloud_reco_client.query(image=high_quality_image) response = exc.value.response diff --git a/tests/test_vws.py b/tests/test_vws.py index 500320c0a..e16eff555 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -30,8 +30,11 @@ class TestAddTarget: """ @staticmethod - @pytest.mark.parametrize("application_metadata", [None, b"a"]) - @pytest.mark.parametrize("active_flag", [True, False]) + @pytest.mark.parametrize( + argnames="application_metadata", + argvalues=[None, b"a"], + ) + @pytest.mark.parametrize(argnames="active_flag", argvalues=[True, False]) def test_add_target( vws_client: VWS, image: io.BytesIO | BinaryIO, @@ -211,7 +214,7 @@ def test_get_target_summary_report( status=TargetStatuses.SUCCESS, database_name=report.database_name, target_name=target_name, - upload_date=datetime.date(2018, 4, 25), + upload_date=datetime.date(year=2018, month=4, day=25), active_flag=True, tracking_rating=report.tracking_rating, total_recos=0, @@ -511,7 +514,9 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: report = vws_client.get_target_summary_report(target_id=target_id) assert report.status == TargetStatuses.PROCESSING - with pytest.raises(TargetProcessingTimeoutError): + with pytest.raises( + expected_exception=TargetProcessingTimeoutError + ): vws_client.wait_for_target_processed( target_id=target_id, timeout_seconds=0.1, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 8f422615d..f9a7b8dab 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -45,7 +45,7 @@ def test_image_too_large( When giving an image which is too large, an ``ImageTooLarge`` exception is raised. """ - with pytest.raises(ImageTooLargeError) as exc: + with pytest.raises(expected_exception=ImageTooLargeError) as exc: vws_client.add_target( name="x", width=1, @@ -63,7 +63,7 @@ def test_invalid_given_id(vws_client: VWS) -> None: causes an ``UnknownTarget`` exception to be raised. """ target_id = "12345abc" - with pytest.raises(UnknownTargetError) as exc: + with pytest.raises(expected_exception=UnknownTargetError) as exc: vws_client.delete_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.NOT_FOUND assert exc.value.target_id == target_id @@ -76,7 +76,9 @@ def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ max_char_value = 65535 bad_name = chr(max_char_value + 1) - with pytest.raises(OopsAnErrorOccurredPossiblyBadNameError) as exc: + with pytest.raises( + expected_exception=OopsAnErrorOccurredPossiblyBadNameError + ) as exc: vws_client.add_target( name=bad_name, width=1, @@ -105,7 +107,7 @@ def test_fail(high_quality_image: io.BytesIO) -> None: server_secret_key=uuid.uuid4().hex, ) - with pytest.raises(FailError) as exc: + with pytest.raises(expected_exception=FailError) as exc: vws_client.add_target( name="x", width=1, @@ -122,7 +124,7 @@ def test_bad_image(vws_client: VWS) -> None: A ``BadImage`` exception is raised when a non-image is given. """ not_an_image = io.BytesIO(initial_bytes=b"Not an image") - with pytest.raises(BadImageError) as exc: + with pytest.raises(expected_exception=BadImageError) as exc: vws_client.add_target( name="x", width=1, @@ -149,7 +151,7 @@ def test_target_name_exist( active_flag=True, application_metadata=None, ) - with pytest.raises(TargetNameExistError) as exc: + with pytest.raises(expected_exception=TargetNameExistError) as exc: vws_client.add_target( name="x", width=1, @@ -177,7 +179,7 @@ def test_project_inactive( server_secret_key=database.server_secret_key, ) - with pytest.raises(ProjectInactiveError) as exc: + with pytest.raises(expected_exception=ProjectInactiveError) as exc: vws_client.add_target( name="x", width=1, @@ -205,7 +207,7 @@ def test_target_status_processing( application_metadata=None, ) - with pytest.raises(TargetStatusProcessingError) as exc: + with pytest.raises(expected_exception=TargetStatusProcessingError) as exc: vws_client.delete_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN @@ -220,7 +222,7 @@ def test_metadata_too_large( A ``MetadataTooLarge`` exception is raised if the metadata given is too large. """ - with pytest.raises(MetadataTooLargeError) as exc: + with pytest.raises(expected_exception=MetadataTooLargeError) as exc: vws_client.add_target( name="x", width=1, @@ -260,7 +262,7 @@ def test_request_time_too_skewed( # >= 1 ticks are acceptable. with ( freeze_time(auto_tick_seconds=time_difference_from_now), - pytest.raises(RequestTimeTooSkewedError) as exc, + pytest.raises(expected_exception=RequestTimeTooSkewedError) as exc, ): vws_client.get_target_record(target_id=target_id) @@ -285,7 +287,9 @@ def test_authentication_failure( with MockVWS() as mock: mock.add_database(database=database) - with pytest.raises(AuthenticationFailureError) as exc: + with pytest.raises( + expected_exception=AuthenticationFailureError + ) as exc: vws_client.add_target( name="x", width=1, @@ -313,7 +317,7 @@ def test_target_status_not_success( application_metadata=None, ) - with pytest.raises(TargetStatusNotSuccessError) as exc: + with pytest.raises(expected_exception=TargetStatusNotSuccessError) as exc: vws_client.update_target(target_id=target_id) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN @@ -353,7 +357,7 @@ def test_base_exception( """ ``VWSException``s has a response property. """ - with pytest.raises(VWSError) as exc: + with pytest.raises(expected_exception=VWSError) as exc: vws_client.get_target_record(target_id="a") assert exc.value.response.status_code == HTTPStatus.NOT_FOUND From ad0795cf48d84f8ee6cf533963bc4510aaf92d1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2024 10:20:18 +0000 Subject: [PATCH 0872/1638] Bump mypy-strict-kwargs from 2024.12.24 to 2024.12.25 Bumps [mypy-strict-kwargs](https://github.com/adamtheturtle/mypy-strict-kwargs) from 2024.12.24 to 2024.12.25. - [Release notes](https://github.com/adamtheturtle/mypy-strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/mypy-strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/mypy-strict-kwargs/compare/2024.12.24...2024.12.25) --- updated-dependencies: - dependency-name: mypy-strict-kwargs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6db511fff..726dbd4ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.14.0", - "mypy-strict-kwargs==2024.12.24", + "mypy-strict-kwargs==2024.12.25", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From 64607a2fa7dfdd670e8f4399eb5c5592bd2356ba Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 26 Dec 2024 07:01:41 +0000 Subject: [PATCH 0873/1638] Disable type ignore comments for pyright --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 726dbd4ca..6ee5eec29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -341,6 +341,7 @@ plugins = [ [tool.pyright] +enableTypeIgnoreComments = false reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" From 8f2631e60c3a9c8547898f2cd85a3acd4f2127cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 10:59:42 +0000 Subject: [PATCH 0874/1638] Bump doccmd from 2024.11.14 to 2024.12.26 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.11.14 to 2024.12.26. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.11.14...2024.12.26) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6ee5eec29..3c82dd032 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.21.2", "doc8==1.1.2", - "doccmd==2024.11.14", + "doccmd==2024.12.26", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From b641d7e40e2ecfd700eebb168a4fd99624a245cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:54:02 +0000 Subject: [PATCH 0875/1638] Bump actionlint-py from 1.7.4.20 to 1.7.5.21 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.4.20 to 1.7.5.21. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.4.20...v1.7.5.21) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c82dd032..5bf392282 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.4.20", + "actionlint-py==1.7.5.21", "check-manifest==0.50", "deptry==0.21.2", "doc8==1.1.2", From d8c738d775ea332b6d1bd19fc32da9b6cfafe512 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 30 Dec 2024 11:03:32 +0000 Subject: [PATCH 0876/1638] Set release fetch-depth to 0 with a comment why --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14bba54cc..e25f5f32e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,12 @@ jobs: # See # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches token: ${{ secrets.RELEASE_PAT }} + # Fetch all history including tags. + # Needed to find the latest tag. + # + # Also, avoids + # https://github.com/stefanzweifel/git-auto-commit-action/issues/99. + fetch-depth: 0 - name: Install uv uses: astral-sh/setup-uv@v5 From 3e9e239dab2da489e4af0a473d513f3105ebdaec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:14:09 +0000 Subject: [PATCH 0877/1638] Bump mypy[faster-cache] from 1.14.0 to 1.14.1 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.14.0 to 1.14.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.14.0...v1.14.1) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5bf392282..c0f6a28f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.14.0", + "mypy[faster-cache]==1.14.1", "mypy-strict-kwargs==2024.12.25", "pre-commit==4.0.1", "pydocstyle==6.3", From abac5901fdad9feed0e2c44130d0ca781e41ee2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 10:45:59 +0000 Subject: [PATCH 0878/1638] Bump sphinx-substitution-extensions from 2024.10.17 to 2025.1.2 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2024.10.17 to 2025.1.2. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2024.10.17...2025.01.02) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c0f6a28f7..8819a5885 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ optional-dependencies.dev = [ "shfmt-py==3.7.0.1", "sphinx==8.1.3", "sphinx-copybutton==0.5.2", - "sphinx-substitution-extensions==2024.10.17", + "sphinx-substitution-extensions==2025.1.2", "sphinxcontrib-spelling==8.0.1", "sybil==9.0.0", "types-requests==2.32.0.20241016", From 2405e89225dc55d38f1f7d70465a275a88e87aa2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 10:31:36 +0000 Subject: [PATCH 0879/1638] Bump ruff from 0.8.4 to 0.8.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.4 to 0.8.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.4...0.8.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8819a5885..3007e1da3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.4", + "ruff==0.8.5", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 5c309c01e1c4f5e5f0706182acfe3c5a19fe26e0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Jan 2025 10:25:40 +0000 Subject: [PATCH 0880/1638] Git ignore DS_Store files --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0a4d3ec0c..556e31308 100644 --- a/.gitignore +++ b/.gitignore @@ -98,8 +98,9 @@ secrets.tar # mypy .mypy_cache/ -# macOS attributes -*.DS_Store +# Ignore Mac DS_Store files +.DS_Store +**/.DS_Store # pyre .pyre/ From 7da543de3eeee679b6f114223173afea9bfb2a6e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Jan 2025 12:44:48 +0000 Subject: [PATCH 0881/1638] Add sphinx-lint --- .pre-commit-config.yaml | 69 +++++++++++++++++++++++------------------ pyproject.toml | 1 + 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f294554b..ea72086b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ ci: # We therefore cannot use those dependencies in pre-commit CI. skip: - actionlint + - sphinx-lint - check-manifest - deptry - doc8 @@ -77,14 +78,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shellcheck name: shellcheck @@ -92,7 +93,7 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shellcheck-docs name: shellcheck-docs @@ -100,14 +101,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: shfmt-docs name: shfmt-docs @@ -115,7 +116,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: mypy name: mypy @@ -124,7 +125,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: mypy-docs name: mypy-docs @@ -132,7 +133,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: check-manifest name: check-manifest @@ -140,7 +141,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyright name: pyright @@ -149,7 +150,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyright-docs name: pyright-docs @@ -157,7 +158,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: vulture name: vulture @@ -165,14 +166,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyroma name: pyroma @@ -180,14 +181,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pylint name: pylint @@ -195,7 +196,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pylint-docs name: pylint-docs @@ -203,28 +204,28 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: ruff-format-fix-docs name: Ruff format docs @@ -232,28 +233,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyproject-fmt-fix name: pyproject-fmt @@ -261,7 +262,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: linkcheck name: linkcheck @@ -270,7 +271,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: spelling name: spelling @@ -279,7 +280,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: docs name: Build Documentation @@ -287,7 +288,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: pyright-verifytypes name: pyright-verifytypes @@ -296,11 +297,19 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.4.25] + additional_dependencies: [uv==0.5.14] + + - id: sphinx-lint + name: sphinx-lint + entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long + *.rst + language: python + types_or: [rst] + additional_dependencies: [uv==0.5.14] diff --git a/pyproject.toml b/pyproject.toml index 3007e1da3..64653715f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,7 @@ optional-dependencies.dev = [ "shfmt-py==3.7.0.1", "sphinx==8.1.3", "sphinx-copybutton==0.5.2", + "sphinx-lint==1.0.0", "sphinx-substitution-extensions==2025.1.2", "sphinxcontrib-spelling==8.0.1", "sybil==9.0.0", From 4cca633998b09d0e411fe6a0dd6b0ef1382e126b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Jan 2025 12:49:23 +0000 Subject: [PATCH 0882/1638] Add sphinx-lint --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea72086b0..0373a88bb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -309,7 +309,7 @@ repos: - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long - *.rst + README.rst CHANGELOG.rst language: python types_or: [rst] additional_dependencies: [uv==0.5.14] From 83db11de8b240c59aad39de1330307caf28aa399 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 5 Jan 2025 13:01:48 +0000 Subject: [PATCH 0883/1638] Add sphinx-lint --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0373a88bb..ea4c5ebc2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -309,7 +309,6 @@ repos: - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long - README.rst CHANGELOG.rst language: python types_or: [rst] additional_dependencies: [uv==0.5.14] From c8128785f2b615d12e9fef35970344acd7dff7f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:50:08 +0000 Subject: [PATCH 0884/1638] Bump ruff from 0.8.5 to 0.8.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.5 to 0.8.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.5...0.8.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64653715f..6bacaed13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.5", + "ruff==0.8.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 0e0cb9272b36cab04f4307a4b9f7a5b2f5e8646e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:50:17 +0000 Subject: [PATCH 0885/1638] Bump actionlint-py from 1.7.5.21 to 1.7.6.22 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.5.21 to 1.7.6.22. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.5.21...v1.7.6.22) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64653715f..daa0a562d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.5.21", + "actionlint-py==1.7.6.22", "check-manifest==0.50", "deptry==0.21.2", "doc8==1.1.2", From cec8a50c73dd3b18d9e37c65b09222b694bc38f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:50:27 +0000 Subject: [PATCH 0886/1638] Bump pygments from 2.18.0 to 2.19.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.18.0 to 2.19.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.18.0...2.19.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64653715f..a73ffc731 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", - "pygments==2.18.0", + "pygments==2.19.0", "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", From c5e71b61a5fbf3096cddd18304e473a729cb1a63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 10:25:13 +0000 Subject: [PATCH 0887/1638] Bump pygments from 2.19.0 to 2.19.1 Bumps [pygments](https://github.com/pygments/pygments) from 2.19.0 to 2.19.1. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.19.0...2.19.1) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1037669a8..7808e35f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", - "pygments==2.19.0", + "pygments==2.19.1", "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", From d1cdad93a0b67da8790e6891a0717f43635d5698 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:37:29 +0000 Subject: [PATCH 0888/1638] Bump deptry from 0.21.2 to 0.22.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.21.2 to 0.22.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.21.2...0.22.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7808e35f5..6debe88fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.6.22", "check-manifest==0.50", - "deptry==0.21.2", + "deptry==0.22.0", "doc8==1.1.2", "doccmd==2024.12.26", "docformatter==1.7.5", From d1f2c40bbabee195aaa5042f9188232035f74cc7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:37:36 +0000 Subject: [PATCH 0889/1638] Bump doccmd from 2024.12.26 to 2025.1.11 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2024.12.26 to 2025.1.11. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2024.12.26...2025.01.11) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7808e35f5..86ad9ace3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.21.2", "doc8==1.1.2", - "doccmd==2024.12.26", + "doccmd==2025.1.11", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 8ca426106fc6de07929bc7773935e3b33cbb49c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:37:53 +0000 Subject: [PATCH 0890/1638] Bump ruff from 0.8.6 to 0.9.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.6 to 0.9.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.6...0.9.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7808e35f5..6644e66c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.8.6", + "ruff==0.9.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e8b9c02a0f7bfe474475a7c28ac6565d0b26cfb7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 13 Jan 2025 19:49:07 +0000 Subject: [PATCH 0891/1638] Stop shadowing Python builtin "types" --- CHANGELOG.rst | 8 ++------ docs/source/api-reference.rst | 2 +- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/{vws.py => response.py} | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) rename src/vws/{vws.py => response.py} (99%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b18bc5e4f..346066c86 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,16 +4,12 @@ Changelog Next ---- -2024.09.21 ------------- - -2024.09.04.1 ------------- +* Move ``Response`` from ``vws.response`` to ``vws.response``. 2024.09.04 ------------ -* Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. +* Move ``Response`` from ``vws.exceptions.response`` to ``vws.response``. * Add ``raw`` field to ``Response``. 2024.09.03 diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 5b7027550..01bba09b2 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -13,6 +13,6 @@ API Reference :undoc-members: :members: -.. automodule:: vws.types +.. automodule:: vws.response :undoc-members: :members: diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index b0888f93f..943323bfd 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,7 @@ from beartype import beartype -from vws.types import Response +from vws.response import Response @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index f05d59b41..11d47a67a 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from vws.types import Response +from vws.response import Response @beartype diff --git a/src/vws/query.py b/src/vws/query.py index 84144691c..96122aa14 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -27,7 +27,7 @@ ) from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -from vws.types import Response +from vws.response import Response _ImageType = io.BytesIO | BinaryIO diff --git a/src/vws/vws.py b/src/vws/response.py similarity index 99% rename from src/vws/vws.py rename to src/vws/response.py index f101a7ecc..f87766571 100644 --- a/src/vws/vws.py +++ b/src/vws/response.py @@ -46,7 +46,7 @@ TargetStatuses, TargetSummaryReport, ) -from vws.types import Response +from vws.response import Response _ImageType = io.BytesIO | BinaryIO From 91d7fffa311e9e0ea6ec18fb6799c2a5e588dd27 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 13 Jan 2025 19:51:53 +0000 Subject: [PATCH 0892/1638] Revert "Stop shadowing Python builtin "types"" This reverts commit e8b9c02a0f7bfe474475a7c28ac6565d0b26cfb7. --- CHANGELOG.rst | 8 ++++++-- docs/source/api-reference.rst | 2 +- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/{response.py => vws.py} | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) rename src/vws/{response.py => vws.py} (99%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 346066c86..b18bc5e4f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,12 +4,16 @@ Changelog Next ---- -* Move ``Response`` from ``vws.response`` to ``vws.response``. +2024.09.21 +------------ + +2024.09.04.1 +------------ 2024.09.04 ------------ -* Move ``Response`` from ``vws.exceptions.response`` to ``vws.response``. +* Move ``Response`` from ``vws.exceptions.response`` to ``vws.types``. * Add ``raw`` field to ``Response``. 2024.09.03 diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 01bba09b2..5b7027550 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -13,6 +13,6 @@ API Reference :undoc-members: :members: -.. automodule:: vws.response +.. automodule:: vws.types :undoc-members: :members: diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 943323bfd..b0888f93f 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,7 @@ from beartype import beartype -from vws.response import Response +from vws.types import Response @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 11d47a67a..f05d59b41 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from vws.response import Response +from vws.types import Response @beartype diff --git a/src/vws/query.py b/src/vws/query.py index 96122aa14..84144691c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -27,7 +27,7 @@ ) from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -from vws.response import Response +from vws.types import Response _ImageType = io.BytesIO | BinaryIO diff --git a/src/vws/response.py b/src/vws/vws.py similarity index 99% rename from src/vws/response.py rename to src/vws/vws.py index f87766571..f101a7ecc 100644 --- a/src/vws/response.py +++ b/src/vws/vws.py @@ -46,7 +46,7 @@ TargetStatuses, TargetSummaryReport, ) -from vws.response import Response +from vws.types import Response _ImageType = io.BytesIO | BinaryIO From cfa9a065ee95cff51de806d33113612b58cf7769 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 13 Jan 2025 19:52:24 +0000 Subject: [PATCH 0893/1638] Stop shadowing Python builtin "types" --- docs/source/api-reference.rst | 2 +- src/vws/exceptions/base_exceptions.py | 2 +- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/query.py | 2 +- src/vws/{types.py => response.py} | 0 src/vws/vws.py | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename src/vws/{types.py => response.py} (100%) diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 5b7027550..01bba09b2 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -13,6 +13,6 @@ API Reference :undoc-members: :members: -.. automodule:: vws.types +.. automodule:: vws.response :undoc-members: :members: diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index b0888f93f..943323bfd 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -5,7 +5,7 @@ from beartype import beartype -from vws.types import Response +from vws.response import Response @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index f05d59b41..11d47a67a 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from vws.types import Response +from vws.response import Response @beartype diff --git a/src/vws/query.py b/src/vws/query.py index 84144691c..96122aa14 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -27,7 +27,7 @@ ) from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -from vws.types import Response +from vws.response import Response _ImageType = io.BytesIO | BinaryIO diff --git a/src/vws/types.py b/src/vws/response.py similarity index 100% rename from src/vws/types.py rename to src/vws/response.py diff --git a/src/vws/vws.py b/src/vws/vws.py index f101a7ecc..f87766571 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -46,7 +46,7 @@ TargetStatuses, TargetSummaryReport, ) -from vws.types import Response +from vws.response import Response _ImageType = io.BytesIO | BinaryIO From fa88b5aba6cb2644051f897791580077599246e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:57:17 +0000 Subject: [PATCH 0894/1638] Bump pyright from 1.1.391 to 1.1.392 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.391 to 1.1.392. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.391...v1.1.392) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 95088de94..1fe83f189 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.391", + "pyright==1.1.392", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From ec09302f088a783c88888bf67a001f78480dcef1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 16 Jan 2025 08:29:31 +0000 Subject: [PATCH 0895/1638] Bump uv in pre-commit hooks to 0.5.20 --- .pre-commit-config.yaml | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea4c5ebc2..8cfad7775 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,14 +78,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: shellcheck name: shellcheck @@ -93,7 +93,7 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: shellcheck-docs name: shellcheck-docs @@ -101,14 +101,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: shfmt-docs name: shfmt-docs @@ -116,7 +116,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: mypy name: mypy @@ -125,7 +125,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: mypy-docs name: mypy-docs @@ -133,7 +133,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: check-manifest name: check-manifest @@ -141,7 +141,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyright name: pyright @@ -150,7 +150,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyright-docs name: pyright-docs @@ -158,7 +158,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: vulture name: vulture @@ -166,14 +166,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyroma name: pyroma @@ -181,14 +181,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pylint name: pylint @@ -196,7 +196,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pylint-docs name: pylint-docs @@ -204,28 +204,28 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: ruff-format-fix-docs name: Ruff format docs @@ -233,28 +233,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyproject-fmt-fix name: pyproject-fmt @@ -262,7 +262,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: linkcheck name: linkcheck @@ -271,7 +271,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: spelling name: spelling @@ -280,7 +280,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: docs name: Build Documentation @@ -288,7 +288,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: pyright-verifytypes name: pyright-verifytypes @@ -297,18 +297,18 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long language: python types_or: [rst] - additional_dependencies: [uv==0.5.14] + additional_dependencies: [uv==0.5.20] From 84ed631f22d6c48d0a176e967f7bf51d3360d1d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:55:30 +0000 Subject: [PATCH 0896/1638] Bump pyright from 1.1.392 to 1.1.392.post0 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.392 to 1.1.392.post0. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.392...v1.1.392.post0) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1fe83f189..fc80a4b8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.3", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.5.0", - "pyright==1.1.392", + "pyright==1.1.392.post0", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From 381e4c14ac8d8101eb416f76450fdaf335c3c65a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:12:52 +0000 Subject: [PATCH 0897/1638] Bump ruff from 0.9.1 to 0.9.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.1 to 0.9.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.1...0.9.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc80a4b8b..ffc039e6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.1", + "ruff==0.9.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e0b9f4304803a9d303b2ecfa8dae97c3297576cc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 17 Jan 2025 21:42:29 +0000 Subject: [PATCH 0898/1638] Use new format for pylint-per-file-ignores --- pyproject.toml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ffc039e6f..7876b245e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pyenchant==3.3.0rc1", "pygments==2.19.1", "pylint==3.3.3", - "pylint-per-file-ignores==1.3.2", + "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.0", "pyright==1.1.392.post0", "pyroma==4.2", @@ -244,16 +244,14 @@ disable = [ 'useless-type-doc', ] -# This format is described in the following issue: -# https://github.com/christopherpickering/pylint-per-file-ignores/issues/160 -# # We ignore invalid names because: # - We want to use generated module names, which may not be valid, but are never seen. -# - We want to use global variables in documentation, which may not be uppercase -per-file-ignores = """ -docs/:invalid-name -doccmd_README_rst.*.py:invalid-name -""" +# - We want to use global variables in documentation, which may not be uppercase. +# - conf.py is a Sphinx configuration file which requires lowercase global variable names. +per-file-ignores = [ + "docs/:invalid-name", + "doccmd_README_rst.*.py:invalid-name", +] [tool.pylint.'FORMAT'] From 62b7929c87295b6b84e20f5e10c327fbd3170403 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:44:58 +0000 Subject: [PATCH 0899/1638] Bump actionlint-py from 1.7.6.22 to 1.7.7.23 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.6.22 to 1.7.7.23. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.6.22...v1.7.7.23) --- updated-dependencies: - dependency-name: actionlint-py dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7876b245e..ac82f3dae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.6.22", + "actionlint-py==1.7.7.23", "check-manifest==0.50", "deptry==0.22.0", "doc8==1.1.2", From be7bd0807c3abf3a71eb88ac2b06309aec2e9079 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:56:35 +0000 Subject: [PATCH 0900/1638] Bump pre-commit from 4.0.1 to 4.1.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.0.1 to 4.1.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.0.1...v4.1.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ac82f3dae..ce014677f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.14.1", "mypy-strict-kwargs==2024.12.25", - "pre-commit==4.0.1", + "pre-commit==4.1.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.1", From 1db4390098d433c9a18e26b5d2b0013dd755a558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 10:38:35 +0000 Subject: [PATCH 0901/1638] Bump ruff from 0.9.2 to 0.9.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.2 to 0.9.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.2...0.9.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ce014677f..8380900e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.2", + "ruff==0.9.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From effe06f77ac552a50acdc8f409eda201914e9123 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 10:30:22 +0000 Subject: [PATCH 0902/1638] Bump deptry from 0.22.0 to 0.23.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/fpgmaas/deptry/releases) - [Changelog](https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/fpgmaas/deptry/compare/0.22.0...0.23.0) --- updated-dependencies: - dependency-name: deptry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8380900e6..8321983b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.7.23", "check-manifest==0.50", - "deptry==0.22.0", + "deptry==0.23.0", "doc8==1.1.2", "doccmd==2025.1.11", "docformatter==1.7.5", From b9b14c4a488a8a28017f388294a54cb2d1082ad7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 10:31:31 +0000 Subject: [PATCH 0903/1638] Bump pylint from 3.3.3 to 3.3.4 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.3 to 3.3.4. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.3...v3.3.4) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8321983b1..04b173ec3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.1", - "pylint==3.3.3", + "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.0", "pyright==1.1.392.post0", From 1c6c6a146b6eb9ee23faa18eedd82f9e0bff6ff4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:33:08 +0000 Subject: [PATCH 0904/1638] Bump pyright from 1.1.392.post0 to 1.1.393 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.392.post0 to 1.1.393. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.392.post0...v1.1.393) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 04b173ec3..eb97626ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.0", - "pyright==1.1.392.post0", + "pyright==1.1.393", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From d83dc0fc60a019e12c88c0eebb9cb07ed282a210 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 10:12:44 +0000 Subject: [PATCH 0905/1638] Bump ruff from 0.9.3 to 0.9.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.3 to 0.9.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.3...0.9.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eb97626ac..528d2a1da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.3", + "ruff==0.9.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 72724e3a35848f2fa5b1941d09631c68a220c445 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:40:00 +0000 Subject: [PATCH 0906/1638] Bump mypy[faster-cache] from 1.14.1 to 1.15.0 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.14.1 to 1.15.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.14.1...v1.15.0) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 528d2a1da..9d13cb32a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.14.1", + "mypy[faster-cache]==1.15.0", "mypy-strict-kwargs==2024.12.25", "pre-commit==4.1.0", "pydocstyle==6.3", From 27e4ff50ce7d8f45770bedb2b296e24997a97773 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:32:43 +0000 Subject: [PATCH 0907/1638] Bump ruff from 0.9.4 to 0.9.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.4 to 0.9.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.4...0.9.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d13cb32a..25cfe33a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.4", + "ruff==0.9.5", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 6cd98b652dc0b875aea5fbfa1e6756f25c4edbea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:14:24 +0000 Subject: [PATCH 0908/1638] Bump ruff from 0.9.5 to 0.9.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.5 to 0.9.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.5...0.9.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 25cfe33a3..42bf430f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.5", + "ruff==0.9.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e1285610787bebc584e3f2135fe4d99c73fd37c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:01:49 +0000 Subject: [PATCH 0909/1638] Bump pyright from 1.1.393 to 1.1.394 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.393 to 1.1.394. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.393...v1.1.394) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 42bf430f7..8c4119585 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.0", - "pyright==1.1.393", + "pyright==1.1.394", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From e13c439e4816c10dfbe044910538025f1e65c3e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 10:50:57 +0000 Subject: [PATCH 0910/1638] Bump doccmd from 2025.1.11 to 2025.2.17 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.1.11 to 2025.2.17. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.01.11...2025.02.17) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8c4119585..f1a471279 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.1.11", + "doccmd==2025.2.17", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From ce1e6ab169dc7f4cb26f41f4b43a53bec41b3179 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:40:30 +0000 Subject: [PATCH 0911/1638] Bump pyproject-fmt from 2.5.0 to 2.5.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.5.0...pyproject-fmt/2.5.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1a471279..297222105 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pygments==2.19.1", "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", - "pyproject-fmt==2.5.0", + "pyproject-fmt==2.5.1", "pyright==1.1.394", "pyroma==4.2", "pytest==8.3.4", From ef308f4e3b3db2e8a5b668fdc3b740c69246bc40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:40:36 +0000 Subject: [PATCH 0912/1638] Bump sphinx-substitution-extensions from 2025.1.2 to 2025.2.19 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.1.2 to 2025.2.19. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.01.02...2025.02.19) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1a471279..36967d9bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinx==8.1.3", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", - "sphinx-substitution-extensions==2025.1.2", + "sphinx-substitution-extensions==2025.2.19", "sphinxcontrib-spelling==8.0.1", "sybil==9.0.0", "types-requests==2.32.0.20241016", From aeb12cb061f732c534a0bd569c437e51ba650088 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:45:54 +0000 Subject: [PATCH 0913/1638] Bump sybil from 9.0.0 to 9.1.0 Bumps [sybil](https://github.com/simplistix/sybil) from 9.0.0 to 9.1.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/9.0.0...9.1.0) --- updated-dependencies: - dependency-name: sybil dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4617145cd..16399ce7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-lint==1.0.0", "sphinx-substitution-extensions==2025.2.19", "sphinxcontrib-spelling==8.0.1", - "sybil==9.0.0", + "sybil==9.1.0", "types-requests==2.32.0.20241016", "vulture==2.14", "vws-python-mock==2024.8.30", From 5b5f08bec20e2c161225bb9f779e260a0fbe9052 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:00:54 +0000 Subject: [PATCH 0914/1638] Bump sphinx from 8.1.3 to 8.2.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.1.3 to 8.2.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.1.3...v8.2.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 16399ce7a..6b77bb7a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.1.3", + "sphinx==8.2.0", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-substitution-extensions==2025.2.19", From 34db2b50cdaa147e699db601317bc2be889ee0dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:00:55 +0000 Subject: [PATCH 0915/1638] Bump vws-python-mock from 2024.8.30 to 2025.2.18 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2024.8.30 to 2025.2.18. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2024.08.30...2025.02.18) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 16399ce7a..63bf52922 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "sybil==9.1.0", "types-requests==2.32.0.20241016", "vulture==2.14", - "vws-python-mock==2024.8.30", + "vws-python-mock==2025.2.18", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] From e703605f962b1bf89c320895a46a1b3cc89ed7a5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 20 Feb 2025 13:38:43 +0000 Subject: [PATCH 0916/1638] Add traceback to word list --- spelling_private_dict.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index ec77ade47..ce782a4af 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -90,6 +90,7 @@ rgb str timestamp todo +traceback travis txt unmocked From e80f13e4f7eb7fd4d39bdfc3770223f129fa1c4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:47:01 +0000 Subject: [PATCH 0917/1638] Bump doccmd from 2025.2.17 to 2025.2.19 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.2.17 to 2025.2.19. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.02.17...2025.02.19) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6b77bb7a4..c97064e77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.2.17", + "doccmd==2025.2.19", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From a37bc0c4e65717bf575c77f3e3a82bd83b74180d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 20 Feb 2025 13:57:17 +0000 Subject: [PATCH 0918/1638] Remove unnecessary strategy from release.yml --- .github/workflows/release.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e25f5f32e..5f18688d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,10 +20,6 @@ jobs: # This is needed for https://github.com/stefanzweifel/git-auto-commit-action. contents: write - strategy: - matrix: - python-version: ['3.12'] - steps: - uses: actions/checkout@v4 with: From 95d1f7252555bd05e805a733746694eec095881e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 20 Feb 2025 14:51:04 +0000 Subject: [PATCH 0919/1638] Make sure GitHub releases are marked as latest --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f18688d2..e0e8e6c11 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,6 +79,7 @@ jobs: uses: ncipollo/release-action@v1 with: tag: ${{ steps.tag_version.outputs.new_tag }} + makeLatest: true name: Release ${{ steps.tag_version.outputs.new_tag }} body: ${{ steps.tag_version.outputs.changelog }} From 91804f94b814b8cdb14b840f1b7983a3f664091c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 20 Feb 2025 19:09:23 +0000 Subject: [PATCH 0920/1638] Fix release parsing in conf.py --- docs/source/conf.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 3255877d6..e7a796f4a 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,6 +6,7 @@ import importlib.metadata from packaging.specifiers import SpecifierSet +from packaging.version import Version project = "VWS-Python" author = "Adam Dangoor" @@ -30,16 +31,16 @@ copybutton_exclude = ".linenos, .gp" # The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the +# |release|, also used in various other places throughout the # built documents. # # Use ``importlib.metadata.version`` as per -# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx -version = importlib.metadata.version(distribution_name=project) -# This method of getting the release from the version goes hand in hand with -# the ``post-release`` versioning scheme chosen in the ``setuptools-scm`` -# configuration. -release = version.split(sep=".post")[0] +# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx. +_version_string = importlib.metadata.version(distribution_name=project) +_version = Version(version=_version_string) +# GitHub release tags have the format YYYY.MM.DD, while Python requirement +# versions may have the format YYYY.M.D for single digit months and days. +release = ".".join(f"{part:02d}" for part in _version.release) project_metadata = importlib.metadata.metadata(distribution_name=project) From 37906612599247027b1eff5c1a5d29f8d6aba90f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 08:40:18 +0000 Subject: [PATCH 0921/1638] Error in release process if trying to commit changes and there are none --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e0e8e6c11..89ba2b4e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,6 +65,8 @@ jobs: with: commit_message: Bump CHANGELOG file_pattern: CHANGELOG.rst + # Error if there are no changes. + skip_dirty_check: true - name: Bump version and push tag id: tag_version From ea17aae6a2d7f09c5f83361511255e2924b17c89 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 09:10:50 +0000 Subject: [PATCH 0922/1638] Enable the uv cache in CI --- .github/workflows/ci.yml | 3 +++ .github/workflows/lint.yml | 3 +++ .github/workflows/release.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a97d1ec58..a2ce97e41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: '**/pyproject.toml' - name: Run tests run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2a3910dd7..ab512c738 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,6 +27,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: '**/pyproject.toml' - name: Lint run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89ba2b4e6..e44c847b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: '**/pyproject.toml' - name: Calver calculate version uses: StephaneBour/actions-calver@master From 86126a6e594e9defa3dc229d582885cd0fddda58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 10:52:59 +0000 Subject: [PATCH 0923/1638] Bump ruff from 0.9.6 to 0.9.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.6 to 0.9.7. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.6...0.9.7) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c97064e77..0dbc1f172 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.6", + "ruff==0.9.7", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 56f93d3d7f356bc0ca01455c187070922a02b88b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 10:53:05 +0000 Subject: [PATCH 0924/1638] Bump doccmd from 2025.2.19 to 2025.2.20.7 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.2.19 to 2025.2.20.7. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.02.19...2025.02.20.7) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c97064e77..67cb564bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.2.19", + "doccmd==2025.2.20.7", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 94f256d5f71d2d639decba4d11bb3b608a16cca8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 12:16:49 +0000 Subject: [PATCH 0925/1638] Remove unused version setting in conf.py --- docs/source/conf.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index e7a796f4a..c6f6230bb 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,7 +6,6 @@ import importlib.metadata from packaging.specifiers import SpecifierSet -from packaging.version import Version project = "VWS-Python" author = "Adam Dangoor" @@ -30,19 +29,6 @@ # https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies. copybutton_exclude = ".linenos, .gp" -# The version info for the project you're documenting, acts as replacement for -# |release|, also used in various other places throughout the -# built documents. -# -# Use ``importlib.metadata.version`` as per -# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx. -_version_string = importlib.metadata.version(distribution_name=project) -_version = Version(version=_version_string) -# GitHub release tags have the format YYYY.MM.DD, while Python requirement -# versions may have the format YYYY.M.D for single digit months and days. -release = ".".join(f"{part:02d}" for part in _version.release) - - project_metadata = importlib.metadata.metadata(distribution_name=project) requires_python = project_metadata["Requires-Python"] specifiers = SpecifierSet(specifiers=requires_python) @@ -89,7 +75,6 @@ rst_prolog = f""" .. |project| replace:: {project} -.. |release| replace:: {release} .. |minimum-python-version| replace:: {minimum_python_version} .. |github-owner| replace:: VWS-Python .. |github-repository| replace:: vws-python From a42aa17bce274f17184da429dc3fce1d7956d41b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 12:23:52 +0000 Subject: [PATCH 0926/1638] Remove double setting of autoclass content - just use both --- docs/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index c6f6230bb..924fc9d41 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,7 +56,6 @@ # Output file base name for HTML help builder. htmlhelp_basename = "VWSPYTHONdoc" -autoclass_content = "init" intersphinx_mapping = { "python": (f"https://docs.python.org/{minimum_python_version}", None), } From 81e270b44b52d4af5a25b97b05456f42aa511ba9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Feb 2025 21:15:59 +0000 Subject: [PATCH 0927/1638] Use SphinxConfig to avoid some duplication --- docs/source/conf.py | 12 ++++++++++-- pyproject.toml | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 924fc9d41..8c7e78f05 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -4,11 +4,19 @@ """ import importlib.metadata +from pathlib import Path from packaging.specifiers import SpecifierSet +from sphinx_pyproject import SphinxConfig -project = "VWS-Python" -author = "Adam Dangoor" +_pyproject_file = Path(__file__).parent.parent.parent / "pyproject.toml" +_pyproject_config = SphinxConfig( + pyproject_file=_pyproject_file, + config_overrides={"version": None}, +) + +project = _pyproject_config.name +author = _pyproject_config.author extensions = [ "sphinx_copybutton", diff --git a/pyproject.toml b/pyproject.toml index 67cb564bc..11e82235f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,6 +71,7 @@ optional-dependencies.dev = [ "sphinx==8.2.0", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", + "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2025.2.19", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", From e7aa907bec4f3aa56f5708069bb00f02fb9e2e7d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 22 Feb 2025 21:21:13 +0000 Subject: [PATCH 0928/1638] Switch from ReadTheDocs to GitHub Pages --- .github/workflows/publish-site.yml | 27 +++++++++++++++++++++++++++ README.rst | 7 ++----- docs/source/index.rst | 1 - pyproject.toml | 3 +-- readthedocs.yaml | 18 ------------------ 5 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/publish-site.yml delete mode 100644 readthedocs.yaml diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml new file mode 100644 index 000000000..4ca927ccb --- /dev/null +++ b/.github/workflows/publish-site.yml @@ -0,0 +1,27 @@ +--- +name: Deploy documentation + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + pages: + runs-on: ubuntu-latest + environment: + name: ${{ github.ref_name == 'main' && 'github-pages' || 'development' }} + url: ${{ steps.deployment.outputs.page_url }} + permissions: + pages: write + id-token: write + steps: + - id: deployment + uses: sphinx-notes/pages@v3 + with: + documentation_path: docs/source + pyproject_extras: dev + python_version: '3.13' + sphinx_build_options: -W + publish: ${{ github.ref_name == 'main' }} diff --git a/README.rst b/README.rst index 730535169..d7943b35f 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -|Build Status| |codecov| |PyPI| |Documentation Status| +|Build Status| |codecov| |PyPI| vws-python ========== @@ -67,8 +67,7 @@ Getting Started Full Documentation ------------------ -See the `full -documentation `__. +See the `full documentation `__. .. |Build Status| image:: https://github.com/VWS-Python/vws-python/actions/workflows/ci.yml/badge.svg?branch=main :target: https://github.com/VWS-Python/vws-python/actions @@ -76,6 +75,4 @@ documentation `__. :target: https://codecov.io/gh/VWS-Python/vws-python .. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg :target: https://badge.fury.io/py/VWS-Python -.. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest - :target: https://vws-python.readthedocs.io/en/latest/?badge=latest .. |minimum-python-version| replace:: 3.12 diff --git a/docs/source/index.rst b/docs/source/index.rst index 3c89de779..505d6569a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -114,7 +114,6 @@ See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for .. _VWS Python Mock: https://github.com/VWS-Python/vws-python-mock - Reference --------- diff --git a/pyproject.toml b/pyproject.toml index 11e82235f..f72b912e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "yamlfix==1.17.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.1" ] -urls.Documentation = "https://vws-python.readthedocs.io/en/latest/" +urls.Documentation = "https://vws-python.github.io/vws-python/" urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] @@ -283,7 +283,6 @@ ignore = [ ".yamlfmt", "*.enc", ".pre-commit-config.yaml", - "readthedocs.yaml", "CHANGELOG.rst", "CODE_OF_CONDUCT.rst", "CONTRIBUTING.rst", diff --git a/readthedocs.yaml b/readthedocs.yaml deleted file mode 100644 index 8f093abcc..000000000 --- a/readthedocs.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -version: 2 - -build: - os: ubuntu-24.04 - tools: - python: '3.12' - -python: - install: - - method: pip - path: . - extra_requirements: [dev] - -sphinx: - builder: html - configuration: docs/source/conf.py - fail_on_warning: true From c0b426f2a234ad835ea0e00fcfdd091d8e61c02f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 23 Feb 2025 02:29:44 +0000 Subject: [PATCH 0929/1638] Update VWS-Python-Mock link to new site --- docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 505d6569a..818b0698d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -110,7 +110,7 @@ To write unit tests for code which uses this library, without using your Vuforia assert matching_targets[0].target_id == target_id There are some differences between the mock and the real Vuforia. -See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details. +See https://vws-python.github.io/vws-python-mock/differences-to-vws for details. .. _VWS Python Mock: https://github.com/VWS-Python/vws-python-mock From ab4a5ebec7e21706610568be4f9bcd86be0c1c4e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 23 Feb 2025 02:38:25 +0000 Subject: [PATCH 0930/1638] Use cache on publish site --- .github/workflows/publish-site.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml index 4ca927ccb..8f5a347a4 100644 --- a/.github/workflows/publish-site.yml +++ b/.github/workflows/publish-site.yml @@ -24,4 +24,5 @@ jobs: pyproject_extras: dev python_version: '3.13' sphinx_build_options: -W + cache: true publish: ${{ github.ref_name == 'main' }} From a0f127ea7a98e4df08681c4defce9d4ea437c78f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:10:58 +0000 Subject: [PATCH 0931/1638] Bump vws-python-mock from 2025.2.18 to 2025.2.21 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2025.2.18 to 2025.2.21. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2025.02.18...2025.02.21) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f16742d4a..29d2e31c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "sybil==9.1.0", "types-requests==2.32.0.20241016", "vulture==2.14", - "vws-python-mock==2025.2.18", + "vws-python-mock==2025.2.21", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] From 2e92c1f7a720bada0aef0e0d27d2cbdd2d254e8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:11:14 +0000 Subject: [PATCH 0932/1638] Bump sphinx from 8.2.0 to 8.2.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.2.0 to 8.2.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/v8.2.1/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.2.0...v8.2.1) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f16742d4a..a683b4218 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.2.0", + "sphinx==8.2.1", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", From e37bdaf1bab87e5631ca05b58b1aaa506b4495dc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 26 Feb 2025 06:32:15 +0000 Subject: [PATCH 0933/1638] Bump uv in pre-commit --- .pre-commit-config.yaml | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8cfad7775..cf9bf80da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,14 +78,14 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: docformatter name: docformatter entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: shellcheck name: shellcheck @@ -93,7 +93,7 @@ repos: language: python pass_filenames: false types_or: [shell] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: shellcheck-docs name: shellcheck-docs @@ -101,14 +101,14 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: shfmt name: shfmt entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: shfmt-docs name: shfmt-docs @@ -116,7 +116,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: mypy name: mypy @@ -125,7 +125,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: mypy-docs name: mypy-docs @@ -133,7 +133,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: check-manifest name: check-manifest @@ -141,7 +141,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyright name: pyright @@ -150,7 +150,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyright-docs name: pyright-docs @@ -158,7 +158,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: vulture name: vulture @@ -166,14 +166,14 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: vulture-docs name: vulture docs entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyroma name: pyroma @@ -181,14 +181,14 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: deptry name: deptry entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pylint name: pylint @@ -196,7 +196,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pylint-docs name: pylint-docs @@ -204,28 +204,28 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: ruff-check-fix-docs name: Ruff check fix docs entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: ruff-format-fix name: Ruff format entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: ruff-format-fix-docs name: Ruff format docs @@ -233,28 +233,28 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: interrogate-docs name: interrogate docs entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyproject-fmt-fix name: pyproject-fmt @@ -262,7 +262,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: linkcheck name: linkcheck @@ -271,7 +271,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: spelling name: spelling @@ -280,7 +280,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: docs name: Build Documentation @@ -288,7 +288,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: pyright-verifytypes name: pyright-verifytypes @@ -297,18 +297,18 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long language: python types_or: [rst] - additional_dependencies: [uv==0.5.20] + additional_dependencies: [uv==0.6.3] From 3fa7b062bf5276fe492b77d497e3b89cc2ba3796 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:17:12 +0000 Subject: [PATCH 0934/1638] Bump pyright from 1.1.394 to 1.1.395 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.394 to 1.1.395. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.394...v1.1.395) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d79f2b5a..c14a3a4d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", - "pyright==1.1.394", + "pyright==1.1.395", "pyroma==4.2", "pytest==8.3.4", "pytest-cov==6.0.0", From 7c9be95b6b0f5289c61bcf98576f24238b887af5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:39:46 +0000 Subject: [PATCH 0935/1638] Bump ruff from 0.9.7 to 0.9.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.7 to 0.9.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.7...0.9.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c14a3a4d8..650fabaef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.4", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.7", + "ruff==0.9.9", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 25670bd10c923d608556eaa2a3353df08ccf6ff5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:07:10 +0000 Subject: [PATCH 0936/1638] Bump types-requests from 2.32.0.20241016 to 2.32.0.20250301 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20241016 to 2.32.0.20250301. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 650fabaef..5ce93f65c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.2.19", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", - "types-requests==2.32.0.20241016", + "types-requests==2.32.0.20250301", "vulture==2.14", "vws-python-mock==2025.2.21", "vws-test-fixtures==2023.3.5", From a3593ca8a42020c824cc683db51cff51de295062 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:07:20 +0000 Subject: [PATCH 0937/1638] Bump sphinx from 8.2.1 to 8.2.3 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.2.1 to 8.2.3. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.2.1...v8.2.3) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 650fabaef..1ec046ef5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", "shfmt-py==3.7.0.1", - "sphinx==8.2.1", + "sphinx==8.2.3", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", From ecc014373f7fdd4d519c1b12b2afd1ab753cea6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:07:33 +0000 Subject: [PATCH 0938/1638] Bump pytest from 8.3.4 to 8.3.5 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.4 to 8.3.5. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.4...8.3.5) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 650fabaef..9d9d5a22b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.5.1", "pyright==1.1.395", "pyroma==4.2", - "pytest==8.3.4", + "pytest==8.3.5", "pytest-cov==6.0.0", "pyyaml==6.0.2", "ruff==0.9.9", From d8f1e1bc2aec99e4841db51924012d58e180a7e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:12:34 +0000 Subject: [PATCH 0939/1638] Bump pyright from 1.1.395 to 1.1.396 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.395 to 1.1.396. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.395...v1.1.396) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d9d5a22b..1fc27ee6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", - "pyright==1.1.395", + "pyright==1.1.396", "pyroma==4.2", "pytest==8.3.5", "pytest-cov==6.0.0", From e0e84ba39cd3698c43ff821301774fbed015690e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 10:07:16 +0000 Subject: [PATCH 0940/1638] Bump sphinx-substitution-extensions from 2025.2.19 to 2025.3.3 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.2.19 to 2025.3.3. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.02.19...2025.03.03) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d623d796a..79bf6ee6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2025.2.19", + "sphinx-substitution-extensions==2025.3.3", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", "types-requests==2.32.0.20250301", From 408308459172071dd3b9f5f6f1d54353cf166574 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 10:30:48 +0000 Subject: [PATCH 0941/1638] Bump types-requests from 2.32.0.20250301 to 2.32.0.20250306 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20250301 to 2.32.0.20250306. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 79bf6ee6c..2b47a90b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.3.3", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", - "types-requests==2.32.0.20250301", + "types-requests==2.32.0.20250306", "vulture==2.14", "vws-python-mock==2025.2.21", "vws-test-fixtures==2023.3.5", From da809ed87553479188e84aa0ca0d40ea8c0f7082 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 11:04:52 +0000 Subject: [PATCH 0942/1638] Bump doccmd from 2025.2.20.7 to 2025.3.6 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.2.20.7 to 2025.3.6. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.02.20.7...2025.03.06) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2b47a90b3..19855a789 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.2.20.7", + "doccmd==2025.3.6", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From c472d754bac31f89af3e1f3da8da7c25ef05db43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:16:16 +0000 Subject: [PATCH 0943/1638] Bump ruff from 0.9.9 to 0.9.10 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.9 to 0.9.10. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.9...0.9.10) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19855a789..3aea85732 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.9", + "ruff==0.9.10", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From bcc4f866d1debdd529206672c684038af74f393d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:16:30 +0000 Subject: [PATCH 0944/1638] Bump vws-python-mock from 2025.2.21 to 2025.3.10 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2025.2.21 to 2025.3.10. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2025.02.21...2025.03.10) --- updated-dependencies: - dependency-name: vws-python-mock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19855a789..86d9b4964 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "sybil==9.1.0", "types-requests==2.32.0.20250306", "vulture==2.14", - "vws-python-mock==2025.2.21", + "vws-python-mock==2025.3.10", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] From 086563f1ce61f99973bab89d253bc4f30992b498 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 10 Mar 2025 10:30:54 +0000 Subject: [PATCH 0945/1638] Remove OopsAnErrorOccurredPossiblyBadName which matches error no longer found in Vuforia --- CHANGELOG.rst | 2 ++ src/vws/exceptions/custom_exceptions.py | 25 ------------------------- src/vws/vws.py | 17 ++--------------- tests/test_vws_exceptions.py | 8 ++++---- 4 files changed, 8 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b18bc5e4f..e2c0eeaa8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Removed ``vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName`` which now does not occur in VWS. + 2024.09.21 ------------ diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 11d47a67a..694e98c30 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -9,31 +9,6 @@ from vws.response import Response -@beartype -class OopsAnErrorOccurredPossiblyBadNameError(Exception): - """Exception raised when VWS returns an HTML page which says "Oops, an - error occurred". - - This has been seen to happen when the given name includes a bad - character. - """ - - def __init__(self, response: Response) -> None: - """ - Args: - response: The response returned by Vuforia. - """ - super().__init__(response.text) - self._response = response - - @property - def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ - return self._response - - @beartype class RequestEntityTooLargeError(Exception): """ diff --git a/src/vws/vws.py b/src/vws/vws.py index f87766571..5dd7503db 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -16,7 +16,6 @@ from vws_auth_tools import authorization_header, rfc_1123_date from vws.exceptions.custom_exceptions import ( - OopsAnErrorOccurredPossiblyBadNameError, ServerError, TargetProcessingTimeoutError, ) @@ -178,12 +177,6 @@ def make_request( The response to the request made by `requests`. Raises: - ~vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadNameError: - Vuforia returns an HTML page with the text "Oops, an error - occurred". - - This has been seen to happen when the given name includes a bad - character. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is @@ -202,9 +195,6 @@ def make_request( base_vws_url=self._base_vws_url, ) - if "Oops, an error occurred" in response.text: - raise OopsAnErrorOccurredPossiblyBadNameError(response=response) - if ( response.status_code == HTTPStatus.TOO_MANY_REQUESTS ): # pragma: no cover @@ -290,12 +280,9 @@ def add_target( inactive. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is an error with the time sent to Vuforia. - ~vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadNameError: - Vuforia returns an HTML page with the text "Oops, an error - occurred". This has been seen to happen when the given name - includes a bad character. ~vws.exceptions.custom_exceptions.ServerError: There is an error - with Vuforia's servers. + with Vuforia's servers. This has been seen to happen when the + given name includes a bad character. ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is rate limiting access. """ diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index f9a7b8dab..86da66040 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -15,7 +15,7 @@ from vws import VWS from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ( - OopsAnErrorOccurredPossiblyBadNameError, + ServerError, ) from vws.exceptions.vws_exceptions import ( AuthenticationFailureError, @@ -71,13 +71,13 @@ def test_invalid_given_id(vws_client: VWS) -> None: def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ - When a name with a bad character is given, an - ``OopsAnErrorOccurredPossiblyBadName`` exception is raised. + When a name with a bad character is given, a ``ServerError`` exception is + raised. """ max_char_value = 65535 bad_name = chr(max_char_value + 1) with pytest.raises( - expected_exception=OopsAnErrorOccurredPossiblyBadNameError + expected_exception=ServerError, ) as exc: vws_client.add_target( name=bad_name, From 7f525577813f690b49895cb8bba333e8a4e8ba49 Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:42:18 +0000 Subject: [PATCH 0946/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e2c0eeaa8..46318086d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2025.03.10 +---------- + * Removed ``vws.exceptions.custom_exceptions.OopsAnErrorOccurredPossiblyBadName`` which now does not occur in VWS. 2024.09.21 From 6e6701d9fd7d7470bf168f34ac7802a07968be2d Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:50:15 +0000 Subject: [PATCH 0947/1638] Bump CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 46318086d..5527f9da1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Next ---- +2025.03.10.1 +------------ + 2025.03.10 ---------- From 51e0e83ab2f2de22f8f310f31c2e953db9fd7ecf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 11:03:06 +0000 Subject: [PATCH 0948/1638] Bump vws-python-mock from 2025.3.10 to 2025.3.10.1 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2025.3.10 to 2025.3.10.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/2025.03.10...2025.03.10.1) --- 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 f69231fbe..3aba724f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "sybil==9.1.0", "types-requests==2.32.0.20250306", "vulture==2.14", - "vws-python-mock==2025.3.10", + "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] From 823cfb827003752e479c612cff30109d49f80acf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 10:35:09 +0000 Subject: [PATCH 0949/1638] Bump shfmt-py from 3.7.0.1 to 3.11.0.2 Bumps [shfmt-py](https://github.com/maxwinterstein/shfmt-py) from 3.7.0.1 to 3.11.0.2. - [Release notes](https://github.com/maxwinterstein/shfmt-py/releases) - [Commits](https://github.com/maxwinterstein/shfmt-py/compare/v3.7.0.1...v3.11.0.2) --- updated-dependencies: - dependency-name: shfmt-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 3aba724f7..99d313eda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ optional-dependencies.dev = [ # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", - "shfmt-py==3.7.0.1", + "shfmt-py==3.11.0.2", "sphinx==8.2.3", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", From c67858dc430910c9b70d464d3ac051556c51fcd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 10:41:37 +0000 Subject: [PATCH 0950/1638] Bump ruff from 0.9.10 to 0.10.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.10 to 0.10.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.9.10...0.10.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 99d313eda..6152cd7c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.9.10", + "ruff==0.10.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 4726f68c8a8e1a9b49210a134cf305632108ee5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:06:13 +0000 Subject: [PATCH 0951/1638] Bump ruff from 0.10.0 to 0.11.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.10.0 to 0.11.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.10.0...0.11.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 6152cd7c7..e49d7a2cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.10.0", + "ruff==0.11.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From f2e0c7c2e141f8a05f95928c48e5144ef8a41e36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 10:47:37 +0000 Subject: [PATCH 0952/1638] Bump pre-commit from 4.1.0 to 4.2.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.1.0 to 4.2.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.1.0...v4.2.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 e49d7a2cf..fca1e2784 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.15.0", "mypy-strict-kwargs==2024.12.25", - "pre-commit==4.1.0", + "pre-commit==4.2.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.1", From 4adb1a576b1c5daf2d0e3dc60306f2295045727b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 10:47:43 +0000 Subject: [PATCH 0953/1638] Bump doccmd from 2025.3.6 to 2025.3.18 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.3.6 to 2025.3.18. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.03.06...2025.03.18) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e49d7a2cf..5a49a2558 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.3.6", + "doccmd==2025.3.18", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From b12abb58534eb3ab88855c6e8b2ab1aed0133c57 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 19 Mar 2025 15:10:20 +0000 Subject: [PATCH 0954/1638] Pass filenames to shellcheck --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf9bf80da..c480de3e9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -91,7 +91,6 @@ repos: name: shellcheck entry: uv run --extra=dev shellcheck --shell=bash language: python - pass_filenames: false types_or: [shell] additional_dependencies: [uv==0.6.3] From 9b6b8e08d285e3055743a8783e8d913bc6e9ca7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 10:53:46 +0000 Subject: [PATCH 0955/1638] Bump pyright from 1.1.396 to 1.1.397 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.396 to 1.1.397. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.396...v1.1.397) --- 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 a14c92787..1e1580858 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.4", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", - "pyright==1.1.396", + "pyright==1.1.397", "pyroma==4.2", "pytest==8.3.5", "pytest-cov==6.0.0", From e72c2c9108ef72e9b6e593005188323e30db48ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 10:29:12 +0000 Subject: [PATCH 0956/1638] Bump ruff from 0.11.0 to 0.11.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.0 to 0.11.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.11.0...0.11.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 1e1580858..047e4cfb7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.11.0", + "ruff==0.11.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 54d083cd8954d614c5e4f71c35517bd2b942ae19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 10:29:20 +0000 Subject: [PATCH 0957/1638] Bump pylint from 3.3.4 to 3.3.6 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.4 to 3.3.6. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.4...v3.3.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 1e1580858..ded6b9ed3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.1", - "pylint==3.3.4", + "pylint==3.3.6", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", "pyright==1.1.397", From 8d3c781fd34f93d8ad772954d981ad513b26a99d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 21 Mar 2025 13:00:47 +0000 Subject: [PATCH 0958/1638] Make it easier to change the build matrix while still keeping builds required --- .github/workflows/ci.yml | 12 ++++++++++++ .github/workflows/lint.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c8d881e8..deab0867e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,3 +42,15 @@ jobs: with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + + completion-ci: + needs: build + runs-on: ubuntu-latest + if: always() # Run even if one matrix job fails + steps: + - name: Check matrix job status + run: |- + if ! ${{ needs.build.result == 'success' }}; then + echo "One or more matrix jobs failed" + exit 1 + fi diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index def06bdb9..7637891d2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,3 +41,15 @@ jobs: - uses: pre-commit-ci/lite-action@v1.1.0 if: always() + + completion-lint: + needs: build + runs-on: ubuntu-latest + if: always() # Run even if one matrix job fails + steps: + - name: Check matrix job status + run: |- + if ! ${{ needs.build.result == 'success' }}; then + echo "One or more matrix jobs failed" + exit 1 + fi From 2cfb3e3c11a27c181dc7d1d4a470ff97f0f9cdab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 11:20:52 +0000 Subject: [PATCH 0959/1638] Bump ruff from 0.11.1 to 0.11.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.1 to 0.11.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.11.1...0.11.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 7a22e6b7e..6bd8f4825 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.0.0", "pyyaml==6.0.2", - "ruff==0.11.1", + "ruff==0.11.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From dc420554ddc1757501a0b70904d1b92eb8b6bd9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:37:35 +0000 Subject: [PATCH 0960/1638] Bump pyright from 1.1.397 to 1.1.398 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.397 to 1.1.398. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.397...v1.1.398) --- 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 6bd8f4825..b41b4f468 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.6", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", - "pyright==1.1.397", + "pyright==1.1.398", "pyroma==4.2", "pytest==8.3.5", "pytest-cov==6.0.0", From e6017b7db627213fbc64516c356580c0896ed4f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Mar 2025 10:34:51 +0000 Subject: [PATCH 0961/1638] Bump types-requests from 2.32.0.20250306 to 2.32.0.20250328 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20250306 to 2.32.0.20250328. - [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 b41b4f468..9290e1518 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.3.3", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", - "types-requests==2.32.0.20250306", + "types-requests==2.32.0.20250328", "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", From b3cf41f56fbdc562f9e04b3c342665d3941871be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Mar 2025 10:35:02 +0000 Subject: [PATCH 0962/1638] Bump doccmd from 2025.3.18 to 2025.3.27 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.3.18 to 2025.3.27. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.03.18...2025.03.27) --- updated-dependencies: - dependency-name: doccmd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b41b4f468..6543f851b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.3.18", + "doccmd==2025.3.27", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 00a7c8676a86820aa6d047d9f03d91cfd3f8de9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:48:55 +0000 Subject: [PATCH 0963/1638] Bump mypy-strict-kwargs from 2024.12.25 to 2025.3.28 Bumps [mypy-strict-kwargs](https://github.com/adamtheturtle/mypy-strict-kwargs) from 2024.12.25 to 2025.3.28. - [Release notes](https://github.com/adamtheturtle/mypy-strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/mypy-strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/mypy-strict-kwargs/compare/2024.12.25...2025.03.28) --- updated-dependencies: - dependency-name: mypy-strict-kwargs 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 986e51bd8..df66297c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.15.0", - "mypy-strict-kwargs==2024.12.25", + "mypy-strict-kwargs==2025.3.28", "pre-commit==4.2.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From b50071fcca3104aa06524f84ec73fbec2f56879f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 10:44:58 +0000 Subject: [PATCH 0964/1638] Bump pytest-cov from 6.0.0 to 6.1.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 6.0.0 to 6.1.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v6.0.0...v6.1.0) --- updated-dependencies: - dependency-name: pytest-cov 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 df66297c2..2a18a426c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pyright==1.1.398", "pyroma==4.2", "pytest==8.3.5", - "pytest-cov==6.0.0", + "pytest-cov==6.1.0", "pyyaml==6.0.2", "ruff==0.11.2", # We add shellcheck-py not only for shell scripts and shell code blocks, From e72346e10bd38700bb2f49b4610f5f078d8fc1b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:12:35 +0000 Subject: [PATCH 0965/1638] Bump ruff from 0.11.2 to 0.11.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.2 to 0.11.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.11.2...0.11.3) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2a18a426c..662260b43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.0", "pyyaml==6.0.2", - "ruff==0.11.2", + "ruff==0.11.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 5ad4fe25aa60b45b703a5b3a9657602873010393 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:12:42 +0000 Subject: [PATCH 0966/1638] Bump sphinx-substitution-extensions from 2025.3.3 to 2025.4.3 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.3.3 to 2025.4.3. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.03.03...2025.04.03) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2025.4.3 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 2a18a426c..beee172d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2025.3.3", + "sphinx-substitution-extensions==2025.4.3", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", "types-requests==2.32.0.20250328", From dabb34e50db11a6912db9c0fc1286a0495286efd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:12:57 +0000 Subject: [PATCH 0967/1638] Bump mypy-strict-kwargs from 2025.3.28 to 2025.4.3 Bumps [mypy-strict-kwargs](https://github.com/adamtheturtle/mypy-strict-kwargs) from 2025.3.28 to 2025.4.3. - [Release notes](https://github.com/adamtheturtle/mypy-strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/mypy-strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/mypy-strict-kwargs/compare/2025.03.28...2025.04.03) --- updated-dependencies: - dependency-name: mypy-strict-kwargs dependency-version: 2025.4.3 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 2a18a426c..84e54941b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.15.0", - "mypy-strict-kwargs==2025.3.28", + "mypy-strict-kwargs==2025.4.3", "pre-commit==4.2.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From 040c9eeccac0cd8ef228d627e36411b5906e241b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:13:03 +0000 Subject: [PATCH 0968/1638] Bump doccmd from 2025.3.27 to 2025.4.4 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.3.27 to 2025.4.4. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.03.27...2025.04.04) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.4.4 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 2a18a426c..422ab9f68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.3.27", + "doccmd==2025.4.4", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 2ec8751c80a7ef45b939df84de8c20083c3d34dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:51:32 +0000 Subject: [PATCH 0969/1638] Bump ruff from 0.11.3 to 0.11.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.3 to 0.11.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.11.3...0.11.4) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 341882fa4..97b4c3e7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.0", "pyyaml==6.0.2", - "ruff==0.11.3", + "ruff==0.11.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 8db63d5b94862506847d3efaa6e9f8da8978c1f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:51:41 +0000 Subject: [PATCH 0970/1638] Bump pytest-cov from 6.1.0 to 6.1.1 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 6.1.0 to 6.1.1. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v6.1.0...v6.1.1) --- updated-dependencies: - dependency-name: pytest-cov dependency-version: 6.1.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 341882fa4..6c9f0d12c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pyright==1.1.398", "pyroma==4.2", "pytest==8.3.5", - "pytest-cov==6.1.0", + "pytest-cov==6.1.1", "pyyaml==6.0.2", "ruff==0.11.3", # We add shellcheck-py not only for shell scripts and shell code blocks, From ec21fce34aee093aead46b1ad726a236e0769141 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:34:43 +0000 Subject: [PATCH 0971/1638] Bump doccmd from 2025.4.4 to 2025.4.8 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.4.4 to 2025.4.8. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.04.04...2025.04.08) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.4.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cd478f131..067d3f4c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.0", "doc8==1.1.2", - "doccmd==2025.4.4", + "doccmd==2025.4.8", "docformatter==1.7.5", "freezegun==1.5.1", "furo==2024.8.6", From 418146ff50c32be014dc9748007bdc8785ab7f22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Apr 2025 10:38:17 +0000 Subject: [PATCH 0972/1638] Bump pyright from 1.1.398 to 1.1.399 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.398 to 1.1.399. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.398...v1.1.399) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.399 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 067d3f4c9..73eac8540 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint==3.3.6", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", - "pyright==1.1.398", + "pyright==1.1.399", "pyroma==4.2", "pytest==8.3.5", "pytest-cov==6.1.1", From 306665dc8e554a5f595994bb94076340d1be1cc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 10:14:21 +0000 Subject: [PATCH 0973/1638] Bump ruff from 0.11.4 to 0.11.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.4 to 0.11.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.11.4...0.11.5) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 73eac8540..100a2c377 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.4", + "ruff==0.11.5", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From ec36c614377ced346eafc5fbcd60933354642e69 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 12 Apr 2025 19:23:13 +0100 Subject: [PATCH 0974/1638] Remove now-unnecessary wheel build dependency --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 100a2c377..ce2a2666f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,6 @@ build-backend = "setuptools.build_meta" requires = [ "setuptools", "setuptools-scm>=8.1.0", - "wheel", ] [project] From 998576a319065d038011f70d463f08f57d9a5036 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:29:12 +0000 Subject: [PATCH 0975/1638] Bump ruff from 0.11.5 to 0.11.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.5 to 0.11.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.11.5...0.11.6) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ce2a2666f..890c2c280 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.5", + "ruff==0.11.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 39afe719ca7d60c1a0f986a31a59e07bf97c7ddc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 10:13:00 +0000 Subject: [PATCH 0976/1638] Bump astral-sh/setup-uv from 5 to 6 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 5 to 6. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v5...v6) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index deab0867e..de333f893 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v6 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7637891d2..6f0dbc9c3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v6 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e44c847b8..f6c1579b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v6 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' From 2abed5615454e92e75860dfce6e2bea7e394e374 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 10:39:27 +0000 Subject: [PATCH 0977/1638] Bump pyright from 1.1.399 to 1.1.400 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.399 to 1.1.400. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.399...v1.1.400) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.400 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 890c2c280..6ef7ac533 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.6", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", - "pyright==1.1.399", + "pyright==1.1.400", "pyroma==4.2", "pytest==8.3.5", "pytest-cov==6.1.1", From 53de68b91751b97faa33ae0dbb1e610fe28efde0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 10:39:46 +0000 Subject: [PATCH 0978/1638] Bump ruff from 0.11.6 to 0.11.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.6 to 0.11.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.11.6...0.11.7) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 890c2c280..3ae74da5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.6", + "ruff==0.11.7", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 4cba7d419f816ff19758e37410e1a03220c6c37a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 May 2025 10:22:12 +0000 Subject: [PATCH 0979/1638] Bump ruff from 0.11.7 to 0.11.8 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.7 to 0.11.8. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.11.7...0.11.8) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e27b18f9f..5f212ceca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.7", + "ruff==0.11.8", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 76fd44eea02dc6c946168c5a5dfa4a3d3c2fcf71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 11:02:39 +0000 Subject: [PATCH 0980/1638] Bump pylint from 3.3.6 to 3.3.7 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.6 to 3.3.7. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.6...v3.3.7) --- updated-dependencies: - dependency-name: pylint dependency-version: 3.3.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5f212ceca..f16860469 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.1", - "pylint==3.3.6", + "pylint==3.3.7", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.5.1", "pyright==1.1.400", From 1e4c2e963e940e1dec4c949e67ee15dff12881f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 10:43:45 +0000 Subject: [PATCH 0981/1638] Bump docformatter from 1.7.5 to 1.7.6 Bumps [docformatter](https://github.com/PyCQA/docformatter) from 1.7.5 to 1.7.6. - [Release notes](https://github.com/PyCQA/docformatter/releases) - [Changelog](https://github.com/PyCQA/docformatter/blob/master/CHANGELOG.md) - [Commits](https://github.com/PyCQA/docformatter/compare/v1.7.5...v1.7.6) --- updated-dependencies: - dependency-name: docformatter dependency-version: 1.7.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f16860469..8f9f74c7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "deptry==0.23.0", "doc8==1.1.2", "doccmd==2025.4.8", - "docformatter==1.7.5", + "docformatter==1.7.6", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From af28076c7e70b030e0cf2a1c06a458b2af8cc913 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 11:01:20 +0000 Subject: [PATCH 0982/1638] Bump docformatter from 1.7.6 to 1.7.7 Bumps [docformatter](https://github.com/PyCQA/docformatter) from 1.7.6 to 1.7.7. - [Release notes](https://github.com/PyCQA/docformatter/releases) - [Changelog](https://github.com/PyCQA/docformatter/blob/master/CHANGELOG.md) - [Commits](https://github.com/PyCQA/docformatter/compare/v1.7.6...v1.7.7) --- updated-dependencies: - dependency-name: docformatter dependency-version: 1.7.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8f9f74c7e..277ad86e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "deptry==0.23.0", "doc8==1.1.2", "doccmd==2025.4.8", - "docformatter==1.7.6", + "docformatter==1.7.7", "freezegun==1.5.1", "furo==2024.8.6", "interrogate==1.7.0", From fd81b24e6b3501e3d260bacc5641804081708285 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 11:01:32 +0000 Subject: [PATCH 0983/1638] Bump ruff from 0.11.8 to 0.11.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.8 to 0.11.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.11.8...0.11.9) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8f9f74c7e..f9a34c814 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.8", + "ruff==0.11.9", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From a19799a23b5466fe7ee1d6d5040ed42ef8d3d9b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 11:04:15 +0000 Subject: [PATCH 0984/1638] Bump check-wheel-contents from 0.6.1 to 0.6.2 Bumps [check-wheel-contents](https://github.com/jwodder/check-wheel-contents) from 0.6.1 to 0.6.2. - [Release notes](https://github.com/jwodder/check-wheel-contents/releases) - [Changelog](https://github.com/jwodder/check-wheel-contents/blob/master/CHANGELOG.md) - [Commits](https://github.com/jwodder/check-wheel-contents/compare/v0.6.1...v0.6.2) --- updated-dependencies: - dependency-name: check-wheel-contents dependency-version: 0.6.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8f9f74c7e..dcd082c94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] -optional-dependencies.release = [ "check-wheel-contents==0.6.1" ] +optional-dependencies.release = [ "check-wheel-contents==0.6.2" ] urls.Documentation = "https://vws-python.github.io/vws-python/" urls.Source = "https://github.com/VWS-Python/vws-python" From 5f8ad966b3ac68bade989ad2f093752f98501182 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 10:44:27 +0000 Subject: [PATCH 0985/1638] Bump types-requests from 2.32.0.20250328 to 2.32.0.20250515 Bumps [types-requests](https://github.com/typeshed-internal/stub_uploader) from 2.32.0.20250328 to 2.32.0.20250515. - [Commits](https://github.com/typeshed-internal/stub_uploader/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.32.0.20250515 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c5d3cade9..d508b335a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.4.3", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", - "types-requests==2.32.0.20250328", + "types-requests==2.32.0.20250515", "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", From f04d94b6da99ed1c7bb65dec7a178157c6bb41c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 10:31:32 +0000 Subject: [PATCH 0986/1638] Bump ruff from 0.11.9 to 0.11.10 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.9 to 0.11.10. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.11.9...0.11.10) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d508b335a..2b71c538f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.9", + "ruff==0.11.10", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 32a39e3ba98ef33c3ee9b1caff19e50d06dd6fd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 10:09:34 +0000 Subject: [PATCH 0987/1638] Bump pyproject-fmt from 2.5.1 to 2.6.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.5.1 to 2.6.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.5.1...pyproject-fmt/2.6.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.6.0 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 2b71c538f..08cb0d1c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.19.1", "pylint==3.3.7", "pylint-per-file-ignores==1.4.0", - "pyproject-fmt==2.5.1", + "pyproject-fmt==2.6.0", "pyright==1.1.400", "pyroma==4.2", "pytest==8.3.5", From 320ed1403fa37b5330d1c8df3b2ac22adcc002f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 10:47:32 +0000 Subject: [PATCH 0988/1638] Bump pyright from 1.1.400 to 1.1.401 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.400 to 1.1.401. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.400...v1.1.401) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.401 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 08cb0d1c9..5dc79e599 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.7", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", - "pyright==1.1.400", + "pyright==1.1.401", "pyroma==4.2", "pytest==8.3.5", "pytest-cov==6.1.1", From 30c5ae6fa01165054793fbf35bdb9a907257b74a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 11:01:39 +0000 Subject: [PATCH 0989/1638] Bump ruff from 0.11.10 to 0.11.11 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.10 to 0.11.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/0.11.10...0.11.11) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.11 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5dc79e599..20f21b24a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.10", + "ruff==0.11.11", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e3f229789ef5da8f1756bea87e2307837c229bd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 11:34:30 +0000 Subject: [PATCH 0990/1638] Bump freezegun from 1.5.1 to 1.5.2 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.5.1 to 1.5.2. - [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.1...1.5.2) --- updated-dependencies: - dependency-name: freezegun dependency-version: 1.5.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 20f21b24a..dfa815588 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "doc8==1.1.2", "doccmd==2025.4.8", "docformatter==1.7.7", - "freezegun==1.5.1", + "freezegun==1.5.2", "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.15.0", From a0b72e8b98ea64283fb6630da853f9ae53cfed7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 10:59:33 +0000 Subject: [PATCH 0991/1638] Bump mypy[faster-cache] from 1.15.0 to 1.16.0 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.15.0 to 1.16.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.15.0...v1.16.0) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-version: 1.16.0 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 dfa815588..1a456d8a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.2", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.15.0", + "mypy[faster-cache]==1.16.0", "mypy-strict-kwargs==2025.4.3", "pre-commit==4.2.0", "pydocstyle==6.3", From a60a495a201a64b309644432baf75adeec6b2be8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 10:59:47 +0000 Subject: [PATCH 0992/1638] Bump ruff from 0.11.11 to 0.11.12 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.11 to 0.11.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/0.11.11...0.11.12) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dfa815588..fd479b4c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.3.5", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.11", + "ruff==0.11.12", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 218f53a6d3e65d98fb60932767ba21ae56241c22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 11:40:40 +0000 Subject: [PATCH 0993/1638] Bump types-requests from 2.32.0.20250515 to 2.32.0.20250602 Bumps [types-requests](https://github.com/typeshed-internal/stub_uploader) from 2.32.0.20250515 to 2.32.0.20250602. - [Commits](https://github.com/typeshed-internal/stub_uploader/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.32.0.20250602 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d8f6a0845..efbc9623e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.4.3", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", - "types-requests==2.32.0.20250515", + "types-requests==2.32.0.20250602", "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", From 3362607d3b2a10b625fffe173cddeab4335c414b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:56:44 +0000 Subject: [PATCH 0994/1638] Bump pytest from 8.3.5 to 8.4.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.5 to 8.4.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.3.5...8.4.0) --- updated-dependencies: - dependency-name: pytest dependency-version: 8.4.0 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 efbc9623e..db6e18781 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.6.0", "pyright==1.1.401", "pyroma==4.2", - "pytest==8.3.5", + "pytest==8.4.0", "pytest-cov==6.1.1", "pyyaml==6.0.2", "ruff==0.11.12", From be1e4289974cb9a63a6570fa123cd0ec06628eda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Jun 2025 10:06:12 +0000 Subject: [PATCH 0995/1638] Bump ruff from 0.11.12 to 0.11.13 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.12 to 0.11.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/0.11.12...0.11.13) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.11.13 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index db6e18781..f7dd6b0ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.0", "pytest-cov==6.1.1", "pyyaml==6.0.2", - "ruff==0.11.12", + "ruff==0.11.13", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 96072081932596e48d21cb80314c1c6513fc64de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 11:31:11 +0000 Subject: [PATCH 0996/1638] Bump sphinx-substitution-extensions from 2025.4.3 to 2025.6.6 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.4.3 to 2025.6.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/2025.04.03...2025.06.06) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2025.6.6 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 f7dd6b0ac..476388c07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2025.4.3", + "sphinx-substitution-extensions==2025.6.6", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", "types-requests==2.32.0.20250602", From 39c2e64574f274bfc28ddbbf719e743c3c1f8cc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 10:38:55 +0000 Subject: [PATCH 0997/1638] Bump types-requests from 2.32.0.20250602 to 2.32.4.20250611 Bumps [types-requests](https://github.com/typeshed-internal/stub_uploader) from 2.32.0.20250602 to 2.32.4.20250611. - [Commits](https://github.com/typeshed-internal/stub_uploader/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.32.4.20250611 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 476388c07..5fce596b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.6.6", "sphinxcontrib-spelling==8.0.1", "sybil==9.1.0", - "types-requests==2.32.0.20250602", + "types-requests==2.32.4.20250611", "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", From 7aeff5abcede031c688ded0ada5227934ea33940 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 10:39:19 +0000 Subject: [PATCH 0998/1638] Bump pyright from 1.1.401 to 1.1.402 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.401 to 1.1.402. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.401...v1.1.402) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.402 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 476388c07..7e57056b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.7", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", - "pyright==1.1.401", + "pyright==1.1.402", "pyroma==4.2", "pytest==8.4.0", "pytest-cov==6.1.1", From a548ac23414494751aa35542c546c56835464011 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 10:57:42 +0000 Subject: [PATCH 0999/1638] Bump stefanzweifel/git-auto-commit-action from 5 to 6 Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 5 to 6. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v5...v6) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... 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 f6c1579b4..c00447040 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,7 +63,7 @@ jobs: include: CHANGELOG.rst regex: false - - uses: stefanzweifel/git-auto-commit-action@v5 + - uses: stefanzweifel/git-auto-commit-action@v6 id: commit with: commit_message: Bump CHANGELOG From 6928b370bdeb08a10dd1b5959e7f0b7d796c2041 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 10:56:43 +0000 Subject: [PATCH 1000/1638] Bump pytest-cov from 6.1.1 to 6.2.1 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 6.1.1 to 6.2.1. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v6.1.1...v6.2.1) --- updated-dependencies: - dependency-name: pytest-cov dependency-version: 6.2.1 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 15250e07c..084501226 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pyright==1.1.402", "pyroma==4.2", "pytest==8.4.0", - "pytest-cov==6.1.1", + "pytest-cov==6.2.1", "pyyaml==6.0.2", "ruff==0.11.13", # We add shellcheck-py not only for shell scripts and shell code blocks, From 50b63b1c22b31e1de5d6545618b9d83a168c800a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 14 Jun 2025 08:52:48 +0100 Subject: [PATCH 1001/1638] Accept all IO[bytes] as image type --- CHANGELOG.rst | 3 +-- src/vws/query.py | 5 ++--- src/vws/vws.py | 5 ++--- tests/conftest.py | 4 ++-- tests/test_query.py | 21 ++++++++++----------- tests/test_vws.py | 30 +++++++++++++++--------------- 6 files changed, 32 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5527f9da1..4b0f026ea 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,8 +4,7 @@ Changelog Next ---- -2025.03.10.1 ------------- +* Be more flexible in the types of images accepted. 2025.03.10 ---------- diff --git a/src/vws/query.py b/src/vws/query.py index 96122aa14..65f72d16f 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -3,10 +3,9 @@ """ import datetime -import io import json from http import HTTPMethod, HTTPStatus -from typing import Any, BinaryIO +from typing import IO, Any from urllib.parse import urljoin import requests @@ -29,7 +28,7 @@ from vws.reports import QueryResult, TargetData from vws.response import Response -_ImageType = io.BytesIO | BinaryIO +_ImageType = IO[bytes] @beartype diff --git a/src/vws/vws.py b/src/vws/vws.py index 5dd7503db..fc33a6861 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -3,12 +3,11 @@ """ import base64 -import io import json import time from datetime import date from http import HTTPMethod, HTTPStatus -from typing import BinaryIO +from typing import IO from urllib.parse import urljoin import requests @@ -47,7 +46,7 @@ ) from vws.response import Response -_ImageType = io.BytesIO | BinaryIO +_ImageType = IO[bytes] @beartype diff --git a/tests/conftest.py b/tests/conftest.py index 74c6fc56d..3831755a8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,7 @@ import io from collections.abc import Generator from pathlib import Path -from typing import BinaryIO, Literal +from typing import IO, BinaryIO, Literal import pytest from mock_vws import MockVWS @@ -70,7 +70,7 @@ def image( request: pytest.FixtureRequest, high_quality_image: io.BytesIO, image_file: BinaryIO, -) -> io.BytesIO | BinaryIO: +) -> IO[bytes]: """ An image in any of the types that the API accepts. """ diff --git a/tests/test_query.py b/tests/test_query.py index e229cf95d..c255b0658 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -2,9 +2,8 @@ Tests for the ``CloudRecoService`` querying functionality. """ -import io import uuid -from typing import BinaryIO +from typing import IO from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase @@ -21,7 +20,7 @@ class TestQuery: @staticmethod def test_no_matches( cloud_reco_client: CloudRecoService, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ An empty list is returned if there are no matches. @@ -33,7 +32,7 @@ def test_no_matches( def test_match( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ Details of matching targets are returned. @@ -56,7 +55,7 @@ class TestCustomBaseVWQURL: """ @staticmethod - def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: + def test_custom_base_url(image: IO[bytes]) -> None: """ It is possible to use query a target to a database under a custom VWQ URL. @@ -101,7 +100,7 @@ class TestMaxNumResults: def test_default( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ By default the maximum number of results is 1. @@ -129,7 +128,7 @@ def test_default( def test_custom( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ It is possible to set a custom ``max_num_results``. @@ -175,7 +174,7 @@ class TestIncludeTargetData: def test_default( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ By default, target data is only returned in the top match. @@ -207,7 +206,7 @@ def test_default( def test_top( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ When ``CloudRecoIncludeTargetData.TOP`` is given, target data is only @@ -241,7 +240,7 @@ def test_top( def test_none( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ When ``CloudRecoIncludeTargetData.NONE`` is given, target data is not @@ -275,7 +274,7 @@ def test_none( def test_all( vws_client: VWS, cloud_reco_client: CloudRecoService, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ When ``CloudRecoIncludeTargetData.ALL`` is given, target data is diff --git a/tests/test_vws.py b/tests/test_vws.py index e16eff555..54391d95c 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -7,7 +7,7 @@ import io import secrets import uuid -from typing import BinaryIO +from typing import IO import pytest from freezegun import freeze_time @@ -37,7 +37,7 @@ class TestAddTarget: @pytest.mark.parametrize(argnames="active_flag", argvalues=[True, False]) def test_add_target( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], application_metadata: bytes | None, cloud_reco_client: CloudRecoService, *, @@ -81,7 +81,7 @@ def test_add_target( @staticmethod def test_add_two_targets( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """No exception is raised when adding two targets with different names. @@ -103,7 +103,7 @@ class TestCustomBaseVWSURL: """ @staticmethod - def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: + def test_custom_base_url(image: IO[bytes]) -> None: """ It is possible to use add a target to a database under a custom VWS URL. @@ -135,7 +135,7 @@ class TestListTargets: @staticmethod def test_list_targets( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ It is possible to get a list of target IDs. @@ -165,7 +165,7 @@ class TestDelete: @staticmethod def test_delete_target( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ It is possible to delete a target. @@ -192,7 +192,7 @@ class TestGetTargetSummaryReport: @staticmethod def test_get_target_summary_report( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ Details of a target are returned by ``get_target_summary_report``. @@ -294,7 +294,7 @@ class TestGetTargetRecord: @staticmethod def test_get_target_record( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ Details of a target are returned by ``get_target_record``. @@ -369,7 +369,7 @@ class TestWaitForTargetProcessed: @staticmethod def test_wait_for_target_processed( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ It is possible to wait until a target is processed. @@ -389,7 +389,7 @@ def test_wait_for_target_processed( @staticmethod def test_default_seconds_between_requests( - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ By default, 0.2 seconds are waited between polling requests. @@ -441,7 +441,7 @@ def test_default_seconds_between_requests( @staticmethod def test_custom_seconds_between_requests( - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ It is possible to customize the time waited between polling requests. @@ -492,7 +492,7 @@ def test_custom_seconds_between_requests( assert report.request_usage == expected_requests @staticmethod - def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: + def test_custom_timeout(image: IO[bytes]) -> None: """ It is possible to set a maximum timeout. """ @@ -538,7 +538,7 @@ class TestGetDuplicateTargets: @staticmethod def test_get_duplicate_targets( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ It is possible to get the IDs of similar targets. @@ -572,7 +572,7 @@ class TestUpdateTarget: @staticmethod def test_update_target( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], different_high_quality_image: io.BytesIO, cloud_reco_client: CloudRecoService, ) -> None: @@ -633,7 +633,7 @@ def test_update_target( @staticmethod def test_no_fields_given( vws_client: VWS, - image: io.BytesIO | BinaryIO, + image: IO[bytes], ) -> None: """ It is possible to give no update fields. From 6382b7a64d38611de093a7ba25692153c5a75331 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 14 Jun 2025 22:01:50 +0100 Subject: [PATCH 1002/1638] Revert "Accept all IO[bytes] as image type" This reverts commit 50b63b1c22b31e1de5d6545618b9d83a168c800a. --- CHANGELOG.rst | 3 ++- src/vws/query.py | 5 +++-- src/vws/vws.py | 5 +++-- tests/conftest.py | 4 ++-- tests/test_query.py | 21 +++++++++++---------- tests/test_vws.py | 30 +++++++++++++++--------------- 6 files changed, 36 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4b0f026ea..5527f9da1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,7 +4,8 @@ Changelog Next ---- -* Be more flexible in the types of images accepted. +2025.03.10.1 +------------ 2025.03.10 ---------- diff --git a/src/vws/query.py b/src/vws/query.py index 65f72d16f..96122aa14 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -3,9 +3,10 @@ """ import datetime +import io import json from http import HTTPMethod, HTTPStatus -from typing import IO, Any +from typing import Any, BinaryIO from urllib.parse import urljoin import requests @@ -28,7 +29,7 @@ from vws.reports import QueryResult, TargetData from vws.response import Response -_ImageType = IO[bytes] +_ImageType = io.BytesIO | BinaryIO @beartype diff --git a/src/vws/vws.py b/src/vws/vws.py index fc33a6861..5dd7503db 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -3,11 +3,12 @@ """ import base64 +import io import json import time from datetime import date from http import HTTPMethod, HTTPStatus -from typing import IO +from typing import BinaryIO from urllib.parse import urljoin import requests @@ -46,7 +47,7 @@ ) from vws.response import Response -_ImageType = IO[bytes] +_ImageType = io.BytesIO | BinaryIO @beartype diff --git a/tests/conftest.py b/tests/conftest.py index 3831755a8..74c6fc56d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,7 @@ import io from collections.abc import Generator from pathlib import Path -from typing import IO, BinaryIO, Literal +from typing import BinaryIO, Literal import pytest from mock_vws import MockVWS @@ -70,7 +70,7 @@ def image( request: pytest.FixtureRequest, high_quality_image: io.BytesIO, image_file: BinaryIO, -) -> IO[bytes]: +) -> io.BytesIO | BinaryIO: """ An image in any of the types that the API accepts. """ diff --git a/tests/test_query.py b/tests/test_query.py index c255b0658..e229cf95d 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -2,8 +2,9 @@ Tests for the ``CloudRecoService`` querying functionality. """ +import io import uuid -from typing import IO +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[bytes], + 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[bytes], + 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[bytes]) -> 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[bytes], + 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[bytes], + 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[bytes], + 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[bytes], + 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[bytes], + 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[bytes], + 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 54391d95c..e16eff555 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -7,7 +7,7 @@ import io import secrets import uuid -from typing import IO +from typing import BinaryIO import pytest from freezegun import freeze_time @@ -37,7 +37,7 @@ class TestAddTarget: @pytest.mark.parametrize(argnames="active_flag", argvalues=[True, False]) def test_add_target( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, application_metadata: bytes | None, cloud_reco_client: CloudRecoService, *, @@ -81,7 +81,7 @@ def test_add_target( @staticmethod def test_add_two_targets( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """No exception is raised when adding two targets with different names. @@ -103,7 +103,7 @@ class TestCustomBaseVWSURL: """ @staticmethod - def test_custom_base_url(image: IO[bytes]) -> 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. @@ -135,7 +135,7 @@ class TestListTargets: @staticmethod def test_list_targets( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to get a list of target IDs. @@ -165,7 +165,7 @@ class TestDelete: @staticmethod def test_delete_target( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to delete a target. @@ -192,7 +192,7 @@ class TestGetTargetSummaryReport: @staticmethod def test_get_target_summary_report( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ Details of a target are returned by ``get_target_summary_report``. @@ -294,7 +294,7 @@ class TestGetTargetRecord: @staticmethod def test_get_target_record( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ Details of a target are returned by ``get_target_record``. @@ -369,7 +369,7 @@ class TestWaitForTargetProcessed: @staticmethod def test_wait_for_target_processed( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to wait until a target is processed. @@ -389,7 +389,7 @@ def test_wait_for_target_processed( @staticmethod def test_default_seconds_between_requests( - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ By default, 0.2 seconds are waited between polling requests. @@ -441,7 +441,7 @@ def test_default_seconds_between_requests( @staticmethod def test_custom_seconds_between_requests( - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to customize the time waited between polling requests. @@ -492,7 +492,7 @@ def test_custom_seconds_between_requests( assert report.request_usage == expected_requests @staticmethod - def test_custom_timeout(image: IO[bytes]) -> None: + def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: """ It is possible to set a maximum timeout. """ @@ -538,7 +538,7 @@ class TestGetDuplicateTargets: @staticmethod def test_get_duplicate_targets( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to get the IDs of similar targets. @@ -572,7 +572,7 @@ class TestUpdateTarget: @staticmethod def test_update_target( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, different_high_quality_image: io.BytesIO, cloud_reco_client: CloudRecoService, ) -> None: @@ -633,7 +633,7 @@ def test_update_target( @staticmethod def test_no_fields_given( vws_client: VWS, - image: IO[bytes], + image: io.BytesIO | BinaryIO, ) -> None: """ It is possible to give no update fields. From f1c2fb787cad1e65e94de7e40464f9914c366113 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 11:23:00 +0000 Subject: [PATCH 1003/1638] Bump doc8 from 1.1.2 to 2.0.0 Bumps [doc8](https://github.com/pycqa/doc8) from 1.1.2 to 2.0.0. - [Release notes](https://github.com/pycqa/doc8/releases) - [Commits](https://github.com/pycqa/doc8/compare/v1.1.2...v2.0.0) --- updated-dependencies: - dependency-name: doc8 dependency-version: 2.0.0 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 084501226..4dcc48d65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "actionlint-py==1.7.7.23", "check-manifest==0.50", "deptry==0.23.0", - "doc8==1.1.2", + "doc8==2.0.0", "doccmd==2025.4.8", "docformatter==1.7.7", "freezegun==1.5.2", From 97148361c55550be5abeb73755d5c5d080eb015d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:19:40 +0000 Subject: [PATCH 1004/1638] Bump mypy[faster-cache] from 1.16.0 to 1.16.1 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.16.0 to 1.16.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.16.0...v1.16.1) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-version: 1.16.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4dcc48d65..c8e279439 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.2", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.16.0", + "mypy[faster-cache]==1.16.1", "mypy-strict-kwargs==2025.4.3", "pre-commit==4.2.0", "pydocstyle==6.3", From da3350b638d89a5bbb00eaf385565de29f6e1753 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 10:40:51 +0000 Subject: [PATCH 1005/1638] Bump ruff from 0.11.13 to 0.12.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.13 to 0.12.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.11.13...0.12.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.0 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 c8e279439..f3f6b63f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.0", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.11.13", + "ruff==0.12.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From c40c5bc3826547686f4569fe6e89c98a05084f40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 10:41:03 +0000 Subject: [PATCH 1006/1638] Bump pytest from 8.4.0 to 8.4.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.4.0 to 8.4.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.4.0...8.4.1) --- updated-dependencies: - dependency-name: pytest dependency-version: 8.4.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c8e279439..5e386c6f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.6.0", "pyright==1.1.402", "pyroma==4.2", - "pytest==8.4.0", + "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", "ruff==0.11.13", From 60df97d3c1fac0fdff03d57b2225e4ffff14bbc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 12:02:23 +0000 Subject: [PATCH 1007/1638] Bump pygments from 2.19.1 to 2.19.2 Bumps [pygments](https://github.com/pygments/pygments) from 2.19.1 to 2.19.2. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.19.1...2.19.2) --- updated-dependencies: - dependency-name: pygments dependency-version: 2.19.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2801ec9c3..fd8ca2e04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pre-commit==4.2.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", - "pygments==2.19.1", + "pygments==2.19.2", "pylint==3.3.7", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", From d507540773872f198e0674ce47c374733d6edc59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 10:19:59 +0000 Subject: [PATCH 1008/1638] Bump ruff from 0.12.0 to 0.12.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.0 to 0.12.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.12.0...0.12.1) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fd8ca2e04..03d1c5ca8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.0", + "ruff==0.12.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 48e722e15a74b7ce041ce4cde19ed972f82355cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 10:43:10 +0000 Subject: [PATCH 1009/1638] Bump pyroma from 4.2 to 4.3.2 Bumps [pyroma](https://github.com/regebro/pyroma) from 4.2 to 4.3.2. - [Changelog](https://github.com/regebro/pyroma/blob/master/CHANGES.txt) - [Commits](https://github.com/regebro/pyroma/compare/4.2...4.3.2) --- updated-dependencies: - dependency-name: pyroma dependency-version: 4.3.2 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 03d1c5ca8..7ac67bf35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", "pyright==1.1.402", - "pyroma==4.2", + "pyroma==4.3.2", "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", From 7798b19e164eff0131df6ede00e794ccb5d9dcde Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 10:16:13 +0000 Subject: [PATCH 1010/1638] Bump ruff from 0.12.1 to 0.12.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.1 to 0.12.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.12.1...0.12.2) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7ac67bf35..d3ffe1fc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.1", + "ruff==0.12.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 56be23315237cf4e4b64e8789ad1468d13f90f8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 10:16:21 +0000 Subject: [PATCH 1011/1638] Bump pyroma from 4.3.2 to 4.3.3 Bumps [pyroma](https://github.com/regebro/pyroma) from 4.3.2 to 4.3.3. - [Changelog](https://github.com/regebro/pyroma/blob/master/CHANGES.txt) - [Commits](https://github.com/regebro/pyroma/compare/4.3.2...4.3.3) --- updated-dependencies: - dependency-name: pyroma dependency-version: 4.3.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7ac67bf35..455d031a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", "pyright==1.1.402", - "pyroma==4.3.2", + "pyroma==4.3.3", "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", From fd85000507bb36139603758fe743e362cdad9820 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 10:38:44 +0000 Subject: [PATCH 1012/1638] Bump shfmt-py from 3.11.0.2 to 3.12.0.2 Bumps [shfmt-py](https://github.com/maxwinterstein/shfmt-py) from 3.11.0.2 to 3.12.0.2. - [Release notes](https://github.com/maxwinterstein/shfmt-py/releases) - [Commits](https://github.com/maxwinterstein/shfmt-py/commits) --- updated-dependencies: - dependency-name: shfmt-py dependency-version: 3.12.0.2 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 a5bdaabe4..964720136 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ optional-dependencies.dev = [ # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.10.0.1", - "shfmt-py==3.11.0.2", + "shfmt-py==3.12.0.2", "sphinx==8.2.3", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", From fd163871d1ac98f6e0d593b89c84c61d1bf22571 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 10:19:03 +0000 Subject: [PATCH 1013/1638] Bump pyright from 1.1.402 to 1.1.403 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.402 to 1.1.403. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.402...v1.1.403) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.403 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 964720136..8dc7bbb83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.7", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", - "pyright==1.1.402", + "pyright==1.1.403", "pyroma==4.3.3", "pytest==8.4.1", "pytest-cov==6.2.1", From 6633e5f172b95c015ef340fce4d4170fb9811873 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 12:00:07 +0000 Subject: [PATCH 1014/1638] Bump ruff from 0.12.2 to 0.12.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.2 to 0.12.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.12.2...0.12.3) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8dc7bbb83..bca4b1652 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.2", + "ruff==0.12.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From b2072bea50bdb4e0a838d7634780dd83ba0b8cd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 12:19:55 +0000 Subject: [PATCH 1015/1638] Bump freezegun from 1.5.2 to 1.5.3 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.5.2 to 1.5.3. - [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.2...1.5.3) --- updated-dependencies: - dependency-name: freezegun dependency-version: 1.5.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8dc7bbb83..0f36ca419 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "doc8==2.0.0", "doccmd==2025.4.8", "docformatter==1.7.7", - "freezegun==1.5.2", + "freezegun==1.5.3", "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.16.1", From 4edd805cdc90ca3c85490e707b2b43b18cbad90c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:11:06 +0000 Subject: [PATCH 1016/1638] Bump pyroma from 4.3.3 to 5.0 Bumps [pyroma](https://github.com/regebro/pyroma) from 4.3.3 to 5.0. - [Changelog](https://github.com/regebro/pyroma/blob/master/CHANGES.txt) - [Commits](https://github.com/regebro/pyroma/compare/4.3.3...5.0) --- updated-dependencies: - dependency-name: pyroma dependency-version: '5.0' 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 8891ba97e..8250d8fe3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", "pyright==1.1.403", - "pyroma==4.3.3", + "pyroma==5.0", "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", From b82469cc28a3f83d9b348600c345e0ee2f706439 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:11:13 +0000 Subject: [PATCH 1017/1638] Bump mypy[faster-cache] from 1.16.1 to 1.17.0 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.16.1 to 1.17.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.16.1...v1.17.0) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-version: 1.17.0 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 8891ba97e..3304982af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.3", "furo==2024.8.6", "interrogate==1.7.0", - "mypy[faster-cache]==1.16.1", + "mypy[faster-cache]==1.17.0", "mypy-strict-kwargs==2025.4.3", "pre-commit==4.2.0", "pydocstyle==6.3", From 204adca8c5e0e29c64a072a3be56c60e3af4f932 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 10:34:00 +0000 Subject: [PATCH 1018/1638] Bump ruff from 0.12.3 to 0.12.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.3 to 0.12.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.12.3...0.12.4) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 088e0dc76..98dc1f2db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.3", + "ruff==0.12.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From d15a9a7eaf24a02752c5b443269e4bcee4e93d35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:09:24 +0000 Subject: [PATCH 1019/1638] Bump furo from 2024.8.6 to 2025.7.19 Bumps [furo](https://github.com/pradyunsg/furo) from 2024.8.6 to 2025.7.19. - [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.08.06...2025.07.19) --- updated-dependencies: - dependency-name: furo dependency-version: 2025.7.19 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 98dc1f2db..732caca55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ optional-dependencies.dev = [ "doccmd==2025.4.8", "docformatter==1.7.7", "freezegun==1.5.3", - "furo==2024.8.6", + "furo==2025.7.19", "interrogate==1.7.0", "mypy[faster-cache]==1.17.0", "mypy-strict-kwargs==2025.4.3", From bae3e79c21d19d91f1f2ec78a824055e7ca16949 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 10:33:52 +0000 Subject: [PATCH 1020/1638] Bump ruff from 0.12.4 to 0.12.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.4 to 0.12.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.12.4...0.12.5) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 732caca55..0266370f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.4", + "ruff==0.12.5", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From cd7e64cd32153265b915bf9aee40907efd414fdc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 10:40:24 +0000 Subject: [PATCH 1021/1638] Bump ruff from 0.12.5 to 0.12.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.5 to 0.12.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.12.5...0.12.7) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0266370f1..7f7c030af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.5", + "ruff==0.12.7", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From b9ad8a0698666fe868997e21dbfb65cc0f3bd1b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 11:01:53 +0000 Subject: [PATCH 1022/1638] Bump freezegun from 1.5.3 to 1.5.4 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.5.3 to 1.5.4. - [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.3...1.5.4) --- updated-dependencies: - dependency-name: freezegun dependency-version: 1.5.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f7c030af..5e56da8b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "doc8==2.0.0", "doccmd==2025.4.8", "docformatter==1.7.7", - "freezegun==1.5.3", + "freezegun==1.5.4", "furo==2025.7.19", "interrogate==1.7.0", "mypy[faster-cache]==1.17.0", From 5296aa6d312c1c221466302344a1c5d1b1405b70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 11:02:11 +0000 Subject: [PATCH 1023/1638] Bump mypy[faster-cache] from 1.17.0 to 1.17.1 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.17.0 to 1.17.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.17.0...v1.17.1) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-version: 1.17.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f7c030af..f19664862 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.3", "furo==2025.7.19", "interrogate==1.7.0", - "mypy[faster-cache]==1.17.0", + "mypy[faster-cache]==1.17.1", "mypy-strict-kwargs==2025.4.3", "pre-commit==4.2.0", "pydocstyle==6.3", From f1698aad37ff4775f7aa27c649adb4ed23667dba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 11:02:17 +0000 Subject: [PATCH 1024/1638] Bump deptry from 0.23.0 to 0.23.1 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.23.0 to 0.23.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.23.0...0.23.1) --- updated-dependencies: - dependency-name: deptry dependency-version: 0.23.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f7c030af..6c6148d01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.7.23", "check-manifest==0.50", - "deptry==0.23.0", + "deptry==0.23.1", "doc8==2.0.0", "doccmd==2025.4.8", "docformatter==1.7.7", From 7d8811f7ac8cba09d46d38e4eab259a5cc282cca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Aug 2025 13:42:44 +0000 Subject: [PATCH 1025/1638] Bump check-wheel-contents from 0.6.2 to 0.6.3 Bumps [check-wheel-contents](https://github.com/jwodder/check-wheel-contents) from 0.6.2 to 0.6.3. - [Release notes](https://github.com/jwodder/check-wheel-contents/releases) - [Changelog](https://github.com/jwodder/check-wheel-contents/blob/master/CHANGELOG.md) - [Commits](https://github.com/jwodder/check-wheel-contents/compare/v0.6.2...v0.6.3) --- updated-dependencies: - dependency-name: check-wheel-contents dependency-version: 0.6.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 89c5af819..ed9d22865 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", "yamlfix==1.17.0", ] -optional-dependencies.release = [ "check-wheel-contents==0.6.2" ] +optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" urls.Source = "https://github.com/VWS-Python/vws-python" From c6cf9596845c600399c5219ac79c49f8dad79476 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 10:49:23 +0000 Subject: [PATCH 1026/1638] Bump ruff from 0.12.7 to 0.12.8 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.7 to 0.12.8. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.12.7...0.12.8) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ed9d22865..44a1f850f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.7", + "ruff==0.12.8", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From aada8590139173dc4551969d9ed17f95a6381f25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 10:49:35 +0000 Subject: [PATCH 1027/1638] Bump sybil from 9.1.0 to 9.2.0 Bumps [sybil](https://github.com/simplistix/sybil) from 9.1.0 to 9.2.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/9.1.0...9.2.0) --- updated-dependencies: - dependency-name: sybil dependency-version: 9.2.0 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 ed9d22865..d65cfcd2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2025.6.6", "sphinxcontrib-spelling==8.0.1", - "sybil==9.1.0", + "sybil==9.2.0", "types-requests==2.32.4.20250611", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 825fc670bcb2c43f90e87f7e2544cccdf5de68f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 14:36:56 +0000 Subject: [PATCH 1028/1638] Bump pre-commit from 4.2.0 to 4.3.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.2.0 to 4.3.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.2.0...v4.3.0) --- updated-dependencies: - dependency-name: pre-commit dependency-version: 4.3.0 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 4d19a6f77..f6c9ea55c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.17.1", "mypy-strict-kwargs==2025.4.3", - "pre-commit==4.2.0", + "pre-commit==4.3.0", "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.2", From 1b0aeb321bb09b9c4cece24425fa5a4ee9f5e17b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 14:38:03 +0000 Subject: [PATCH 1029/1638] Bump freezegun from 1.5.4 to 1.5.5 Bumps [freezegun](https://github.com/spulec/freezegun) from 1.5.4 to 1.5.5. - [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.4...1.5.5) --- updated-dependencies: - dependency-name: freezegun dependency-version: 1.5.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d19a6f77..bdf65c3ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "doc8==2.0.0", "doccmd==2025.4.8", "docformatter==1.7.7", - "freezegun==1.5.4", + "freezegun==1.5.5", "furo==2025.7.19", "interrogate==1.7.0", "mypy[faster-cache]==1.17.1", From a15757763f92e5d178ff540e30ef2c44c157fc8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 15:44:46 +0000 Subject: [PATCH 1030/1638] Bump types-requests from 2.32.4.20250611 to 2.32.4.20250809 Bumps [types-requests](https://github.com/typeshed-internal/stub_uploader) from 2.32.4.20250611 to 2.32.4.20250809. - [Commits](https://github.com/typeshed-internal/stub_uploader/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.32.4.20250809 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d19a6f77..1294fe3fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.6.6", "sphinxcontrib-spelling==8.0.1", "sybil==9.2.0", - "types-requests==2.32.4.20250611", + "types-requests==2.32.4.20250809", "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", From b9765629f2819351e2cae586cd18300c35b80aa7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 16:03:52 +0000 Subject: [PATCH 1031/1638] Bump pylint from 3.3.7 to 3.3.8 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.7...v3.3.8) --- updated-dependencies: - dependency-name: pylint dependency-version: 3.3.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d19a6f77..a575f81bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pyenchant==3.3.0rc1", "pygments==2.19.2", - "pylint==3.3.7", + "pylint==3.3.8", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", "pyright==1.1.403", From 32fea5f76c81a68b11f2fc2ae2ca75753b4de0ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 16:16:42 +0000 Subject: [PATCH 1032/1638] Bump shellcheck-py from 0.10.0.1 to 0.11.0.1 Bumps [shellcheck-py](https://github.com/ryanrhee/shellcheck-py) from 0.10.0.1 to 0.11.0.1. - [Commits](https://github.com/ryanrhee/shellcheck-py/compare/v0.10.0.1...v0.11.0.1) --- updated-dependencies: - dependency-name: shellcheck-py dependency-version: 0.11.0.1 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 4d19a6f77..85e4b6c06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ optional-dependencies.dev = [ # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. - "shellcheck-py==0.10.0.1", + "shellcheck-py==0.11.0.1", "shfmt-py==3.12.0.2", "sphinx==8.2.3", "sphinx-copybutton==0.5.2", From a80be06d2511101c34ea35ec5c0e51037cca6c1e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 22:17:45 +0000 Subject: [PATCH 1033/1638] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) --- .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 c480de3e9..addfdb70e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: hooks: - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-case-conflict From 00d702af3815c78a6091605393f185a2b79fc68d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 17:54:10 +0000 Subject: [PATCH 1034/1638] Bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de333f893..e8e3da5a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install uv uses: astral-sh/setup-uv@v6 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f0dbc9c3..71774a6d8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install uv uses: astral-sh/setup-uv@v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c00447040..a19408730 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: # See # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches From c923eccfdde3ce628514810d2c8dc2d51411bc88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 10:39:43 +0000 Subject: [PATCH 1035/1638] Bump ruff from 0.12.8 to 0.12.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.8 to 0.12.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.12.8...0.12.9) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a917ebc9f..8e29d5389 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.8", + "ruff==0.12.9", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 3859bad95c61410134fedc03eba02c81595b3d70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 10:22:41 +0000 Subject: [PATCH 1036/1638] Bump pyright from 1.1.403 to 1.1.404 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.403 to 1.1.404. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.403...v1.1.404) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.404 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8e29d5389..f4e316b7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint==3.3.8", "pylint-per-file-ignores==1.4.0", "pyproject-fmt==2.6.0", - "pyright==1.1.403", + "pyright==1.1.404", "pyroma==5.0", "pytest==8.4.1", "pytest-cov==6.2.1", From 5bf6193ec5a314b1f3e1a0ee58fbfc5cf55a43ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 10:15:21 +0000 Subject: [PATCH 1037/1638] Bump ruff from 0.12.9 to 0.12.10 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.9 to 0.12.10. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.12.9...0.12.10) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f4e316b7a..624947f08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.9", + "ruff==0.12.10", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From eb19b9083f7b61b31fe45f530e7b3bdacb4386c6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 24 Aug 2025 17:04:52 +0100 Subject: [PATCH 1038/1638] Simplify specifying license --- LICENSE | 19 ------------------- pyproject.toml | 3 +-- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index ef26969f8..000000000 --- a/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -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. diff --git a/pyproject.toml b/pyproject.toml index 624947f08..3bd00d717 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ keywords = [ "vuforia", "vws", ] -license = { file = "LICENSE" } +license = "MIT" authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com" }, ] @@ -22,7 +22,6 @@ requires-python = ">=3.13" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", - "License :: OSI Approved :: MIT License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", From 22a2cca62a9ff655eaad04cdcbf7173a42bd16d4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 24 Aug 2025 17:47:50 +0100 Subject: [PATCH 1039/1638] Run pre-commit hooks on only one stage each --- .pre-commit-config.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index addfdb70e..5c164119e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,31 +45,49 @@ repos: - repo: meta hooks: - id: check-useless-excludes + stages: [pre-commit] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-added-large-files + stages: [pre-commit] - id: check-case-conflict + stages: [pre-commit] - id: check-executables-have-shebangs + stages: [pre-commit] - id: check-merge-conflict + stages: [pre-commit] - id: check-shebang-scripts-are-executable + stages: [pre-commit] - id: check-symlinks + stages: [pre-commit] - id: check-json + stages: [pre-commit] - id: check-toml + stages: [pre-commit] - id: check-vcs-permalinks + stages: [pre-commit] - id: check-yaml + stages: [pre-commit] - id: end-of-file-fixer + stages: [pre-commit] - id: file-contents-sorter files: spelling_private_dict\.txt$ + stages: [pre-commit] - id: trailing-whitespace + stages: [pre-commit] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: - id: rst-directive-colons + stages: [pre-commit] - id: rst-inline-touching-normal + stages: [pre-commit] - id: text-unicode-replacement-char + stages: [pre-commit] - id: rst-backticks + stages: [pre-commit] - repo: local hooks: - id: actionlint @@ -79,6 +97,7 @@ repos: pass_filenames: false types_or: [yaml] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: docformatter name: docformatter @@ -86,6 +105,7 @@ repos: language: python types_or: [python] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: shellcheck name: shellcheck @@ -93,6 +113,7 @@ repos: language: python types_or: [shell] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: shellcheck-docs name: shellcheck-docs @@ -101,6 +122,7 @@ repos: language: python types_or: [markdown, rst] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: shfmt name: shfmt @@ -108,6 +130,7 @@ repos: language: python types_or: [shell] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: shfmt-docs name: shfmt-docs @@ -116,6 +139,7 @@ repos: language: python types_or: [markdown, rst] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: mypy name: mypy @@ -166,6 +190,7 @@ repos: types_or: [python] pass_filenames: false additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: vulture-docs name: vulture docs @@ -173,6 +198,7 @@ repos: language: python types_or: [markdown, rst] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: pyroma name: pyroma @@ -181,6 +207,7 @@ repos: pass_filenames: false types_or: [toml] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: deptry name: deptry @@ -188,6 +215,7 @@ repos: language: python pass_filenames: false additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: pylint name: pylint @@ -211,6 +239,7 @@ repos: language: python types_or: [python] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: ruff-check-fix-docs name: Ruff check fix docs @@ -218,6 +247,7 @@ repos: language: python types_or: [markdown, rst] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: ruff-format-fix name: Ruff format @@ -225,6 +255,7 @@ repos: language: python types_or: [python] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: ruff-format-fix-docs name: Ruff format docs @@ -233,6 +264,7 @@ repos: language: python types_or: [markdown, rst] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: doc8 name: doc8 @@ -240,6 +272,7 @@ repos: language: python types_or: [rst] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: interrogate name: interrogate @@ -247,6 +280,7 @@ repos: language: python types_or: [python] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: interrogate-docs name: interrogate docs @@ -254,6 +288,7 @@ repos: language: python types_or: [markdown, rst] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: pyproject-fmt-fix name: pyproject-fmt @@ -262,6 +297,7 @@ repos: types_or: [toml] files: pyproject.toml additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: linkcheck name: linkcheck @@ -304,6 +340,7 @@ repos: language: python types_or: [yaml] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] - id: sphinx-lint name: sphinx-lint @@ -311,3 +348,4 @@ repos: language: python types_or: [rst] additional_dependencies: [uv==0.6.3] + stages: [pre-commit] From fcaa10d1f92199c06c2b312b301ceb29672ff968 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 27 Aug 2025 23:22:03 +0100 Subject: [PATCH 1040/1638] Bump pylint per-file-ignores --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3bd00d717..cc10111b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pyenchant==3.3.0rc1", "pygments==2.19.2", "pylint==3.3.8", - "pylint-per-file-ignores==1.4.0", + "pylint-per-file-ignores==2.0.3", "pyproject-fmt==2.6.0", "pyright==1.1.404", "pyroma==5.0", @@ -248,7 +248,8 @@ disable = [ # - We want to use global variables in documentation, which may not be uppercase. # - conf.py is a Sphinx configuration file which requires lowercase global variable names. per-file-ignores = [ - "docs/:invalid-name", + "docs/source/conf.py:invalid-name", + "docs/source/doccmd_*.py:invalid-name", "doccmd_README_rst.*.py:invalid-name", ] From af9bf7520cd87956fbae5de426958db1804eaa14 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 27 Aug 2025 23:29:26 +0100 Subject: [PATCH 1041/1638] Bump pylint per-file-ignores --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cc10111b0..b5eeff047 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -250,7 +250,7 @@ disable = [ per-file-ignores = [ "docs/source/conf.py:invalid-name", "docs/source/doccmd_*.py:invalid-name", - "doccmd_README_rst.*.py:invalid-name", + "doccmd_README_rst_*.py:invalid-name", ] [tool.pylint.'FORMAT'] From a94bad5cf3e8ab95fd6f5d8f297c37d411c36678 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 10:07:18 +0000 Subject: [PATCH 1042/1638] Bump ruff from 0.12.10 to 0.12.11 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.10 to 0.12.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/0.12.10...0.12.11) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.11 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b5eeff047..77de76c3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.10", + "ruff==0.12.11", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 5b22fb36ad798133c46be65f898bdc6929006fb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 13:17:00 +0000 Subject: [PATCH 1043/1638] Bump pyright from 1.1.404 to 1.1.405 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.404 to 1.1.405. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.404...v1.1.405) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.405 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 77de76c3e..15ca2a1d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint==3.3.8", "pylint-per-file-ignores==2.0.3", "pyproject-fmt==2.6.0", - "pyright==1.1.404", + "pyright==1.1.405", "pyroma==5.0", "pytest==8.4.1", "pytest-cov==6.2.1", From 73686e48273d513e45e32bda249291be4a357b67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 10:06:46 +0000 Subject: [PATCH 1044/1638] Bump pytest from 8.4.1 to 8.4.2 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.4.1 to 8.4.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.4.1...8.4.2) --- updated-dependencies: - dependency-name: pytest dependency-version: 8.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 15ca2a1d6..7c628a437 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.6.0", "pyright==1.1.405", "pyroma==5.0", - "pytest==8.4.1", + "pytest==8.4.2", "pytest-cov==6.2.1", "pyyaml==6.0.2", "ruff==0.12.11", From eaac5dcdf2b356dcc79ef2f7a66f134fdcdff4ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 10:07:02 +0000 Subject: [PATCH 1045/1638] Bump ruff from 0.12.11 to 0.12.12 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.11 to 0.12.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/0.12.11...0.12.12) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 15ca2a1d6..d95e0b17f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.4.1", "pytest-cov==6.2.1", "pyyaml==6.0.2", - "ruff==0.12.11", + "ruff==0.12.12", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 063b9d365dbf517b7a06df81e28ce989372b8daa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:31:55 +0000 Subject: [PATCH 1046/1638] Bump pytest-cov from 6.2.1 to 6.3.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 6.2.1 to 6.3.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v6.2.1...v6.3.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-version: 6.3.0 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 d823ba952..c3f48e366 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pyright==1.1.405", "pyroma==5.0", "pytest==8.4.2", - "pytest-cov==6.2.1", + "pytest-cov==6.3.0", "pyyaml==6.0.2", "ruff==0.12.12", # We add shellcheck-py not only for shell scripts and shell code blocks, From 3a215e060f2c3caca35a791f256446c9d2ebb6e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:33:49 +0000 Subject: [PATCH 1047/1638] Bump yamlfix from 1.17.0 to 1.18.0 Bumps [yamlfix](https://github.com/lyz-code/yamlfix) from 1.17.0 to 1.18.0. - [Changelog](https://github.com/lyz-code/yamlfix/blob/main/CHANGELOG.md) - [Commits](https://github.com/lyz-code/yamlfix/compare/1.17.0...1.18.0) --- updated-dependencies: - dependency-name: yamlfix dependency-version: 1.18.0 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 d823ba952..a06268a8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", - "yamlfix==1.17.0", + "yamlfix==1.18.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From faa21d2fc8535a6b90223203aab46d008e9c6db3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 10:06:21 +0000 Subject: [PATCH 1048/1638] Bump pytest-cov from 6.3.0 to 7.0.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 6.3.0 to 7.0.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v6.3.0...v7.0.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-version: 7.0.0 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 60bd5dbae..a1fa17472 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pyright==1.1.405", "pyroma==5.0", "pytest==8.4.2", - "pytest-cov==6.3.0", + "pytest-cov==7.0.0", "pyyaml==6.0.2", "ruff==0.12.12", # We add shellcheck-py not only for shell scripts and shell code blocks, From e6edf35d8cf00ad835c61090f9be6ad4d0f71b21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:07:17 +0000 Subject: [PATCH 1049/1638] Bump ruff from 0.12.12 to 0.13.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.12 to 0.13.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.12.12...0.13.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.13.0 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 a1fa17472..88d6cdeba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.2", - "ruff==0.12.12", + "ruff==0.13.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From c9b5da269b2e6af16ee5e1d4ce1be783fc1a6429 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 10:07:26 +0000 Subject: [PATCH 1050/1638] Bump mypy[faster-cache] from 1.17.1 to 1.18.1 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.17.1 to 1.18.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.17.1...v1.18.1) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-version: 1.18.1 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 88d6cdeba..30d6da20a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.7.19", "interrogate==1.7.0", - "mypy[faster-cache]==1.17.1", + "mypy[faster-cache]==1.18.1", "mypy-strict-kwargs==2025.4.3", "pre-commit==4.3.0", "pydocstyle==6.3", From 91cccb574eebf16923c593adc3179ef1af2c898f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 14 Sep 2025 22:34:53 +0100 Subject: [PATCH 1051/1638] Remove direct pyenchant dependency now that 3.3.0 supports the latest macOS --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 30d6da20a..8155d78c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,6 @@ optional-dependencies.dev = [ "mypy-strict-kwargs==2025.4.3", "pre-commit==4.3.0", "pydocstyle==6.3", - "pyenchant==3.3.0rc1", "pygments==2.19.2", "pylint==3.3.8", "pylint-per-file-ignores==2.0.3", From c3c9801d05f04662ba004f7049de387a1aa09a1f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 15 Sep 2025 03:29:50 +0100 Subject: [PATCH 1052/1638] Make pylint spelling dependency explicit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8155d78c5..0f0a053a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pre-commit==4.3.0", "pydocstyle==6.3", "pygments==2.19.2", - "pylint==3.3.8", + "pylint[spelling]==3.3.8", "pylint-per-file-ignores==2.0.3", "pyproject-fmt==2.6.0", "pyright==1.1.405", From 3b6658fe8dc4f3e05fc466a1eab29fb2ece13adb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 10:35:09 +0000 Subject: [PATCH 1053/1638] Bump types-requests from 2.32.4.20250809 to 2.32.4.20250913 Bumps [types-requests](https://github.com/typeshed-internal/stub_uploader) from 2.32.4.20250809 to 2.32.4.20250913. - [Commits](https://github.com/typeshed-internal/stub_uploader/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.32.4.20250913 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0f0a053a8..d3d24c834 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.6.6", "sphinxcontrib-spelling==8.0.1", "sybil==9.2.0", - "types-requests==2.32.4.20250809", + "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", From 8b1cdcbc391a2bdce36bc3dc827ee8e540996fa3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 10:07:54 +0000 Subject: [PATCH 1054/1638] Bump doccmd from 2025.4.8 to 2025.9.19 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.4.8 to 2025.9.19. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.04.08...2025.09.19) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.9.19 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 d3d24c834..83e974706 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.50", "deptry==0.23.1", "doc8==2.0.0", - "doccmd==2025.4.8", + "doccmd==2025.9.19", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.7.19", From c7f89faa312257ca277b3bd1ccad4cbce90a8ae4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 10:36:18 +0000 Subject: [PATCH 1055/1638] Bump ruff from 0.13.0 to 0.13.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.13.0 to 0.13.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.13.0...0.13.1) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.13.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 83e974706..2d53e4755 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.2", - "ruff==0.13.0", + "ruff==0.13.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 4b1dafd48ef33ebc55a459c3238da0c848f8b34a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 10:36:24 +0000 Subject: [PATCH 1056/1638] Bump mypy[faster-cache] from 1.18.1 to 1.18.2 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.18.1 to 1.18.2. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.18.1...v1.18.2) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-version: 1.18.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 83e974706..9f9c4d147 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.7.19", "interrogate==1.7.0", - "mypy[faster-cache]==1.18.1", + "mypy[faster-cache]==1.18.2", "mypy-strict-kwargs==2025.4.3", "pre-commit==4.3.0", "pydocstyle==6.3", From 95dc03e8f8df892f064e1192e3eec9d32193097f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 10:07:07 +0000 Subject: [PATCH 1057/1638] Bump pyyaml from 6.0.2 to 6.0.3 Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.2 to 6.0.3. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/6.0.2...6.0.3) --- updated-dependencies: - dependency-name: pyyaml dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 29e697a8f..7c6b82d34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ optional-dependencies.dev = [ "pyroma==5.0", "pytest==8.4.2", "pytest-cov==7.0.0", - "pyyaml==6.0.2", + "pyyaml==6.0.3", "ruff==0.13.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will From 6885ac6ade117646c842399615bcdbf28a91d574 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 10:07:35 +0000 Subject: [PATCH 1058/1638] Bump furo from 2025.7.19 to 2025.9.25 Bumps [furo](https://github.com/pradyunsg/furo) from 2025.7.19 to 2025.9.25. - [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/2025.07.19...2025.09.25) --- updated-dependencies: - dependency-name: furo dependency-version: 2025.9.25 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 29e697a8f..188de4b02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "doccmd==2025.9.19", "docformatter==1.7.7", "freezegun==1.5.5", - "furo==2025.7.19", + "furo==2025.9.25", "interrogate==1.7.0", "mypy[faster-cache]==1.18.2", "mypy-strict-kwargs==2025.4.3", From b2fc84bd89cec895d83320b961be38333d8a6366 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 10:11:42 +0000 Subject: [PATCH 1059/1638] Bump ruff from 0.13.1 to 0.13.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.13.1 to 0.13.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.13.1...0.13.2) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.13.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7c6b82d34..735892aa2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.13.1", + "ruff==0.13.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From d8e1a6cca688d2d6fe32c1e0d1716d25ea3ef2ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 10:07:33 +0000 Subject: [PATCH 1060/1638] Bump pyright from 1.1.405 to 1.1.406 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.405 to 1.1.406. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.405...v1.1.406) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.406 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 81cf71311..8020ea126 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==3.3.8", "pylint-per-file-ignores==2.0.3", "pyproject-fmt==2.6.0", - "pyright==1.1.405", + "pyright==1.1.406", "pyroma==5.0", "pytest==8.4.2", "pytest-cov==7.0.0", From 6b54a1d39908fe85d54a6db29925d7230e665693 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 10:12:33 +0000 Subject: [PATCH 1061/1638] Bump pyproject-fmt from 2.6.0 to 2.7.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.6.0 to 2.7.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.6.0...pyproject-fmt/2.7.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.7.0 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 8020ea126..85e1fc266 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==3.3.8", "pylint-per-file-ignores==2.0.3", - "pyproject-fmt==2.6.0", + "pyproject-fmt==2.7.0", "pyright==1.1.406", "pyroma==5.0", "pytest==8.4.2", From 5e4a468ac77c7babc8063d224b317e0267bc082a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:06:19 +0000 Subject: [PATCH 1062/1638] Bump ruff from 0.13.2 to 0.13.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.13.2 to 0.13.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.13.2...0.13.3) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.13.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 85e1fc266..020c8b7f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.13.2", + "ruff==0.13.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 2c7878dd67c512db71c38f95f2a5075cb9d89558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:51:43 +0000 Subject: [PATCH 1063/1638] Bump pylint[spelling] from 3.3.8 to 3.3.9 Bumps [pylint[spelling]](https://github.com/pylint-dev/pylint) from 3.3.8 to 3.3.9. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.8...v3.3.9) --- updated-dependencies: - dependency-name: pylint[spelling] dependency-version: 3.3.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 020c8b7f5..2eefdc34c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pre-commit==4.3.0", "pydocstyle==6.3", "pygments==2.19.2", - "pylint[spelling]==3.3.8", + "pylint[spelling]==3.3.9", "pylint-per-file-ignores==2.0.3", "pyproject-fmt==2.7.0", "pyright==1.1.406", From d21db3bbf61f79f88ed25218ca491a25bf43268a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 7 Oct 2025 07:32:36 +0100 Subject: [PATCH 1064/1638] Remove Codecov - it is flaky and doesn't provide much value --- .github/workflows/ci.yml | 8 +------- README.rst | 4 +--- codecov.yaml | 7 ------- pyproject.toml | 1 - 4 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 codecov.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8e3da5a0..92a2848b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,13 +35,7 @@ jobs: run: | # We run tests against "." and not the tests directory as we test the README # and documentation. - uv run --extra=dev --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 - with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} + uv run --extra=dev --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . completion-ci: needs: build diff --git a/README.rst b/README.rst index 3cd5bb22c..dea6bb93d 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -|Build Status| |codecov| |PyPI| +|Build Status| |PyPI| vws-python ========== @@ -71,8 +71,6 @@ See the `full documentation `__. .. |Build Status| image:: https://github.com/VWS-Python/vws-python/actions/workflows/ci.yml/badge.svg?branch=main :target: https://github.com/VWS-Python/vws-python/actions -.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/main/graph/badge.svg - :target: https://codecov.io/gh/VWS-Python/vws-python .. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg :target: https://badge.fury.io/py/VWS-Python .. |minimum-python-version| replace:: 3.13 diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 5c35baac9..000000000 --- a/codecov.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -coverage: - status: - patch: - default: - # Require 100% test coverage. - target: 100% diff --git a/pyproject.toml b/pyproject.toml index 2eefdc34c..aac9f9969 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -288,7 +288,6 @@ ignore = [ "Makefile", "ci", "ci/**", - "codecov.yaml", "doc8.ini", "docs", "docs/**", From 4dd75bbd990351a4b8b5a3cacdc9f60e8c4491bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Oct 2025 10:07:36 +0000 Subject: [PATCH 1065/1638] Bump astral-sh/setup-uv from 6 to 7 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 6 to 7. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v6...v7) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92a2848b8..b71569197 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v5 - name: Install uv - uses: astral-sh/setup-uv@v6 + uses: astral-sh/setup-uv@v7 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 71774a6d8..d3bb9d802 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v5 - name: Install uv - uses: astral-sh/setup-uv@v6 + uses: astral-sh/setup-uv@v7 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a19408730..8665829a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v6 + uses: astral-sh/setup-uv@v7 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' From 3dd98d7c572fcc423ae991b46a5364d1cd0254b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Oct 2025 10:08:09 +0000 Subject: [PATCH 1066/1638] Bump ruff from 0.13.3 to 0.14.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.13.3 to 0.14.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.13.3...0.14.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.0 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 aac9f9969..662d1c988 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.13.3", + "ruff==0.14.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 86b2807633fd9db999a1cc5617ff7f4320b7162a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Oct 2025 10:07:14 +0000 Subject: [PATCH 1067/1638] Bump pyproject-fmt from 2.7.0 to 2.10.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.7.0 to 2.10.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.7.0...pyproject-fmt/2.10.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.10.0 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 662d1c988..c733120c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==3.3.9", "pylint-per-file-ignores==2.0.3", - "pyproject-fmt==2.7.0", + "pyproject-fmt==2.10.0", "pyright==1.1.406", "pyroma==5.0", "pytest==8.4.2", From f62b24ca2058330d4104e2681ae133a20daedd6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:37:40 +0000 Subject: [PATCH 1068/1638] Bump actionlint-py from 1.7.7.23 to 1.7.8.24 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.7.23 to 1.7.8.24. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.7.23...v1.7.8.24) --- updated-dependencies: - dependency-name: actionlint-py dependency-version: 1.7.8.24 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c733120c5..8710c28af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.7.23", + "actionlint-py==1.7.8.24", "check-manifest==0.50", "deptry==0.23.1", "doc8==2.0.0", From ce7d4972c75e7fb4a1e015c1d38220054dc35ac1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:45:51 +0000 Subject: [PATCH 1069/1638] Bump pylint-per-file-ignores from 2.0.3 to 3.1.0 Bumps [pylint-per-file-ignores](https://github.com/SAP/pylint-per-file-ignores) from 2.0.3 to 3.1.0. - [Release notes](https://github.com/SAP/pylint-per-file-ignores/releases) - [Changelog](https://github.com/SAP/pylint-per-file-ignores/blob/main/CHANGELOG.md) - [Commits](https://github.com/SAP/pylint-per-file-ignores/compare/v2.0.3...v3.1.0) --- updated-dependencies: - dependency-name: pylint-per-file-ignores dependency-version: 3.1.0 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 c733120c5..101848b7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==3.3.9", - "pylint-per-file-ignores==2.0.3", + "pylint-per-file-ignores==3.1.0", "pyproject-fmt==2.10.0", "pyright==1.1.406", "pyroma==5.0", From 66fa29cb29e876c3a30fa17ae27d9855ff5527f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:46:11 +0000 Subject: [PATCH 1070/1638] Bump yamlfix from 1.18.0 to 1.19.0 Bumps [yamlfix](https://github.com/lyz-code/yamlfix) from 1.18.0 to 1.19.0. - [Changelog](https://github.com/lyz-code/yamlfix/blob/main/CHANGELOG.md) - [Commits](https://github.com/lyz-code/yamlfix/commits) --- updated-dependencies: - dependency-name: yamlfix dependency-version: 1.19.0 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 c733120c5..dc4390829 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", - "yamlfix==1.18.0", + "yamlfix==1.19.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From fde6d89b25ee3322da9830147a49eaac2a6e8e57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:54:41 +0000 Subject: [PATCH 1071/1638] Bump stefanzweifel/git-auto-commit-action from 6 to 7 Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 6 to 7. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v6...v7) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... 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 8665829a5..ca3d74491 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,7 +63,7 @@ jobs: include: CHANGELOG.rst regex: false - - uses: stefanzweifel/git-auto-commit-action@v6 + - uses: stefanzweifel/git-auto-commit-action@v7 id: commit with: commit_message: Bump CHANGELOG From 6110b1372df22d7e6c63d3c524fe737552eff435 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:57:05 +0000 Subject: [PATCH 1072/1638] Bump pylint[spelling] from 3.3.9 to 4.0.0 Bumps [pylint[spelling]](https://github.com/pylint-dev/pylint) from 3.3.9 to 4.0.0. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.9...v4.0.0) --- updated-dependencies: - dependency-name: pylint[spelling] dependency-version: 4.0.0 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 28931851c..75385c471 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pre-commit==4.3.0", "pydocstyle==6.3", "pygments==2.19.2", - "pylint[spelling]==3.3.9", + "pylint[spelling]==4.0.0", "pylint-per-file-ignores==3.1.0", "pyproject-fmt==2.10.0", "pyright==1.1.406", From 7639d13bf94f9db9587202aea1d6ab43b589c06b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 10:09:00 +0000 Subject: [PATCH 1073/1638] Bump pyproject-fmt from 2.10.0 to 2.11.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.10.0 to 2.11.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.10.0...pyproject-fmt/2.11.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.11.0 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 75385c471..8221ef96f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.0", "pylint-per-file-ignores==3.1.0", - "pyproject-fmt==2.10.0", + "pyproject-fmt==2.11.0", "pyright==1.1.406", "pyroma==5.0", "pytest==8.4.2", From 158efeae3dafe8b5ffc8e82285faca0cb2e35d07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 10:09:16 +0000 Subject: [PATCH 1074/1638] Bump pylint[spelling] from 4.0.0 to 4.0.1 Bumps [pylint[spelling]](https://github.com/pylint-dev/pylint) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v4.0.0...v4.0.1) --- updated-dependencies: - dependency-name: pylint[spelling] dependency-version: 4.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 75385c471..22b645f2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pre-commit==4.3.0", "pydocstyle==6.3", "pygments==2.19.2", - "pylint[spelling]==4.0.0", + "pylint[spelling]==4.0.1", "pylint-per-file-ignores==3.1.0", "pyproject-fmt==2.10.0", "pyright==1.1.406", From 1bcd0b372324e04017dcfc2935d812d2204dce8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Oct 2025 10:08:19 +0000 Subject: [PATCH 1075/1638] Bump check-manifest from 0.50 to 0.51 Bumps [check-manifest](https://github.com/mgedmin/check-manifest) from 0.50 to 0.51. - [Changelog](https://github.com/mgedmin/check-manifest/blob/master/CHANGES.rst) - [Commits](https://github.com/mgedmin/check-manifest/compare/0.50...0.51) --- updated-dependencies: - dependency-name: check-manifest dependency-version: '0.51' 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 f5a4a96fd..26443a6c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ ] optional-dependencies.dev = [ "actionlint-py==1.7.8.24", - "check-manifest==0.50", + "check-manifest==0.51", "deptry==0.23.1", "doc8==2.0.0", "doccmd==2025.9.19", From 03280e551448d19f380c7952822102ffcec12513 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Oct 2025 10:07:19 +0000 Subject: [PATCH 1076/1638] Bump ruff from 0.14.0 to 0.14.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.0 to 0.14.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.14.0...0.14.1) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 26443a6c4..d3da05490 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.0", + "ruff==0.14.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 32fcb153a5867b7e7958b69291af5d7b41093383 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 11:00:50 +0000 Subject: [PATCH 1077/1638] Bump doccmd from 2025.9.19 to 2025.10.18 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.9.19 to 2025.10.18. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.09.19...2025.10.18) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.10.18 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 d3da05490..37e7ed7b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.23.1", "doc8==2.0.0", - "doccmd==2025.9.19", + "doccmd==2025.10.18", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From 8b1fd521869de717a6b4b7c6be9572874f186adb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Oct 2025 10:08:34 +0000 Subject: [PATCH 1078/1638] Bump pylint[spelling] from 4.0.1 to 4.0.2 Bumps [pylint[spelling]](https://github.com/pylint-dev/pylint) from 4.0.1 to 4.0.2. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v4.0.1...v4.0.2) --- updated-dependencies: - dependency-name: pylint[spelling] dependency-version: 4.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 37e7ed7b6..77c9ca89f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pre-commit==4.3.0", "pydocstyle==6.3", "pygments==2.19.2", - "pylint[spelling]==4.0.1", + "pylint[spelling]==4.0.2", "pylint-per-file-ignores==3.1.0", "pyproject-fmt==2.11.0", "pyright==1.1.406", From 53cf3a0e2f8473c101cf1d1fc9dde27e4d4a3436 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 10:07:55 +0000 Subject: [PATCH 1079/1638] Bump sphinx-substitution-extensions from 2025.6.6 to 2025.10.24 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.6.6 to 2025.10.24. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.06.06...2025.10.24) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2025.10.24 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 77c9ca89f..0d72ee5a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.0", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2025.6.6", + "sphinx-substitution-extensions==2025.10.24", "sphinxcontrib-spelling==8.0.1", "sybil==9.2.0", "types-requests==2.32.4.20250913", From aabdd340ce454dff1596fccda58ea9c466fa40a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 10:08:14 +0000 Subject: [PATCH 1080/1638] Bump ruff from 0.14.1 to 0.14.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.1 to 0.14.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.14.1...0.14.2) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 77c9ca89f..ea4ce5631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.1", + "ruff==0.14.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From ee5594fa58c94fc0c27edca4fd36c78fc79ab0e7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 Oct 2025 02:08:39 +0000 Subject: [PATCH 1081/1638] Remove docs/Makefile and update pre-commit to use sphinx-build directly --- .pre-commit-config.yaml | 15 +++++++++------ docs/Makefile | 20 -------------------- 2 files changed, 9 insertions(+), 26 deletions(-) delete mode 100644 docs/Makefile diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5c164119e..adc80ff7e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -117,7 +117,8 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck + entry: + uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] @@ -134,7 +135,8 @@ repos: - id: shfmt-docs name: shfmt-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt + entry: + uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] @@ -259,7 +261,8 @@ repos: - id: ruff-format-fix-docs name: Ruff format docs - entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff + entry: + uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" language: python types_or: [markdown, rst] @@ -301,7 +304,7 @@ repos: - id: linkcheck name: linkcheck - entry: make -C docs/ linkcheck SPHINXOPTS=-W + entry: uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build -W language: python types_or: [rst] stages: [manual] @@ -310,7 +313,7 @@ repos: - id: spelling name: spelling - entry: make -C docs/ spelling SPHINXOPTS=-W + entry: uv run --extra=dev sphinx-build -M spelling docs/source docs/build -W language: python types_or: [rst] stages: [manual] @@ -319,7 +322,7 @@ repos: - id: docs name: Build Documentation - entry: make docs + entry: uv run --extra=dev sphinx-build -M html docs/source docs/build language: python stages: [manual] pass_filenames: false diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 15e9c44b1..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = VWSPYTHON -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @uv run --extra=dev $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @uv run --extra=dev $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) From 57db930a19e1a1a82db3723f58a6b8d9a2ea90e8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 Oct 2025 02:12:14 +0000 Subject: [PATCH 1082/1638] Update base Makefile to use sphinx-build directly --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 216a25740..b4612b464 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,7 @@ SHELL := /bin/bash -euxo pipefail - -# Treat Sphinx warnings as errors -SPHINXOPTS := -W - .PHONY: docs docs: - make -C docs clean html SPHINXOPTS=$(SPHINXOPTS) + uv run --extra=dev sphinx-build -M html docs/source docs/build -W .PHONY: open-docs open-docs: From 82faaf5752dfe3cf76b4f860a3df04cedae388f0 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 Oct 2025 02:14:08 +0000 Subject: [PATCH 1083/1638] [pre-commit.ci lite] apply automatic fixes --- .pre-commit-config.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index adc80ff7e..8a8e38b20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -117,8 +117,7 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: - uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck + entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] @@ -135,8 +134,7 @@ repos: - id: shfmt-docs name: shfmt-docs - entry: - uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt + entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] @@ -261,8 +259,7 @@ repos: - id: ruff-format-fix-docs name: Ruff format docs - entry: - uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff + entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" language: python types_or: [markdown, rst] @@ -304,7 +301,8 @@ repos: - id: linkcheck name: linkcheck - entry: uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build -W + entry: uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build + -W language: python types_or: [rst] stages: [manual] @@ -313,7 +311,8 @@ repos: - id: spelling name: spelling - entry: uv run --extra=dev sphinx-build -M spelling docs/source docs/build -W + entry: uv run --extra=dev sphinx-build -M spelling docs/source docs/build + -W language: python types_or: [rst] stages: [manual] From eb9fb0ff6cdd0895c426be2fdc248fce87b9a5fc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 Oct 2025 02:22:55 +0000 Subject: [PATCH 1084/1638] Add -W flag to docs hook for consistent error handling --- .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 8a8e38b20..4236e1a68 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -321,7 +321,7 @@ repos: - id: docs name: Build Documentation - entry: uv run --extra=dev sphinx-build -M html docs/source docs/build + entry: uv run --extra=dev sphinx-build -M html docs/source docs/build -W language: python stages: [manual] pass_filenames: false From cc7bbe869276e7054a64ca551cf78ded97711723 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 Oct 2025 02:34:43 +0000 Subject: [PATCH 1085/1638] Add MIT LICENSE file --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..c9f18d1a3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Adam Dangoor + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +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 80ef1ad105705cd056b36839b1e09173b2fd5c00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 11:16:55 +0000 Subject: [PATCH 1086/1638] Bump doccmd from 2025.10.18 to 2025.10.25 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.10.18 to 2025.10.25. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.10.18...2025.10.25) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.10.25 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b83b042ac..e5f693e12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.23.1", "doc8==2.0.0", - "doccmd==2025.10.18", + "doccmd==2025.10.25", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From e725d98f9752834c2e59dd1b44fedc107b5ee2d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 11:19:22 +0000 Subject: [PATCH 1087/1638] Bump pyright from 1.1.406 to 1.1.407 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.406 to 1.1.407. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.406...v1.1.407) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.407 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b83b042ac..80c0f3e90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.2", "pylint-per-file-ignores==3.1.0", "pyproject-fmt==2.11.0", - "pyright==1.1.406", + "pyright==1.1.407", "pyroma==5.0", "pytest==8.4.2", "pytest-cov==7.0.0", From 3172d5e1d03178b6a76eadcbd0ff9ff5730554d3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 Oct 2025 12:23:10 +0000 Subject: [PATCH 1088/1638] Add .prettierrc configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Prettier configuration file with YAML single quote override from click-compose. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .prettierrc | 10 ++++++++++ pyproject.toml | 1 + 2 files changed, 11 insertions(+) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..3ab9aa054 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "overrides": [ + { + "files": ["*.yaml", "*.yml"], + "options": { + "singleQuote": true + } + } + ] +} diff --git a/pyproject.toml b/pyproject.toml index b83b042ac..ecc36d8eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -278,6 +278,7 @@ make-summary-multi-line = true ignore = [ ".checkmake-config.ini", + ".prettierrc", ".yamlfmt", "*.enc", ".pre-commit-config.yaml", From 82fdfe69f4d3ca3e292c76d170bc8216e7902745 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 27 Oct 2025 22:19:21 +0000 Subject: [PATCH 1089/1638] Remove Makefile and replace make commands with direct equivalents --- Makefile | 8 -------- docs/source/contributing.rst | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index b4612b464..000000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -SHELL := /bin/bash -euxo pipefail -.PHONY: docs -docs: - uv run --extra=dev sphinx-build -M html docs/source docs/build -W - -.PHONY: open-docs -open-docs: - python -c 'import os, webbrowser; webbrowser.open("file://" + os.path.abspath("docs/build/html/index.html"))' diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 21e5dbe82..0e531220d 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -64,8 +64,8 @@ Run the following commands to build and view documentation locally: .. code-block:: console - $ make docs - $ make open-docs + $ uv run --extra=dev sphinx-build -M html docs/source docs/build -W + $ python -c 'import os, webbrowser; webbrowser.open("file://" + os.path.abspath("docs/build/html/index.html"))' Continuous integration ---------------------- From f4dc7328d8340caa110aa4087e0df9c799a5bda4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 10:08:38 +0000 Subject: [PATCH 1090/1638] Bump doccmd from 2025.10.25 to 2025.10.27 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.10.25 to 2025.10.27. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.10.25...2025.10.27) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.10.27 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 48816b12d..778c8f743 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.23.1", "doc8==2.0.0", - "doccmd==2025.10.25", + "doccmd==2025.10.27", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From 5347522b7c5bb079f5b2f419d28e2599dcda9189 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 28 Oct 2025 10:54:06 +0000 Subject: [PATCH 1091/1638] Bump uv to 0.9.5 --- .pre-commit-config.yaml | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4236e1a68..3a653b355 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -96,7 +96,7 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: docformatter @@ -104,7 +104,7 @@ repos: entry: uv run --extra=dev -m docformatter --in-place language: python types_or: [python] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: shellcheck @@ -112,7 +112,7 @@ repos: entry: uv run --extra=dev shellcheck --shell=bash language: python types_or: [shell] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: shellcheck-docs @@ -121,7 +121,7 @@ repos: --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: shfmt @@ -129,7 +129,7 @@ repos: entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: shfmt-docs @@ -138,7 +138,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: mypy @@ -148,7 +148,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: mypy-docs name: mypy-docs @@ -156,7 +156,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: check-manifest name: check-manifest @@ -164,7 +164,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: pyright name: pyright @@ -173,7 +173,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: pyright-docs name: pyright-docs @@ -181,7 +181,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: vulture name: vulture @@ -189,7 +189,7 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: vulture-docs @@ -197,7 +197,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: pyroma @@ -206,7 +206,7 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: deptry @@ -214,7 +214,7 @@ repos: entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: pylint @@ -223,7 +223,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: pylint-docs name: pylint-docs @@ -231,14 +231,14 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: ruff-check-fix-docs @@ -246,7 +246,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: ruff-format-fix @@ -254,7 +254,7 @@ repos: entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: ruff-format-fix-docs @@ -263,7 +263,7 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: doc8 @@ -271,7 +271,7 @@ repos: entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: interrogate @@ -279,7 +279,7 @@ repos: entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: interrogate-docs @@ -287,7 +287,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: pyproject-fmt-fix @@ -296,7 +296,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: linkcheck @@ -307,7 +307,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: spelling name: spelling @@ -317,7 +317,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: docs name: Build Documentation @@ -325,7 +325,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: pyright-verifytypes name: pyright-verifytypes @@ -334,14 +334,14 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] - id: sphinx-lint @@ -349,5 +349,5 @@ repos: entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long language: python types_or: [rst] - additional_dependencies: [uv==0.6.3] + additional_dependencies: [uv==0.9.5] stages: [pre-commit] From a0231fd59cfc58a30bf5c4b2dd4715fb25a272b3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 28 Oct 2025 12:21:53 +0000 Subject: [PATCH 1092/1638] Add view and edit buttons to Sphinx docs --- docs/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8c7e78f05..4bce31b24 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -60,6 +60,7 @@ html_show_sourcelink = False html_theme_options = { "sidebar_hide_name": False, + "top_of_page_buttons": ["view", "edit"], } # Output file base name for HTML help builder. From 2ed9e31ab765e7f4fd0d9a0fa233ffcb8d606325 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 28 Oct 2025 13:42:05 +0000 Subject: [PATCH 1093/1638] Configure Furo top-of-page buttons with repository details --- docs/source/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 4bce31b24..914bcb886 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -60,7 +60,9 @@ html_show_sourcelink = False html_theme_options = { "sidebar_hide_name": False, - "top_of_page_buttons": ["view", "edit"], + "source_repository": "https://github.com/VWS-Python/vws-python/", + "source_branch": "main", + "source_directory": "docs/source/", } # Output file base name for HTML help builder. From aefc8d7efd9c850bc4eee2c576eaa6e8acc2d30d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:08:16 +0000 Subject: [PATCH 1094/1638] Bump sphinx-lint from 1.0.0 to 1.0.1 Bumps [sphinx-lint](https://github.com/sphinx-contrib/sphinx-lint) from 1.0.0 to 1.0.1. - [Release notes](https://github.com/sphinx-contrib/sphinx-lint/releases) - [Commits](https://github.com/sphinx-contrib/sphinx-lint/compare/v1.0.0...v1.0.1) --- updated-dependencies: - dependency-name: sphinx-lint dependency-version: 1.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 280218ea2..c05290470 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ optional-dependencies.dev = [ "shfmt-py==3.12.0.2", "sphinx==8.2.3", "sphinx-copybutton==0.5.2", - "sphinx-lint==1.0.0", + "sphinx-lint==1.0.1", "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2025.10.24", "sphinxcontrib-spelling==8.0.1", From 9a94a5c41493e8efaa10d37a9a090e65a76dc977 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 10:08:28 +0000 Subject: [PATCH 1095/1638] Bump ruff from 0.14.2 to 0.14.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.2 to 0.14.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.14.2...0.14.3) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c05290470..1d11449d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.2", + "ruff==0.14.3", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From ceb43b785390c9727aebc1dce84bb9712952a586 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 10:07:53 +0000 Subject: [PATCH 1096/1638] Bump pyproject-fmt from 2.11.0 to 2.11.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.11.0 to 2.11.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/commits) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.11.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d11449d2..ffcb7f329 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.2", "pylint-per-file-ignores==3.1.0", - "pyproject-fmt==2.11.0", + "pyproject-fmt==2.11.1", "pyright==1.1.407", "pyroma==5.0", "pytest==8.4.2", From 26b2a9c820a377f7354fb0abfac247ee5722866e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 10:07:56 +0000 Subject: [PATCH 1097/1638] Bump ruff from 0.14.3 to 0.14.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.3 to 0.14.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.14.3...0.14.4) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ffcb7f329..8fd215533 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==8.4.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.3", + "ruff==0.14.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e9831945a81fbb3a41d4a17c56b7994275746785 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 8 Nov 2025 16:22:49 +0000 Subject: [PATCH 1098/1638] Add --no-write-to-file flag for read-only doccmd commands --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a653b355..1f5f92b50 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -117,8 +117,8 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck - --shell=bash" + entry: uv run --extra=dev doccmd --no-write-to-file --language=shell --language=console + --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -153,7 +153,7 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --language=python --command="mypy" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -178,7 +178,7 @@ repos: - id: pyright-docs name: pyright-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --language=python --command="pyright" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyright" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -194,7 +194,7 @@ repos: - id: vulture-docs name: vulture docs - entry: uv run --extra=dev doccmd --language=python --command="vulture" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="vulture" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -227,7 +227,7 @@ repos: - id: pylint-docs name: pylint-docs - entry: uv run --extra=dev doccmd --language=python --command="pylint" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pylint" language: python stages: [manual] types_or: [markdown, rst] @@ -284,7 +284,7 @@ repos: - id: interrogate-docs name: interrogate docs - entry: uv run --extra=dev doccmd --language=python --command="interrogate" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="interrogate" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] From 3ba7058114bf5b7cab3568faa1a2d0fce9c83035 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 8 Nov 2025 19:54:48 +0000 Subject: [PATCH 1099/1638] Bump doccmd to 2025.11.8.1 and sybil-extras to 2025.11.8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8fd215533..3fe95ed38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.23.1", "doc8==2.0.0", - "doccmd==2025.10.27", + "doccmd==2025.11.8", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From bfbfc7e0d98eb863de3ca683d0d15248011bdb8f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 8 Nov 2025 20:13:34 +0000 Subject: [PATCH 1100/1638] Add --example-workers 0 to read-only doccmd hooks --- .pre-commit-config.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f5f92b50..fb99a708b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -117,8 +117,8 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=shell --language=console - --command="shellcheck --shell=bash" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=shell + --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -153,7 +153,8 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="mypy" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -178,7 +179,8 @@ repos: - id: pyright-docs name: pyright-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyright" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pyright" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -194,7 +196,8 @@ repos: - id: vulture-docs name: vulture docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="vulture" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="vulture" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -227,7 +230,8 @@ repos: - id: pylint-docs name: pylint-docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pylint" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pylint" language: python stages: [manual] types_or: [markdown, rst] @@ -284,7 +288,8 @@ repos: - id: interrogate-docs name: interrogate docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="interrogate" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="interrogate" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] From 1b6dd2cdde873c11d397704ae5be915cd7659b5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:26:06 +0000 Subject: [PATCH 1101/1638] Bump doccmd from 2025.11.8 to 2025.11.8.1 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.11.8 to 2025.11.8.1. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.11.08...2025.11.08.1) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.11.8.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3fe95ed38..dc7683977 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.23.1", "doc8==2.0.0", - "doccmd==2025.11.8", + "doccmd==2025.11.8.1", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From 1a537631547a8beb70329d46b227673eacd050a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:26:14 +0000 Subject: [PATCH 1102/1638] Bump pytest from 8.4.2 to 9.0.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.4.2 to 9.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/8.4.2...9.0.0) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.0.0 dependency-type: direct:development 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 3fe95ed38..b46b4a360 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.11.1", "pyright==1.1.407", "pyroma==5.0", - "pytest==8.4.2", + "pytest==9.0.0", "pytest-cov==7.0.0", "pyyaml==6.0.3", "ruff==0.14.4", From 5b9a189e4154d88108440a5a31c61093d76b780b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:26:28 +0000 Subject: [PATCH 1103/1638] Bump pre-commit from 4.3.0 to 4.4.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.3.0 to 4.4.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.3.0...v4.4.0) --- updated-dependencies: - dependency-name: pre-commit dependency-version: 4.4.0 dependency-type: direct:development 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 3fe95ed38..c40855d60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.18.2", "mypy-strict-kwargs==2025.4.3", - "pre-commit==4.3.0", + "pre-commit==4.4.0", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.2", From fac2dcda58555860d2099700c7d42dc2f59beb59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:26:35 +0000 Subject: [PATCH 1104/1638] Bump deptry from 0.23.1 to 0.24.0 Bumps [deptry](https://github.com/fpgmaas/deptry) from 0.23.1 to 0.24.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.23.1...0.24.0) --- updated-dependencies: - dependency-name: deptry dependency-version: 0.24.0 dependency-type: direct:development 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 3fe95ed38..d52f07008 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.8.24", "check-manifest==0.51", - "deptry==0.23.1", + "deptry==0.24.0", "doc8==2.0.0", "doccmd==2025.11.8", "docformatter==1.7.7", From 0d1f110142d6fdce9934dc161da0ec3720e8277a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 10:08:25 +0000 Subject: [PATCH 1105/1638] Bump pytest from 9.0.0 to 9.0.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.0.0 to 9.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/9.0.0...9.0.1) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.0.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7b0e67fa0..1c33fd64c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.11.1", "pyright==1.1.407", "pyroma==5.0", - "pytest==9.0.0", + "pytest==9.0.1", "pytest-cov==7.0.0", "pyyaml==6.0.3", "ruff==0.14.4", From 87b26bc582df6843d37ee7c1a4c155d1faebf4d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 10:07:07 +0000 Subject: [PATCH 1106/1638] Bump pylint[spelling] from 4.0.2 to 4.0.3 Bumps [pylint[spelling]](https://github.com/pylint-dev/pylint) from 4.0.2 to 4.0.3. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v4.0.2...v4.0.3) --- updated-dependencies: - dependency-name: pylint[spelling] dependency-version: 4.0.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1c33fd64c..b3a393d15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pre-commit==4.4.0", "pydocstyle==6.3", "pygments==2.19.2", - "pylint[spelling]==4.0.2", + "pylint[spelling]==4.0.3", "pylint-per-file-ignores==3.1.0", "pyproject-fmt==2.11.1", "pyright==1.1.407", From 56dffc291149b888d8f29e7c8b0c8761bae02ab5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 10:07:31 +0000 Subject: [PATCH 1107/1638] Bump ruff from 0.14.4 to 0.14.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.4 to 0.14.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.14.4...0.14.5) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1c33fd64c..3f1bd9df9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==9.0.1", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.4", + "ruff==0.14.5", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 3b1bdeb4cfde26afae8d4aa5a321a130cc3e9958 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 10:10:29 +0000 Subject: [PATCH 1108/1638] Bump sphinx-substitution-extensions from 2025.10.24 to 2025.11.17 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.10.24 to 2025.11.17. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.10.24...2025.11.17) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2025.11.17 dependency-type: direct:development 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 12b6f57c9..ad3977ba3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.1", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2025.10.24", + "sphinx-substitution-extensions==2025.11.17", "sphinxcontrib-spelling==8.0.1", "sybil==9.2.0", "types-requests==2.32.4.20250913", From 59e86d3e789f04a48e0c3fe93d81db51388bdca5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 10:08:03 +0000 Subject: [PATCH 1109/1638] Bump sphinx-lint from 1.0.1 to 1.0.2 Bumps [sphinx-lint](https://github.com/sphinx-contrib/sphinx-lint) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/sphinx-contrib/sphinx-lint/releases) - [Commits](https://github.com/sphinx-contrib/sphinx-lint/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: sphinx-lint dependency-version: 1.0.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad3977ba3..bf32f1900 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ optional-dependencies.dev = [ "shfmt-py==3.12.0.2", "sphinx==8.2.3", "sphinx-copybutton==0.5.2", - "sphinx-lint==1.0.1", + "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2025.11.17", "sphinxcontrib-spelling==8.0.1", From bbe38af05e4fcf69b39da33fe7f1bde4dd3f668f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 10:08:20 +0000 Subject: [PATCH 1110/1638] Bump doccmd from 2025.11.8.1 to 2025.11.20 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.11.8.1 to 2025.11.20. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.11.08.1...2025.11.20) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.11.20 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bf32f1900..1ab667665 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2025.11.8.1", + "doccmd==2025.11.20", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From 8b0901ead24fba4db3ae894f391531f29466f184 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 10:06:36 +0000 Subject: [PATCH 1111/1638] Bump actions/checkout from 5 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b71569197..73e6ce82c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Install uv uses: astral-sh/setup-uv@v7 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d3bb9d802..fbdc4c6ce 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Install uv uses: astral-sh/setup-uv@v7 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca3d74491..2ccae040a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: contents: write steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: # See # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches From b9a9e7fc3328f8db1a1e99e090637e9e429d16f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:00:48 +0000 Subject: [PATCH 1112/1638] Bump ruff from 0.14.5 to 0.14.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.5 to 0.14.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.14.5...0.14.6) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1ab667665..e21e40d16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==9.0.1", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.5", + "ruff==0.14.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 0b16d8afe0534f3b9536b1141c4998cdd590db00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:00:57 +0000 Subject: [PATCH 1113/1638] Bump pre-commit from 4.4.0 to 4.5.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.4.0...v4.5.0) --- updated-dependencies: - dependency-name: pre-commit dependency-version: 4.5.0 dependency-type: direct:development 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 1ab667665..e72620c23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.18.2", "mypy-strict-kwargs==2025.4.3", - "pre-commit==4.4.0", + "pre-commit==4.5.0", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.3", From 853ddae258071d037f702bd3070c6d7bc90b29e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:01:03 +0000 Subject: [PATCH 1114/1638] Bump actionlint-py from 1.7.8.24 to 1.7.9.24 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.8.24 to 1.7.9.24. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.8.24...v1.7.9.24) --- updated-dependencies: - dependency-name: actionlint-py dependency-version: 1.7.9.24 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1ab667665..815ba085d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.8.24", + "actionlint-py==1.7.9.24", "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", From 2e18e5431b27c089b21b7942bd04c4ecd37b1d5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 10:06:53 +0000 Subject: [PATCH 1115/1638] Bump pylint-per-file-ignores from 3.1.0 to 3.2.0 Bumps [pylint-per-file-ignores](https://github.com/SAP/pylint-per-file-ignores) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/SAP/pylint-per-file-ignores/releases) - [Changelog](https://github.com/SAP/pylint-per-file-ignores/blob/main/CHANGELOG.md) - [Commits](https://github.com/SAP/pylint-per-file-ignores/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: pylint-per-file-ignores dependency-version: 3.2.0 dependency-type: direct:development 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 b6c742df5..30c82e995 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.3", - "pylint-per-file-ignores==3.1.0", + "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", "pyright==1.1.407", "pyroma==5.0", From 7631aae5f5bca321c70211ae01c5a17f5f56208e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 12:35:39 +0000 Subject: [PATCH 1116/1638] Bump mypy[faster-cache] from 1.18.2 to 1.19.0 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.18.2 to 1.19.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.18.2...v1.19.0) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-version: 1.19.0 dependency-type: direct:development 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 30c82e995..e89705fa1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.9.25", "interrogate==1.7.0", - "mypy[faster-cache]==1.18.2", + "mypy[faster-cache]==1.19.0", "mypy-strict-kwargs==2025.4.3", "pre-commit==4.5.0", "pydocstyle==6.3", From 8af37ccca7e839af52ae2c334526fcd3e1171991 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 12:35:48 +0000 Subject: [PATCH 1117/1638] Bump pylint[spelling] from 4.0.3 to 4.0.4 Bumps [pylint[spelling]](https://github.com/pylint-dev/pylint) from 4.0.3 to 4.0.4. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v4.0.3...v4.0.4) --- updated-dependencies: - dependency-name: pylint[spelling] dependency-version: 4.0.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 30c82e995..0905b4a76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ optional-dependencies.dev = [ "pre-commit==4.5.0", "pydocstyle==6.3", "pygments==2.19.2", - "pylint[spelling]==4.0.3", + "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", "pyright==1.1.407", From 8318d6b97d0ed7573d9c346fecd148c8c08cca1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 12:36:03 +0000 Subject: [PATCH 1118/1638] Bump sphinxcontrib-spelling from 8.0.1 to 8.0.2 Bumps [sphinxcontrib-spelling](https://github.com/sphinx-contrib/spelling) from 8.0.1 to 8.0.2. - [Release notes](https://github.com/sphinx-contrib/spelling/releases) - [Commits](https://github.com/sphinx-contrib/spelling/compare/8.0.1...8.0.2) --- updated-dependencies: - dependency-name: sphinxcontrib-spelling dependency-version: 8.0.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 30c82e995..e0f7b7705 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ optional-dependencies.dev = [ "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2025.11.17", - "sphinxcontrib-spelling==8.0.1", + "sphinxcontrib-spelling==8.0.2", "sybil==9.2.0", "types-requests==2.32.4.20250913", "vulture==2.14", From 19936ad54596c7a66babbe067d6d79833a014962 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 12:36:13 +0000 Subject: [PATCH 1119/1638] Bump ruff from 0.14.6 to 0.14.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.6 to 0.14.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.14.6...0.14.7) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.7 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 30c82e995..dd38c1a33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==9.0.1", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.6", + "ruff==0.14.7", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 3f68948742f8d2513452284b2b3dd902947f2e9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:07:49 +0000 Subject: [PATCH 1120/1638] Bump sybil from 9.2.0 to 9.3.0 Bumps [sybil](https://github.com/simplistix/sybil) from 9.2.0 to 9.3.0. - [Changelog](https://github.com/simplistix/sybil/blob/master/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/9.2.0...9.3.0) --- updated-dependencies: - dependency-name: sybil dependency-version: 9.3.0 dependency-type: direct:development 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 27218b970..8a4cf2e2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ optional-dependencies.dev = [ "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2025.11.17", "sphinxcontrib-spelling==8.0.2", - "sybil==9.2.0", + "sybil==9.3.0", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 61ead975199d709d9910ae9bb96a27914347ad50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:07:39 +0000 Subject: [PATCH 1121/1638] Bump doccmd from 2025.11.20 to 2025.12.3 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.11.20 to 2025.12.3. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.11.20...2025.12.03) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.12.3 dependency-type: direct:development 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 8a4cf2e2d..22244360a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2025.11.20", + "doccmd==2025.12.3", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From 80d4d1d4386fe0d1f0f13805f689e630223db648 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 10:06:57 +0000 Subject: [PATCH 1122/1638] Bump ruff from 0.14.7 to 0.14.8 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.7 to 0.14.8. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.14.7...0.14.8) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 22244360a..35be4b8dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==9.0.1", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.7", + "ruff==0.14.8", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From ba8e9c31e41f8c87aabcd50aba4f52010f37f1df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 10:07:04 +0000 Subject: [PATCH 1123/1638] Bump doccmd from 2025.12.3 to 2025.12.5 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.12.3 to 2025.12.5. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.12.03...2025.12.05) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.12.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 22244360a..00784ecf5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2025.12.3", + "doccmd==2025.12.5", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From af3d68217fb3c98fc1ea0c2c00be3d71da1df79a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 8 Dec 2025 07:22:26 +0000 Subject: [PATCH 1124/1638] Add validation for gha-find-replace actions Fail the workflow if no files are modified during file updates. This prevents silent failures in the release process. --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ccae040a..60b4f9398 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,7 @@ jobs: echo "underline=${underline}" >> "$GITHUB_OUTPUT" - name: Update changelog + id: update_changelog uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" @@ -63,6 +64,12 @@ jobs: include: CHANGELOG.rst regex: false + - name: Check Update changelog was modified + run: | + if [ "${{ steps.update_changelog.outputs.modifiedFiles }}" = "0" ]; then + echo "Error: No files were modified when updating changelog" + exit 1 + fi - uses: stefanzweifel/git-auto-commit-action@v7 id: commit with: From 92e7b03224bb43b46b55e0b424238d141147b382 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:09:00 +0000 Subject: [PATCH 1125/1638] Bump pytest from 9.0.1 to 9.0.2 Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.0.1 to 9.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/9.0.1...9.0.2) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.0.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef165a9f5..db2c59e9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pyproject-fmt==2.11.1", "pyright==1.1.407", "pyroma==5.0", - "pytest==9.0.1", + "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", "ruff==0.14.8", From 27ec48f4068cc873013190326ff8c65603b1db7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:09:06 +0000 Subject: [PATCH 1126/1638] Bump doccmd from 2025.12.5 to 2025.12.8.5 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.12.5 to 2025.12.8.5. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.12.05...2025.12.08.5) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.12.8.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef165a9f5..9157ef37a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2025.12.5", + "doccmd==2025.12.8.5", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From dd3dfb2ddc739a3324eab9af956bb4da4df4d1c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 10:08:47 +0000 Subject: [PATCH 1127/1638] Bump pyroma from 5.0 to 5.0.1 Bumps [pyroma](https://github.com/regebro/pyroma) from 5.0 to 5.0.1. - [Changelog](https://github.com/regebro/pyroma/blob/master/CHANGES.txt) - [Commits](https://github.com/regebro/pyroma/compare/5.0...5.0.1) --- updated-dependencies: - dependency-name: pyroma dependency-version: 5.0.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e1b5405c2..6bfdb8b2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", "pyright==1.1.407", - "pyroma==5.0", + "pyroma==5.0.1", "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", From d8832258b02509285368ea9b81cf5e6508e4e19f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 10:06:54 +0000 Subject: [PATCH 1128/1638] Bump doccmd from 2025.12.8.5 to 2025.12.10 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.12.8.5 to 2025.12.10. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.12.08.5...2025.12.10) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.12.10 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6bfdb8b2c..5c399ffce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2025.12.8.5", + "doccmd==2025.12.10", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From c9adeaef2a8df61209a3a3d8dd6f14505dbdb870 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 10:06:23 +0000 Subject: [PATCH 1129/1638] Bump ruff from 0.14.8 to 0.14.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.8 to 0.14.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.14.8...0.14.9) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.9 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5c399ffce..aa8469e08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.8", + "ruff==0.14.9", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e91723bfb0438b957412d137e091e02c33d46b17 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 13 Dec 2025 07:47:46 +0000 Subject: [PATCH 1130/1638] Bump beartype to 0.22.9 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aa8469e08..63c580c12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dynamic = [ "version", ] dependencies = [ - "beartype>=0.18.5", + "beartype>=0.22.9", "requests>=2.32.3", "urllib3>=2.2.3", "vws-auth-tools>=2024.7.12", From 394cc018b13c3a1bdafd296e816dde6919646c45 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 13 Dec 2025 08:46:40 +0000 Subject: [PATCH 1131/1638] Add ty to pre-commit --- .pre-commit-config.yaml | 20 ++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 21 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb99a708b..869dd167b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,6 +25,8 @@ ci: - pyright - pyright-docs - pyright-verifytypes + - ty + - ty-docs - pyroma - ruff-check-fix - ruff-check-fix-docs @@ -341,6 +343,24 @@ repos: types_or: [python] additional_dependencies: [uv==0.9.5] + - id: ty + name: ty + stages: [pre-push] + entry: uv run --extra=dev ty check + language: python + types_or: [python, toml] + pass_filenames: false + additional_dependencies: [uv==0.9.5] + + - id: ty-docs + name: ty-docs + stages: [pre-push] + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="ty check" + language: python + types_or: [markdown, rst] + additional_dependencies: [uv==0.9.5] + - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix diff --git a/pyproject.toml b/pyproject.toml index 63c580c12..c55ab29cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.11.17", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", + "ty==0.0.1a34", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 39bd39bbf5cbbd54e15e1c93293ad4fe23ce22e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:07:12 +0000 Subject: [PATCH 1132/1638] Bump mypy[faster-cache] from 1.19.0 to 1.19.1 Bumps [mypy[faster-cache]](https://github.com/python/mypy) from 1.19.0 to 1.19.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.19.0...v1.19.1) --- updated-dependencies: - dependency-name: mypy[faster-cache] dependency-version: 1.19.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c55ab29cd..0c7d5b23d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.9.25", "interrogate==1.7.0", - "mypy[faster-cache]==1.19.0", + "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2025.4.3", "pre-commit==4.5.0", "pydocstyle==6.3", From 4c4bcd7e8a6938b4666b6426d1f461fda2325251 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:07:17 +0000 Subject: [PATCH 1133/1638] Bump doccmd from 2025.12.10 to 2025.12.13 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.12.10 to 2025.12.13. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.12.10...2025.12.13) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2025.12.13 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c55ab29cd..e004a6c1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2025.12.10", + "doccmd==2025.12.13", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.9.25", From 66535b2d74b3cdda1113677b6a8e949719c18e9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:07:29 +0000 Subject: [PATCH 1134/1638] Bump sphinx-substitution-extensions from 2025.11.17 to 2025.12.15 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.11.17 to 2025.12.15. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.11.17...2025.12.15) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2025.12.15 dependency-type: direct:development 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 c55ab29cd..db264822d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2025.11.17", + "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", "ty==0.0.1a34", From 6b3eddb13067d339f394928fe642461d6cf32967 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 10:07:37 +0000 Subject: [PATCH 1135/1638] Bump ty from 0.0.1a34 to 0.0.1a35 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.1a34 to 0.0.1a35. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.1-alpha.34...0.0.1-alpha.35) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.1a35 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c78c199b2..fbfc2d380 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.1a34", + "ty==0.0.1a35", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From beaee0dd2d42b36956cbd988790f82cf893e374f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 10:07:12 +0000 Subject: [PATCH 1136/1638] Bump pre-commit from 4.5.0 to 4.5.1 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.5.0 to 4.5.1. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.5.0...v4.5.1) --- updated-dependencies: - dependency-name: pre-commit dependency-version: 4.5.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fbfc2d380..6cc88f6ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2025.4.3", - "pre-commit==4.5.0", + "pre-commit==4.5.1", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.4", From 26fa111cbd1f1219241ac9c5a75b7eb986522228 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 10:07:28 +0000 Subject: [PATCH 1137/1638] Bump ty from 0.0.1a35 to 0.0.2 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.1a35 to 0.0.2. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.1-alpha.35...0.0.2) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fbfc2d380..12cee6d12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.1a35", + "ty==0.0.2", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From a536d6257f57d2464da9f40efd17f758e5b7387c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 10:06:55 +0000 Subject: [PATCH 1138/1638] Bump yamlfix from 1.19.0 to 1.19.1 Bumps [yamlfix](https://github.com/lyz-code/yamlfix) from 1.19.0 to 1.19.1. - [Changelog](https://github.com/lyz-code/yamlfix/blob/main/CHANGELOG.md) - [Commits](https://github.com/lyz-code/yamlfix/compare/1.19.0...1.19.1) --- updated-dependencies: - dependency-name: yamlfix dependency-version: 1.19.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2a2a07f0f..d624a7acc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", - "yamlfix==1.19.0", + "yamlfix==1.19.1", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 50dd267dc9f250847acaf2d8da3361554326e148 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 10:07:07 +0000 Subject: [PATCH 1139/1638] Bump ty from 0.0.2 to 0.0.3 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.2 to 0.0.3. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.2...0.0.3) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2a2a07f0f..1f2180bc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.2", + "ty==0.0.3", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 44ef2a77b8aa085c177c70b98f724fbd1b3880e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:06:31 +0000 Subject: [PATCH 1140/1638] Bump ruff from 0.14.9 to 0.14.10 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.9 to 0.14.10. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.14.9...0.14.10) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.10 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3bb297ad8..64b60edb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.9", + "ruff==0.14.10", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From d6636bdad9cf3686abd731fb4b8feaf5bc8c052e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:06:37 +0000 Subject: [PATCH 1141/1638] Bump ty from 0.0.3 to 0.0.4 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.3 to 0.0.4. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.3...0.0.4) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3bb297ad8..c04b49cb0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.3", + "ty==0.0.4", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 1bd3d3788e29a5f3237f564566494adcef9836b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:11:26 +0000 Subject: [PATCH 1142/1638] Bump sphinx from 8.2.3 to 9.0.4 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.2.3 to 9.0.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/v8.2.3...v9.0.4) --- updated-dependencies: - dependency-name: sphinx dependency-version: 9.0.4 dependency-type: direct:development 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 c04b49cb0..21f7d62fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.11.0.1", "shfmt-py==3.12.0.2", - "sphinx==8.2.3", + "sphinx==9.0.4", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", From 9723406fb1f2715b0be49193b486c659ed65b465 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 19 Dec 2025 20:00:44 +0000 Subject: [PATCH 1143/1638] Update furo package version to 2025.12.19 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 21f7d62fd..88123bf98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "doccmd==2025.12.13", "docformatter==1.7.7", "freezegun==1.5.5", - "furo==2025.9.25", + "furo==2025.12.19", "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2025.4.3", From 88c8a17a56f3ace8352dc675e089b8422f687d9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 10:06:54 +0000 Subject: [PATCH 1144/1638] Bump furo from 2025.9.25 to 2025.12.19 Bumps [furo](https://github.com/pradyunsg/furo) from 2025.9.25 to 2025.12.19. - [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/2025.09.25...2025.12.19) --- updated-dependencies: - dependency-name: furo dependency-version: 2025.12.19 dependency-type: direct:development 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 fbc8246f8..317f65c8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ optional-dependencies.dev = [ "doccmd==2025.12.13", "docformatter==1.7.7", "freezegun==1.5.5", - "furo==2025.9.25", + "furo==2025.12.19", "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2025.4.3", From ac207c1a8d55cf624374dae8028f582ad4aaef8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 10:07:09 +0000 Subject: [PATCH 1145/1638] Bump ty from 0.0.4 to 0.0.5 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.4 to 0.0.5. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.4...0.0.5) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fbc8246f8..5d847450f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.4", + "ty==0.0.5", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From e0a7faa6995fd78b42c83cef94d8a6276613ef2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Dec 2025 10:06:00 +0000 Subject: [PATCH 1146/1638] Bump ty from 0.0.5 to 0.0.6 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.5 to 0.0.6. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.5...0.0.6) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 53fa894f3..095963da1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.5", + "ty==0.0.6", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 0e55cc744253a9bb880728f6bc9c3db130565083 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Dec 2025 10:06:37 +0000 Subject: [PATCH 1147/1638] Bump ty from 0.0.6 to 0.0.7 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.6 to 0.0.7. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.6...0.0.7) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.7 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 095963da1..0777cf4a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.6", + "ty==0.0.7", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 235856347f8e614dbd4414f6d3e41cfefc568606 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 26 Dec 2025 14:24:52 +0000 Subject: [PATCH 1148/1638] Add pyrefly and pyrefly-docs configuration --- .pre-commit-config.yaml | 20 ++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 21 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 869dd167b..90934191b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,6 +40,8 @@ ci: - vulture - vulture-docs - yamlfix + - pyrefly + - pyrefly-docs default_install_hook_types: [pre-commit, pre-push, commit-msg] @@ -376,3 +378,21 @@ repos: types_or: [rst] additional_dependencies: [uv==0.9.5] stages: [pre-commit] + + - id: pyrefly + name: pyrefly + stages: [pre-push] + entry: uv run --extra=dev pyrefly check + language: python + types_or: [python, toml] + pass_filenames: false + additional_dependencies: [uv==0.9.5] + + - id: pyrefly-docs + name: pyrefly-docs + stages: [pre-push] + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pyrefly check" + language: python + types_or: [markdown, rst] + additional_dependencies: [uv==0.9.5] diff --git a/pyproject.toml b/pyproject.toml index 53fa894f3..62a8733d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", + "pyrefly==0.46.1", "pyright==1.1.407", "pyroma==5.0.1", "pytest==9.0.2", From 47c76bda6095117739fb2eef4277c22f4b4828b8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 26 Dec 2025 15:17:08 +0000 Subject: [PATCH 1149/1638] Fix pyrefly --- src/vws/vws.py | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 5dd7503db..bb05233c3 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -352,10 +352,10 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: target_record_dict = dict(result_data["target_record"]) target_record = TargetRecord( target_id=target_record_dict["target_id"], - active_flag=target_record_dict["active_flag"], + active_flag=bool(target_record_dict["active_flag"]), name=target_record_dict["name"], - width=target_record_dict["width"], - tracking_rating=target_record_dict["tracking_rating"], + width=float(target_record_dict["width"]), + tracking_rating=int(target_record_dict["tracking_rating"]), reco_rating=target_record_dict["reco_rating"], ) return TargetStatusAndRecord( @@ -485,11 +485,11 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: database_name=result_data["database_name"], target_name=result_data["target_name"], upload_date=date.fromisoformat(result_data["upload_date"]), - active_flag=result_data["active_flag"], - tracking_rating=result_data["tracking_rating"], - total_recos=result_data["total_recos"], - current_month_recos=result_data["current_month_recos"], - previous_month_recos=result_data["previous_month_recos"], + active_flag=bool(result_data["active_flag"]), + tracking_rating=int(result_data["tracking_rating"]), + total_recos=int(result_data["total_recos"]), + current_month_recos=int(result_data["current_month_recos"]), + previous_month_recos=int(result_data["previous_month_recos"]), ) def get_database_summary_report(self) -> DatabaseSummaryReport: @@ -524,18 +524,18 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: response_data = dict(json.loads(s=response.text)) return DatabaseSummaryReport( - active_images=response_data["active_images"], - current_month_recos=response_data["current_month_recos"], - failed_images=response_data["failed_images"], - inactive_images=response_data["inactive_images"], - name=response_data["name"], - previous_month_recos=response_data["previous_month_recos"], - processing_images=response_data["processing_images"], - reco_threshold=response_data["reco_threshold"], - request_quota=response_data["request_quota"], - request_usage=response_data["request_usage"], - target_quota=response_data["target_quota"], - total_recos=response_data["total_recos"], + active_images=int(response_data["active_images"]), + current_month_recos=int(response_data["current_month_recos"]), + failed_images=int(response_data["failed_images"]), + inactive_images=int(response_data["inactive_images"]), + name=str(response_data["name"]), + previous_month_recos=int(response_data["previous_month_recos"]), + processing_images=int(response_data["processing_images"]), + reco_threshold=int(response_data["reco_threshold"]), + request_quota=int(response_data["request_quota"]), + request_usage=int(response_data["request_usage"]), + target_quota=int(response_data["target_quota"]), + total_recos=int(response_data["total_recos"]), ) def delete_target(self, target_id: str) -> None: From 495f0048c6d5e923f001d43b729a79fca5937b37 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 26 Dec 2025 15:21:38 +0000 Subject: [PATCH 1150/1638] Fix mypy --- src/vws/vws.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index bb05233c3..8def19ed7 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -528,7 +528,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: current_month_recos=int(response_data["current_month_recos"]), failed_images=int(response_data["failed_images"]), inactive_images=int(response_data["inactive_images"]), - name=str(response_data["name"]), + name=str(object=response_data["name"]), previous_month_recos=int(response_data["previous_month_recos"]), processing_images=int(response_data["processing_images"]), reco_threshold=int(response_data["reco_threshold"]), From ab3c1cbc0ed74693bd2566a07a79aa9d65f4cab8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Dec 2025 13:11:32 +0000 Subject: [PATCH 1151/1638] Add zizmor for GitHub Actions security linting --- .pre-commit-config.yaml | 10 ++++++++++ pyproject.toml | 1 + 2 files changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90934191b..f80c2aa4a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,6 +40,7 @@ ci: - vulture - vulture-docs - yamlfix + - zizmor - pyrefly - pyrefly-docs @@ -371,6 +372,15 @@ repos: additional_dependencies: [uv==0.9.5] stages: [pre-commit] + - id: zizmor + name: zizmor + entry: uv run --extra=dev zizmor .github + language: python + pass_filenames: false + types_or: [yaml] + additional_dependencies: [uv==0.9.5] + stages: [pre-commit] + - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long diff --git a/pyproject.toml b/pyproject.toml index fffc77ad5..c4fd55a7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,7 @@ optional-dependencies.dev = [ "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", + "zizmor==1.19.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 8e33271b8df067abfb6f40170d644c0a79dd805e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Dec 2025 13:42:59 +0000 Subject: [PATCH 1152/1638] Add zizmor config --- zizmor.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 zizmor.yml diff --git a/zizmor.yml b/zizmor.yml new file mode 100644 index 000000000..fd4a958a9 --- /dev/null +++ b/zizmor.yml @@ -0,0 +1,4 @@ +--- +rules: + unpinned-uses: + disable: true From fb43e8b27a7f85b3250a39b7541aeed8d7d050c2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Dec 2025 14:36:32 +0000 Subject: [PATCH 1153/1638] Fix zizmor / ignore some errors --- .github/workflows/ci.yml | 6 ++++-- .github/workflows/dependabot-merge.yml | 1 - .github/workflows/lint.yml | 6 ++++-- .github/workflows/release.yml | 6 +++--- zizmor.yml | 8 ++++++++ 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73e6ce82c..ca86af4b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ --- - name: Test on: @@ -12,9 +11,10 @@ on: # Run at 1:00 every day - cron: 0 1 * * * +permissions: {} + jobs: build: - strategy: matrix: python-version: ['3.13'] @@ -24,6 +24,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v7 diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml index 5238c9f68..4932493cf 100644 --- a/.github/workflows/dependabot-merge.yml +++ b/.github/workflows/dependabot-merge.yml @@ -1,5 +1,4 @@ --- - name: Dependabot auto-merge on: pull_request diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fbdc4c6ce..4c01f743c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,4 @@ --- - name: Lint on: @@ -12,9 +11,10 @@ on: # Run at 1:00 every day - cron: 0 1 * * * +permissions: {} + jobs: build: - strategy: matrix: python-version: ['3.13'] @@ -24,6 +24,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v7 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60b4f9398..305cecb7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,4 @@ --- - name: Release on: workflow_dispatch @@ -32,6 +31,7 @@ jobs: # Also, avoids # https://github.com/stefanzweifel/git-auto-commit-action/issues/99. fetch-depth: 0 + persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v7 @@ -59,8 +59,8 @@ jobs: uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\ - \ }}" + replace: | + "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}" include: CHANGELOG.rst regex: false diff --git a/zizmor.yml b/zizmor.yml index fd4a958a9..f63e179d2 100644 --- a/zizmor.yml +++ b/zizmor.yml @@ -2,3 +2,11 @@ rules: unpinned-uses: disable: true + cache-poisoning: + disable: true + bot-conditions: + disable: true + dependabot-cooldown: + disable: true + template-injection: + disable: true From 502ec2e4c18d91ab4c4556bbe5354031f1d7fc17 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Dec 2025 14:37:41 +0000 Subject: [PATCH 1154/1638] Ignore zizmor in check-manifest --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c4fd55a7e..d1c81f7e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -302,6 +302,7 @@ ignore = [ "tests/**", "vuforia_secrets.env.example", "lint.mk", + "zizmor.yml", ] [tool.deptry] From 30aee41db18d59beb0864ddef49bf181947a4460 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Dec 2025 16:11:22 +0000 Subject: [PATCH 1155/1638] Fix bugbot issues --- .github/workflows/release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 305cecb7b..8bbb38a09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v6 - with: + with: # zizmor: ignore[artipacked] git-auto-commit-action requires credentials # See # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches token: ${{ secrets.RELEASE_PAT }} @@ -31,7 +31,6 @@ jobs: # Also, avoids # https://github.com/stefanzweifel/git-auto-commit-action/issues/99. fetch-depth: 0 - persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v7 @@ -59,8 +58,8 @@ jobs: uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: | - "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}" + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\ + \ }}" include: CHANGELOG.rst regex: false From ba43cc99746c69c87521fcf0305766a7690357b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Dec 2025 10:05:49 +0000 Subject: [PATCH 1156/1638] Bump ty from 0.0.7 to 0.0.8 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.7 to 0.0.8. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.7...0.0.8) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1c81f7e7..f6bce47c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.7", + "ty==0.0.8", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 2781f1225cdcd1ce50dfc498c2917beda3ea187e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Dec 2025 10:05:56 +0000 Subject: [PATCH 1157/1638] Bump pyrefly from 0.46.1 to 0.46.2 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.46.1 to 0.46.2. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.46.1...0.46.2) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.46.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1c81f7e7..daa3fedd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.46.1", + "pyrefly==0.46.2", "pyright==1.1.407", "pyroma==5.0.1", "pytest==9.0.2", From d40ba68247317001eb7a6c3cb79b4fcbd4728dba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Dec 2025 10:07:02 +0000 Subject: [PATCH 1158/1638] Bump pyrefly from 0.46.2 to 0.46.3 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.46.2 to 0.46.3. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.46.2...0.46.3) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.46.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2c15b49b0..51b8d55c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.46.2", + "pyrefly==0.46.3", "pyright==1.1.407", "pyroma==5.0.1", "pytest==9.0.2", From ed0c648710c592668c3c896f6fd290eddf0d7c0d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Jan 2026 06:50:58 +0000 Subject: [PATCH 1159/1638] Switch from pre-commit to prek - Replace pre-commit with prek in pyproject.toml dev dependencies - Update .pre-commit-config.yaml to use prek builtin hooks - Remove pre-commit CI configuration (ci: section) - Update GitHub Actions workflow to use prek commands - Update contributing documentation for prek --- .github/workflows/lint.yml | 8 ++--- .pre-commit-config.yaml | 59 ++++++------------------------------ docs/source/contributing.rst | 10 +++--- pyproject.toml | 2 +- 4 files changed, 19 insertions(+), 60 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4c01f743c..a2e604942 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,9 +35,9 @@ jobs: - name: Lint run: | - uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose - uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose - uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose + uv run --extra=dev prek run --all-files --hook-stage pre-commit --verbose + uv run --extra=dev prek run --all-files --hook-stage pre-push --verbose + uv run --extra=dev prek run --all-files --hook-stage manual --verbose env: UV_PYTHON: ${{ matrix.python-version }} @@ -47,7 +47,7 @@ jobs: completion-lint: needs: build runs-on: ubuntu-latest - if: always() # Run even if one matrix job fails + if: always() # Run even if one matrix job fails steps: - name: Check matrix job status run: |- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f80c2aa4a..82eeb1116 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,58 +1,14 @@ --- fail_fast: true -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks - -ci: - # We use system Python, with required dependencies specified in pyproject.toml. - # We therefore cannot use those dependencies in pre-commit CI. - skip: - - actionlint - - sphinx-lint - - check-manifest - - deptry - - doc8 - - docformatter - - docs - - interrogate - - interrogate-docs - - linkcheck - - mypy - - mypy-docs - - pylint - - pyproject-fmt-fix - - pyright - - pyright-docs - - pyright-verifytypes - - ty - - ty-docs - - pyroma - - ruff-check-fix - - ruff-check-fix-docs - - ruff-format-fix - - ruff-format-fix-docs - - shellcheck - - shellcheck-docs - - shfmt - - shfmt-docs - - spelling - - vulture - - vulture-docs - - yamlfix - - zizmor - - pyrefly - - pyrefly-docs +# See https://prek.j178.dev for more information + + default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: - - repo: meta - hooks: - - id: check-useless-excludes - stages: [pre-commit] - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 + - repo: builtin hooks: - id: check-added-large-files stages: [pre-commit] @@ -76,11 +32,14 @@ repos: stages: [pre-commit] - id: end-of-file-fixer stages: [pre-commit] + - id: trailing-whitespace + stages: [pre-commit] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: - id: file-contents-sorter files: spelling_private_dict\.txt$ stages: [pre-commit] - - id: trailing-whitespace - stages: [pre-commit] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 0e531220d..55d902399 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -27,11 +27,11 @@ and on Ubuntu with ``apt``: $ apt-get install -y enchant -Install ``pre-commit`` hooks: +Install ``prek`` hooks: .. code-block:: console - $ pre-commit install + $ prek install Linting ------- @@ -40,9 +40,9 @@ Run lint tools either by committing, or with: .. code-block:: console - $ pre-commit run --all-files --hook-stage pre-commit --verbose - $ pre-commit run --all-files --hook-stage pre-push --verbose - $ pre-commit run --all-files --hook-stage manual --verbose + $ prek run --all-files --hook-stage pre-commit --verbose + $ prek run --all-files --hook-stage pre-push --verbose + $ prek run --all-files --hook-stage manual --verbose .. _Homebrew: https://brew.sh diff --git a/pyproject.toml b/pyproject.toml index 51b8d55c1..2aa051145 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2025.4.3", - "pre-commit==4.5.1", + "prek==0.2.25", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.4", From 852127947726f91c4b4566c25bf3a26be3f2f38e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Jan 2026 07:05:06 +0000 Subject: [PATCH 1160/1638] Undo some unnecessary changes --- .pre-commit-config.yaml | 45 ++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82eeb1116..c18dc43f5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,8 +3,6 @@ fail_fast: true # See https://prek.j178.dev for more information - - default_install_hook_types: [pre-commit, pre-push, commit-msg] repos: @@ -32,14 +30,11 @@ repos: stages: [pre-commit] - id: end-of-file-fixer stages: [pre-commit] - - id: trailing-whitespace - stages: [pre-commit] - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 - hooks: - id: file-contents-sorter files: spelling_private_dict\.txt$ stages: [pre-commit] + - id: trailing-whitespace + stages: [pre-commit] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: @@ -81,7 +76,8 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=shell + entry: + uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=shell --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] @@ -98,7 +94,8 @@ repos: - id: shfmt-docs name: shfmt-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt + entry: + uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] @@ -117,7 +114,8 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: + uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="mypy" language: python types_or: [markdown, rst] @@ -143,7 +141,8 @@ repos: - id: pyright-docs name: pyright-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: + uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="pyright" language: python types_or: [markdown, rst] @@ -160,7 +159,8 @@ repos: - id: vulture-docs name: vulture docs - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: + uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="vulture" language: python types_or: [markdown, rst] @@ -194,7 +194,8 @@ repos: - id: pylint-docs name: pylint-docs - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: + uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="pylint" language: python stages: [manual] @@ -227,7 +228,8 @@ repos: - id: ruff-format-fix-docs name: Ruff format docs - entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff + entry: + uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" language: python types_or: [markdown, rst] @@ -252,7 +254,8 @@ repos: - id: interrogate-docs name: interrogate docs - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: + uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="interrogate" language: python types_or: [markdown, rst] @@ -270,7 +273,8 @@ repos: - id: linkcheck name: linkcheck - entry: uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build + entry: + uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build -W language: python types_or: [rst] @@ -280,7 +284,8 @@ repos: - id: spelling name: spelling - entry: uv run --extra=dev sphinx-build -M spelling docs/source docs/build + entry: + uv run --extra=dev sphinx-build -M spelling docs/source docs/build -W language: python types_or: [rst] @@ -317,7 +322,8 @@ repos: - id: ty-docs name: ty-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: + uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="ty check" language: python types_or: [markdown, rst] @@ -360,7 +366,8 @@ repos: - id: pyrefly-docs name: pyrefly-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: + uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="pyrefly check" language: python types_or: [markdown, rst] From e2c817a172fb46354c735495fde48b39f9e4e944 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Jan 2026 07:10:53 +0000 Subject: [PATCH 1161/1638] Remove stage --- .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 c18dc43f5..3313df31a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ fail_fast: true # See https://prek.j178.dev for more information -default_install_hook_types: [pre-commit, pre-push, commit-msg] +default_install_hook_types: [pre-commit, pre-push] repos: - repo: builtin From 1a622a69c12d664cc3d46d0f0d130ba3dc9d4654 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Jan 2026 07:12:37 +0000 Subject: [PATCH 1162/1638] Remove changes --- .pre-commit-config.yaml | 86 ++++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 26 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3313df31a..d9a702af3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,58 @@ --- fail_fast: true -# See https://prek.j178.dev for more information +# 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 + - sphinx-lint + - check-manifest + - deptry + - doc8 + - docformatter + - docs + - interrogate + - interrogate-docs + - linkcheck + - mypy + - mypy-docs + - pylint + - pyproject-fmt-fix + - pyright + - pyright-docs + - pyright-verifytypes + - ty + - ty-docs + - pyroma + - ruff-check-fix + - ruff-check-fix-docs + - ruff-format-fix + - ruff-format-fix-docs + - shellcheck + - shellcheck-docs + - shfmt + - shfmt-docs + - spelling + - vulture + - vulture-docs + - yamlfix + - zizmor + - pyrefly + - pyrefly-docs default_install_hook_types: [pre-commit, pre-push] repos: - - repo: builtin + - repo: meta + hooks: + - id: check-useless-excludes + stages: [pre-commit] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 hooks: - id: check-added-large-files stages: [pre-commit] @@ -76,8 +122,7 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: - uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=shell + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=shell --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] @@ -94,8 +139,7 @@ repos: - id: shfmt-docs name: shfmt-docs - entry: - uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt + entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] @@ -114,8 +158,7 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: - uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="mypy" language: python types_or: [markdown, rst] @@ -141,8 +184,7 @@ repos: - id: pyright-docs name: pyright-docs stages: [pre-push] - entry: - uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="pyright" language: python types_or: [markdown, rst] @@ -159,8 +201,7 @@ repos: - id: vulture-docs name: vulture docs - entry: - uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="vulture" language: python types_or: [markdown, rst] @@ -194,8 +235,7 @@ repos: - id: pylint-docs name: pylint-docs - entry: - uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="pylint" language: python stages: [manual] @@ -228,8 +268,7 @@ repos: - id: ruff-format-fix-docs name: Ruff format docs - entry: - uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff + entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format" language: python types_or: [markdown, rst] @@ -254,8 +293,7 @@ repos: - id: interrogate-docs name: interrogate docs - entry: - uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="interrogate" language: python types_or: [markdown, rst] @@ -273,8 +311,7 @@ repos: - id: linkcheck name: linkcheck - entry: - uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build + entry: uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build -W language: python types_or: [rst] @@ -284,8 +321,7 @@ repos: - id: spelling name: spelling - entry: - uv run --extra=dev sphinx-build -M spelling docs/source docs/build + entry: uv run --extra=dev sphinx-build -M spelling docs/source docs/build -W language: python types_or: [rst] @@ -322,8 +358,7 @@ repos: - id: ty-docs name: ty-docs stages: [pre-push] - entry: - uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="ty check" language: python types_or: [markdown, rst] @@ -366,8 +401,7 @@ repos: - id: pyrefly-docs name: pyrefly-docs stages: [pre-push] - entry: - uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python --command="pyrefly check" language: python types_or: [markdown, rst] From dee2727aa1c8f7462c99c17ca6acf01b2ad0b9c1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Jan 2026 07:12:59 +0000 Subject: [PATCH 1163/1638] Test a change --- src/vws/exceptions/vws_exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 482223766..e0e268e29 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -127,7 +127,7 @@ class ProjectInactiveError(VWSError): @beartype class MetadataTooLargeError(VWSError): """ - Exception raised when Vuforia returns a response with a result code + Exception raised when Vuforia returns responses with a result code 'MetadataTooLarge'. """ From bcb26d17a371a82c5a25754e9199ed2a80c0fe22 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Jan 2026 07:13:08 +0000 Subject: [PATCH 1164/1638] Undo a change --- src/vws/exceptions/vws_exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index e0e268e29..482223766 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -127,7 +127,7 @@ class ProjectInactiveError(VWSError): @beartype class MetadataTooLargeError(VWSError): """ - Exception raised when Vuforia returns responses with a result code + Exception raised when Vuforia returns a response with a result code 'MetadataTooLarge'. """ From 833c51f2a8ac442a80dbd4d8189e6df605b74775 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Fri, 2 Jan 2026 07:14:39 +0000 Subject: [PATCH 1165/1638] [pre-commit.ci lite] apply automatic fixes --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a2e604942..0a9661f41 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -47,7 +47,7 @@ jobs: completion-lint: needs: build runs-on: ubuntu-latest - if: always() # Run even if one matrix job fails + if: always() # Run even if one matrix job fails steps: - name: Check matrix job status run: |- From 86f85f2c052ab368e78a58bb31a5244f7eee94b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Jan 2026 10:06:16 +0000 Subject: [PATCH 1166/1638] Bump actionlint-py from 1.7.9.24 to 1.7.10.24 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.9.24 to 1.7.10.24. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.9.24...v1.7.10.24) --- updated-dependencies: - dependency-name: actionlint-py dependency-version: 1.7.10.24 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2aa051145..aa0509965 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.9.24", + "actionlint-py==1.7.10.24", "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", From bca8178e917fc97c4c3930fd3686be3ab93591f5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 3 Jan 2026 07:26:15 +0000 Subject: [PATCH 1167/1638] Make prettier printWidth more compatible with yamlfix --- .prettierrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.prettierrc b/.prettierrc index 3ab9aa054..4a36aae89 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,7 +3,8 @@ { "files": ["*.yaml", "*.yml"], "options": { - "singleQuote": true + "singleQuote": true, + "printWidth": 100 } } ] From 2b14da712b5473f4ddb7795a79a5e051de813222 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 3 Jan 2026 07:37:14 +0000 Subject: [PATCH 1168/1638] Make prettier more compatible with yamlfix --- .prettierrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierrc b/.prettierrc index 4a36aae89..e0af3cff2 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,6 +4,7 @@ "files": ["*.yaml", "*.yml"], "options": { "singleQuote": true, + "printWidth": 100", "printWidth": 100 } } From 63942af74d3513bc9c33ea54fb688fb10a052537 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 3 Jan 2026 07:46:50 +0000 Subject: [PATCH 1169/1638] Fix prettier config --- .prettierrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.prettierrc b/.prettierrc index e0af3cff2..a6c3428b7 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,7 +4,7 @@ "files": ["*.yaml", "*.yml"], "options": { "singleQuote": true, - "printWidth": 100", + "printWidth": 100, "printWidth": 100 } } From c0c781fb624d6ab0c811921945ca4193746fb328 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 3 Jan 2026 08:14:11 +0000 Subject: [PATCH 1170/1638] Make zizmor collection strict --- .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 d9a702af3..1ed243a7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -374,7 +374,7 @@ repos: - id: zizmor name: zizmor - entry: uv run --extra=dev zizmor .github + entry: uv run --extra=dev zizmor --strict-collection .github language: python pass_filenames: false types_or: [yaml] From 7de5dbbf4b415e06cc201aeea7d311709e3d847c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 3 Jan 2026 08:15:10 +0000 Subject: [PATCH 1171/1638] Remove duplicate key --- .prettierrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.prettierrc b/.prettierrc index a6c3428b7..4a36aae89 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,7 +4,6 @@ "files": ["*.yaml", "*.yml"], "options": { "singleQuote": true, - "printWidth": 100, "printWidth": 100 } } From d06536eaa00a3ba326e326b55b405ba424b3f15c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 3 Jan 2026 08:47:44 +0000 Subject: [PATCH 1172/1638] Fix zizmor warning in release workflow --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bbb38a09..1c092f518 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,8 +58,8 @@ jobs: uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\ - \ }}" + replace: |- + Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}\n include: CHANGELOG.rst regex: false From 8d50b7c22d43cf7bdacd70141ea18ec7c86deb2d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 3 Jan 2026 09:05:54 +0000 Subject: [PATCH 1173/1638] Fix block scalar newline interpretation in release workflow --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c092f518..685e0a9bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,8 +58,7 @@ jobs: uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: |- - Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}\n + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}\n" include: CHANGELOG.rst regex: false From 345aef02c5d608bd6c7fb94410a19a266b497ce1 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, 3 Jan 2026 09:12:31 +0000 Subject: [PATCH 1174/1638] [pre-commit.ci lite] apply automatic fixes --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 685e0a9bb..8e655a8a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,8 @@ jobs: uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" - replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}\n" + replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\ + \ }}\n" include: CHANGELOG.rst regex: false From 75b82221014b5f19bf172d3d8e9b6559c3343217 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 10:06:22 +0000 Subject: [PATCH 1175/1638] Bump doccmd from 2025.12.13 to 2026.1.3.2 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2025.12.13 to 2026.1.3.2. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2025.12.13...2026.01.03.2) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.3.2 dependency-type: direct:development 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 aa0509965..69fc622d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2025.12.13", + "doccmd==2026.1.3.2", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.12.19", From af376fc361b240c36e98da5ca197a8ed8243fbc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 10:08:51 +0000 Subject: [PATCH 1176/1638] Bump ty from 0.0.8 to 0.0.9 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.8 to 0.0.9. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.8...0.0.9) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.9 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 69fc622d7..e31b01609 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.8", + "ty==0.0.9", "types-requests==2.32.4.20250913", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 1edb010db619b933d63371322c28a48c38bac4e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 10:08:56 +0000 Subject: [PATCH 1177/1638] Bump pyrefly from 0.46.3 to 0.47.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.46.3 to 0.47.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.46.3...0.47.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.47.0 dependency-type: direct:development 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 69fc622d7..13651363d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.46.3", + "pyrefly==0.47.0", "pyright==1.1.407", "pyroma==5.0.1", "pytest==9.0.2", From e654679ecf7997c5edadc7321ece4141d795bee6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 10:09:18 +0000 Subject: [PATCH 1178/1638] Bump zizmor from 1.19.0 to 1.20.0 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.19.0 to 1.20.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.19.0...v1.20.0) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.20.0 dependency-type: direct:development 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 69fc622d7..e6e7250dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ optional-dependencies.dev = [ "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.19.0", + "zizmor==1.20.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From e66ebb4cf271489a7f1b3d456a1f846f0419d736 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:10:40 +0000 Subject: [PATCH 1179/1638] Bump types-requests from 2.32.4.20250913 to 2.32.4.20260107 Bumps [types-requests](https://github.com/typeshed-internal/stub_uploader) from 2.32.4.20250913 to 2.32.4.20260107. - [Commits](https://github.com/typeshed-internal/stub_uploader/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.32.4.20260107 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 779fc7e80..2c91b8116 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", "ty==0.0.9", - "types-requests==2.32.4.20250913", + "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", From c96a3da27556606ecfd3cbea41df72a3854e08ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 21:46:10 +0000 Subject: [PATCH 1180/1638] Bump prek from 0.2.25 to 0.2.27 Bumps [prek](https://github.com/j178/prek) from 0.2.25 to 0.2.27. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.2.25...v0.2.27) --- updated-dependencies: - dependency-name: prek dependency-version: 0.2.27 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2c91b8116..2516a3caa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2025.4.3", - "prek==0.2.25", + "prek==0.2.27", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.4", From c6979f1ba097daa9b45acac3ecb0df02e6aaf86e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jan 2026 10:31:59 +0000 Subject: [PATCH 1181/1638] Bump pyright from 1.1.407 to 1.1.408 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.407 to 1.1.408. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.407...v1.1.408) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.408 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2516a3caa..1c4a71770 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", "pyrefly==0.47.0", - "pyright==1.1.407", + "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", "pytest-cov==7.0.0", From 3d89fa80ff2f3a40dafdf91187b2cb00b8e3c036 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jan 2026 10:32:08 +0000 Subject: [PATCH 1182/1638] Bump ty from 0.0.9 to 0.0.10 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.9 to 0.0.10. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.9...0.0.10) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.10 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2516a3caa..2cd83f5ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.9", + "ty==0.0.10", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2025.3.10.1", From aa46135c99a55def1a1a6394a610555b5d1bbf1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Jan 2026 10:38:01 +0000 Subject: [PATCH 1183/1638] Bump ruff from 0.14.10 to 0.14.11 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.10 to 0.14.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/0.14.10...0.14.11) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.11 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 37398cc75..e7202bd8c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.10", + "ruff==0.14.11", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 7795bb4b0066777daabe200ddc80375928a05558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 12:34:02 +0000 Subject: [PATCH 1184/1638] Bump sphinx-substitution-extensions from 2025.12.15 to 2026.1.12 Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2025.12.15 to 2026.1.12. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2025.12.15...2026.01.12) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2026.1.12 dependency-type: direct:development 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 e7202bd8c..cfeaf5906 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2025.12.15", + "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", "ty==0.0.10", From 5352d8fa2df773b301f81e46d48529b86323efe9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 12:34:11 +0000 Subject: [PATCH 1185/1638] Bump mypy-strict-kwargs from 2025.4.3 to 2026.1.12 Bumps [mypy-strict-kwargs](https://github.com/adamtheturtle/mypy-strict-kwargs) from 2025.4.3 to 2026.1.12. - [Release notes](https://github.com/adamtheturtle/mypy-strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/mypy-strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/mypy-strict-kwargs/compare/2025.04.03...2026.01.12) --- updated-dependencies: - dependency-name: mypy-strict-kwargs dependency-version: 2026.1.12 dependency-type: direct:development 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 e7202bd8c..30af2dcd2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "furo==2025.12.19", "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", - "mypy-strict-kwargs==2025.4.3", + "mypy-strict-kwargs==2026.1.12", "prek==0.2.27", "pydocstyle==6.3", "pygments==2.19.2", From 59071162cc24648136663e4e4eb1afb6e064270b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 12:34:20 +0000 Subject: [PATCH 1186/1638] Bump ty from 0.0.10 to 0.0.11 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.10 to 0.0.11. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.10...0.0.11) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.11 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e7202bd8c..9c89f308d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2025.12.15", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.10", + "ty==0.0.11", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2025.3.10.1", From c5f4eadbcd741164f39152960d3fba50ec2b3c13 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 12 Jan 2026 14:17:13 +0000 Subject: [PATCH 1187/1638] Switch from docformatter to pydocstringformatter --- .pre-commit-config.yaml | 8 ++++---- pyproject.toml | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ed243a7a..6b48bc64c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ ci: - check-manifest - deptry - doc8 - - docformatter + - pydocstringformatter - docs - interrogate - interrogate-docs @@ -104,9 +104,9 @@ repos: additional_dependencies: [uv==0.9.5] stages: [pre-commit] - - id: docformatter - name: docformatter - entry: uv run --extra=dev -m docformatter --in-place + - id: pydocstringformatter + name: pydocstringformatter + entry: uv run --extra=dev pydocstringformatter language: python types_or: [python] additional_dependencies: [uv==0.9.5] diff --git a/pyproject.toml b/pyproject.toml index 3f7f5df0a..d4a6cbd29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,13 +42,13 @@ optional-dependencies.dev = [ "deptry==0.24.0", "doc8==2.0.0", "doccmd==2026.1.3.2", - "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", "prek==0.2.27", + "pydocstringformatter==0.7.3", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.4", @@ -274,9 +274,6 @@ spelling-private-dict-file = 'spelling_private_dict.txt' # --spelling-private-dict-file option instead of raising a message. spelling-store-unknown-words = 'no' -[tool.docformatter] -make-summary-multi-line = true - [tool.check-manifest] ignore = [ @@ -346,6 +343,10 @@ enableTypeIgnoreComments = false reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" +[tool.pydocstringformatter] +write = true +split-summary-body = false + [tool.interrogate] fail-under = 100 omit-covered-files = true From e4126ee5441f4afdae41339aad26f77c04bc4638 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, 12 Jan 2026 14:18:45 +0000 Subject: [PATCH 1188/1638] [pre-commit.ci lite] apply automatic fixes --- conftest.py | 8 +- docs/source/__init__.py | 4 +- docs/source/conf.py | 4 +- src/vws/__init__.py | 4 +- src/vws/exceptions/__init__.py | 4 +- src/vws/exceptions/base_exceptions.py | 12 +-- src/vws/exceptions/cloud_reco_exceptions.py | 16 +--- src/vws/exceptions/custom_exceptions.py | 20 +--- src/vws/exceptions/vws_exceptions.py | 68 ++++--------- src/vws/include_target_data.py | 4 +- src/vws/query.py | 12 +-- src/vws/reports.py | 8 +- src/vws/response.py | 8 +- src/vws/vws.py | 12 +-- tests/__init__.py | 4 +- tests/conftest.py | 24 ++--- tests/test_cloud_reco_exceptions.py | 8 +- tests/test_query.py | 40 ++------ tests/test_vws.py | 100 +++++--------------- tests/test_vws_exceptions.py | 20 +--- 20 files changed, 100 insertions(+), 280 deletions(-) diff --git a/conftest.py b/conftest.py index 1d776f8db..0e579a4db 100644 --- a/conftest.py +++ b/conftest.py @@ -1,6 +1,4 @@ -""" -Setup for Sybil. -""" +"""Setup for Sybil.""" import io import uuid @@ -21,9 +19,7 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: - """ - Apply the beartype decorator to all collected test functions. - """ + """Apply the beartype decorator to all collected test functions.""" for item in items: if isinstance(item, pytest.Function): item.obj = beartype(obj=item.obj) diff --git a/docs/source/__init__.py b/docs/source/__init__.py index b63eed5fb..535ceb2ec 100644 --- a/docs/source/__init__.py +++ b/docs/source/__init__.py @@ -1,3 +1 @@ -""" -Documentation. -""" +"""Documentation.""" diff --git a/docs/source/conf.py b/docs/source/conf.py index 914bcb886..920ba1a4b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 -""" -Configuration for Sphinx. -""" +"""Configuration for Sphinx.""" import importlib.metadata from pathlib import Path diff --git a/src/vws/__init__.py b/src/vws/__init__.py index 42788b92d..bfd96d6c2 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -1,6 +1,4 @@ -""" -A library for Vuforia Web Services. -""" +"""A library for Vuforia Web Services.""" from .query import CloudRecoService from .vws import VWS diff --git a/src/vws/exceptions/__init__.py b/src/vws/exceptions/__init__.py index a1e3cd91c..7260ffdbb 100644 --- a/src/vws/exceptions/__init__.py +++ b/src/vws/exceptions/__init__.py @@ -1,3 +1 @@ -""" -Custom exceptions raised by this package. -""" +"""Custom exceptions raised by this package.""" diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 943323bfd..c86080593 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -10,9 +10,7 @@ @beartype class CloudRecoError(Exception): - """ - Base class for Vuforia Cloud Recognition Web API exceptions. - """ + """Base class for Vuforia Cloud Recognition Web API exceptions.""" def __init__(self, response: Response) -> None: """ @@ -24,9 +22,7 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ + """The response returned by Vuforia which included this error.""" return self._response @@ -48,7 +44,5 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ + """The response returned by Vuforia which included this error.""" return self._response diff --git a/src/vws/exceptions/cloud_reco_exceptions.py b/src/vws/exceptions/cloud_reco_exceptions.py index ff5dde209..2b20a7220 100644 --- a/src/vws/exceptions/cloud_reco_exceptions.py +++ b/src/vws/exceptions/cloud_reco_exceptions.py @@ -1,6 +1,4 @@ -""" -Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs. -""" +"""Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs.""" from beartype import beartype @@ -17,31 +15,27 @@ class MaxNumResultsOutOfRangeError(CloudRecoError): @beartype class InactiveProjectError(CloudRecoError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'InactiveProject'. """ @beartype class BadImageError(CloudRecoError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'BadImage'. """ @beartype class AuthenticationFailureError(CloudRecoError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'AuthenticationFailure'. """ @beartype class RequestTimeTooSkewedError(CloudRecoError): - """ - Exception raised when Vuforia returns a response with a result code + """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 694e98c30..466dfd1cd 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -11,9 +11,7 @@ @beartype class RequestEntityTooLargeError(Exception): - """ - Exception raised when the given image is too large. - """ + """Exception raised when the given image is too large.""" def __init__(self, response: Response) -> None: """ @@ -25,24 +23,18 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ + """The response returned by Vuforia which included this error.""" return self._response @beartype class TargetProcessingTimeoutError(Exception): - """ - Exception raised when waiting for a target to be processed times out. - """ + """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. - """ + """Exception raised when VWS returns a server error.""" def __init__(self, response: Response) -> None: """ @@ -54,7 +46,5 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ + """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 482223766..a25c2261b 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -14,16 +14,13 @@ @beartype class UnknownTargetError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'UnknownTarget'. """ @property def target_id(self) -> str: - """ - The unknown target ID. - """ + """The unknown target ID.""" path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -32,23 +29,19 @@ def target_id(self) -> str: @beartype class FailError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code 'Fail'. - """ + """Exception raised when Vuforia returns a response with a result code 'Fail'.""" @beartype class BadImageError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'BadImage'. """ @beartype class AuthenticationFailureError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'AuthenticationFailure'. """ @@ -56,24 +49,20 @@ 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 + """Exception raised when Vuforia returns a response with a result code 'RequestQuotaReached'. """ @beartype class TargetStatusProcessingError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'TargetStatusProcessing'. """ @property def target_id(self) -> str: - """ - The processing target ID. - """ + """The processing target ID.""" path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -83,8 +72,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 + """Exception raised when Vuforia returns a response with a result code 'DateRangeError'. """ @@ -92,8 +80,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 + """Exception raised when Vuforia returns a response with a result code 'TargetQuotaReached'. """ @@ -101,8 +88,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 + """Exception raised when Vuforia returns a response with a result code 'ProjectSuspended'. """ @@ -110,48 +96,41 @@ 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 + """Exception raised when Vuforia returns a response with a result code 'ProjectHasNoAPIAccess'. """ @beartype class ProjectInactiveError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'ProjectInactive'. """ @beartype class MetadataTooLargeError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'MetadataTooLarge'. """ @beartype class RequestTimeTooSkewedError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'RequestTimeTooSkewed'. """ @beartype class TargetNameExistError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'TargetNameExist'. """ @property def target_name(self) -> str: - """ - The target name which already exists. - """ + """The target name which already exists.""" response_body = self.response.request_body or b"" request_json = json.loads(s=response_body) return str(object=request_json["name"]) @@ -159,24 +138,20 @@ def target_name(self) -> str: @beartype class ImageTooLargeError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'ImageTooLarge'. """ @beartype class TargetStatusNotSuccessError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'TargetStatusNotSuccess'. """ @property def target_id(self) -> str: - """ - The unknown target ID. - """ + """The unknown target ID.""" path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -185,7 +160,6 @@ def target_id(self) -> str: @beartype class TooManyRequestsError(VWSError): # pragma: no cover - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'TooManyRequests'. """ diff --git a/src/vws/include_target_data.py b/src/vws/include_target_data.py index 37682e08a..0692a1e40 100644 --- a/src/vws/include_target_data.py +++ b/src/vws/include_target_data.py @@ -1,6 +1,4 @@ -""" -Tools for managing ``CloudRecoService.query``'s ``include_target_data``. -""" +"""Tools for managing ``CloudRecoService.query``'s ``include_target_data``.""" from enum import StrEnum, auto, unique diff --git a/src/vws/query.py b/src/vws/query.py index 96122aa14..ab449c614 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -1,6 +1,4 @@ -""" -Tools for interacting with the Vuforia Cloud Recognition Web APIs. -""" +"""Tools for interacting with the Vuforia Cloud Recognition Web APIs.""" import datetime import io @@ -34,9 +32,7 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """ - Get the data of an image file. - """ + """Get the data of an image file.""" original_tell = image.tell() image.seek(0) image_data = image.read() @@ -46,9 +42,7 @@ def _get_image_data(image: _ImageType) -> bytes: @beartype class CloudRecoService: - """ - An interface to the Vuforia Cloud Recognition Web APIs. - """ + """An interface to the Vuforia Cloud Recognition Web APIs.""" def __init__( self, diff --git a/src/vws/reports.py b/src/vws/reports.py index f6a77133c..e59408aad 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -1,6 +1,4 @@ -""" -Classes for representing Vuforia reports. -""" +"""Classes for representing Vuforia reports.""" import datetime from dataclasses import dataclass @@ -86,9 +84,7 @@ class TargetRecord: @beartype @dataclass(frozen=True) class TargetData: - """ - The target data optionally included with a query match. - """ + """The target data optionally included with a query match.""" name: str application_metadata: str | None diff --git a/src/vws/response.py b/src/vws/response.py index 269f2e23f..e2060cb9e 100644 --- a/src/vws/response.py +++ b/src/vws/response.py @@ -1,6 +1,4 @@ -""" -Responses for requests to VWS and VWQ. -""" +"""Responses for requests to VWS and VWQ.""" from dataclasses import dataclass @@ -10,9 +8,7 @@ @dataclass(frozen=True) @beartype class Response: - """ - A response from a request. - """ + """A response from a request.""" text: str url: str diff --git a/src/vws/vws.py b/src/vws/vws.py index 8def19ed7..1191ee7df 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -1,6 +1,4 @@ -""" -Tools for interacting with Vuforia APIs. -""" +"""Tools for interacting with Vuforia APIs.""" import base64 import io @@ -52,9 +50,7 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """ - Get the data of an image file. - """ + """Get the data of an image file.""" original_tell = image.tell() image.seek(0) image_data = image.read() @@ -131,9 +127,7 @@ def _target_api_request( @beartype(conf=BeartypeConf(is_pep484_tower=True)) class VWS: - """ - An interface to Vuforia Web Services APIs. - """ + """An interface to Vuforia Web Services APIs.""" def __init__( self, diff --git a/tests/__init__.py b/tests/__init__.py index c7e38a862..3502d86d5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +1 @@ -""" -Tests for ``vws``. -""" +"""Tests for ``vws``.""" diff --git a/tests/conftest.py b/tests/conftest.py index 74c6fc56d..7c0647786 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,4 @@ -""" -Configuration, plugins and fixtures for `pytest`. -""" +"""Configuration, plugins and fixtures for `pytest`.""" import io from collections.abc import Generator @@ -16,9 +14,7 @@ @pytest.fixture(name="_mock_database") def fixture_mock_database() -> Generator[VuforiaDatabase]: - """ - Yield a mock ``VuforiaDatabase``. - """ + """Yield a mock ``VuforiaDatabase``.""" # We use a low processing time so that tests run quickly. with MockVWS(processing_time_seconds=0.2) as mock: database = VuforiaDatabase() @@ -28,9 +24,7 @@ def fixture_mock_database() -> Generator[VuforiaDatabase]: @pytest.fixture def vws_client(_mock_database: VuforiaDatabase) -> VWS: - """ - A VWS client which connects to a mock database. - """ + """A VWS client which connects to a mock database.""" return VWS( server_access_key=_mock_database.server_access_key, server_secret_key=_mock_database.server_secret_key, @@ -39,9 +33,7 @@ def vws_client(_mock_database: VuforiaDatabase) -> VWS: @pytest.fixture def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: - """ - A ``CloudRecoService`` client which connects to a mock database. - """ + """A ``CloudRecoService`` client which connects to a mock database.""" return CloudRecoService( client_access_key=_mock_database.client_access_key, client_secret_key=_mock_database.client_secret_key, @@ -54,9 +46,7 @@ def fixture_image_file( tmp_path: Path, request: pytest.FixtureRequest, ) -> Generator[BinaryIO]: - """ - An image file object. - """ + """An image file object.""" file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() file.write_bytes(data=buffer) @@ -71,9 +61,7 @@ def image( high_quality_image: io.BytesIO, image_file: BinaryIO, ) -> io.BytesIO | BinaryIO: - """ - An image in any of the types that the API accepts. - """ + """An image in any of the types that the API accepts.""" if request.param == "high_quality_image": return high_quality_image return image_file diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 3515b0d22..d4c8cb0f7 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -1,6 +1,4 @@ -""" -Tests for exceptions raised when using the CloudRecoService. -""" +"""Tests for exceptions raised when using the CloudRecoService.""" import io import uuid @@ -63,9 +61,7 @@ def test_image_too_large( def test_cloudrecoexception_inheritance() -> None: - """ - CloudRecoService-specific exceptions inherit from CloudRecoException. - """ + """CloudRecoService-specific exceptions inherit from CloudRecoException.""" subclasses = [ MaxNumResultsOutOfRangeError, InactiveProjectError, diff --git a/tests/test_query.py b/tests/test_query.py index e229cf95d..11b803eb5 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,6 +1,4 @@ -""" -Tests for the ``CloudRecoService`` querying functionality. -""" +"""Tests for the ``CloudRecoService`` querying functionality.""" import io import uuid @@ -14,18 +12,14 @@ class TestQuery: - """ - Tests for making image queries. - """ + """Tests for making image queries.""" @staticmethod def test_no_matches( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - An empty list is returned if there are no matches. - """ + """An empty list is returned if there are no matches.""" result = cloud_reco_client.query(image=image) assert result == [] @@ -35,9 +29,7 @@ def test_match( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - Details of matching targets are returned. - """ + """Details of matching targets are returned.""" target_id = vws_client.add_target( name="x", width=1, @@ -51,9 +43,7 @@ def test_match( class TestCustomBaseVWQURL: - """ - Tests for using a custom base VWQ URL. - """ + """Tests for using a custom base VWQ URL.""" @staticmethod def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: @@ -93,9 +83,7 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: class TestMaxNumResults: - """ - Tests for the ``max_num_results`` parameter of ``query``. - """ + """Tests for the ``max_num_results`` parameter of ``query``.""" @staticmethod def test_default( @@ -103,9 +91,7 @@ def test_default( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - By default the maximum number of results is 1. - """ + """By default the maximum number of results is 1.""" target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, @@ -131,9 +117,7 @@ def test_custom( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to set a custom ``max_num_results``. - """ + """It is possible to set a custom ``max_num_results``.""" target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, @@ -167,9 +151,7 @@ def test_custom( class TestIncludeTargetData: - """ - Tests for the ``include_target_data`` parameter of ``query``. - """ + """Tests for the ``include_target_data`` parameter of ``query``.""" @staticmethod def test_default( @@ -177,9 +159,7 @@ def test_default( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - By default, target data is only returned in the top match. - """ + """By default, target data is only returned in the top match.""" target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, diff --git a/tests/test_vws.py b/tests/test_vws.py index e16eff555..d427e1c9b 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -1,6 +1,4 @@ -""" -Tests for helper functions for managing a Vuforia database. -""" +"""Tests for helper functions for managing a Vuforia database.""" import base64 import datetime @@ -25,9 +23,7 @@ class TestAddTarget: - """ - Tests for adding a target. - """ + """Tests for adding a target.""" @staticmethod @pytest.mark.parametrize( @@ -43,9 +39,7 @@ def test_add_target( *, active_flag: bool, ) -> None: - """ - No exception is raised when adding one target. - """ + """No exception is raised when adding one target.""" name = "x" width = 1 if application_metadata is None: @@ -98,9 +92,7 @@ def test_add_two_targets( class TestCustomBaseVWSURL: - """ - Tests for using a custom base VWS URL. - """ + """Tests for using a custom base VWS URL.""" @staticmethod def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: @@ -128,18 +120,14 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: class TestListTargets: - """ - Tests for listing targets. - """ + """Tests for listing targets.""" @staticmethod def test_list_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to get a list of target IDs. - """ + """It is possible to get a list of target IDs.""" id_1 = vws_client.add_target( name="x", width=1, @@ -158,18 +146,14 @@ def test_list_targets( class TestDelete: - """ - Test for deleting a target. - """ + """Test for deleting a target.""" @staticmethod def test_delete_target( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to delete a target. - """ + """It is possible to delete a target.""" target_id = vws_client.add_target( name="x", width=1, @@ -185,18 +169,14 @@ def test_delete_target( class TestGetTargetSummaryReport: - """ - Tests for getting a summary report for a target. - """ + """Tests for getting a summary report for a target.""" @staticmethod def test_get_target_summary_report( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - Details of a target are returned by ``get_target_summary_report``. - """ + """Details of a target are returned by ``get_target_summary_report``.""" date = "2018-04-25" target_name = uuid.uuid4().hex with freeze_time(time_to_freeze=date): @@ -240,15 +220,11 @@ def test_get_target_summary_report( class TestGetDatabaseSummaryReport: - """ - Tests for getting a summary report for a database. - """ + """Tests for getting a summary report for a database.""" @staticmethod def test_get_target(vws_client: VWS) -> None: - """ - Details of a database are returned by ``get_database_summary_report``. - """ + """Details of a database are returned by ``get_database_summary_report``.""" report = vws_client.get_database_summary_report() expected_report = DatabaseSummaryReport( @@ -287,18 +263,14 @@ def test_get_target(vws_client: VWS) -> None: class TestGetTargetRecord: - """ - Tests for getting a record of a target. - """ + """Tests for getting a record of a target.""" @staticmethod def test_get_target_record( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - Details of a target are returned by ``get_target_record``. - """ + """Details of a target are returned by ``get_target_record``.""" target_id = vws_client.add_target( name="x", width=1, @@ -344,9 +316,7 @@ def test_get_failed( vws_client: VWS, image_file_failed_state: io.BytesIO, ) -> None: - """ - Check that the report works with a failed target. - """ + """Check that the report works with a failed target.""" target_id = vws_client.add_target( name="x", width=1, @@ -362,18 +332,14 @@ def test_get_failed( class TestWaitForTargetProcessed: - """ - Tests for waiting for a target to be processed. - """ + """Tests for waiting for a target to be processed.""" @staticmethod def test_wait_for_target_processed( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to wait until a target is processed. - """ + """It is possible to wait until a target is processed.""" target_id = vws_client.add_target( name="x", width=1, @@ -391,9 +357,7 @@ def test_wait_for_target_processed( def test_default_seconds_between_requests( image: io.BytesIO | BinaryIO, ) -> None: - """ - By default, 0.2 seconds are waited between polling requests. - """ + """By default, 0.2 seconds are waited between polling requests.""" with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -443,9 +407,7 @@ def test_default_seconds_between_requests( def test_custom_seconds_between_requests( image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to customize the time waited between polling requests. - """ + """It is possible to customize the time waited between polling requests.""" with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -493,9 +455,7 @@ def test_custom_seconds_between_requests( @staticmethod def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: - """ - It is possible to set a maximum timeout. - """ + """It is possible to set a maximum timeout.""" with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -531,18 +491,14 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: class TestGetDuplicateTargets: - """ - Tests for getting duplicate targets. - """ + """Tests for getting duplicate targets.""" @staticmethod def test_get_duplicate_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to get the IDs of similar targets. - """ + """It is possible to get the IDs of similar targets.""" target_id = vws_client.add_target( name="x", width=1, @@ -565,9 +521,7 @@ def test_get_duplicate_targets( class TestUpdateTarget: - """ - Tests for updating a target. - """ + """Tests for updating a target.""" @staticmethod def test_update_target( @@ -576,9 +530,7 @@ def test_update_target( different_high_quality_image: io.BytesIO, cloud_reco_client: CloudRecoService, ) -> None: - """ - It is possible to update a target. - """ + """It is possible to update a target.""" old_name = uuid.uuid4().hex old_width = secrets.choice(seq=range(1, 5000)) / 100 target_id = vws_client.add_target( @@ -635,9 +587,7 @@ def test_no_fields_given( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to give no update fields. - """ + """It is possible to give no update fields.""" target_id = vws_client.add_target( name="x", width=1, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 86da66040..eb5b12a6f 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -1,6 +1,4 @@ -""" -Tests for VWS exceptions. -""" +"""Tests for VWS exceptions.""" import io import uuid @@ -98,9 +96,7 @@ def test_request_quota_reached() -> None: def test_fail(high_quality_image: io.BytesIO) -> None: - """ - A ``Fail`` exception is raised when the server access key does not exist. - """ + """A ``Fail`` exception is raised when the server access key does not exist.""" with MockVWS(): vws_client = VWS( server_access_key=uuid.uuid4().hex, @@ -120,9 +116,7 @@ def test_fail(high_quality_image: io.BytesIO) -> None: def test_bad_image(vws_client: VWS) -> None: - """ - A ``BadImage`` exception is raised when a non-image is given. - """ + """A ``BadImage`` exception is raised when a non-image is given.""" not_an_image = io.BytesIO(initial_bytes=b"Not an image") with pytest.raises(expected_exception=BadImageError) as exc: vws_client.add_target( @@ -325,9 +319,7 @@ def test_target_status_not_success( def test_vwsexception_inheritance() -> None: - """ - VWS-related exceptions should inherit from VWSException. - """ + """VWS-related exceptions should inherit from VWSException.""" subclasses = [ AuthenticationFailureError, BadImageError, @@ -354,9 +346,7 @@ def test_base_exception( vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: - """ - ``VWSException``s has a response property. - """ + """``VWSException``s has a response property.""" with pytest.raises(expected_exception=VWSError) as exc: vws_client.get_target_record(target_id="a") From b57ba660dc68b9c917b91fe720d5bd223280745d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 12 Jan 2026 14:23:57 +0000 Subject: [PATCH 1189/1638] Configure pydocstringformatter to make minimal changes --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d4a6cbd29..f83bea5bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -346,6 +346,8 @@ typeCheckingMode = "strict" [tool.pydocstringformatter] write = true split-summary-body = false +beginning-quotes = false +closing-quotes = false [tool.interrogate] fail-under = 100 From 6c82f4a9543f22170b369090744d872742ae8630 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 12 Jan 2026 14:24:43 +0000 Subject: [PATCH 1190/1638] Switch from pydocstringformatter --- conftest.py | 8 +- docs/source/__init__.py | 4 +- docs/source/conf.py | 4 +- pyproject.toml | 2 - src/vws/__init__.py | 4 +- src/vws/exceptions/__init__.py | 4 +- src/vws/exceptions/base_exceptions.py | 12 ++- src/vws/exceptions/cloud_reco_exceptions.py | 16 +++- src/vws/exceptions/custom_exceptions.py | 20 +++- src/vws/exceptions/vws_exceptions.py | 68 +++++++++---- src/vws/include_target_data.py | 4 +- src/vws/query.py | 12 ++- src/vws/reports.py | 8 +- src/vws/response.py | 8 +- src/vws/vws.py | 12 ++- tests/__init__.py | 4 +- tests/conftest.py | 24 +++-- tests/test_cloud_reco_exceptions.py | 8 +- tests/test_query.py | 40 ++++++-- tests/test_vws.py | 100 +++++++++++++++----- tests/test_vws_exceptions.py | 20 +++- 21 files changed, 280 insertions(+), 102 deletions(-) diff --git a/conftest.py b/conftest.py index 0e579a4db..1d776f8db 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,6 @@ -"""Setup for Sybil.""" +""" +Setup for Sybil. +""" import io import uuid @@ -19,7 +21,9 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: - """Apply the beartype decorator to all collected test functions.""" + """ + Apply the beartype decorator to all collected test functions. + """ for item in items: if isinstance(item, pytest.Function): item.obj = beartype(obj=item.obj) diff --git a/docs/source/__init__.py b/docs/source/__init__.py index 535ceb2ec..b63eed5fb 100644 --- a/docs/source/__init__.py +++ b/docs/source/__init__.py @@ -1 +1,3 @@ -"""Documentation.""" +""" +Documentation. +""" diff --git a/docs/source/conf.py b/docs/source/conf.py index 920ba1a4b..914bcb886 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 -"""Configuration for Sphinx.""" +""" +Configuration for Sphinx. +""" import importlib.metadata from pathlib import Path diff --git a/pyproject.toml b/pyproject.toml index f83bea5bb..d4a6cbd29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -346,8 +346,6 @@ typeCheckingMode = "strict" [tool.pydocstringformatter] write = true split-summary-body = false -beginning-quotes = false -closing-quotes = false [tool.interrogate] fail-under = 100 diff --git a/src/vws/__init__.py b/src/vws/__init__.py index bfd96d6c2..42788b92d 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -1,4 +1,6 @@ -"""A library for Vuforia Web Services.""" +""" +A library for Vuforia Web Services. +""" from .query import CloudRecoService from .vws import VWS diff --git a/src/vws/exceptions/__init__.py b/src/vws/exceptions/__init__.py index 7260ffdbb..a1e3cd91c 100644 --- a/src/vws/exceptions/__init__.py +++ b/src/vws/exceptions/__init__.py @@ -1 +1,3 @@ -"""Custom exceptions raised by this package.""" +""" +Custom exceptions raised by this package. +""" diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index c86080593..943323bfd 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -10,7 +10,9 @@ @beartype class CloudRecoError(Exception): - """Base class for Vuforia Cloud Recognition Web API exceptions.""" + """ + Base class for Vuforia Cloud Recognition Web API exceptions. + """ def __init__(self, response: Response) -> None: """ @@ -22,7 +24,9 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """The response returned by Vuforia which included this error.""" + """ + The response returned by Vuforia which included this error. + """ return self._response @@ -44,5 +48,7 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """The response returned by Vuforia which included this error.""" + """ + The response returned by Vuforia which included this error. + """ return self._response diff --git a/src/vws/exceptions/cloud_reco_exceptions.py b/src/vws/exceptions/cloud_reco_exceptions.py index 2b20a7220..ff5dde209 100644 --- a/src/vws/exceptions/cloud_reco_exceptions.py +++ b/src/vws/exceptions/cloud_reco_exceptions.py @@ -1,4 +1,6 @@ -"""Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs.""" +""" +Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs. +""" from beartype import beartype @@ -15,27 +17,31 @@ class MaxNumResultsOutOfRangeError(CloudRecoError): @beartype class InactiveProjectError(CloudRecoError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'InactiveProject'. """ @beartype class BadImageError(CloudRecoError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'BadImage'. """ @beartype class AuthenticationFailureError(CloudRecoError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'AuthenticationFailure'. """ @beartype class RequestTimeTooSkewedError(CloudRecoError): - """Exception raised when Vuforia returns a response with a result code + """ + 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 466dfd1cd..694e98c30 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -11,7 +11,9 @@ @beartype class RequestEntityTooLargeError(Exception): - """Exception raised when the given image is too large.""" + """ + Exception raised when the given image is too large. + """ def __init__(self, response: Response) -> None: """ @@ -23,18 +25,24 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """The response returned by Vuforia which included this error.""" + """ + The response returned by Vuforia which included this error. + """ return self._response @beartype class TargetProcessingTimeoutError(Exception): - """Exception raised when waiting for a target to be processed times out.""" + """ + 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.""" + """ + Exception raised when VWS returns a server error. + """ def __init__(self, response: Response) -> None: """ @@ -46,5 +54,7 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """The response returned by Vuforia which included this error.""" + """ + 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 a25c2261b..482223766 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -14,13 +14,16 @@ @beartype class UnknownTargetError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'UnknownTarget'. """ @property def target_id(self) -> str: - """The unknown target ID.""" + """ + The unknown target ID. + """ path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -29,19 +32,23 @@ def target_id(self) -> str: @beartype class FailError(VWSError): - """Exception raised when Vuforia returns a response with a result code 'Fail'.""" + """ + Exception raised when Vuforia returns a response with a result code 'Fail'. + """ @beartype class BadImageError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'BadImage'. """ @beartype class AuthenticationFailureError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'AuthenticationFailure'. """ @@ -49,20 +56,24 @@ 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 + """ + Exception raised when Vuforia returns a response with a result code 'RequestQuotaReached'. """ @beartype class TargetStatusProcessingError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'TargetStatusProcessing'. """ @property def target_id(self) -> str: - """The processing target ID.""" + """ + The processing target ID. + """ path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -72,7 +83,8 @@ 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 + """ + Exception raised when Vuforia returns a response with a result code 'DateRangeError'. """ @@ -80,7 +92,8 @@ 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 + """ + Exception raised when Vuforia returns a response with a result code 'TargetQuotaReached'. """ @@ -88,7 +101,8 @@ 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 + """ + Exception raised when Vuforia returns a response with a result code 'ProjectSuspended'. """ @@ -96,41 +110,48 @@ 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 + """ + Exception raised when Vuforia returns a response with a result code 'ProjectHasNoAPIAccess'. """ @beartype class ProjectInactiveError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'ProjectInactive'. """ @beartype class MetadataTooLargeError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'MetadataTooLarge'. """ @beartype class RequestTimeTooSkewedError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'RequestTimeTooSkewed'. """ @beartype class TargetNameExistError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'TargetNameExist'. """ @property def target_name(self) -> str: - """The target name which already exists.""" + """ + The target name which already exists. + """ response_body = self.response.request_body or b"" request_json = json.loads(s=response_body) return str(object=request_json["name"]) @@ -138,20 +159,24 @@ def target_name(self) -> str: @beartype class ImageTooLargeError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'ImageTooLarge'. """ @beartype class TargetStatusNotSuccessError(VWSError): - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'TargetStatusNotSuccess'. """ @property def target_id(self) -> str: - """The unknown target ID.""" + """ + The unknown target ID. + """ path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -160,6 +185,7 @@ def target_id(self) -> str: @beartype class TooManyRequestsError(VWSError): # pragma: no cover - """Exception raised when Vuforia returns a response with a result code + """ + Exception raised when Vuforia returns a response with a result code 'TooManyRequests'. """ diff --git a/src/vws/include_target_data.py b/src/vws/include_target_data.py index 0692a1e40..37682e08a 100644 --- a/src/vws/include_target_data.py +++ b/src/vws/include_target_data.py @@ -1,4 +1,6 @@ -"""Tools for managing ``CloudRecoService.query``'s ``include_target_data``.""" +""" +Tools for managing ``CloudRecoService.query``'s ``include_target_data``. +""" from enum import StrEnum, auto, unique diff --git a/src/vws/query.py b/src/vws/query.py index ab449c614..96122aa14 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -1,4 +1,6 @@ -"""Tools for interacting with the Vuforia Cloud Recognition Web APIs.""" +""" +Tools for interacting with the Vuforia Cloud Recognition Web APIs. +""" import datetime import io @@ -32,7 +34,9 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """Get the data of an image file.""" + """ + Get the data of an image file. + """ original_tell = image.tell() image.seek(0) image_data = image.read() @@ -42,7 +46,9 @@ def _get_image_data(image: _ImageType) -> bytes: @beartype class CloudRecoService: - """An interface to the Vuforia Cloud Recognition Web APIs.""" + """ + An interface to the Vuforia Cloud Recognition Web APIs. + """ def __init__( self, diff --git a/src/vws/reports.py b/src/vws/reports.py index e59408aad..f6a77133c 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -1,4 +1,6 @@ -"""Classes for representing Vuforia reports.""" +""" +Classes for representing Vuforia reports. +""" import datetime from dataclasses import dataclass @@ -84,7 +86,9 @@ class TargetRecord: @beartype @dataclass(frozen=True) class TargetData: - """The target data optionally included with a query match.""" + """ + The target data optionally included with a query match. + """ name: str application_metadata: str | None diff --git a/src/vws/response.py b/src/vws/response.py index e2060cb9e..269f2e23f 100644 --- a/src/vws/response.py +++ b/src/vws/response.py @@ -1,4 +1,6 @@ -"""Responses for requests to VWS and VWQ.""" +""" +Responses for requests to VWS and VWQ. +""" from dataclasses import dataclass @@ -8,7 +10,9 @@ @dataclass(frozen=True) @beartype class Response: - """A response from a request.""" + """ + A response from a request. + """ text: str url: str diff --git a/src/vws/vws.py b/src/vws/vws.py index 1191ee7df..8def19ed7 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -1,4 +1,6 @@ -"""Tools for interacting with Vuforia APIs.""" +""" +Tools for interacting with Vuforia APIs. +""" import base64 import io @@ -50,7 +52,9 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """Get the data of an image file.""" + """ + Get the data of an image file. + """ original_tell = image.tell() image.seek(0) image_data = image.read() @@ -127,7 +131,9 @@ def _target_api_request( @beartype(conf=BeartypeConf(is_pep484_tower=True)) class VWS: - """An interface to Vuforia Web Services APIs.""" + """ + An interface to Vuforia Web Services APIs. + """ def __init__( self, diff --git a/tests/__init__.py b/tests/__init__.py index 3502d86d5..c7e38a862 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1,3 @@ -"""Tests for ``vws``.""" +""" +Tests for ``vws``. +""" diff --git a/tests/conftest.py b/tests/conftest.py index 7c0647786..74c6fc56d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,6 @@ -"""Configuration, plugins and fixtures for `pytest`.""" +""" +Configuration, plugins and fixtures for `pytest`. +""" import io from collections.abc import Generator @@ -14,7 +16,9 @@ @pytest.fixture(name="_mock_database") def fixture_mock_database() -> Generator[VuforiaDatabase]: - """Yield a mock ``VuforiaDatabase``.""" + """ + Yield a mock ``VuforiaDatabase``. + """ # We use a low processing time so that tests run quickly. with MockVWS(processing_time_seconds=0.2) as mock: database = VuforiaDatabase() @@ -24,7 +28,9 @@ def fixture_mock_database() -> Generator[VuforiaDatabase]: @pytest.fixture def vws_client(_mock_database: VuforiaDatabase) -> VWS: - """A VWS client which connects to a mock database.""" + """ + A VWS client which connects to a mock database. + """ return VWS( server_access_key=_mock_database.server_access_key, server_secret_key=_mock_database.server_secret_key, @@ -33,7 +39,9 @@ def vws_client(_mock_database: VuforiaDatabase) -> VWS: @pytest.fixture def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: - """A ``CloudRecoService`` client which connects to a mock database.""" + """ + A ``CloudRecoService`` client which connects to a mock database. + """ return CloudRecoService( client_access_key=_mock_database.client_access_key, client_secret_key=_mock_database.client_secret_key, @@ -46,7 +54,9 @@ def fixture_image_file( tmp_path: Path, request: pytest.FixtureRequest, ) -> Generator[BinaryIO]: - """An image file object.""" + """ + An image file object. + """ file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() file.write_bytes(data=buffer) @@ -61,7 +71,9 @@ def image( high_quality_image: io.BytesIO, image_file: BinaryIO, ) -> io.BytesIO | BinaryIO: - """An image in any of the types that the API accepts.""" + """ + An image in any of the types that the API accepts. + """ if request.param == "high_quality_image": return high_quality_image return image_file diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index d4c8cb0f7..3515b0d22 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -1,4 +1,6 @@ -"""Tests for exceptions raised when using the CloudRecoService.""" +""" +Tests for exceptions raised when using the CloudRecoService. +""" import io import uuid @@ -61,7 +63,9 @@ def test_image_too_large( def test_cloudrecoexception_inheritance() -> None: - """CloudRecoService-specific exceptions inherit from CloudRecoException.""" + """ + CloudRecoService-specific exceptions inherit from CloudRecoException. + """ subclasses = [ MaxNumResultsOutOfRangeError, InactiveProjectError, diff --git a/tests/test_query.py b/tests/test_query.py index 11b803eb5..e229cf95d 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,4 +1,6 @@ -"""Tests for the ``CloudRecoService`` querying functionality.""" +""" +Tests for the ``CloudRecoService`` querying functionality. +""" import io import uuid @@ -12,14 +14,18 @@ class TestQuery: - """Tests for making image queries.""" + """ + Tests for making image queries. + """ @staticmethod def test_no_matches( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """An empty list is returned if there are no matches.""" + """ + An empty list is returned if there are no matches. + """ result = cloud_reco_client.query(image=image) assert result == [] @@ -29,7 +35,9 @@ def test_match( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """Details of matching targets are returned.""" + """ + Details of matching targets are returned. + """ target_id = vws_client.add_target( name="x", width=1, @@ -43,7 +51,9 @@ def test_match( class TestCustomBaseVWQURL: - """Tests for using a custom base VWQ URL.""" + """ + Tests for using a custom base VWQ URL. + """ @staticmethod def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: @@ -83,7 +93,9 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: class TestMaxNumResults: - """Tests for the ``max_num_results`` parameter of ``query``.""" + """ + Tests for the ``max_num_results`` parameter of ``query``. + """ @staticmethod def test_default( @@ -91,7 +103,9 @@ def test_default( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """By default the maximum number of results is 1.""" + """ + By default the maximum number of results is 1. + """ target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, @@ -117,7 +131,9 @@ def test_custom( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """It is possible to set a custom ``max_num_results``.""" + """ + It is possible to set a custom ``max_num_results``. + """ target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, @@ -151,7 +167,9 @@ def test_custom( class TestIncludeTargetData: - """Tests for the ``include_target_data`` parameter of ``query``.""" + """ + Tests for the ``include_target_data`` parameter of ``query``. + """ @staticmethod def test_default( @@ -159,7 +177,9 @@ def test_default( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """By default, target data is only returned in the top match.""" + """ + By default, target data is only returned in the top match. + """ target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, diff --git a/tests/test_vws.py b/tests/test_vws.py index d427e1c9b..e16eff555 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -1,4 +1,6 @@ -"""Tests for helper functions for managing a Vuforia database.""" +""" +Tests for helper functions for managing a Vuforia database. +""" import base64 import datetime @@ -23,7 +25,9 @@ class TestAddTarget: - """Tests for adding a target.""" + """ + Tests for adding a target. + """ @staticmethod @pytest.mark.parametrize( @@ -39,7 +43,9 @@ def test_add_target( *, active_flag: bool, ) -> None: - """No exception is raised when adding one target.""" + """ + No exception is raised when adding one target. + """ name = "x" width = 1 if application_metadata is None: @@ -92,7 +98,9 @@ def test_add_two_targets( class TestCustomBaseVWSURL: - """Tests for using a custom base VWS URL.""" + """ + Tests for using a custom base VWS URL. + """ @staticmethod def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: @@ -120,14 +128,18 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: class TestListTargets: - """Tests for listing targets.""" + """ + Tests for listing targets. + """ @staticmethod def test_list_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """It is possible to get a list of target IDs.""" + """ + It is possible to get a list of target IDs. + """ id_1 = vws_client.add_target( name="x", width=1, @@ -146,14 +158,18 @@ def test_list_targets( class TestDelete: - """Test for deleting a target.""" + """ + Test for deleting a target. + """ @staticmethod def test_delete_target( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """It is possible to delete a target.""" + """ + It is possible to delete a target. + """ target_id = vws_client.add_target( name="x", width=1, @@ -169,14 +185,18 @@ def test_delete_target( class TestGetTargetSummaryReport: - """Tests for getting a summary report for a target.""" + """ + Tests for getting a summary report for a target. + """ @staticmethod def test_get_target_summary_report( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """Details of a target are returned by ``get_target_summary_report``.""" + """ + Details of a target are returned by ``get_target_summary_report``. + """ date = "2018-04-25" target_name = uuid.uuid4().hex with freeze_time(time_to_freeze=date): @@ -220,11 +240,15 @@ def test_get_target_summary_report( class TestGetDatabaseSummaryReport: - """Tests for getting a summary report for a database.""" + """ + Tests for getting a summary report for a database. + """ @staticmethod def test_get_target(vws_client: VWS) -> None: - """Details of a database are returned by ``get_database_summary_report``.""" + """ + Details of a database are returned by ``get_database_summary_report``. + """ report = vws_client.get_database_summary_report() expected_report = DatabaseSummaryReport( @@ -263,14 +287,18 @@ def test_get_target(vws_client: VWS) -> None: class TestGetTargetRecord: - """Tests for getting a record of a target.""" + """ + Tests for getting a record of a target. + """ @staticmethod def test_get_target_record( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """Details of a target are returned by ``get_target_record``.""" + """ + Details of a target are returned by ``get_target_record``. + """ target_id = vws_client.add_target( name="x", width=1, @@ -316,7 +344,9 @@ def test_get_failed( vws_client: VWS, image_file_failed_state: io.BytesIO, ) -> None: - """Check that the report works with a failed target.""" + """ + Check that the report works with a failed target. + """ target_id = vws_client.add_target( name="x", width=1, @@ -332,14 +362,18 @@ def test_get_failed( class TestWaitForTargetProcessed: - """Tests for waiting for a target to be processed.""" + """ + Tests for waiting for a target to be processed. + """ @staticmethod def test_wait_for_target_processed( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """It is possible to wait until a target is processed.""" + """ + It is possible to wait until a target is processed. + """ target_id = vws_client.add_target( name="x", width=1, @@ -357,7 +391,9 @@ def test_wait_for_target_processed( def test_default_seconds_between_requests( image: io.BytesIO | BinaryIO, ) -> None: - """By default, 0.2 seconds are waited between polling requests.""" + """ + By default, 0.2 seconds are waited between polling requests. + """ with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -407,7 +443,9 @@ def test_default_seconds_between_requests( def test_custom_seconds_between_requests( image: io.BytesIO | BinaryIO, ) -> None: - """It is possible to customize the time waited between polling requests.""" + """ + It is possible to customize the time waited between polling requests. + """ with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -455,7 +493,9 @@ def test_custom_seconds_between_requests( @staticmethod def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set a maximum timeout.""" + """ + It is possible to set a maximum timeout. + """ with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -491,14 +531,18 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: class TestGetDuplicateTargets: - """Tests for getting duplicate targets.""" + """ + Tests for getting duplicate targets. + """ @staticmethod def test_get_duplicate_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """It is possible to get the IDs of similar targets.""" + """ + It is possible to get the IDs of similar targets. + """ target_id = vws_client.add_target( name="x", width=1, @@ -521,7 +565,9 @@ def test_get_duplicate_targets( class TestUpdateTarget: - """Tests for updating a target.""" + """ + Tests for updating a target. + """ @staticmethod def test_update_target( @@ -530,7 +576,9 @@ def test_update_target( different_high_quality_image: io.BytesIO, cloud_reco_client: CloudRecoService, ) -> None: - """It is possible to update a target.""" + """ + It is possible to update a target. + """ old_name = uuid.uuid4().hex old_width = secrets.choice(seq=range(1, 5000)) / 100 target_id = vws_client.add_target( @@ -587,7 +635,9 @@ def test_no_fields_given( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """It is possible to give no update fields.""" + """ + It is possible to give no update fields. + """ target_id = vws_client.add_target( name="x", width=1, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index eb5b12a6f..86da66040 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -1,4 +1,6 @@ -"""Tests for VWS exceptions.""" +""" +Tests for VWS exceptions. +""" import io import uuid @@ -96,7 +98,9 @@ def test_request_quota_reached() -> None: def test_fail(high_quality_image: io.BytesIO) -> None: - """A ``Fail`` exception is raised when the server access key does not exist.""" + """ + A ``Fail`` exception is raised when the server access key does not exist. + """ with MockVWS(): vws_client = VWS( server_access_key=uuid.uuid4().hex, @@ -116,7 +120,9 @@ def test_fail(high_quality_image: io.BytesIO) -> None: def test_bad_image(vws_client: VWS) -> None: - """A ``BadImage`` exception is raised when a non-image is given.""" + """ + A ``BadImage`` exception is raised when a non-image is given. + """ not_an_image = io.BytesIO(initial_bytes=b"Not an image") with pytest.raises(expected_exception=BadImageError) as exc: vws_client.add_target( @@ -319,7 +325,9 @@ def test_target_status_not_success( def test_vwsexception_inheritance() -> None: - """VWS-related exceptions should inherit from VWSException.""" + """ + VWS-related exceptions should inherit from VWSException. + """ subclasses = [ AuthenticationFailureError, BadImageError, @@ -346,7 +354,9 @@ def test_base_exception( vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: - """``VWSException``s has a response property.""" + """ + ``VWSException``s has a response property. + """ with pytest.raises(expected_exception=VWSError) as exc: vws_client.get_target_record(target_id="a") From 848686798b4cd9b7617d973b77ef25fbdc69c10a 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, 12 Jan 2026 14:27:40 +0000 Subject: [PATCH 1191/1638] [pre-commit.ci lite] apply automatic fixes --- conftest.py | 8 +- docs/source/__init__.py | 4 +- docs/source/conf.py | 4 +- src/vws/__init__.py | 4 +- src/vws/exceptions/__init__.py | 4 +- src/vws/exceptions/base_exceptions.py | 12 +-- src/vws/exceptions/cloud_reco_exceptions.py | 16 +--- src/vws/exceptions/custom_exceptions.py | 20 +--- src/vws/exceptions/vws_exceptions.py | 68 ++++--------- src/vws/include_target_data.py | 4 +- src/vws/query.py | 12 +-- src/vws/reports.py | 8 +- src/vws/response.py | 8 +- src/vws/vws.py | 12 +-- tests/__init__.py | 4 +- tests/conftest.py | 24 ++--- tests/test_cloud_reco_exceptions.py | 8 +- tests/test_query.py | 40 ++------ tests/test_vws.py | 100 +++++--------------- tests/test_vws_exceptions.py | 20 +--- 20 files changed, 100 insertions(+), 280 deletions(-) diff --git a/conftest.py b/conftest.py index 1d776f8db..0e579a4db 100644 --- a/conftest.py +++ b/conftest.py @@ -1,6 +1,4 @@ -""" -Setup for Sybil. -""" +"""Setup for Sybil.""" import io import uuid @@ -21,9 +19,7 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: - """ - Apply the beartype decorator to all collected test functions. - """ + """Apply the beartype decorator to all collected test functions.""" for item in items: if isinstance(item, pytest.Function): item.obj = beartype(obj=item.obj) diff --git a/docs/source/__init__.py b/docs/source/__init__.py index b63eed5fb..535ceb2ec 100644 --- a/docs/source/__init__.py +++ b/docs/source/__init__.py @@ -1,3 +1 @@ -""" -Documentation. -""" +"""Documentation.""" diff --git a/docs/source/conf.py b/docs/source/conf.py index 914bcb886..920ba1a4b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 -""" -Configuration for Sphinx. -""" +"""Configuration for Sphinx.""" import importlib.metadata from pathlib import Path diff --git a/src/vws/__init__.py b/src/vws/__init__.py index 42788b92d..bfd96d6c2 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -1,6 +1,4 @@ -""" -A library for Vuforia Web Services. -""" +"""A library for Vuforia Web Services.""" from .query import CloudRecoService from .vws import VWS diff --git a/src/vws/exceptions/__init__.py b/src/vws/exceptions/__init__.py index a1e3cd91c..7260ffdbb 100644 --- a/src/vws/exceptions/__init__.py +++ b/src/vws/exceptions/__init__.py @@ -1,3 +1 @@ -""" -Custom exceptions raised by this package. -""" +"""Custom exceptions raised by this package.""" diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 943323bfd..c86080593 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -10,9 +10,7 @@ @beartype class CloudRecoError(Exception): - """ - Base class for Vuforia Cloud Recognition Web API exceptions. - """ + """Base class for Vuforia Cloud Recognition Web API exceptions.""" def __init__(self, response: Response) -> None: """ @@ -24,9 +22,7 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ + """The response returned by Vuforia which included this error.""" return self._response @@ -48,7 +44,5 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ + """The response returned by Vuforia which included this error.""" return self._response diff --git a/src/vws/exceptions/cloud_reco_exceptions.py b/src/vws/exceptions/cloud_reco_exceptions.py index ff5dde209..2b20a7220 100644 --- a/src/vws/exceptions/cloud_reco_exceptions.py +++ b/src/vws/exceptions/cloud_reco_exceptions.py @@ -1,6 +1,4 @@ -""" -Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs. -""" +"""Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs.""" from beartype import beartype @@ -17,31 +15,27 @@ class MaxNumResultsOutOfRangeError(CloudRecoError): @beartype class InactiveProjectError(CloudRecoError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'InactiveProject'. """ @beartype class BadImageError(CloudRecoError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'BadImage'. """ @beartype class AuthenticationFailureError(CloudRecoError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'AuthenticationFailure'. """ @beartype class RequestTimeTooSkewedError(CloudRecoError): - """ - Exception raised when Vuforia returns a response with a result code + """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 694e98c30..466dfd1cd 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -11,9 +11,7 @@ @beartype class RequestEntityTooLargeError(Exception): - """ - Exception raised when the given image is too large. - """ + """Exception raised when the given image is too large.""" def __init__(self, response: Response) -> None: """ @@ -25,24 +23,18 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ + """The response returned by Vuforia which included this error.""" return self._response @beartype class TargetProcessingTimeoutError(Exception): - """ - Exception raised when waiting for a target to be processed times out. - """ + """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. - """ + """Exception raised when VWS returns a server error.""" def __init__(self, response: Response) -> None: """ @@ -54,7 +46,5 @@ def __init__(self, response: Response) -> None: @property def response(self) -> Response: - """ - The response returned by Vuforia which included this error. - """ + """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 482223766..a25c2261b 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -14,16 +14,13 @@ @beartype class UnknownTargetError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'UnknownTarget'. """ @property def target_id(self) -> str: - """ - The unknown target ID. - """ + """The unknown target ID.""" path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -32,23 +29,19 @@ def target_id(self) -> str: @beartype class FailError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code 'Fail'. - """ + """Exception raised when Vuforia returns a response with a result code 'Fail'.""" @beartype class BadImageError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'BadImage'. """ @beartype class AuthenticationFailureError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'AuthenticationFailure'. """ @@ -56,24 +49,20 @@ 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 + """Exception raised when Vuforia returns a response with a result code 'RequestQuotaReached'. """ @beartype class TargetStatusProcessingError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'TargetStatusProcessing'. """ @property def target_id(self) -> str: - """ - The processing target ID. - """ + """The processing target ID.""" path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -83,8 +72,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 + """Exception raised when Vuforia returns a response with a result code 'DateRangeError'. """ @@ -92,8 +80,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 + """Exception raised when Vuforia returns a response with a result code 'TargetQuotaReached'. """ @@ -101,8 +88,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 + """Exception raised when Vuforia returns a response with a result code 'ProjectSuspended'. """ @@ -110,48 +96,41 @@ 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 + """Exception raised when Vuforia returns a response with a result code 'ProjectHasNoAPIAccess'. """ @beartype class ProjectInactiveError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'ProjectInactive'. """ @beartype class MetadataTooLargeError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'MetadataTooLarge'. """ @beartype class RequestTimeTooSkewedError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'RequestTimeTooSkewed'. """ @beartype class TargetNameExistError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'TargetNameExist'. """ @property def target_name(self) -> str: - """ - The target name which already exists. - """ + """The target name which already exists.""" response_body = self.response.request_body or b"" request_json = json.loads(s=response_body) return str(object=request_json["name"]) @@ -159,24 +138,20 @@ def target_name(self) -> str: @beartype class ImageTooLargeError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'ImageTooLarge'. """ @beartype class TargetStatusNotSuccessError(VWSError): - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'TargetStatusNotSuccess'. """ @property def target_id(self) -> str: - """ - The unknown target ID. - """ + """The unknown target ID.""" path = urlparse(url=self.response.url).path # Every HTTP path which can raise this error is in the format # `/something/{target_id}`. @@ -185,7 +160,6 @@ def target_id(self) -> str: @beartype class TooManyRequestsError(VWSError): # pragma: no cover - """ - Exception raised when Vuforia returns a response with a result code + """Exception raised when Vuforia returns a response with a result code 'TooManyRequests'. """ diff --git a/src/vws/include_target_data.py b/src/vws/include_target_data.py index 37682e08a..0692a1e40 100644 --- a/src/vws/include_target_data.py +++ b/src/vws/include_target_data.py @@ -1,6 +1,4 @@ -""" -Tools for managing ``CloudRecoService.query``'s ``include_target_data``. -""" +"""Tools for managing ``CloudRecoService.query``'s ``include_target_data``.""" from enum import StrEnum, auto, unique diff --git a/src/vws/query.py b/src/vws/query.py index 96122aa14..ab449c614 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -1,6 +1,4 @@ -""" -Tools for interacting with the Vuforia Cloud Recognition Web APIs. -""" +"""Tools for interacting with the Vuforia Cloud Recognition Web APIs.""" import datetime import io @@ -34,9 +32,7 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """ - Get the data of an image file. - """ + """Get the data of an image file.""" original_tell = image.tell() image.seek(0) image_data = image.read() @@ -46,9 +42,7 @@ def _get_image_data(image: _ImageType) -> bytes: @beartype class CloudRecoService: - """ - An interface to the Vuforia Cloud Recognition Web APIs. - """ + """An interface to the Vuforia Cloud Recognition Web APIs.""" def __init__( self, diff --git a/src/vws/reports.py b/src/vws/reports.py index f6a77133c..e59408aad 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -1,6 +1,4 @@ -""" -Classes for representing Vuforia reports. -""" +"""Classes for representing Vuforia reports.""" import datetime from dataclasses import dataclass @@ -86,9 +84,7 @@ class TargetRecord: @beartype @dataclass(frozen=True) class TargetData: - """ - The target data optionally included with a query match. - """ + """The target data optionally included with a query match.""" name: str application_metadata: str | None diff --git a/src/vws/response.py b/src/vws/response.py index 269f2e23f..e2060cb9e 100644 --- a/src/vws/response.py +++ b/src/vws/response.py @@ -1,6 +1,4 @@ -""" -Responses for requests to VWS and VWQ. -""" +"""Responses for requests to VWS and VWQ.""" from dataclasses import dataclass @@ -10,9 +8,7 @@ @dataclass(frozen=True) @beartype class Response: - """ - A response from a request. - """ + """A response from a request.""" text: str url: str diff --git a/src/vws/vws.py b/src/vws/vws.py index 8def19ed7..1191ee7df 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -1,6 +1,4 @@ -""" -Tools for interacting with Vuforia APIs. -""" +"""Tools for interacting with Vuforia APIs.""" import base64 import io @@ -52,9 +50,7 @@ @beartype def _get_image_data(image: _ImageType) -> bytes: - """ - Get the data of an image file. - """ + """Get the data of an image file.""" original_tell = image.tell() image.seek(0) image_data = image.read() @@ -131,9 +127,7 @@ def _target_api_request( @beartype(conf=BeartypeConf(is_pep484_tower=True)) class VWS: - """ - An interface to Vuforia Web Services APIs. - """ + """An interface to Vuforia Web Services APIs.""" def __init__( self, diff --git a/tests/__init__.py b/tests/__init__.py index c7e38a862..3502d86d5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +1 @@ -""" -Tests for ``vws``. -""" +"""Tests for ``vws``.""" diff --git a/tests/conftest.py b/tests/conftest.py index 74c6fc56d..7c0647786 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,4 @@ -""" -Configuration, plugins and fixtures for `pytest`. -""" +"""Configuration, plugins and fixtures for `pytest`.""" import io from collections.abc import Generator @@ -16,9 +14,7 @@ @pytest.fixture(name="_mock_database") def fixture_mock_database() -> Generator[VuforiaDatabase]: - """ - Yield a mock ``VuforiaDatabase``. - """ + """Yield a mock ``VuforiaDatabase``.""" # We use a low processing time so that tests run quickly. with MockVWS(processing_time_seconds=0.2) as mock: database = VuforiaDatabase() @@ -28,9 +24,7 @@ def fixture_mock_database() -> Generator[VuforiaDatabase]: @pytest.fixture def vws_client(_mock_database: VuforiaDatabase) -> VWS: - """ - A VWS client which connects to a mock database. - """ + """A VWS client which connects to a mock database.""" return VWS( server_access_key=_mock_database.server_access_key, server_secret_key=_mock_database.server_secret_key, @@ -39,9 +33,7 @@ def vws_client(_mock_database: VuforiaDatabase) -> VWS: @pytest.fixture def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: - """ - A ``CloudRecoService`` client which connects to a mock database. - """ + """A ``CloudRecoService`` client which connects to a mock database.""" return CloudRecoService( client_access_key=_mock_database.client_access_key, client_secret_key=_mock_database.client_secret_key, @@ -54,9 +46,7 @@ def fixture_image_file( tmp_path: Path, request: pytest.FixtureRequest, ) -> Generator[BinaryIO]: - """ - An image file object. - """ + """An image file object.""" file = tmp_path / "image.jpg" buffer = high_quality_image.getvalue() file.write_bytes(data=buffer) @@ -71,9 +61,7 @@ def image( high_quality_image: io.BytesIO, image_file: BinaryIO, ) -> io.BytesIO | BinaryIO: - """ - An image in any of the types that the API accepts. - """ + """An image in any of the types that the API accepts.""" if request.param == "high_quality_image": return high_quality_image return image_file diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 3515b0d22..d4c8cb0f7 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -1,6 +1,4 @@ -""" -Tests for exceptions raised when using the CloudRecoService. -""" +"""Tests for exceptions raised when using the CloudRecoService.""" import io import uuid @@ -63,9 +61,7 @@ def test_image_too_large( def test_cloudrecoexception_inheritance() -> None: - """ - CloudRecoService-specific exceptions inherit from CloudRecoException. - """ + """CloudRecoService-specific exceptions inherit from CloudRecoException.""" subclasses = [ MaxNumResultsOutOfRangeError, InactiveProjectError, diff --git a/tests/test_query.py b/tests/test_query.py index e229cf95d..11b803eb5 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,6 +1,4 @@ -""" -Tests for the ``CloudRecoService`` querying functionality. -""" +"""Tests for the ``CloudRecoService`` querying functionality.""" import io import uuid @@ -14,18 +12,14 @@ class TestQuery: - """ - Tests for making image queries. - """ + """Tests for making image queries.""" @staticmethod def test_no_matches( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - An empty list is returned if there are no matches. - """ + """An empty list is returned if there are no matches.""" result = cloud_reco_client.query(image=image) assert result == [] @@ -35,9 +29,7 @@ def test_match( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - Details of matching targets are returned. - """ + """Details of matching targets are returned.""" target_id = vws_client.add_target( name="x", width=1, @@ -51,9 +43,7 @@ def test_match( class TestCustomBaseVWQURL: - """ - Tests for using a custom base VWQ URL. - """ + """Tests for using a custom base VWQ URL.""" @staticmethod def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: @@ -93,9 +83,7 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: class TestMaxNumResults: - """ - Tests for the ``max_num_results`` parameter of ``query``. - """ + """Tests for the ``max_num_results`` parameter of ``query``.""" @staticmethod def test_default( @@ -103,9 +91,7 @@ def test_default( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - By default the maximum number of results is 1. - """ + """By default the maximum number of results is 1.""" target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, @@ -131,9 +117,7 @@ def test_custom( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to set a custom ``max_num_results``. - """ + """It is possible to set a custom ``max_num_results``.""" target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, @@ -167,9 +151,7 @@ def test_custom( class TestIncludeTargetData: - """ - Tests for the ``include_target_data`` parameter of ``query``. - """ + """Tests for the ``include_target_data`` parameter of ``query``.""" @staticmethod def test_default( @@ -177,9 +159,7 @@ def test_default( cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: - """ - By default, target data is only returned in the top match. - """ + """By default, target data is only returned in the top match.""" target_id = vws_client.add_target( name=uuid.uuid4().hex, width=1, diff --git a/tests/test_vws.py b/tests/test_vws.py index e16eff555..d427e1c9b 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -1,6 +1,4 @@ -""" -Tests for helper functions for managing a Vuforia database. -""" +"""Tests for helper functions for managing a Vuforia database.""" import base64 import datetime @@ -25,9 +23,7 @@ class TestAddTarget: - """ - Tests for adding a target. - """ + """Tests for adding a target.""" @staticmethod @pytest.mark.parametrize( @@ -43,9 +39,7 @@ def test_add_target( *, active_flag: bool, ) -> None: - """ - No exception is raised when adding one target. - """ + """No exception is raised when adding one target.""" name = "x" width = 1 if application_metadata is None: @@ -98,9 +92,7 @@ def test_add_two_targets( class TestCustomBaseVWSURL: - """ - Tests for using a custom base VWS URL. - """ + """Tests for using a custom base VWS URL.""" @staticmethod def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: @@ -128,18 +120,14 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: class TestListTargets: - """ - Tests for listing targets. - """ + """Tests for listing targets.""" @staticmethod def test_list_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to get a list of target IDs. - """ + """It is possible to get a list of target IDs.""" id_1 = vws_client.add_target( name="x", width=1, @@ -158,18 +146,14 @@ def test_list_targets( class TestDelete: - """ - Test for deleting a target. - """ + """Test for deleting a target.""" @staticmethod def test_delete_target( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to delete a target. - """ + """It is possible to delete a target.""" target_id = vws_client.add_target( name="x", width=1, @@ -185,18 +169,14 @@ def test_delete_target( class TestGetTargetSummaryReport: - """ - Tests for getting a summary report for a target. - """ + """Tests for getting a summary report for a target.""" @staticmethod def test_get_target_summary_report( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - Details of a target are returned by ``get_target_summary_report``. - """ + """Details of a target are returned by ``get_target_summary_report``.""" date = "2018-04-25" target_name = uuid.uuid4().hex with freeze_time(time_to_freeze=date): @@ -240,15 +220,11 @@ def test_get_target_summary_report( class TestGetDatabaseSummaryReport: - """ - Tests for getting a summary report for a database. - """ + """Tests for getting a summary report for a database.""" @staticmethod def test_get_target(vws_client: VWS) -> None: - """ - Details of a database are returned by ``get_database_summary_report``. - """ + """Details of a database are returned by ``get_database_summary_report``.""" report = vws_client.get_database_summary_report() expected_report = DatabaseSummaryReport( @@ -287,18 +263,14 @@ def test_get_target(vws_client: VWS) -> None: class TestGetTargetRecord: - """ - Tests for getting a record of a target. - """ + """Tests for getting a record of a target.""" @staticmethod def test_get_target_record( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - Details of a target are returned by ``get_target_record``. - """ + """Details of a target are returned by ``get_target_record``.""" target_id = vws_client.add_target( name="x", width=1, @@ -344,9 +316,7 @@ def test_get_failed( vws_client: VWS, image_file_failed_state: io.BytesIO, ) -> None: - """ - Check that the report works with a failed target. - """ + """Check that the report works with a failed target.""" target_id = vws_client.add_target( name="x", width=1, @@ -362,18 +332,14 @@ def test_get_failed( class TestWaitForTargetProcessed: - """ - Tests for waiting for a target to be processed. - """ + """Tests for waiting for a target to be processed.""" @staticmethod def test_wait_for_target_processed( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to wait until a target is processed. - """ + """It is possible to wait until a target is processed.""" target_id = vws_client.add_target( name="x", width=1, @@ -391,9 +357,7 @@ def test_wait_for_target_processed( def test_default_seconds_between_requests( image: io.BytesIO | BinaryIO, ) -> None: - """ - By default, 0.2 seconds are waited between polling requests. - """ + """By default, 0.2 seconds are waited between polling requests.""" with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -443,9 +407,7 @@ def test_default_seconds_between_requests( def test_custom_seconds_between_requests( image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to customize the time waited between polling requests. - """ + """It is possible to customize the time waited between polling requests.""" with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -493,9 +455,7 @@ def test_custom_seconds_between_requests( @staticmethod def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: - """ - It is possible to set a maximum timeout. - """ + """It is possible to set a maximum timeout.""" with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -531,18 +491,14 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: class TestGetDuplicateTargets: - """ - Tests for getting duplicate targets. - """ + """Tests for getting duplicate targets.""" @staticmethod def test_get_duplicate_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to get the IDs of similar targets. - """ + """It is possible to get the IDs of similar targets.""" target_id = vws_client.add_target( name="x", width=1, @@ -565,9 +521,7 @@ def test_get_duplicate_targets( class TestUpdateTarget: - """ - Tests for updating a target. - """ + """Tests for updating a target.""" @staticmethod def test_update_target( @@ -576,9 +530,7 @@ def test_update_target( different_high_quality_image: io.BytesIO, cloud_reco_client: CloudRecoService, ) -> None: - """ - It is possible to update a target. - """ + """It is possible to update a target.""" old_name = uuid.uuid4().hex old_width = secrets.choice(seq=range(1, 5000)) / 100 target_id = vws_client.add_target( @@ -635,9 +587,7 @@ def test_no_fields_given( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """ - It is possible to give no update fields. - """ + """It is possible to give no update fields.""" target_id = vws_client.add_target( name="x", width=1, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 86da66040..eb5b12a6f 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -1,6 +1,4 @@ -""" -Tests for VWS exceptions. -""" +"""Tests for VWS exceptions.""" import io import uuid @@ -98,9 +96,7 @@ def test_request_quota_reached() -> None: def test_fail(high_quality_image: io.BytesIO) -> None: - """ - A ``Fail`` exception is raised when the server access key does not exist. - """ + """A ``Fail`` exception is raised when the server access key does not exist.""" with MockVWS(): vws_client = VWS( server_access_key=uuid.uuid4().hex, @@ -120,9 +116,7 @@ def test_fail(high_quality_image: io.BytesIO) -> None: def test_bad_image(vws_client: VWS) -> None: - """ - A ``BadImage`` exception is raised when a non-image is given. - """ + """A ``BadImage`` exception is raised when a non-image is given.""" not_an_image = io.BytesIO(initial_bytes=b"Not an image") with pytest.raises(expected_exception=BadImageError) as exc: vws_client.add_target( @@ -325,9 +319,7 @@ def test_target_status_not_success( def test_vwsexception_inheritance() -> None: - """ - VWS-related exceptions should inherit from VWSException. - """ + """VWS-related exceptions should inherit from VWSException.""" subclasses = [ AuthenticationFailureError, BadImageError, @@ -354,9 +346,7 @@ def test_base_exception( vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: - """ - ``VWSException``s has a response property. - """ + """``VWSException``s has a response property.""" with pytest.raises(expected_exception=VWSError) as exc: vws_client.get_target_record(target_id="a") From 945db40a65fdb13147c726da0a2a087654b7ae9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:47:57 +0000 Subject: [PATCH 1192/1638] Bump doccmd from 2026.1.3.2 to 2026.1.12 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.3.2 to 2026.1.12. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.03.2...2026.01.12) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.12 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3f7f5df0a..d874c44da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.3.2", + "doccmd==2026.1.12", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.12.19", From 7478c49044f21f350c1db4ca0a1863823ce78fab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:48:08 +0000 Subject: [PATCH 1193/1638] Bump pyrefly from 0.47.0 to 0.48.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.47.0 to 0.48.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.47.0...0.48.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.48.0 dependency-type: direct:development 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 3f7f5df0a..610bfaa4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.47.0", + "pyrefly==0.48.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 9039ba75145fd1d0f17a90de71f67d1dc5300c8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 10:33:29 +0000 Subject: [PATCH 1194/1638] Bump prek from 0.2.27 to 0.2.28 Bumps [prek](https://github.com/j178/prek) from 0.2.27 to 0.2.28. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.2.27...v0.2.28) --- updated-dependencies: - dependency-name: prek dependency-version: 0.2.28 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 36d0acb22..0fbeab8f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.2.27", + "prek==0.2.28", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.4", From b17fdfd6c22125d139abc9154e9d8b490b106bd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 10:33:39 +0000 Subject: [PATCH 1195/1638] Bump ty from 0.0.11 to 0.0.12 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.11 to 0.0.12. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.11...0.0.12) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.12 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0fbeab8f2..2b9f2ef24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.11", + "ty==0.0.12", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 2e312c4064e509a7dcd64ea00e70a8a6687e08d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 10:33:26 +0000 Subject: [PATCH 1196/1638] Bump zizmor from 1.20.0 to 1.21.0 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.20.0 to 1.21.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.20.0...v1.21.0) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.21.0 dependency-type: direct:development 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 2b9f2ef24..06a1d0d86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ optional-dependencies.dev = [ "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.20.0", + "zizmor==1.21.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 6d3b483bd9bf2da8d6ff8ba2be1ef60f2c34f409 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 10:33:39 +0000 Subject: [PATCH 1197/1638] Bump ruff from 0.14.11 to 0.14.13 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.11 to 0.14.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/0.14.11...0.14.13) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.13 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2b9f2ef24..e2b49e137 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.11", + "ruff==0.14.13", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From fc0837e96106557f57bc41068fac7601936a353c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 10:33:50 +0000 Subject: [PATCH 1198/1638] Bump pyrefly from 0.48.0 to 0.48.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.48.0 to 0.48.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.48.0...0.48.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.48.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2b9f2ef24..8d922aa34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.48.0", + "pyrefly==0.48.1", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 23d947e07bfca1279087f06c81106a0dd9379f04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 12:03:18 +0000 Subject: [PATCH 1199/1638] Bump sphinx from 9.0.4 to 9.1.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 9.0.4 to 9.1.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v9.0.4...v9.1.0) --- updated-dependencies: - dependency-name: sphinx dependency-version: 9.1.0 dependency-type: direct:development 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 6c79db287..11864b58c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ optional-dependencies.dev = [ # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.11.0.1", "shfmt-py==3.12.0.2", - "sphinx==9.0.4", + "sphinx==9.1.0", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", From 4e56a7d0e7c1a23fa8c93cf5587ada8704ce58e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 12:03:25 +0000 Subject: [PATCH 1200/1638] Bump zizmor from 1.21.0 to 1.22.0 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.21.0 to 1.22.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.21.0...v1.22.0) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.22.0 dependency-type: direct:development 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 6c79db287..e092671fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ optional-dependencies.dev = [ "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.21.0", + "zizmor==1.22.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 35e943c0e7d1d4215dc64ce8c979ecca29f8120a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 12:03:32 +0000 Subject: [PATCH 1201/1638] Bump prek from 0.2.28 to 0.2.30 Bumps [prek](https://github.com/j178/prek) from 0.2.28 to 0.2.30. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.2.28...v0.2.30) --- updated-dependencies: - dependency-name: prek dependency-version: 0.2.30 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c79db287..14fcad18f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.2.28", + "prek==0.2.30", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.4", From a3258f9fe66afc5c4e9dac1ef54be1638ffea95e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 12:03:39 +0000 Subject: [PATCH 1202/1638] Bump doccmd from 2026.1.12 to 2026.1.18 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.12 to 2026.1.18. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.12...2026.01.18) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.18 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c79db287..de7350677 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.12", + "doccmd==2026.1.18", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.12.19", From 6ea2afc8233a4c7263ec4eab5dbc2884a6b4ad82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 12:03:45 +0000 Subject: [PATCH 1203/1638] Bump pyrefly from 0.48.1 to 0.48.2 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.48.1 to 0.48.2. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.48.1...0.48.2) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.48.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c79db287..a0c047b0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.48.1", + "pyrefly==0.48.2", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 3f381a829f30a55ac2a598db8f976869db2b0b47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 10:33:13 +0000 Subject: [PATCH 1204/1638] Bump pyrefly from 0.48.2 to 0.49.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.48.2 to 0.49.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.48.2...0.49.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.49.0 dependency-type: direct:development 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 d4af4571f..dac0450a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.48.2", + "pyrefly==0.49.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 40b14bb7e46129662fdf68db6d7aaba68ede89bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 10:33:30 +0000 Subject: [PATCH 1205/1638] Bump prek from 0.2.30 to 0.3.0 Bumps [prek](https://github.com/j178/prek) from 0.2.30 to 0.3.0. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.2.30...v0.3.0) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.0 dependency-type: direct:development 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 dac0450a4..271d191a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.2.30", + "prek==0.3.0", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.4", From 8ec4f829753f3bf977a1f5a87f1c306f538c1ff9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 10:33:38 +0000 Subject: [PATCH 1206/1638] Bump ty from 0.0.12 to 0.0.13 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.12 to 0.0.13. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.12...0.0.13) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.13 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dac0450a4..c9cf18b4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.12", + "ty==0.0.13", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 46b0a4fc0263ebabd584e1daaa9d9a3281a46f76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 10:33:50 +0000 Subject: [PATCH 1207/1638] Bump doccmd from 2026.1.18 to 2026.1.21.2 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.18 to 2026.1.21.2. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.18...2026.01.21.2) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.21.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dac0450a4..0cedb1bf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.18", + "doccmd==2026.1.21.2", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.12.19", From a130d1beed1315ced58d536005a8e93860102c99 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 22 Jan 2026 17:40:40 +0000 Subject: [PATCH 1208/1638] Use bash shell for Lint step to ensure early failure PowerShell does not fail on intermediate command failures by default. By using bash shell, we ensure that any failing command causes the step to fail immediately. --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0a9661f41..f4c94be57 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -34,6 +34,9 @@ jobs: cache-dependency-glob: '**/pyproject.toml' - name: Lint + # Use bash to ensure the step fails if any command fails. + # PowerShell does not fail on intermediate command failures by default. + shell: bash run: | uv run --extra=dev prek run --all-files --hook-stage pre-commit --verbose uv run --extra=dev prek run --all-files --hook-stage pre-push --verbose From 780a1b13ea766df310f037119c27237ebaaf50b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 10:33:14 +0000 Subject: [PATCH 1209/1638] Bump doccmd from 2026.1.21.2 to 2026.1.22.1 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.21.2 to 2026.1.22.1. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.21.2...2026.01.22.1) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.22.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 470b5cd13..1e9cd363e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.21.2", + "doccmd==2026.1.22.1", "docformatter==1.7.7", "freezegun==1.5.5", "furo==2025.12.19", From 89f628fc9d74cdb25e42e151a3ede8c53ca57823 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 10:33:30 +0000 Subject: [PATCH 1210/1638] Bump ruff from 0.14.13 to 0.14.14 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.13 to 0.14.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/0.14.13...0.14.14) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.14.14 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 470b5cd13..34b9c6d09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.13", + "ruff==0.14.14", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 0ed9be617a157ece3114f783b3d9a5bbfbb9380b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 09:26:34 +0000 Subject: [PATCH 1211/1638] Linewrap with pydocstringformatter --- pyproject.toml | 2 ++ src/vws/exceptions/cloud_reco_exceptions.py | 4 +++- src/vws/exceptions/custom_exceptions.py | 7 +++++-- src/vws/exceptions/vws_exceptions.py | 7 +++++-- tests/test_cloud_reco_exceptions.py | 7 +++++-- tests/test_query.py | 9 ++++++--- tests/test_vws.py | 12 +++++++++--- tests/test_vws_exceptions.py | 19 +++++++++++++------ 8 files changed, 48 insertions(+), 19 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d4a6cbd29..3998bc1a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -346,6 +346,8 @@ typeCheckingMode = "strict" [tool.pydocstringformatter] write = true split-summary-body = false +max-line-length = 79 +linewrap-full-docstring = true [tool.interrogate] fail-under = 100 diff --git a/src/vws/exceptions/cloud_reco_exceptions.py b/src/vws/exceptions/cloud_reco_exceptions.py index 2b20a7220..a59335f14 100644 --- a/src/vws/exceptions/cloud_reco_exceptions.py +++ b/src/vws/exceptions/cloud_reco_exceptions.py @@ -1,4 +1,6 @@ -"""Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs.""" +"""Exceptions which match errors raised by the Vuforia Cloud Recognition Web +APIs. +""" from beartype import beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index 466dfd1cd..e06c20a19 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -1,6 +1,7 @@ """ Exceptions which do not map to errors at -https://developer.vuforia.com/library/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. """ @@ -29,7 +30,9 @@ def response(self) -> Response: @beartype class TargetProcessingTimeoutError(Exception): - """Exception raised when waiting for a target to be processed times out.""" + """Exception raised when waiting for a target to be processed times + out. + """ @beartype diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index a25c2261b..892f6e12f 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -1,7 +1,8 @@ """ Exception raised when Vuforia returns a response with a result code matching one of those documented at -https://developer.vuforia.com/library/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 @@ -29,7 +30,9 @@ def target_id(self) -> str: @beartype class FailError(VWSError): - """Exception raised when Vuforia returns a response with a result code 'Fail'.""" + """Exception raised when Vuforia returns a response with a result code + 'Fail'. + """ @beartype diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index d4c8cb0f7..a9e25338f 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -61,7 +61,9 @@ def test_image_too_large( def test_cloudrecoexception_inheritance() -> None: - """CloudRecoService-specific exceptions inherit from CloudRecoException.""" + """CloudRecoService-specific exceptions inherit from + CloudRecoException. + """ subclasses = [ MaxNumResultsOutOfRangeError, InactiveProjectError, @@ -77,7 +79,8 @@ def test_authentication_failure( high_quality_image: io.BytesIO, ) -> None: """ - An ``AuthenticationFailure`` exception is raised when the client access key + An ``AuthenticationFailure`` exception is raised when the client access + key exists but the client secret key is incorrect. """ database = VuforiaDatabase() diff --git a/tests/test_query.py b/tests/test_query.py index 11b803eb5..10fff3a8c 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -48,7 +48,8 @@ class TestCustomBaseVWQURL: @staticmethod 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 + It is possible to use query a target to a database under a custom + VWQ URL. """ base_vwq_url = "http://example.com" @@ -190,7 +191,8 @@ def test_top( image: io.BytesIO | BinaryIO, ) -> None: """ - When ``CloudRecoIncludeTargetData.TOP`` is given, target data is only + When ``CloudRecoIncludeTargetData.TOP`` is given, target data is + only returned in the top match. """ target_id = vws_client.add_target( @@ -224,7 +226,8 @@ def test_none( image: io.BytesIO | BinaryIO, ) -> None: """ - When ``CloudRecoIncludeTargetData.NONE`` is given, target data is not + When ``CloudRecoIncludeTargetData.NONE`` is given, target data is + not returned in any match. """ target_id = vws_client.add_target( diff --git a/tests/test_vws.py b/tests/test_vws.py index d427e1c9b..73d8e1fdf 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -176,7 +176,9 @@ def test_get_target_summary_report( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """Details of a target are returned by ``get_target_summary_report``.""" + """Details of a target are returned by + ``get_target_summary_report``. + """ date = "2018-04-25" target_name = uuid.uuid4().hex with freeze_time(time_to_freeze=date): @@ -224,7 +226,9 @@ class TestGetDatabaseSummaryReport: @staticmethod def test_get_target(vws_client: VWS) -> None: - """Details of a database are returned by ``get_database_summary_report``.""" + """Details of a database are returned by + ``get_database_summary_report``. + """ report = vws_client.get_database_summary_report() expected_report = DatabaseSummaryReport( @@ -407,7 +411,9 @@ def test_default_seconds_between_requests( def test_custom_seconds_between_requests( image: io.BytesIO | BinaryIO, ) -> None: - """It is possible to customize the time waited between polling requests.""" + """It is possible to customize the time waited between polling + requests. + """ with MockVWS(processing_time_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index eb5b12a6f..496243274 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -40,7 +40,8 @@ def test_image_too_large( png_too_large: io.BytesIO | io.BufferedRandom, ) -> None: """ - When giving an image which is too large, an ``ImageTooLarge`` exception is + When giving an image which is too large, an ``ImageTooLarge`` exception + is raised. """ with pytest.raises(expected_exception=ImageTooLargeError) as exc: @@ -69,7 +70,8 @@ def test_invalid_given_id(vws_client: VWS) -> None: def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ - When a name with a bad character is given, a ``ServerError`` exception is + When a name with a bad character is given, a ``ServerError`` exception + is raised. """ max_char_value = 65535 @@ -96,7 +98,9 @@ def test_request_quota_reached() -> None: def test_fail(high_quality_image: io.BytesIO) -> None: - """A ``Fail`` exception is raised when the server access key does not exist.""" + """A ``Fail`` exception is raised when the server access key does not + exist. + """ with MockVWS(): vws_client = VWS( server_access_key=uuid.uuid4().hex, @@ -135,7 +139,8 @@ def test_target_name_exist( high_quality_image: io.BytesIO, ) -> None: """ - A ``TargetNameExist`` exception is raised after adding two targets with the + A ``TargetNameExist`` exception is raised after adding two targets with + the same name. """ vws_client.add_target( @@ -162,7 +167,8 @@ def test_project_inactive( high_quality_image: io.BytesIO, ) -> None: """ - A ``ProjectInactive`` exception is raised if adding a target to an inactive + A ``ProjectInactive`` exception is raised if adding a target to an + inactive database. """ database = VuforiaDatabase(state=States.PROJECT_INACTIVE) @@ -267,7 +273,8 @@ def test_authentication_failure( high_quality_image: io.BytesIO, ) -> None: """ - An ``AuthenticationFailure`` exception is raised when the server access key + An ``AuthenticationFailure`` exception is raised when the server access + key exists but the server secret key is incorrect, or when a client key is incorrect. """ From e446e04b4352f3d4d1ed82994bec513d0d5cf64d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 09:50:09 +0000 Subject: [PATCH 1212/1638] Un-break URLs --- pyproject.toml | 2 +- src/vws/exceptions/custom_exceptions.py | 3 +-- src/vws/exceptions/vws_exceptions.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3998bc1a9..a37ece588 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -344,7 +344,7 @@ reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" [tool.pydocstringformatter] -write = true +write = false split-summary-body = false max-line-length = 79 linewrap-full-docstring = true diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index e06c20a19..ff20c1b6d 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -1,7 +1,6 @@ """ Exceptions which do not map to errors at -https://developer.vuforia.com/library/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 892f6e12f..c68107d00 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -1,8 +1,7 @@ """ Exception raised when Vuforia returns a response with a result code matching one of those documented at -https://developer.vuforia.com/library/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 From 06de28f492912c6c6cea349964fadc130429f89e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 10:46:10 +0000 Subject: [PATCH 1213/1638] Work around pydocstringformatter issue --- src/vws/exceptions/custom_exceptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index ff20c1b6d..cf3902264 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -1,7 +1,7 @@ -""" -Exceptions which do not map to errors at +"""Exceptions which do not map to errors at the following URL, or simple +errors given by the cloud recognition service. + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes -or simple errors given by the cloud recognition service. """ from beartype import beartype From a820dbdcfabf5fc81a4580e8421dc47f4ea73b98 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 10:50:31 +0000 Subject: [PATCH 1214/1638] Fix ruff ignore comment --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a37ece588..77640c0ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,8 +119,8 @@ lint.select = [ lint.ignore = [ # Ruff warns that this conflicts with the formatter. "COM812", - # Allow our chosen docstring line-style - no one-line summary. - "D200", + # Allow our chosen docstring line-style - pydocstringformatter handles formatting + # but doesn't enforce D205 (blank line after summary) or D212 (summary on first line). "D205", "D212", # Ruff warns that this conflicts with the formatter. From d4fe42e32a2351b9025f0ce53ec04a04dbd712ef Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 10:52:41 +0000 Subject: [PATCH 1215/1638] Write fixes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 77640c0ba..32edef2a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -344,7 +344,7 @@ reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" [tool.pydocstringformatter] -write = false +write = true split-summary-body = false max-line-length = 79 linewrap-full-docstring = true From 31dfe8c1839343f38272d5b4f08fa67c3525bc45 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 11:03:05 +0000 Subject: [PATCH 1216/1638] Re-add D200 to ruff ignores - conflicts with pydocstringformatter at line-length boundary --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 15fb0e3cf..9843058be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,7 +120,9 @@ lint.ignore = [ # Ruff warns that this conflicts with the formatter. "COM812", # Allow our chosen docstring line-style - pydocstringformatter handles formatting - # but doesn't enforce D205 (blank line after summary) or D212 (summary on first line). + # but may conflict with D200 at the line-length boundary, and doesn't enforce + # D205 (blank line after summary) or D212 (summary on first line). + "D200", "D205", "D212", # Ruff warns that this conflicts with the formatter. From 114e0835579deb7d0727a12bb158cefdaa3b235a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 11:03:51 +0000 Subject: [PATCH 1217/1638] Remove D200 ignore by lowering pydocstringformatter line length to 75 --- bun.lock | 14 +++++++++++ example.txt | 0 issue.txt | 28 +++++++++++++++++++++ package.json | 6 +++++ pyproject.toml | 9 ++++--- src/vws/exceptions/base_exceptions.py | 3 ++- src/vws/exceptions/cloud_reco_exceptions.py | 3 ++- src/vws/exceptions/vws_exceptions.py | 6 +++-- src/vws/query.py | 3 ++- src/vws/vws.py | 3 ++- tests/test_cloud_reco_exceptions.py | 6 +++-- tests/test_query.py | 6 +++-- tests/test_vws.py | 6 +++-- tests/test_vws_exceptions.py | 27 +++++++++++++------- 14 files changed, 95 insertions(+), 25 deletions(-) create mode 100644 bun.lock create mode 100644 example.txt create mode 100644 issue.txt create mode 100644 package.json diff --git a/bun.lock b/bun.lock new file mode 100644 index 000000000..45f73b81b --- /dev/null +++ b/bun.lock @@ -0,0 +1,14 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "devDependencies": { + "prettier": "3.7.4", + }, + }, + }, + "packages": { + "prettier": ["prettier@3.7.4", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA=="], + } +} diff --git a/example.txt b/example.txt new file mode 100644 index 000000000..e69de29bb diff --git a/issue.txt b/issue.txt new file mode 100644 index 000000000..abe88bb9b --- /dev/null +++ b/issue.txt @@ -0,0 +1,28 @@ +URLs are broken when reflowing paragraphs + +## Version + +0.7.3 + +## Example + +Input file: + +```python +"""For more information see https://example.com/documentation/api/v2/reference/getting-started#authentication or contact support.""" +``` + +Output after running `pydocstringformatter --linewrap-full-docstring`: + +```diff +--- issue.py ++++ issue.py +@@ -1,2 +1,5 @@ +-"""For more information see https://example.com/documentation/api/v2/reference/getting-started#authentication or contact support.""" ++"""For more information see https://example.com/documentation/api/v2/reference/getting-. ++ ++started#authentication or contact support. ++""" +``` + +The URL is broken across two lines, making it impossible to click. diff --git a/package.json b/package.json new file mode 100644 index 000000000..71b8ee1ef --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": {}, + "devDependencies": { + "prettier": "3.7.4" + } +} diff --git a/pyproject.toml b/pyproject.toml index 9843058be..55238906d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,9 +120,7 @@ lint.ignore = [ # Ruff warns that this conflicts with the formatter. "COM812", # Allow our chosen docstring line-style - pydocstringformatter handles formatting - # but may conflict with D200 at the line-length boundary, and doesn't enforce - # D205 (blank line after summary) or D212 (summary on first line). - "D200", + # but doesn't enforce D205 (blank line after summary) or D212 (summary on first line). "D205", "D212", # Ruff warns that this conflicts with the formatter. @@ -348,7 +346,10 @@ typeCheckingMode = "strict" [tool.pydocstringformatter] write = true split-summary-body = false -max-line-length = 79 +# Use a lower line length than ruff (79) to avoid conflicts with D200 - +# pydocstringformatter would otherwise split docstrings at exactly 79 chars +# which ruff considers should stay on one line. +max-line-length = 75 linewrap-full-docstring = true [tool.interrogate] diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index c86080593..fa031838a 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -1,5 +1,6 @@ """ -Base exceptions for errors returned by Vuforia Web Services or the Vuforia +Base exceptions for errors returned by Vuforia Web Services or the +Vuforia Cloud Recognition Web API. """ diff --git a/src/vws/exceptions/cloud_reco_exceptions.py b/src/vws/exceptions/cloud_reco_exceptions.py index a59335f14..b2e3ee67f 100644 --- a/src/vws/exceptions/cloud_reco_exceptions.py +++ b/src/vws/exceptions/cloud_reco_exceptions.py @@ -1,4 +1,5 @@ -"""Exceptions which match errors raised by the Vuforia Cloud Recognition Web +"""Exceptions which match errors raised by the Vuforia Cloud Recognition +Web APIs. """ diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index c68107d00..6b1447577 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -1,7 +1,9 @@ """ -Exception raised when Vuforia returns a response with a result code matching +Exception raised when Vuforia returns a response with a result code +matching one of those documented at -https://developer.vuforia.com/library/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 ab449c614..6c2dc481e 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -68,7 +68,8 @@ def query( CloudRecoIncludeTargetData.TOP ), ) -> list[QueryResult]: - """Use the Vuforia Web Query API to make an Image Recognition Query. + """Use the Vuforia Web Query API to make an Image Recognition + Query. See https://developer.vuforia.com/library/web-api/vuforia-query-web-api diff --git a/src/vws/vws.py b/src/vws/vws.py index 1191ee7df..9b3d19b4e 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -567,7 +567,8 @@ def delete_target(self, target_id: str) -> None: ) def get_duplicate_targets(self, target_id: str) -> list[str]: - """Get targets which may be considered duplicates of a given target. + """Get targets which may be considered duplicates of a given + target. See https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#check. diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index a9e25338f..5576f4d40 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -49,7 +49,8 @@ def test_image_too_large( png_too_large: io.BytesIO | io.BufferedRandom, ) -> None: """ - A ``RequestEntityTooLarge`` exception is raised if an image which is too + A ``RequestEntityTooLarge`` exception is raised if an image which is + too large is given. """ with pytest.raises(expected_exception=RequestEntityTooLargeError) as exc: @@ -79,7 +80,8 @@ def test_authentication_failure( high_quality_image: io.BytesIO, ) -> None: """ - An ``AuthenticationFailure`` exception is raised when the client access + An ``AuthenticationFailure`` exception is raised when the client + access key exists but the client secret key is incorrect. """ diff --git a/tests/test_query.py b/tests/test_query.py index 10fff3a8c..a79a712c0 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -48,7 +48,8 @@ class TestCustomBaseVWQURL: @staticmethod def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: """ - It is possible to use query a target to a database under a custom + It is possible to use query a target to a database under a + custom VWQ URL. """ @@ -226,7 +227,8 @@ def test_none( image: io.BytesIO | BinaryIO, ) -> None: """ - When ``CloudRecoIncludeTargetData.NONE`` is given, target data is + When ``CloudRecoIncludeTargetData.NONE`` is given, target data + is not returned in any match. """ diff --git a/tests/test_vws.py b/tests/test_vws.py index 73d8e1fdf..00936bde8 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -77,7 +77,8 @@ def test_add_two_targets( vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: - """No exception is raised when adding two targets with different names. + """No exception is raised when adding two targets with different + names. This demonstrates that the image seek position is not changed. """ @@ -97,7 +98,8 @@ class TestCustomBaseVWSURL: @staticmethod 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 + It is possible to use add a target to a database under a custom + VWS URL. """ base_vws_url = "http://example.com" diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 496243274..4262b3ea6 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -40,7 +40,8 @@ def test_image_too_large( png_too_large: io.BytesIO | io.BufferedRandom, ) -> None: """ - When giving an image which is too large, an ``ImageTooLarge`` exception + When giving an image which is too large, an ``ImageTooLarge`` + exception is raised. """ @@ -58,7 +59,8 @@ def test_image_too_large( def test_invalid_given_id(vws_client: VWS) -> None: """ - Giving an invalid ID to a helper which requires a target ID to be given + Giving an invalid ID to a helper which requires a target ID to be + given causes an ``UnknownTarget`` exception to be raised. """ target_id = "12345abc" @@ -70,7 +72,8 @@ def test_invalid_given_id(vws_client: VWS) -> None: def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None: """ - When a name with a bad character is given, a ``ServerError`` exception + When a name with a bad character is given, a ``ServerError`` + exception is raised. """ @@ -139,7 +142,8 @@ def test_target_name_exist( high_quality_image: io.BytesIO, ) -> None: """ - A ``TargetNameExist`` exception is raised after adding two targets with + A ``TargetNameExist`` exception is raised after adding two targets + with the same name. """ @@ -196,7 +200,8 @@ def test_target_status_processing( high_quality_image: io.BytesIO, ) -> None: """ - A ``TargetStatusProcessing`` exception is raised if trying to delete a + A ``TargetStatusProcessing`` exception is raised if trying to delete + a target which is processing. """ target_id = vws_client.add_target( @@ -219,7 +224,8 @@ def test_metadata_too_large( high_quality_image: io.BytesIO, ) -> None: """ - A ``MetadataTooLarge`` exception is raised if the metadata given is too + A ``MetadataTooLarge`` exception is raised if the metadata given is + too large. """ with pytest.raises(expected_exception=MetadataTooLargeError) as exc: @@ -239,7 +245,8 @@ def test_request_time_too_skewed( high_quality_image: io.BytesIO, ) -> None: """ - A ``RequestTimeTooSkewed`` exception is raised when the request time is + A ``RequestTimeTooSkewed`` exception is raised when the request time + is more than five minutes different from the server time. """ target_id = vws_client.add_target( @@ -273,7 +280,8 @@ def test_authentication_failure( high_quality_image: io.BytesIO, ) -> None: """ - An ``AuthenticationFailure`` exception is raised when the server access + An ``AuthenticationFailure`` exception is raised when the server + access key exists but the server secret key is incorrect, or when a client key is incorrect. @@ -307,7 +315,8 @@ def test_target_status_not_success( high_quality_image: io.BytesIO, ) -> None: """ - A ``TargetStatusNotSuccess`` exception is raised when updating a target + A ``TargetStatusNotSuccess`` exception is raised when updating a + target which has a status which is not "Success". """ target_id = vws_client.add_target( From 7f330219e793b08895ff78a54052b950d3fc3254 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 11:04:20 +0000 Subject: [PATCH 1218/1638] Remove unrelated test files --- bun.lock | 14 -------------- example.txt | 0 issue.txt | 28 ---------------------------- package.json | 6 ------ 4 files changed, 48 deletions(-) delete mode 100644 bun.lock delete mode 100644 example.txt delete mode 100644 issue.txt delete mode 100644 package.json diff --git a/bun.lock b/bun.lock deleted file mode 100644 index 45f73b81b..000000000 --- a/bun.lock +++ /dev/null @@ -1,14 +0,0 @@ -{ - "lockfileVersion": 1, - "configVersion": 1, - "workspaces": { - "": { - "devDependencies": { - "prettier": "3.7.4", - }, - }, - }, - "packages": { - "prettier": ["prettier@3.7.4", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA=="], - } -} diff --git a/example.txt b/example.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/issue.txt b/issue.txt deleted file mode 100644 index abe88bb9b..000000000 --- a/issue.txt +++ /dev/null @@ -1,28 +0,0 @@ -URLs are broken when reflowing paragraphs - -## Version - -0.7.3 - -## Example - -Input file: - -```python -"""For more information see https://example.com/documentation/api/v2/reference/getting-started#authentication or contact support.""" -``` - -Output after running `pydocstringformatter --linewrap-full-docstring`: - -```diff ---- issue.py -+++ issue.py -@@ -1,2 +1,5 @@ --"""For more information see https://example.com/documentation/api/v2/reference/getting-started#authentication or contact support.""" -+"""For more information see https://example.com/documentation/api/v2/reference/getting-. -+ -+started#authentication or contact support. -+""" -``` - -The URL is broken across two lines, making it impossible to click. diff --git a/package.json b/package.json deleted file mode 100644 index 71b8ee1ef..000000000 --- a/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": {}, - "devDependencies": { - "prettier": "3.7.4" - } -} From 98aae9197c8181b2f85e10501391cf6c6e00a8a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:37:16 +0000 Subject: [PATCH 1219/1638] Bump doccmd from 2026.1.22.1 to 2026.1.25 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.22.1 to 2026.1.25. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.22.1...2026.01.25) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.25 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 55238906d..c40ae9b46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.22.1", + "doccmd==2026.1.25", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 1d9fb85fb1d106930476ce6d385f6878d748cd16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:37:24 +0000 Subject: [PATCH 1220/1638] Bump pydocstringformatter from 0.7.3 to 0.7.5 Bumps [pydocstringformatter](https://github.com/DanielNoord/pydocstringformatter) from 0.7.3 to 0.7.5. - [Release notes](https://github.com/DanielNoord/pydocstringformatter/releases) - [Commits](https://github.com/DanielNoord/pydocstringformatter/compare/v0.7.3...v0.7.5) --- updated-dependencies: - dependency-name: pydocstringformatter dependency-version: 0.7.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 55238906d..8af403249 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", "prek==0.3.0", - "pydocstringformatter==0.7.3", + "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", "pylint[spelling]==4.0.4", From 099a85381d6547554c43b99c1cdfa2bb41b35c7a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 12:23:38 +0000 Subject: [PATCH 1221/1638] Remove --example-workers 0 due to mypy bug See https://github.com/python/mypy/issues/18283 --- .pre-commit-config.yaml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b48bc64c..49e946718 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,8 @@ --- fail_fast: true +# We do not use --example-workers 0 due to https://github.com/python/mypy/issues/18283 + # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks @@ -122,8 +124,8 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=shell - --language=console --command="shellcheck --shell=bash" + entry: uv run --extra=dev doccmd --no-write-to-file --language=shell --language=console + --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -158,8 +160,7 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python - --command="mypy" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -184,8 +185,7 @@ repos: - id: pyright-docs name: pyright-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python - --command="pyright" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyright" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -201,8 +201,7 @@ repos: - id: vulture-docs name: vulture docs - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python - --command="vulture" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="vulture" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -235,8 +234,7 @@ repos: - id: pylint-docs name: pylint-docs - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python - --command="pylint" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pylint" language: python stages: [manual] types_or: [markdown, rst] @@ -293,8 +291,7 @@ repos: - id: interrogate-docs name: interrogate docs - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python - --command="interrogate" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="interrogate" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -358,8 +355,8 @@ repos: - id: ty-docs name: ty-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python - --command="ty check" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="ty + check" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -401,8 +398,8 @@ repos: - id: pyrefly-docs name: pyrefly-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python - --command="pyrefly check" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyrefly + check" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] From fce3a97d981c50cb42a704de6f8b2f8d92aafb07 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 12:40:25 +0000 Subject: [PATCH 1222/1638] Fix: Remove --example-workers 0 only from mypy-docs hook This reverts the previous incorrect change that removed --example-workers 0 from all hooks, and correctly removes it only from mypy-docs. See https://github.com/python/mypy/issues/18283 --- .pre-commit-config.yaml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49e946718..0126b809a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,6 @@ --- fail_fast: true -# We do not use --example-workers 0 due to https://github.com/python/mypy/issues/18283 - # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks @@ -124,8 +122,8 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=shell --language=console - --command="shellcheck --shell=bash" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=shell + --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -160,7 +158,8 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python + --command="mypy" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -185,7 +184,8 @@ repos: - id: pyright-docs name: pyright-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyright" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pyright" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -201,7 +201,8 @@ repos: - id: vulture-docs name: vulture docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="vulture" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="vulture" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -234,7 +235,8 @@ repos: - id: pylint-docs name: pylint-docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pylint" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pylint" language: python stages: [manual] types_or: [markdown, rst] @@ -291,7 +293,8 @@ repos: - id: interrogate-docs name: interrogate docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="interrogate" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="interrogate" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -355,8 +358,8 @@ repos: - id: ty-docs name: ty-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="ty - check" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="ty check" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -398,8 +401,8 @@ repos: - id: pyrefly-docs name: pyrefly-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyrefly - check" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pyrefly check" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] From 4a5ce8e7c7572ce6809784976f2cffdc3346aeef 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, 26 Jan 2026 12:42:29 +0000 Subject: [PATCH 1223/1638] [pre-commit.ci lite] apply automatic fixes --- .pre-commit-config.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0126b809a..9bb1ad683 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -158,8 +158,7 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python - --command="mypy" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] From 2a9c9f60296dc392004d5d8fdbee2f2ed6d2d094 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 12:46:08 +0000 Subject: [PATCH 1224/1638] Add comment explaining why --example-workers 0 is not used for mypy-docs --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9bb1ad683..c64693b9d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -155,6 +155,7 @@ repos: pass_filenames: false additional_dependencies: [uv==0.9.5] + # We do not use --example-workers 0 due to https://github.com/python/mypy/issues/18283 - id: mypy-docs name: mypy-docs stages: [pre-push] From 90cd53bb3a690f83d6c1edc3e42db6b4dc3f61a1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 27 Jan 2026 04:31:17 +0000 Subject: [PATCH 1225/1638] Support Python 3.14 --- .github/workflows/ci.yml | 2 +- pyproject.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca86af4b1..2bec50283 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: build: strategy: matrix: - python-version: ['3.13'] + python-version: ['3.13', '3.14'] platform: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} diff --git a/pyproject.toml b/pyproject.toml index 3d1113d2c..3b6366fb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ classifiers = [ "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] dynamic = [ "version", @@ -311,7 +312,7 @@ pep621_dev_dependency_groups = [ [tool.pyproject-fmt] indent = 4 keep_full_version = true -max_supported_python = "3.13" +max_supported_python = "3.14" [tool.pytest.ini_options] From 03aea77ffa3add893acce8b0152a3d5238742c98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 10:31:24 +0000 Subject: [PATCH 1226/1638] Bump doccmd from 2026.1.25 to 2026.1.27.2 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.25 to 2026.1.27.2. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.25...2026.01.27.2) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.27.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b6366fb6..1787e4339 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.25", + "doccmd==2026.1.27.2", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 37d14fb090552481e9eceb495c972c35b8c16625 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 10:31:36 +0000 Subject: [PATCH 1227/1638] Bump ty from 0.0.13 to 0.0.14 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.13 to 0.0.14. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.13...0.0.14) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.14 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b6366fb6..6edd655cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.13", + "ty==0.0.14", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2025.3.10.1", From ae28c2d82d69580211ab889d3b3cc78cceea10e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 10:31:41 +0000 Subject: [PATCH 1228/1638] Bump pyrefly from 0.49.0 to 0.50.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.49.0 to 0.50.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.49.0...0.50.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.50.0 dependency-type: direct:development 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 3b6366fb6..a9b0825ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.49.0", + "pyrefly==0.50.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 5945d15615a27ad04ae4267e19a16a19e188be7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:33:09 +0000 Subject: [PATCH 1229/1638] Bump doccmd from 2026.1.27.2 to 2026.1.28 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.27.2 to 2026.1.28. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.27.2...2026.01.28) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.28 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1971da3c..3d34fe0f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.27.2", + "doccmd==2026.1.28", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From e3f97fd96995842c48480fae8c124431b353b969 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 10:33:07 +0000 Subject: [PATCH 1230/1638] Bump pyrefly from 0.50.0 to 0.50.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.50.0 to 0.50.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.50.0...0.50.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.50.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3d34fe0f9..9f1747298 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.11.1", - "pyrefly==0.50.0", + "pyrefly==0.50.1", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 13376509e7e766b0953355279b65ddaefdfdf0f8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 2 Feb 2026 11:40:32 +0000 Subject: [PATCH 1231/1638] Add custom request timeout support for VWS and CloudRecoService Allow users to configure request timeouts instead of using a hardcoded 30-second default. Both VWS and CloudRecoService now accept an optional request_timeout_seconds parameter during initialization, with proper defaults and documentation. Co-Authored-By: Claude Haiku 4.5 --- src/vws/query.py | 7 +++++-- src/vws/vws.py | 10 ++++++++-- tests/test_query.py | 48 +++++++++++++++++++++++++++++++++++++++++++++ tests/test_vws.py | 41 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 102 insertions(+), 4 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index 6c2dc481e..b9d42d4c8 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -49,16 +49,20 @@ def __init__( client_access_key: str, client_secret_key: str, base_vwq_url: str = "https://cloudreco.vuforia.com", + request_timeout_seconds: float = 30.0, ) -> None: """ Args: client_access_key: A VWS client access key. client_secret_key: A VWS client secret key. base_vwq_url: The base URL for the VWQ API. + request_timeout_seconds: The timeout in seconds for each HTTP + request made to the Cloud Reco API. """ self._client_access_key = client_access_key self._client_secret_key = client_secret_key self._base_vwq_url = base_vwq_url + self.request_timeout_seconds = request_timeout_seconds def query( self, @@ -141,8 +145,7 @@ def query( url=urljoin(base=self._base_vwq_url, url=request_path), headers=headers, data=content, - # We should make the timeout customizable. - timeout=30, + timeout=self.request_timeout_seconds, ) response = Response( text=requests_response.text, diff --git a/src/vws/vws.py b/src/vws/vws.py index 9b3d19b4e..82eb7c5bc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -68,6 +68,7 @@ def _target_api_request( data: bytes, request_path: str, base_vws_url: str, + request_timeout_seconds: float, ) -> Response: """Make a request to the Vuforia Target API. @@ -82,6 +83,7 @@ def _target_api_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. + request_timeout_seconds: The timeout in seconds for the request. Returns: The response to the request made by `requests`. @@ -111,8 +113,7 @@ def _target_api_request( url=url, headers=headers, data=data, - # We should make the timeout customizable. - timeout=30, + timeout=request_timeout_seconds, ) return Response( @@ -134,16 +135,20 @@ def __init__( server_access_key: str, server_secret_key: str, base_vws_url: str = "https://vws.vuforia.com", + request_timeout_seconds: float = 30.0, ) -> None: """ Args: server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. base_vws_url: The base URL for the VWS API. + request_timeout_seconds: The timeout in seconds for each HTTP + request made to the VWS API. """ self._server_access_key = server_access_key self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url + self.request_timeout_seconds = request_timeout_seconds def make_request( self, @@ -187,6 +192,7 @@ def make_request( data=data, request_path=request_path, base_vws_url=self._base_vws_url, + request_timeout_seconds=self.request_timeout_seconds, ) if ( diff --git a/tests/test_query.py b/tests/test_query.py index a79a712c0..af9d19799 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -42,6 +42,54 @@ def test_match( assert matching_target.target_id == target_id +class TestCustomRequestTimeout: + """Tests for using a custom request timeout.""" + + @staticmethod + def test_default_timeout() -> None: + """By default, the request timeout is 30 seconds.""" + default_timeout_seconds = 30.0 + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + expected = default_timeout_seconds + assert cloud_reco_client.request_timeout_seconds == expected + + @staticmethod + def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: + """It is possible to set a custom request timeout.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + custom_timeout = 60.5 + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + request_timeout_seconds=custom_timeout, + ) + assert cloud_reco_client.request_timeout_seconds == custom_timeout + + # Verify requests work with the custom timeout + target_id = vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + matches = cloud_reco_client.query(image=image) + assert len(matches) == 1 + + class TestCustomBaseVWQURL: """Tests for using a custom base VWQ URL.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index 00936bde8..25fe7227e 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -92,6 +92,47 @@ def test_add_two_targets( ) +class TestCustomRequestTimeout: + """Tests for using a custom request timeout.""" + + @staticmethod + def test_default_timeout() -> None: + """By default, the request timeout is 30 seconds.""" + default_timeout_seconds = 30.0 + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + expected = default_timeout_seconds + assert vws_client.request_timeout_seconds == expected + + @staticmethod + def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: + """It is possible to set a custom request timeout.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + custom_timeout = 60.5 + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + request_timeout_seconds=custom_timeout, + ) + assert vws_client.request_timeout_seconds == custom_timeout + + # Verify requests work with the custom timeout + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + class TestCustomBaseVWSURL: """Tests for using a custom base VWS URL.""" From 5e1f289b1b491558dc44298e6701d1f27e56d59b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:49:50 +0000 Subject: [PATCH 1232/1638] Bump prek from 0.3.0 to 0.3.1 Bumps [prek](https://github.com/j178/prek) from 0.3.0 to 0.3.1. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.0...v0.3.1) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9f1747298..c01f056ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.0", + "prek==0.3.1", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", From 2504ba117f6b5208e62a714c84e8ff2ba0db68d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:49:56 +0000 Subject: [PATCH 1233/1638] Bump doccmd from 2026.1.28 to 2026.1.31.3 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.28 to 2026.1.31.3. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.28...2026.01.31.3) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.1.31.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9f1747298..9196881ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.28", + "doccmd==2026.1.31.3", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 32c7e2bc767d735827b6a6ef15ed4634764470e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:50:08 +0000 Subject: [PATCH 1234/1638] Bump pyproject-fmt from 2.11.1 to 2.12.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.11.1 to 2.12.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.11.1...pyproject-fmt/2.12.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.12.1 dependency-type: direct:development 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 9f1747298..b24fc8ef8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.11.1", + "pyproject-fmt==2.12.1", "pyrefly==0.50.1", "pyright==1.1.408", "pyroma==5.0.1", From 7f0990fc6cfabefd54e88a485dccf39d9b75ff1c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 2 Feb 2026 11:54:49 +0000 Subject: [PATCH 1235/1638] Add tests that verify timeout is actually enforced Add test_timeout_raises_on_slow_response and test_longer_timeout_succeeds tests to both VWS and CloudRecoService. These tests simulate slow server responses and verify that short timeouts actually raise Timeout exceptions. Co-Authored-By: Claude Opus 4.5 --- tests/test_query.py | 104 ++++++++++++++++++++++++++++++++++++++++++++ tests/test_vws.py | 89 +++++++++++++++++++++++++++++++++++++ 2 files changed, 193 insertions(+) diff --git a/tests/test_query.py b/tests/test_query.py index af9d19799..a3f4c0331 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,9 +1,13 @@ """Tests for the ``CloudRecoService`` querying functionality.""" import io +import time import uuid from typing import BinaryIO +from unittest.mock import patch +import pytest +import requests from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase @@ -89,6 +93,106 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: matches = cloud_reco_client.query(image=image) assert len(matches) == 1 + @staticmethod + def test_timeout_raises_on_slow_response( + image: io.BytesIO | BinaryIO, + ) -> None: + """A short timeout raises an error when the server is slow.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + request_timeout_seconds=0.1, + ) + + target_id = vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + + simulated_slow_threshold = 0.5 + original_request = requests.request + + def slow_request( + *args: object, + **kwargs: float | None, + ) -> requests.Response: + """Simulate a slow server response.""" + timeout = kwargs.get("timeout") + if timeout is not None and timeout < simulated_slow_threshold: + time.sleep(0.2) + raise requests.exceptions.Timeout + return original_request(*args, **kwargs) # type: ignore[arg-type] + + with ( + patch.object( + requests, + "request", + side_effect=slow_request, + ), + pytest.raises(requests.exceptions.Timeout), + ): + cloud_reco_client.query(image=image) + + @staticmethod + def test_longer_timeout_succeeds(image: io.BytesIO | BinaryIO) -> None: + """A longer timeout allows slow responses to complete.""" + simulated_slow_threshold = 0.5 + + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + request_timeout_seconds=1.0, + ) + + target_id = vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + + original_request = requests.request + + def slow_request( + *args: object, + **kwargs: float | None, + ) -> requests.Response: + """Simulate a slow server response.""" + timeout = kwargs.get("timeout") + if timeout is not None and timeout < simulated_slow_threshold: + time.sleep(0.2) + raise requests.exceptions.Timeout + return original_request(*args, **kwargs) # type: ignore[arg-type] + + with patch.object( + requests, + "request", + side_effect=slow_request, + ): + # This should succeed because timeout is 1.0 > 0.5 + matches = cloud_reco_client.query(image=image) + assert len(matches) == 1 + class TestCustomBaseVWQURL: """Tests for using a custom base VWQ URL.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index 25fe7227e..03b5818b3 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -4,10 +4,13 @@ import datetime import io import secrets +import time import uuid from typing import BinaryIO +from unittest.mock import patch import pytest +import requests from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase @@ -132,6 +135,92 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: application_metadata=None, ) + @staticmethod + def test_timeout_raises_on_slow_response( + image: io.BytesIO | BinaryIO, + ) -> None: + """A short timeout raises an error when the server is slow.""" + simulated_slow_threshold = 0.5 + + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + request_timeout_seconds=0.1, + ) + + original_request = requests.request + + def slow_request( + *args: object, + **kwargs: float | None, + ) -> requests.Response: + """Simulate a slow server response.""" + timeout = kwargs.get("timeout") + if timeout is not None and timeout < simulated_slow_threshold: + time.sleep(0.2) + raise requests.exceptions.Timeout + return original_request(*args, **kwargs) # type: ignore[arg-type] + + with ( + patch.object( + requests, + "request", + side_effect=slow_request, + ), + pytest.raises(requests.exceptions.Timeout), + ): + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + @staticmethod + def test_longer_timeout_succeeds(image: io.BytesIO | BinaryIO) -> None: + """A longer timeout allows slow responses to complete.""" + simulated_slow_threshold = 0.5 + + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + request_timeout_seconds=1.0, + ) + + original_request = requests.request + + def slow_request( + *args: object, + **kwargs: float | None, + ) -> requests.Response: + """Simulate a slow server response.""" + timeout = kwargs.get("timeout") + if timeout is not None and timeout < simulated_slow_threshold: + time.sleep(0.2) + raise requests.exceptions.Timeout + return original_request(*args, **kwargs) # type: ignore[arg-type] + + with patch.object( + requests, + "request", + side_effect=slow_request, + ): + # This should succeed because timeout is 1.0 > 0.5 + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + class TestCustomBaseVWSURL: """Tests for using a custom base VWS URL.""" From 1a930ea8c1c3ac4e1ef130a26592a75815af28ac Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 2 Feb 2026 11:56:10 +0000 Subject: [PATCH 1236/1638] Fix mypy errors in timeout tests Use keyword arguments for patch.object and pytest.raises to satisfy mypy's type checking. Co-Authored-By: Claude Opus 4.5 --- tests/test_query.py | 10 +++++----- tests/test_vws.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index a3f4c0331..6e8247ab1 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -136,11 +136,11 @@ def slow_request( with ( patch.object( - requests, - "request", + target=requests, + attribute="request", side_effect=slow_request, ), - pytest.raises(requests.exceptions.Timeout), + pytest.raises(expected_exception=requests.exceptions.Timeout), ): cloud_reco_client.query(image=image) @@ -185,8 +185,8 @@ def slow_request( return original_request(*args, **kwargs) # type: ignore[arg-type] with patch.object( - requests, - "request", + target=requests, + attribute="request", side_effect=slow_request, ): # This should succeed because timeout is 1.0 > 0.5 diff --git a/tests/test_vws.py b/tests/test_vws.py index 03b5818b3..0f03a1ccf 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -166,11 +166,11 @@ def slow_request( with ( patch.object( - requests, - "request", + target=requests, + attribute="request", side_effect=slow_request, ), - pytest.raises(requests.exceptions.Timeout), + pytest.raises(expected_exception=requests.exceptions.Timeout), ): vws_client.add_target( name="x", @@ -208,8 +208,8 @@ def slow_request( return original_request(*args, **kwargs) # type: ignore[arg-type] with patch.object( - requests, - "request", + target=requests, + attribute="request", side_effect=slow_request, ): # This should succeed because timeout is 1.0 > 0.5 From a0b073dc1f3e3c6a77be8425fa65cac5a49b43df Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 2 Feb 2026 11:56:45 +0000 Subject: [PATCH 1237/1638] Add pyright ignore comments for type checking Co-Authored-By: Claude Opus 4.5 --- tests/test_query.py | 4 ++-- tests/test_vws.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index 6e8247ab1..85b2d03ab 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -132,7 +132,7 @@ def slow_request( if timeout is not None and timeout < simulated_slow_threshold: time.sleep(0.2) raise requests.exceptions.Timeout - return original_request(*args, **kwargs) # type: ignore[arg-type] + return original_request(*args, **kwargs) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] with ( patch.object( @@ -182,7 +182,7 @@ def slow_request( if timeout is not None and timeout < simulated_slow_threshold: time.sleep(0.2) raise requests.exceptions.Timeout - return original_request(*args, **kwargs) # type: ignore[arg-type] + return original_request(*args, **kwargs) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] with patch.object( target=requests, diff --git a/tests/test_vws.py b/tests/test_vws.py index 0f03a1ccf..bbf157b4b 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -162,7 +162,7 @@ def slow_request( if timeout is not None and timeout < simulated_slow_threshold: time.sleep(0.2) raise requests.exceptions.Timeout - return original_request(*args, **kwargs) # type: ignore[arg-type] + return original_request(*args, **kwargs) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] with ( patch.object( @@ -205,7 +205,7 @@ def slow_request( if timeout is not None and timeout < simulated_slow_threshold: time.sleep(0.2) raise requests.exceptions.Timeout - return original_request(*args, **kwargs) # type: ignore[arg-type] + return original_request(*args, **kwargs) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] with patch.object( target=requests, From 06af721e61a9c9c287d86af354479cf546e6c481 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 3 Feb 2026 09:42:35 +0000 Subject: [PATCH 1238/1638] Apply pyproject-fmt formatting changes --- pyproject.toml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b24fc8ef8..706eec1bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,16 +89,16 @@ urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] zip-safe = false -[tool.setuptools.packages.find] -where = [ - "src", -] - [tool.setuptools.package-data] vws = [ "py.typed", ] +[tool.setuptools.packages.find] +where = [ + "src", +] + [tool.distutils.bdist_wheel] universal = true @@ -156,6 +156,12 @@ lint.pydocstyle.convention = "google" [tool.pylint] +[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.'MASTER'] # Pickle collected data for later comparisons. @@ -256,12 +262,6 @@ per-file-ignores = [ "doccmd_README_rst_*.py:invalid-name", ] -[tool.pylint.'FORMAT'] - -# Allow the body of an if to be on the same line as the test if there is no -# else. -single-line-if-stmt = false - [tool.pylint.'SPELLING'] # Spelling dictionary name. Available dictionaries: none. To make it working @@ -319,15 +319,15 @@ max_supported_python = "3.14" xfail_strict = true log_cli = true -[tool.coverage.run] - -branch = true - [tool.coverage.report] exclude_also = [ "if TYPE_CHECKING:", ] +[tool.coverage.run] + +branch = true + [tool.mypy] strict = true From a0091087ce92a6121f720380d92b13d19b820e03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 10:35:06 +0000 Subject: [PATCH 1239/1638] Bump pyrefly from 0.50.1 to 0.51.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.50.1 to 0.51.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.50.1...0.51.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.51.0 dependency-type: direct:development 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 e082d0dad..2b8127c7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.12.1", - "pyrefly==0.50.1", + "pyrefly==0.51.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 62c1d7b547e48efa401afd6ea13e5fa1c4aa4516 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:33:23 +0000 Subject: [PATCH 1240/1638] Bump ruff from 0.14.14 to 0.15.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.14 to 0.15.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.14.14...0.15.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.0 dependency-type: direct:development 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 2b8127c7a..86a1c0567 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.14.14", + "ruff==0.15.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 669eeb63db602acce9403e55bd6377df19a7e9a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 10:33:25 +0000 Subject: [PATCH 1241/1638] Bump ty from 0.0.14 to 0.0.15 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.14 to 0.0.15. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.14...0.0.15) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.15 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 86a1c0567..a72a70214 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.14", + "ty==0.0.15", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 5de56fc8482bbbf5299bdfe4055d1d29b1871b66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 10:33:19 +0000 Subject: [PATCH 1242/1638] Bump pyrefly from 0.51.0 to 0.51.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.51.0 to 0.51.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.51.0...0.51.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.51.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a72a70214..c8d5296f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.12.1", - "pyrefly==0.51.0", + "pyrefly==0.51.1", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From cb4b09565ee4de781443466d12239317830091f0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 8 Feb 2026 13:26:26 +0000 Subject: [PATCH 1243/1638] Work around toml-fmt array comment bugs Avoid tox-dev/toml-fmt#184 (double quotes in comments corrupt arrays) by using single quotes in comments, and avoid tox-dev/toml-fmt#186 (single-quoted strings in arrays with comments get corrupted) by converting to double quotes. Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 74 +++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c8d5296f0..2d1e49c43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -126,7 +126,7 @@ lint.ignore = [ "D212", # Ruff warns that this conflicts with the formatter. "ISC001", - # Ignore "too-many-*" errors as they seem to get in the way more than + # Ignore 'too-many-*' errors as they seem to get in the way more than # helping. "PLR0913", ] @@ -181,21 +181,21 @@ jobs = 0 # as they seemed to get in the way. load-plugins = [ "pylint_per_file_ignores", - 'pylint.extensions.bad_builtin', - 'pylint.extensions.comparison_placement', - 'pylint.extensions.consider_refactoring_into_while_condition', - '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', + "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 @@ -209,12 +209,12 @@ unsafe-load-any-extension = false # 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', + "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 @@ -228,28 +228,28 @@ enable = [ # --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', + "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', + "line-too-long", # Let ruff handle unused imports - 'unused-import', + "unused-import", # Let ruff deal with sorting - 'ungrouped-imports', + "ungrouped-imports", # We don't need everything to be documented because of mypy - 'missing-type-doc', - 'missing-return-type-doc', + "missing-type-doc", + "missing-return-type-doc", # Too difficult to please - 'duplicate-code', + "duplicate-code", # Let ruff handle imports - 'wrong-import-order', + "wrong-import-order", # mypy does not want untyped parameters. - 'useless-type-doc', + "useless-type-doc", ] # We ignore invalid names because: From 7721f7c3699de06751116058bc0967b5181f9348 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 8 Feb 2026 13:26:26 +0000 Subject: [PATCH 1244/1638] Bump pyproject-fmt to 2.14.0 and apply formatting Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 101 +++++++++++++++---------------------------------- 1 file changed, 31 insertions(+), 70 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2d1e49c43..47c38d627 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.12.1", + "pyproject-fmt==2.14.0", "pyrefly==0.51.1", "pyright==1.1.408", "pyroma==5.0.1", @@ -62,10 +62,6 @@ optional-dependencies.dev = [ "pytest-cov==7.0.0", "pyyaml==6.0.3", "ruff==0.15.0", - # We add shellcheck-py not only for shell scripts and shell code blocks, - # but also because having it installed means that ``actionlint-py`` will - # use it to lint shell commands in GitHub workflow files. - "shellcheck-py==0.11.0.1", "shfmt-py==3.12.0.2", "sphinx==9.1.0", "sphinx-copybutton==0.5.2", @@ -79,6 +75,10 @@ optional-dependencies.dev = [ "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", + # We add shellcheck-py not only for shell scripts and shell code blocks, + # but also because having it installed means that ``actionlint-py`` will + # use it to lint shell commands in GitHub workflow files. + "shellcheck-py==0.11.0.1", "yamlfix==1.19.1", "zizmor==1.22.0", ] @@ -88,22 +88,17 @@ urls.Source = "https://github.com/VWS-Python/vws-python" [tool.setuptools] zip-safe = false - -[tool.setuptools.package-data] -vws = [ +package-data.vws = [ "py.typed", ] - -[tool.setuptools.packages.find] -where = [ +packages.find.where = [ "src", ] -[tool.distutils.bdist_wheel] -universal = true +[tool.distutils] +bdist_wheel.universal = true [tool.setuptools_scm] - # This keeps the start of the version the same as the last release. # This is useful for our documentation to include e.g. binary links # to the latest released binary. @@ -113,39 +108,34 @@ version_scheme = "post-release" [tool.ruff] line-length = 79 - lint.select = [ "ALL", ] lint.ignore = [ - # Ruff warns that this conflicts with the formatter. - "COM812", # Allow our chosen docstring line-style - pydocstringformatter handles formatting # but doesn't enforce D205 (blank line after summary) or D212 (summary on first line). "D205", - "D212", - # Ruff warns that this conflicts with the formatter. - "ISC001", # Ignore 'too-many-*' errors as they seem to get in the way more than # helping. "PLR0913", + # Ruff warns that this conflicts with the formatter. + "COM812", + # Ruff warns that this conflicts with the formatter. + "ISC001", + "D212", ] - lint.per-file-ignores."doccmd_*.py" = [ # Allow asserts in docs. "S101", ] - lint.per-file-ignores."docs/source/*.py" = [ # Allow asserts in docs. "S101", ] - lint.per-file-ignores."tests/*.py" = [ # Allow asserts in 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. @@ -155,21 +145,13 @@ lint.unfixable = [ lint.pydocstyle.convention = "google" [tool.pylint] - -[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.'MASTER'] - +"FORMAT".single-line-if-stmt = false # Pickle collected data for later comparisons. -persistent = true - +"MASTER".persistent = true # Use multiple processes to speed up Pylint. -jobs = 0 - +"MASTER".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. @@ -179,7 +161,7 @@ jobs = 0 # - pylint.extensions.magic_value # - pylint.extensions.while_used # as they seemed to get in the way. -load-plugins = [ +"MASTER".load-plugins = [ "pylint_per_file_ignores", "pylint.extensions.bad_builtin", "pylint.extensions.comparison_placement", @@ -197,18 +179,14 @@ load-plugins = [ "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'] - +"MASTER".unsafe-load-any-extension = false # 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 = [ +"MESSAGES CONTROL".enable = [ "bad-inline-option", "deprecated-pragma", "file-ignored", @@ -216,7 +194,6 @@ enable = [ "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 @@ -226,8 +203,7 @@ enable = [ # --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 = [ +"MESSAGES CONTROL".disable = [ "too-few-public-methods", "too-many-locals", "too-many-arguments", @@ -251,32 +227,25 @@ disable = [ # mypy does not want untyped parameters. "useless-type-doc", ] - # We ignore invalid names because: # - We want to use generated module names, which may not be valid, but are never seen. # - We want to use global variables in documentation, which may not be uppercase. # - conf.py is a Sphinx configuration file which requires lowercase global variable names. -per-file-ignores = [ +"MESSAGES CONTROL".per-file-ignores = [ "docs/source/conf.py:invalid-name", "docs/source/doccmd_*.py:invalid-name", "doccmd_README_rst_*.py:invalid-name", ] - -[tool.pylint.'SPELLING'] - # Spelling dictionary name. Available dictionaries: none. To make it working # install python-enchant package. -spelling-dict = 'en_US' - +"SPELLING".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' - +"SPELLING".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' +"SPELLING".spelling-store-unknown-words = "no" [tool.check-manifest] - ignore = [ ".checkmake-config.ini", ".prettierrc", @@ -314,22 +283,17 @@ indent = 4 keep_full_version = true max_supported_python = "3.14" -[tool.pytest.ini_options] - -xfail_strict = true -log_cli = true +[tool.pytest] +ini_options.xfail_strict = true +ini_options.log_cli = true -[tool.coverage.report] -exclude_also = [ +[tool.coverage] +report.exclude_also = [ "if TYPE_CHECKING:", ] - -[tool.coverage.run] - -branch = true +run.branch = true [tool.mypy] - strict = true files = [ "." ] exclude = [ "build" ] @@ -339,7 +303,6 @@ plugins = [ ] [tool.pyright] - enableTypeIgnoreComments = false reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" @@ -359,7 +322,6 @@ omit-covered-files = true verbose = 2 [tool.doc8] - max_line_length = 2000 ignore_path = [ "./.eggs", @@ -408,7 +370,6 @@ ignore_names = [ "templates_path", "warning_is_error", ] - # Duplicate some of .gitignore exclude = [ ".venv" ] From 28780e38e30338b74a5bed80b1221ff6157420ac Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Feb 2026 10:47:25 +0000 Subject: [PATCH 1245/1638] Bump pyproject-fmt to 2.14.2 --- pyproject.toml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 47c38d627..5dd6a685a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.14.0", + "pyproject-fmt==2.14.2", "pyrefly==0.51.1", "pyright==1.1.408", "pyroma==5.0.1", @@ -62,6 +62,10 @@ optional-dependencies.dev = [ "pytest-cov==7.0.0", "pyyaml==6.0.3", "ruff==0.15.0", + # We add shellcheck-py not only for shell scripts and shell code blocks, + # but also because having it installed means that ``actionlint-py`` will + # use it to lint shell commands in GitHub workflow files. + "shellcheck-py==0.11.0.1", "shfmt-py==3.12.0.2", "sphinx==9.1.0", "sphinx-copybutton==0.5.2", @@ -75,10 +79,6 @@ optional-dependencies.dev = [ "vulture==2.14", "vws-python-mock==2025.3.10.1", "vws-test-fixtures==2023.3.5", - # We add shellcheck-py not only for shell scripts and shell code blocks, - # but also because having it installed means that ``actionlint-py`` will - # use it to lint shell commands in GitHub workflow files. - "shellcheck-py==0.11.0.1", "yamlfix==1.19.1", "zizmor==1.22.0", ] @@ -112,17 +112,17 @@ lint.select = [ "ALL", ] lint.ignore = [ + # Ruff warns that this conflicts with the formatter. + "COM812", # Allow our chosen docstring line-style - pydocstringformatter handles formatting # but doesn't enforce D205 (blank line after summary) or D212 (summary on first line). "D205", + "D212", + # Ruff warns that this conflicts with the formatter. + "ISC001", # Ignore 'too-many-*' errors as they seem to get in the way more than # helping. "PLR0913", - # Ruff warns that this conflicts with the formatter. - "COM812", - # Ruff warns that this conflicts with the formatter. - "ISC001", - "D212", ] lint.per-file-ignores."doccmd_*.py" = [ # Allow asserts in docs. From a4478f35a67cf32cc7faab486e28ea8ec46e190e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 11:42:27 +0000 Subject: [PATCH 1246/1638] Bump pyrefly from 0.51.1 to 0.51.2 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.51.1 to 0.51.2. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/commits) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.51.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5dd6a685a..bc7a0ec98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.14.2", - "pyrefly==0.51.1", + "pyrefly==0.51.2", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 8cc2e58df6658fbfc28eae7d51a3ca99ec7dcbc0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 11:42:39 +0000 Subject: [PATCH 1247/1638] Bump prek from 0.3.1 to 0.3.2 Bumps [prek](https://github.com/j178/prek) from 0.3.1 to 0.3.2. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.1...v0.3.2) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5dd6a685a..6ba414452 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.1", + "prek==0.3.2", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", From baa97f9e121d261444064ddff394417b893fabd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 10:33:11 +0000 Subject: [PATCH 1248/1638] Bump pyrefly from 0.51.2 to 0.52.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.51.2 to 0.52.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/commits/0.52.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.52.0 dependency-type: direct:development 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 b9db7f6b8..32c854a40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.14.2", - "pyrefly==0.51.2", + "pyrefly==0.52.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 17d7ac377ea891feceebc753dabb3277dc8b0f82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 10:33:16 +0000 Subject: [PATCH 1249/1638] Bump pyproject-fmt from 2.14.2 to 2.15.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.14.2 to 2.15.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.14.2...pyproject-fmt/2.15.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.15.1 dependency-type: direct:development 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 b9db7f6b8..22287017f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.14.2", + "pyproject-fmt==2.15.1", "pyrefly==0.51.2", "pyright==1.1.408", "pyroma==5.0.1", From b5087fbd447928b2a598e8233265d002fcb21afb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 10 Feb 2026 10:39:19 +0000 Subject: [PATCH 1250/1638] Re-format pyproject.toml with pyproject-fmt 2.15.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 22287017f..4046c5f44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -288,10 +288,10 @@ ini_options.xfail_strict = true ini_options.log_cli = true [tool.coverage] +run.branch = true report.exclude_also = [ "if TYPE_CHECKING:", ] -run.branch = true [tool.mypy] strict = true From 3264eea681160f63114499ce70de382d767a8b56 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 11 Feb 2026 09:14:23 +0000 Subject: [PATCH 1251/1638] Update pyproject-fmt to 2.15.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2919be653..9100eb182 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.15.1", + "pyproject-fmt==2.15.2", "pyrefly==0.52.0", "pyright==1.1.408", "pyroma==5.0.1", From 72eaa04ad32c25aadb89d2ccd0fb2447c6577733 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:33:32 +0000 Subject: [PATCH 1252/1638] Bump ty from 0.0.15 to 0.0.16 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.15 to 0.0.16. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.15...0.0.16) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.16 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9100eb182..126fb24d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.15", + "ty==0.0.16", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2025.3.10.1", From 75edda24ae41cbd83f611545584c1aef72a2d7f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 10:33:20 +0000 Subject: [PATCH 1253/1638] Bump pyproject-fmt from 2.15.2 to 2.15.3 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.15.2 to 2.15.3. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.15.2...pyproject-fmt/2.15.3) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.15.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 126fb24d2..c699fdc14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.15.2", + "pyproject-fmt==2.15.3", "pyrefly==0.52.0", "pyright==1.1.408", "pyroma==5.0.1", From f4e3dc1f7525ca75b47b31428bb47af24d9be950 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 10:33:20 +0000 Subject: [PATCH 1254/1638] Bump pyproject-fmt from 2.15.3 to 2.16.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.15.3 to 2.16.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.15.3...pyproject-fmt/2.16.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.16.0 dependency-type: direct:development 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 c699fdc14..54eb5f3fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.15.3", + "pyproject-fmt==2.16.0", "pyrefly==0.52.0", "pyright==1.1.408", "pyroma==5.0.1", From 615d5798a840f19f968930f0651f32ea7f310f85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 10:33:40 +0000 Subject: [PATCH 1255/1638] Bump ruff from 0.15.0 to 0.15.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.0 to 0.15.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.15.0...0.15.1) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c699fdc14..1e7fdedf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.15.0", + "ruff==0.15.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 8217323d13e44f8fa65f5a7ffe30288feb47a036 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 07:59:41 +0000 Subject: [PATCH 1256/1638] Accept tuple for request_timeout_seconds to match requests API The timeout parameter now accepts either a float (applied to both connect and read timeouts) or a (connect, read) tuple, matching the requests library's timeout interface. Updated docstrings to reference requests. Co-Authored-By: Claude Opus 4.6 --- src/vws/query.py | 8 +++++--- src/vws/vws.py | 14 +++++++++----- tests/test_query.py | 31 ++++++++++++++++++++++++++++++- tests/test_vws.py | 24 +++++++++++++++++++++++- 4 files changed, 67 insertions(+), 10 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index b9d42d4c8..0e4e33d04 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -49,15 +49,17 @@ def __init__( client_access_key: str, client_secret_key: str, base_vwq_url: str = "https://cloudreco.vuforia.com", - request_timeout_seconds: float = 30.0, + request_timeout_seconds: float | tuple[float, float] = 30.0, ) -> None: """ Args: client_access_key: A VWS client access key. client_secret_key: A VWS client secret key. base_vwq_url: The base URL for the VWQ API. - request_timeout_seconds: The timeout in seconds for each HTTP - request made to the Cloud Reco API. + request_timeout_seconds: The timeout for each HTTP request, as + used by ``requests.request``. This can be a float to set + both the connect and read timeouts, or a (connect, read) + tuple. """ self._client_access_key = client_access_key self._client_secret_key = client_secret_key diff --git a/src/vws/vws.py b/src/vws/vws.py index 82eb7c5bc..dfb868cff 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -68,7 +68,7 @@ def _target_api_request( data: bytes, request_path: str, base_vws_url: str, - request_timeout_seconds: float, + request_timeout_seconds: float | tuple[float, float], ) -> Response: """Make a request to the Vuforia Target API. @@ -83,7 +83,9 @@ def _target_api_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. - request_timeout_seconds: The timeout in seconds for the request. + request_timeout_seconds: The timeout for the request, as used by + ``requests.request``. This can be a float to set both the + connect and read timeouts, or a (connect, read) tuple. Returns: The response to the request made by `requests`. @@ -135,15 +137,17 @@ def __init__( server_access_key: str, server_secret_key: str, base_vws_url: str = "https://vws.vuforia.com", - request_timeout_seconds: float = 30.0, + request_timeout_seconds: float | tuple[float, float] = 30.0, ) -> None: """ Args: server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. base_vws_url: The base URL for the VWS API. - request_timeout_seconds: The timeout in seconds for each HTTP - request made to the VWS API. + request_timeout_seconds: The timeout for each HTTP request, as + used by ``requests.request``. This can be a float to set + both the connect and read timeouts, or a (connect, read) + tuple. """ self._server_access_key = server_access_key self._server_secret_key = server_secret_key diff --git a/tests/test_query.py b/tests/test_query.py index 85b2d03ab..d1e13f2cf 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -65,7 +65,7 @@ def test_default_timeout() -> None: @staticmethod def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set a custom request timeout.""" + """It is possible to set a custom request timeout as a float.""" with MockVWS() as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -93,6 +93,35 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: matches = cloud_reco_client.query(image=image) assert len(matches) == 1 + @staticmethod + def test_custom_timeout_tuple(image: io.BytesIO | BinaryIO) -> None: + """It is possible to set separate connect and read timeouts.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + custom_timeout = (5.0, 30.0) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + request_timeout_seconds=custom_timeout, + ) + assert cloud_reco_client.request_timeout_seconds == custom_timeout + + target_id = vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + matches = cloud_reco_client.query(image=image) + assert len(matches) == 1 + @staticmethod def test_timeout_raises_on_slow_response( image: io.BytesIO | BinaryIO, diff --git a/tests/test_vws.py b/tests/test_vws.py index bbf157b4b..2350ca365 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -114,7 +114,7 @@ def test_default_timeout() -> None: @staticmethod def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set a custom request timeout.""" + """It is possible to set a custom request timeout as a float.""" with MockVWS() as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -135,6 +135,28 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: application_metadata=None, ) + @staticmethod + def test_custom_timeout_tuple(image: io.BytesIO | BinaryIO) -> None: + """It is possible to set separate connect and read timeouts.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + custom_timeout = (5.0, 30.0) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + request_timeout_seconds=custom_timeout, + ) + assert vws_client.request_timeout_seconds == custom_timeout + + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + @staticmethod def test_timeout_raises_on_slow_response( image: io.BytesIO | BinaryIO, From 1b2001ecdf413e236a9ab625df3f4a23324f7eee Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 08:05:28 +0000 Subject: [PATCH 1257/1638] Fix integer timeouts failing at request time _target_api_request used plain @beartype which rejects int for float, while VWS.__init__ used is_pep484_tower=True which accepts it. This caused integer timeouts to pass construction but fail on first request. Enable is_pep484_tower on _target_api_request and CloudRecoService too. Co-Authored-By: Claude Opus 4.6 --- src/vws/query.py | 4 ++-- src/vws/vws.py | 2 +- tests/test_query.py | 29 +++++++++++++++++++++++++++++ tests/test_vws.py | 22 ++++++++++++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index 0e4e33d04..db1945b11 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -8,7 +8,7 @@ from urllib.parse import urljoin import requests -from beartype import beartype +from beartype import BeartypeConf, beartype from urllib3.filepost import encode_multipart_formdata from vws_auth_tools import authorization_header, rfc_1123_date @@ -40,7 +40,7 @@ def _get_image_data(image: _ImageType) -> bytes: return image_data -@beartype +@beartype(conf=BeartypeConf(is_pep484_tower=True)) class CloudRecoService: """An interface to the Vuforia Cloud Recognition Web APIs.""" diff --git a/src/vws/vws.py b/src/vws/vws.py index dfb868cff..cdff3f906 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -58,7 +58,7 @@ def _get_image_data(image: _ImageType) -> bytes: return image_data -@beartype +@beartype(conf=BeartypeConf(is_pep484_tower=True)) def _target_api_request( *, content_type: str, diff --git a/tests/test_query.py b/tests/test_query.py index d1e13f2cf..5516a0ea4 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -93,6 +93,35 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: matches = cloud_reco_client.query(image=image) assert len(matches) == 1 + @staticmethod + def test_custom_timeout_int(image: io.BytesIO | BinaryIO) -> None: + """It is possible to set a custom request timeout as an int.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + custom_timeout = 60 + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + request_timeout_seconds=custom_timeout, + ) + assert cloud_reco_client.request_timeout_seconds == custom_timeout + + target_id = vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + matches = cloud_reco_client.query(image=image) + assert len(matches) == 1 + @staticmethod def test_custom_timeout_tuple(image: io.BytesIO | BinaryIO) -> None: """It is possible to set separate connect and read timeouts.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index 2350ca365..db3b88b5d 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -135,6 +135,28 @@ def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: application_metadata=None, ) + @staticmethod + def test_custom_timeout_int(image: io.BytesIO | BinaryIO) -> None: + """It is possible to set a custom request timeout as an int.""" + with MockVWS() as mock: + database = VuforiaDatabase() + mock.add_database(database=database) + custom_timeout = 60 + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + request_timeout_seconds=custom_timeout, + ) + assert vws_client.request_timeout_seconds == custom_timeout + + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + @staticmethod def test_custom_timeout_tuple(image: io.BytesIO | BinaryIO) -> None: """It is possible to set separate connect and read timeouts.""" From 7123758816b61dce6b9f132d8625c8a9f31f0266 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 08:18:06 +0000 Subject: [PATCH 1258/1638] Fix CI failures in timeout tests - Remove branching and time.sleep from slow_request mocks, fixing coverage gaps (partial branches) and Windows CI timeouts - Remove test_longer_timeout_succeeds (redundant with test_custom_timeout) - Assert the timeout value is passed correctly instead of branching - Remove unused time import and unused *args parameter Co-Authored-By: Claude Opus 4.6 --- tests/test_query.py | 66 ++++----------------------------------------- tests/test_vws.py | 59 ++++------------------------------------ 2 files changed, 10 insertions(+), 115 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index 5516a0ea4..43af56711 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,7 +1,6 @@ """Tests for the ``CloudRecoService`` querying functionality.""" import io -import time import uuid from typing import BinaryIO from unittest.mock import patch @@ -156,6 +155,7 @@ def test_timeout_raises_on_slow_response( image: io.BytesIO | BinaryIO, ) -> None: """A short timeout raises an error when the server is slow.""" + custom_timeout = 0.1 with MockVWS() as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -166,7 +166,7 @@ def test_timeout_raises_on_slow_response( cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=database.client_secret_key, - request_timeout_seconds=0.1, + request_timeout_seconds=custom_timeout, ) target_id = vws_client.add_target( @@ -178,19 +178,12 @@ def test_timeout_raises_on_slow_response( ) vws_client.wait_for_target_processed(target_id=target_id) - simulated_slow_threshold = 0.5 - original_request = requests.request - def slow_request( - *args: object, **kwargs: float | None, ) -> requests.Response: - """Simulate a slow server response.""" - timeout = kwargs.get("timeout") - if timeout is not None and timeout < simulated_slow_threshold: - time.sleep(0.2) - raise requests.exceptions.Timeout - return original_request(*args, **kwargs) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + """Simulate a server that is too slow to respond.""" + assert kwargs["timeout"] == custom_timeout + raise requests.exceptions.Timeout with ( patch.object( @@ -202,55 +195,6 @@ def slow_request( ): cloud_reco_client.query(image=image) - @staticmethod - def test_longer_timeout_succeeds(image: io.BytesIO | BinaryIO) -> None: - """A longer timeout allows slow responses to complete.""" - simulated_slow_threshold = 0.5 - - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, - request_timeout_seconds=1.0, - ) - - target_id = vws_client.add_target( - name="x", - width=1, - image=image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - - original_request = requests.request - - def slow_request( - *args: object, - **kwargs: float | None, - ) -> requests.Response: - """Simulate a slow server response.""" - timeout = kwargs.get("timeout") - if timeout is not None and timeout < simulated_slow_threshold: - time.sleep(0.2) - raise requests.exceptions.Timeout - return original_request(*args, **kwargs) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] - - with patch.object( - target=requests, - attribute="request", - side_effect=slow_request, - ): - # This should succeed because timeout is 1.0 > 0.5 - matches = cloud_reco_client.query(image=image) - assert len(matches) == 1 - class TestCustomBaseVWQURL: """Tests for using a custom base VWQ URL.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index db3b88b5d..e141b041c 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -4,7 +4,6 @@ import datetime import io import secrets -import time import uuid from typing import BinaryIO from unittest.mock import patch @@ -184,29 +183,22 @@ def test_timeout_raises_on_slow_response( image: io.BytesIO | BinaryIO, ) -> None: """A short timeout raises an error when the server is slow.""" - simulated_slow_threshold = 0.5 - + custom_timeout = 0.1 with MockVWS() as mock: database = VuforiaDatabase() mock.add_database(database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, - request_timeout_seconds=0.1, + request_timeout_seconds=custom_timeout, ) - original_request = requests.request - def slow_request( - *args: object, **kwargs: float | None, ) -> requests.Response: - """Simulate a slow server response.""" - timeout = kwargs.get("timeout") - if timeout is not None and timeout < simulated_slow_threshold: - time.sleep(0.2) - raise requests.exceptions.Timeout - return original_request(*args, **kwargs) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + """Simulate a server that is too slow to respond.""" + assert kwargs["timeout"] == custom_timeout + raise requests.exceptions.Timeout with ( patch.object( @@ -224,47 +216,6 @@ def slow_request( application_metadata=None, ) - @staticmethod - def test_longer_timeout_succeeds(image: io.BytesIO | BinaryIO) -> None: - """A longer timeout allows slow responses to complete.""" - simulated_slow_threshold = 0.5 - - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - request_timeout_seconds=1.0, - ) - - original_request = requests.request - - def slow_request( - *args: object, - **kwargs: float | None, - ) -> requests.Response: - """Simulate a slow server response.""" - timeout = kwargs.get("timeout") - if timeout is not None and timeout < simulated_slow_threshold: - time.sleep(0.2) - raise requests.exceptions.Timeout - return original_request(*args, **kwargs) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] - - with patch.object( - target=requests, - attribute="request", - side_effect=slow_request, - ): - # This should succeed because timeout is 1.0 > 0.5 - vws_client.add_target( - name="x", - width=1, - image=image, - active_flag=True, - application_metadata=None, - ) - class TestCustomBaseVWSURL: """Tests for using a custom base VWS URL.""" From 74763f3b207b4e6c206b55bf56907d7eefcb2e43 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 08:25:35 +0000 Subject: [PATCH 1259/1638] Matrix lint workflow by hook stage --- .github/workflows/lint.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f4c94be57..c6f0c8074 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,6 +19,7 @@ jobs: matrix: python-version: ['3.13'] platform: [ubuntu-latest, windows-latest] + hook-stage: [pre-commit, pre-push, manual] runs-on: ${{ matrix.platform }} @@ -37,10 +38,8 @@ jobs: # Use bash to ensure the step fails if any command fails. # PowerShell does not fail on intermediate command failures by default. shell: bash - run: | - uv run --extra=dev prek run --all-files --hook-stage pre-commit --verbose - uv run --extra=dev prek run --all-files --hook-stage pre-push --verbose - uv run --extra=dev prek run --all-files --hook-stage manual --verbose + run: uv run --extra=dev prek run --all-files --hook-stage ${{ matrix.hook-stage }} + --verbose env: UV_PYTHON: ${{ matrix.python-version }} From 16c4604eb208167feeffe1ebfdcc8dd30e2bc2b8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 08:55:52 +0000 Subject: [PATCH 1260/1638] Bump vws-python-mock from 2025.3.10.1 to 2026.2.15 Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 15ca13f24..2b0fb465f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "ty==0.0.16", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2025.3.10.1", + "vws-python-mock==2026.2.15", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", From 5d0a72941fdde8e783e56d1ff9e3281ffa785c73 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 08:59:13 +0000 Subject: [PATCH 1261/1638] Use vws-python-mock response_delay_seconds for timeout tests Upgrade vws-python-mock to 2026.2.15 which adds response_delay_seconds parameter. Replace unittest.mock.patch-based timeout simulation with MockVWS(response_delay_seconds=0.5), testing the real timeout mechanism end-to-end. Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 2 +- tests/test_query.py | 22 +++------------------- tests/test_vws.py | 22 +++------------------- 3 files changed, 7 insertions(+), 39 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9f1747298..68f237322 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "ty==0.0.14", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2025.3.10.1", + "vws-python-mock==2026.2.15", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", diff --git a/tests/test_query.py b/tests/test_query.py index 43af56711..29a9b3b4e 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -3,7 +3,6 @@ import io import uuid from typing import BinaryIO -from unittest.mock import patch import pytest import requests @@ -155,8 +154,7 @@ def test_timeout_raises_on_slow_response( image: io.BytesIO | BinaryIO, ) -> None: """A short timeout raises an error when the server is slow.""" - custom_timeout = 0.1 - with MockVWS() as mock: + with MockVWS(response_delay_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) vws_client = VWS( @@ -166,7 +164,7 @@ def test_timeout_raises_on_slow_response( cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=database.client_secret_key, - request_timeout_seconds=custom_timeout, + request_timeout_seconds=0.1, ) target_id = vws_client.add_target( @@ -178,21 +176,7 @@ def test_timeout_raises_on_slow_response( ) vws_client.wait_for_target_processed(target_id=target_id) - def slow_request( - **kwargs: float | None, - ) -> requests.Response: - """Simulate a server that is too slow to respond.""" - assert kwargs["timeout"] == custom_timeout - raise requests.exceptions.Timeout - - with ( - patch.object( - target=requests, - attribute="request", - side_effect=slow_request, - ), - pytest.raises(expected_exception=requests.exceptions.Timeout), - ): + with pytest.raises(expected_exception=requests.exceptions.Timeout): cloud_reco_client.query(image=image) diff --git a/tests/test_vws.py b/tests/test_vws.py index e141b041c..5d2a58f89 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -6,7 +6,6 @@ import secrets import uuid from typing import BinaryIO -from unittest.mock import patch import pytest import requests @@ -183,31 +182,16 @@ def test_timeout_raises_on_slow_response( image: io.BytesIO | BinaryIO, ) -> None: """A short timeout raises an error when the server is slow.""" - custom_timeout = 0.1 - with MockVWS() as mock: + with MockVWS(response_delay_seconds=0.5) as mock: database = VuforiaDatabase() mock.add_database(database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, - request_timeout_seconds=custom_timeout, + request_timeout_seconds=0.1, ) - def slow_request( - **kwargs: float | None, - ) -> requests.Response: - """Simulate a server that is too slow to respond.""" - assert kwargs["timeout"] == custom_timeout - raise requests.exceptions.Timeout - - with ( - patch.object( - target=requests, - attribute="request", - side_effect=slow_request, - ), - pytest.raises(expected_exception=requests.exceptions.Timeout), - ): + with pytest.raises(expected_exception=requests.exceptions.Timeout): vws_client.add_target( name="x", width=1, From 90c8285c54c3f74bc161d2a46437b088fa529970 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 09:01:21 +0000 Subject: [PATCH 1262/1638] Add changelog entry for custom request timeout support Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5527f9da1..174256880 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog Next ---- +* Add ``request_timeout_seconds`` parameter to ``VWS`` and ``CloudRecoService``, allowing customization of the request timeout. This accepts a float or a ``(connect, read)`` tuple, matching the ``requests`` library's timeout interface. The default remains 30 seconds. + 2025.03.10.1 ------------ From 88e1d775cf54e3d65280334bfbd4b3565de7b76e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 09:12:18 +0000 Subject: [PATCH 1263/1638] Parametrize custom timeout tests Co-Authored-By: Claude Opus 4.6 --- tests/test_query.py | 74 +++++++-------------------------------------- tests/test_vws.py | 60 +++++++----------------------------- 2 files changed, 22 insertions(+), 112 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index 29a9b3b4e..dafe5a738 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -62,67 +62,15 @@ def test_default_timeout() -> None: assert cloud_reco_client.request_timeout_seconds == expected @staticmethod - def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set a custom request timeout as a float.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - custom_timeout = 60.5 - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, - request_timeout_seconds=custom_timeout, - ) - assert cloud_reco_client.request_timeout_seconds == custom_timeout - - # Verify requests work with the custom timeout - target_id = vws_client.add_target( - name="x", - width=1, - image=image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - matches = cloud_reco_client.query(image=image) - assert len(matches) == 1 - - @staticmethod - def test_custom_timeout_int(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set a custom request timeout as an int.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - custom_timeout = 60 - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, - request_timeout_seconds=custom_timeout, - ) - assert cloud_reco_client.request_timeout_seconds == custom_timeout - - target_id = vws_client.add_target( - name="x", - width=1, - image=image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - matches = cloud_reco_client.query(image=image) - assert len(matches) == 1 - - @staticmethod - def test_custom_timeout_tuple(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set separate connect and read timeouts.""" + @pytest.mark.parametrize( + argnames="custom_timeout", + argvalues=[60.5, 60, (5.0, 30.0)], + ) + def test_custom_timeout( + image: io.BytesIO | BinaryIO, + custom_timeout: int | float | tuple[float, float], # noqa: PYI041 + ) -> None: + """It is possible to set a custom request timeout.""" with MockVWS() as mock: database = VuforiaDatabase() mock.add_database(database=database) @@ -130,13 +78,13 @@ def test_custom_timeout_tuple(image: io.BytesIO | BinaryIO) -> None: server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, ) - custom_timeout = (5.0, 30.0) cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=database.client_secret_key, request_timeout_seconds=custom_timeout, ) - assert cloud_reco_client.request_timeout_seconds == custom_timeout + expected = custom_timeout + assert cloud_reco_client.request_timeout_seconds == expected target_id = vws_client.add_target( name="x", diff --git a/tests/test_vws.py b/tests/test_vws.py index 5d2a58f89..9fe63dc21 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -111,63 +111,25 @@ def test_default_timeout() -> None: assert vws_client.request_timeout_seconds == expected @staticmethod - def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set a custom request timeout as a float.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - custom_timeout = 60.5 - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - request_timeout_seconds=custom_timeout, - ) - assert vws_client.request_timeout_seconds == custom_timeout - - # Verify requests work with the custom timeout - vws_client.add_target( - name="x", - width=1, - image=image, - active_flag=True, - application_metadata=None, - ) - - @staticmethod - def test_custom_timeout_int(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set a custom request timeout as an int.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - custom_timeout = 60 - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - request_timeout_seconds=custom_timeout, - ) - assert vws_client.request_timeout_seconds == custom_timeout - - vws_client.add_target( - name="x", - width=1, - image=image, - active_flag=True, - application_metadata=None, - ) - - @staticmethod - def test_custom_timeout_tuple(image: io.BytesIO | BinaryIO) -> None: - """It is possible to set separate connect and read timeouts.""" + @pytest.mark.parametrize( + argnames="custom_timeout", + argvalues=[60.5, 60, (5.0, 30.0)], + ) + def test_custom_timeout( + image: io.BytesIO | BinaryIO, + custom_timeout: int | float | tuple[float, float], # noqa: PYI041 + ) -> None: + """It is possible to set a custom request timeout.""" with MockVWS() as mock: database = VuforiaDatabase() mock.add_database(database=database) - custom_timeout = (5.0, 30.0) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, request_timeout_seconds=custom_timeout, ) - assert vws_client.request_timeout_seconds == custom_timeout + expected = custom_timeout + assert vws_client.request_timeout_seconds == expected vws_client.add_target( name="x", From 605d27c4c81ca670e23b25ff2bcdded8cf20db14 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 10:42:29 +0000 Subject: [PATCH 1264/1638] Update timeout behavior and default-timeout tests --- src/vws/query.py | 4 ++-- src/vws/vws.py | 4 ++-- tests/test_query.py | 33 +++++++++++++++++++++++++++------ tests/test_vws.py | 43 +++++++++++++++++++++++++++++++++++++------ 4 files changed, 68 insertions(+), 16 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index db1945b11..dd36e8f21 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -64,7 +64,7 @@ def __init__( self._client_access_key = client_access_key self._client_secret_key = client_secret_key self._base_vwq_url = base_vwq_url - self.request_timeout_seconds = request_timeout_seconds + self._request_timeout_seconds = request_timeout_seconds def query( self, @@ -147,7 +147,7 @@ def query( url=urljoin(base=self._base_vwq_url, url=request_path), headers=headers, data=content, - timeout=self.request_timeout_seconds, + timeout=self._request_timeout_seconds, ) response = Response( text=requests_response.text, diff --git a/src/vws/vws.py b/src/vws/vws.py index cdff3f906..4cb75ca32 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -152,7 +152,7 @@ def __init__( self._server_access_key = server_access_key self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url - self.request_timeout_seconds = request_timeout_seconds + self._request_timeout_seconds = request_timeout_seconds def make_request( self, @@ -196,7 +196,7 @@ def make_request( data=data, request_path=request_path, base_vws_url=self._base_vws_url, - request_timeout_seconds=self.request_timeout_seconds, + request_timeout_seconds=self._request_timeout_seconds, ) if ( diff --git a/tests/test_query.py b/tests/test_query.py index dafe5a738..fd014cadf 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -6,6 +6,7 @@ import pytest import requests +from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase @@ -48,18 +49,38 @@ class TestCustomRequestTimeout: """Tests for using a custom request timeout.""" @staticmethod - def test_default_timeout() -> None: - """By default, the request timeout is 30 seconds.""" - default_timeout_seconds = 30.0 - with MockVWS() as mock: + @pytest.mark.parametrize( + argnames=("response_delay_seconds", "expect_timeout"), + argvalues=[(29, False), (31, True)], + ) + def test_default_timeout( + image: io.BytesIO | BinaryIO, + *, + response_delay_seconds: int, + expect_timeout: bool, + ) -> None: + """At 29 seconds there is no error; at 31 seconds there is a + timeout. + """ + with ( + freeze_time(auto_tick_seconds=1), + MockVWS(response_delay_seconds=response_delay_seconds) as mock, + ): database = VuforiaDatabase() mock.add_database(database=database) cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=database.client_secret_key, ) - expected = default_timeout_seconds - assert cloud_reco_client.request_timeout_seconds == expected + + if expect_timeout: + with pytest.raises( + expected_exception=requests.exceptions.Timeout, + ): + cloud_reco_client.query(image=image) + else: + matches = cloud_reco_client.query(image=image) + assert matches == [] @staticmethod @pytest.mark.parametrize( diff --git a/tests/test_vws.py b/tests/test_vws.py index 9fe63dc21..03dc796c9 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -97,18 +97,49 @@ class TestCustomRequestTimeout: """Tests for using a custom request timeout.""" @staticmethod - def test_default_timeout() -> None: - """By default, the request timeout is 30 seconds.""" - default_timeout_seconds = 30.0 - with MockVWS() as mock: + @pytest.mark.parametrize( + argnames=("response_delay_seconds", "expect_timeout"), + argvalues=[(29, False), (31, True)], + ) + def test_default_timeout( + image: io.BytesIO | BinaryIO, + *, + response_delay_seconds: int, + expect_timeout: bool, + ) -> None: + """At 29 seconds there is no error; at 31 seconds there is a + timeout. + """ + with ( + freeze_time(auto_tick_seconds=1), + MockVWS(response_delay_seconds=response_delay_seconds) as mock, + ): database = VuforiaDatabase() mock.add_database(database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, ) - expected = default_timeout_seconds - assert vws_client.request_timeout_seconds == expected + + if expect_timeout: + with pytest.raises( + expected_exception=requests.exceptions.Timeout, + ): + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + else: + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) @staticmethod @pytest.mark.parametrize( From 2af9315334564b8685a13d3180bd67682ed258dd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 10:43:05 +0000 Subject: [PATCH 1265/1638] Remove mypy-invalid timeout attribute assertions --- tests/test_query.py | 2 -- tests/test_vws.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index fd014cadf..32c07989b 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -104,8 +104,6 @@ def test_custom_timeout( client_secret_key=database.client_secret_key, request_timeout_seconds=custom_timeout, ) - expected = custom_timeout - assert cloud_reco_client.request_timeout_seconds == expected target_id = vws_client.add_target( name="x", diff --git a/tests/test_vws.py b/tests/test_vws.py index 03dc796c9..bb71a0236 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -159,8 +159,6 @@ def test_custom_timeout( server_secret_key=database.server_secret_key, request_timeout_seconds=custom_timeout, ) - expected = custom_timeout - assert vws_client.request_timeout_seconds == expected vws_client.add_target( name="x", From 1c987da7c138b886d92fd49a50173338cc3eb422 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 10:48:13 +0000 Subject: [PATCH 1266/1638] Fix pylint empty-list comparison in timeout test --- tests/test_query.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index 32c07989b..3c78e7f77 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -80,16 +80,16 @@ def test_default_timeout( cloud_reco_client.query(image=image) else: matches = cloud_reco_client.query(image=image) - assert matches == [] + assert not matches @staticmethod @pytest.mark.parametrize( argnames="custom_timeout", - argvalues=[60.5, 60, (5.0, 30.0)], + argvalues=[60.5, 60.0, (5.0, 30.0)], ) def test_custom_timeout( image: io.BytesIO | BinaryIO, - custom_timeout: int | float | tuple[float, float], # noqa: PYI041 + custom_timeout: float | tuple[float, float], ) -> None: """It is possible to set a custom request timeout.""" with MockVWS() as mock: From 80c214b77f2ebaee417c45b63ef974ce420cdf95 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 10:51:47 +0000 Subject: [PATCH 1267/1638] Align timeout test parameter types --- tests/test_vws.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_vws.py b/tests/test_vws.py index bb71a0236..be4dd7a7e 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -144,11 +144,11 @@ def test_default_timeout( @staticmethod @pytest.mark.parametrize( argnames="custom_timeout", - argvalues=[60.5, 60, (5.0, 30.0)], + argvalues=[60.5, 60.0, (5.0, 30.0)], ) def test_custom_timeout( image: io.BytesIO | BinaryIO, - custom_timeout: int | float | tuple[float, float], # noqa: PYI041 + custom_timeout: float | tuple[float, float], ) -> None: """It is possible to set a custom request timeout.""" with MockVWS() as mock: From bdaacd891b766e5a5fafd3cef2c9e4b22e4f2ce8 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 11:59:12 +0000 Subject: [PATCH 1268/1638] Bump mock-vws and use sleep_fn in timeout tests --- pyproject.toml | 2 +- tests/test_query.py | 44 ++++++++------------------------------------ tests/test_vws.py | 36 +++++++----------------------------- 3 files changed, 16 insertions(+), 66 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2b0fb465f..2f5a29b78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "ty==0.0.16", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.15", + "vws-python-mock==2026.2.15.4", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", diff --git a/tests/test_query.py b/tests/test_query.py index 3c78e7f77..4e7ccb86d 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,5 +1,6 @@ """Tests for the ``CloudRecoService`` querying functionality.""" +import datetime import io import uuid from typing import BinaryIO @@ -63,8 +64,13 @@ def test_default_timeout( timeout. """ with ( - freeze_time(auto_tick_seconds=1), - MockVWS(response_delay_seconds=response_delay_seconds) as mock, + freeze_time() as frozen_datetime, + MockVWS( + response_delay_seconds=response_delay_seconds, + sleep_fn=lambda seconds: frozen_datetime.tick( + delta=datetime.timedelta(seconds=seconds), + ), + ) as mock, ): database = VuforiaDatabase() mock.add_database(database=database) @@ -82,40 +88,6 @@ def test_default_timeout( matches = cloud_reco_client.query(image=image) assert not matches - @staticmethod - @pytest.mark.parametrize( - argnames="custom_timeout", - argvalues=[60.5, 60.0, (5.0, 30.0)], - ) - def test_custom_timeout( - image: io.BytesIO | BinaryIO, - custom_timeout: float | tuple[float, float], - ) -> None: - """It is possible to set a custom request timeout.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - cloud_reco_client = CloudRecoService( - client_access_key=database.client_access_key, - client_secret_key=database.client_secret_key, - request_timeout_seconds=custom_timeout, - ) - - target_id = vws_client.add_target( - name="x", - width=1, - image=image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - matches = cloud_reco_client.query(image=image) - assert len(matches) == 1 - @staticmethod def test_timeout_raises_on_slow_response( image: io.BytesIO | BinaryIO, diff --git a/tests/test_vws.py b/tests/test_vws.py index be4dd7a7e..e93c35063 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -111,8 +111,13 @@ def test_default_timeout( timeout. """ with ( - freeze_time(auto_tick_seconds=1), - MockVWS(response_delay_seconds=response_delay_seconds) as mock, + freeze_time() as frozen_datetime, + MockVWS( + response_delay_seconds=response_delay_seconds, + sleep_fn=lambda seconds: frozen_datetime.tick( + delta=datetime.timedelta(seconds=seconds), + ), + ) as mock, ): database = VuforiaDatabase() mock.add_database(database=database) @@ -141,33 +146,6 @@ def test_default_timeout( application_metadata=None, ) - @staticmethod - @pytest.mark.parametrize( - argnames="custom_timeout", - argvalues=[60.5, 60.0, (5.0, 30.0)], - ) - def test_custom_timeout( - image: io.BytesIO | BinaryIO, - custom_timeout: float | tuple[float, float], - ) -> None: - """It is possible to set a custom request timeout.""" - with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - request_timeout_seconds=custom_timeout, - ) - - vws_client.add_target( - name="x", - width=1, - image=image, - active_flag=True, - application_metadata=None, - ) - @staticmethod def test_timeout_raises_on_slow_response( image: io.BytesIO | BinaryIO, From ff977797212068c55040d02ae4326992eba2d1b1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 11:59:50 +0000 Subject: [PATCH 1269/1638] Fix sleep_fn return type for mypy --- tests/test_query.py | 9 ++++++--- tests/test_vws.py | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index 4e7ccb86d..8c6a73769 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -67,9 +67,12 @@ def test_default_timeout( freeze_time() as frozen_datetime, MockVWS( response_delay_seconds=response_delay_seconds, - sleep_fn=lambda seconds: frozen_datetime.tick( - delta=datetime.timedelta(seconds=seconds), - ), + sleep_fn=lambda seconds: ( + frozen_datetime.tick( + delta=datetime.timedelta(seconds=seconds), + ), + None, + )[1], ) as mock, ): database = VuforiaDatabase() diff --git a/tests/test_vws.py b/tests/test_vws.py index e93c35063..6bb771f14 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -114,9 +114,12 @@ def test_default_timeout( freeze_time() as frozen_datetime, MockVWS( response_delay_seconds=response_delay_seconds, - sleep_fn=lambda seconds: frozen_datetime.tick( - delta=datetime.timedelta(seconds=seconds), - ), + sleep_fn=lambda seconds: ( + frozen_datetime.tick( + delta=datetime.timedelta(seconds=seconds), + ), + None, + )[1], ) as mock, ): database = VuforiaDatabase() From a8b8800f4c19b1d7c2d10063bd2e398154b296ec Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 12:03:14 +0000 Subject: [PATCH 1270/1638] Bump vws-python-mock to 2026.2.15.4 Co-Authored-By: Claude Haiku 4.5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2b0fb465f..2f5a29b78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "ty==0.0.16", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.15", + "vws-python-mock==2026.2.15.4", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", From 2d64771065a113a59c3dd65fa44f50577fe8b4b5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 12:07:32 +0000 Subject: [PATCH 1271/1638] Add tests for the default 30-second request timeout Test that VWS and CloudRecoService requests succeed at 29 seconds and time out at 31 seconds, verifying the existing default timeout behavior. Co-Authored-By: Claude Opus 4.6 --- tests/test_query.py | 50 ++++++++++++++++++++++++++++++++++++++ tests/test_vws.py | 58 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/tests/test_query.py b/tests/test_query.py index a79a712c0..31284325d 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,9 +1,13 @@ """Tests for the ``CloudRecoService`` querying functionality.""" +import datetime import io import uuid from typing import BinaryIO +import pytest +import requests +from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase @@ -42,6 +46,52 @@ def test_match( assert matching_target.target_id == target_id +class TestDefaultRequestTimeout: + """Tests for the default request timeout.""" + + @staticmethod + @pytest.mark.parametrize( + argnames=("response_delay_seconds", "expect_timeout"), + argvalues=[(29, False), (31, True)], + ) + def test_default_timeout( + image: io.BytesIO | BinaryIO, + *, + response_delay_seconds: int, + expect_timeout: bool, + ) -> None: + """At 29 seconds there is no error; at 31 seconds there is a + timeout. + """ + with ( + freeze_time() as frozen_datetime, + MockVWS( + response_delay_seconds=response_delay_seconds, + sleep_fn=lambda seconds: ( + frozen_datetime.tick( + delta=datetime.timedelta(seconds=seconds), + ), + None, + )[1], + ) as mock, + ): + database = VuforiaDatabase() + mock.add_database(database=database) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + if expect_timeout: + with pytest.raises( + expected_exception=requests.exceptions.Timeout, + ): + cloud_reco_client.query(image=image) + else: + matches = cloud_reco_client.query(image=image) + assert not matches + + class TestCustomBaseVWQURL: """Tests for using a custom base VWQ URL.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index 00936bde8..9a1c8ded9 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -8,6 +8,7 @@ from typing import BinaryIO import pytest +import requests from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase @@ -92,6 +93,63 @@ def test_add_two_targets( ) +class TestDefaultRequestTimeout: + """Tests for the default request timeout.""" + + @staticmethod + @pytest.mark.parametrize( + argnames=("response_delay_seconds", "expect_timeout"), + argvalues=[(29, False), (31, True)], + ) + def test_default_timeout( + image: io.BytesIO | BinaryIO, + *, + response_delay_seconds: int, + expect_timeout: bool, + ) -> None: + """At 29 seconds there is no error; at 31 seconds there is a + timeout. + """ + with ( + freeze_time() as frozen_datetime, + MockVWS( + response_delay_seconds=response_delay_seconds, + sleep_fn=lambda seconds: ( + frozen_datetime.tick( + delta=datetime.timedelta(seconds=seconds), + ), + None, + )[1], + ) as mock, + ): + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + if expect_timeout: + with pytest.raises( + expected_exception=requests.exceptions.Timeout, + ): + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + else: + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + class TestCustomBaseVWSURL: """Tests for using a custom base VWS URL.""" From 26b9256dcaca967567f75b28b0720ed22a03cbde Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 12:16:17 +0000 Subject: [PATCH 1272/1638] Add pyrefly non-exhaustive match as error --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 2f5a29b78..2dadc4af3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -376,3 +376,6 @@ exclude = [ ".venv" ] [tool.yamlfix] section_whitelines = 1 whitelines = 1 + +[tool.pyrefly] +errors.non-exhaustive-match = "error" From 495fad3cd48a71698a9e0f3518727682fd4505bd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 15 Feb 2026 12:20:06 +0000 Subject: [PATCH 1273/1638] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2dadc4af3..ed1e46588 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -302,6 +302,9 @@ plugins = [ "mypy_strict_kwargs", ] +[tool.pyrefly] +errors.non-exhaustive-match = "error" + [tool.pyright] enableTypeIgnoreComments = false reportUnnecessaryTypeIgnoreComment = true @@ -376,6 +379,3 @@ exclude = [ ".venv" ] [tool.yamlfix] section_whitelines = 1 whitelines = 1 - -[tool.pyrefly] -errors.non-exhaustive-match = "error" From a69677c294e8fd5ce4db907594cf17cba163b034 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 12:32:59 +0000 Subject: [PATCH 1274/1638] Add fast tests for custom request timeouts --- tests/test_query.py | 55 +++++++++++++++++++++++++++++++++++++ tests/test_vws.py | 66 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/tests/test_query.py b/tests/test_query.py index 31284325d..d7b64aff2 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -92,6 +92,61 @@ def test_default_timeout( assert not matches +class TestCustomRequestTimeout: + """Tests for custom request timeout values.""" + + @staticmethod + @pytest.mark.parametrize( + argnames=( + "custom_timeout", + "response_delay_seconds", + "expect_timeout", + ), + argvalues=[ + (0.1, 0.09, False), + (0.1, 0.11, True), + ((5.0, 0.1), 0.09, False), + ((5.0, 0.1), 0.11, True), + ], + ) + def test_custom_timeout( + image: io.BytesIO | BinaryIO, + *, + custom_timeout: float | tuple[float, float], + response_delay_seconds: float, + expect_timeout: bool, + ) -> None: + """Custom timeouts are honored for both float and tuple forms.""" + with ( + freeze_time() as frozen_datetime, + MockVWS( + response_delay_seconds=response_delay_seconds, + sleep_fn=lambda seconds: ( + frozen_datetime.tick( + delta=datetime.timedelta(seconds=seconds), + ), + None, + )[1], + ) as mock, + ): + database = VuforiaDatabase() + mock.add_database(database=database) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + request_timeout_seconds=custom_timeout, + ) + + if expect_timeout: + with pytest.raises( + expected_exception=requests.exceptions.Timeout, + ): + cloud_reco_client.query(image=image) + else: + matches = cloud_reco_client.query(image=image) + assert not matches + + class TestCustomBaseVWQURL: """Tests for using a custom base VWQ URL.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index 9a1c8ded9..f09906ee5 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -150,6 +150,72 @@ def test_default_timeout( ) +class TestCustomRequestTimeout: + """Tests for custom request timeout values.""" + + @staticmethod + @pytest.mark.parametrize( + argnames=( + "custom_timeout", + "response_delay_seconds", + "expect_timeout", + ), + argvalues=[ + (0.1, 0.09, False), + (0.1, 0.11, True), + ((5.0, 0.1), 0.09, False), + ((5.0, 0.1), 0.11, True), + ], + ) + def test_custom_timeout( + image: io.BytesIO | BinaryIO, + *, + custom_timeout: float | tuple[float, float], + response_delay_seconds: float, + expect_timeout: bool, + ) -> None: + """Custom timeouts are honored for both float and tuple forms.""" + with ( + freeze_time() as frozen_datetime, + MockVWS( + response_delay_seconds=response_delay_seconds, + sleep_fn=lambda seconds: ( + frozen_datetime.tick( + delta=datetime.timedelta(seconds=seconds), + ), + None, + )[1], + ) as mock, + ): + database = VuforiaDatabase() + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + request_timeout_seconds=custom_timeout, + ) + + if expect_timeout: + with pytest.raises( + expected_exception=requests.exceptions.Timeout, + ): + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + else: + vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + class TestCustomBaseVWSURL: """Tests for using a custom base VWS URL.""" From 9654d576889369d483ceb1cac4881fb19ee36df5 Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Sun, 15 Feb 2026 12:36:58 +0000 Subject: [PATCH 1275/1638] Bump CHANGELOG --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 174256880..20a40ddb9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,10 @@ Changelog Next ---- +2026.02.15 +---------- + + * Add ``request_timeout_seconds`` parameter to ``VWS`` and ``CloudRecoService``, allowing customization of the request timeout. This accepts a float or a ``(connect, read)`` tuple, matching the ``requests`` library's timeout interface. The default remains 30 seconds. 2025.03.10.1 From 1d1890940b37d3f0cd926d90608ab1fd29ee1af4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 15 Feb 2026 21:49:48 +0000 Subject: [PATCH 1276/1638] Enable coverage report.show_missing --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2dadc4af3..0da02ac7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -293,6 +293,7 @@ report.exclude_also = [ "if TYPE_CHECKING:", ] +report.show_missing = true [tool.mypy] strict = true files = [ "." ] From afa54a8546aa455f8a8c4ae633a4e1bc239c52bc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 15 Feb 2026 21:50:55 +0000 Subject: [PATCH 1277/1638] [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 0da02ac7e..931426792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -292,8 +292,8 @@ run.branch = true report.exclude_also = [ "if TYPE_CHECKING:", ] - report.show_missing = true + [tool.mypy] strict = true files = [ "." ] From 9b9855a0b836115f14a54b7d004a27570cdf8502 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:29:09 +0000 Subject: [PATCH 1278/1638] Bump ty from 0.0.16 to 0.0.17 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.16 to 0.0.17. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.16...0.0.17) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.17 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 43defd463..458aea327 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", - "ty==0.0.16", + "ty==0.0.17", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2026.2.15.4", From 1f228869cc8631068cfef17d3f2f0abdc4645892 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:29:21 +0000 Subject: [PATCH 1279/1638] Bump actionlint-py from 1.7.10.24 to 1.7.11.24 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.10.24 to 1.7.11.24. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.10.24...v1.7.11.24) --- updated-dependencies: - dependency-name: actionlint-py dependency-version: 1.7.11.24 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 43defd463..71a44c2da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.10.24", + "actionlint-py==1.7.11.24", "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", From 0b2673e6c03eab8ff5d101622248ea13401a1e0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:29:27 +0000 Subject: [PATCH 1280/1638] Bump doccmd from 2026.1.31.3 to 2026.2.15 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.1.31.3 to 2026.2.15. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.01.31.3...2026.02.15) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.2.15 dependency-type: direct:development 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 43defd463..1d5189397 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.1.31.3", + "doccmd==2026.2.15", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From d3f91187ab612dfc214890650dc6b32a15f5d5b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:29:38 +0000 Subject: [PATCH 1281/1638] Bump prek from 0.3.2 to 0.3.3 Bumps [prek](https://github.com/j178/prek) from 0.3.2 to 0.3.3. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.2...v0.3.3) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 43defd463..5676f951e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.2", + "prek==0.3.3", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", From b179aa8f4762ed0dd782c28f64ef06c14beaf73f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:38:48 +0000 Subject: [PATCH 1282/1638] Bump vws-python-mock from 2026.2.15.4 to 2026.2.15.5 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2026.2.15.4 to 2026.2.15.5. - [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/2026.02.15.4...2026.02.15.5) --- updated-dependencies: - dependency-name: vws-python-mock dependency-version: 2026.2.15.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c61d5e9e5..8aa97ac42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "ty==0.0.17", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.15.4", + "vws-python-mock==2026.2.15.5", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", From 8ebd2af35f65e9aad49011ad8684fc9021d20f8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:33:41 +0000 Subject: [PATCH 1283/1638] Bump pyrefly from 0.52.0 to 0.53.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.52.0 to 0.53.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.52.0...0.53.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.53.0 dependency-type: direct:development 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 c4cdc33c0..f73e2c9e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.16.0", - "pyrefly==0.52.0", + "pyrefly==0.53.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From d0c90e256d180fc1a7ca494bbad4c52d61f0e84f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:33:56 +0000 Subject: [PATCH 1284/1638] Bump vws-python-mock from 2026.2.15.5 to 2026.2.18 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2026.2.15.5 to 2026.2.18. - [Release notes](https://github.com/VWS-Python/vws-python-mock/releases) - [Changelog](https://github.com/VWS-Python/vws-python-mock/blob/main/CHANGELOG.rst) - [Commits](https://github.com/VWS-Python/vws-python-mock/compare/2026.02.15.5...2026.02.18) --- updated-dependencies: - dependency-name: vws-python-mock dependency-version: 2026.2.18 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c4cdc33c0..61d1d0081 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ optional-dependencies.dev = [ "ty==0.0.17", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.15.5", + "vws-python-mock==2026.2.18", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", From 1b4e9fa9403db4ac8f51111f25306860ec99a01e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:37:18 +0000 Subject: [PATCH 1285/1638] Bump pyproject-fmt from 2.16.0 to 2.16.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.16.0 to 2.16.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.16.0...pyproject-fmt/2.16.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.16.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f73e2c9e9..262882a72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.16.0", + "pyproject-fmt==2.16.1", "pyrefly==0.53.0", "pyright==1.1.408", "pyroma==5.0.1", From f24db3bd1bb425e228c649a17f72580507285a8d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 18 Feb 2026 12:34:40 +0000 Subject: [PATCH 1286/1638] Use CPU-only PyTorch index to speed up dev dependency installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit torch and torchvision are transitive dependencies of vws-python-mock. By default uv resolves them from PyPI, which provides CUDA-enabled wheels on Linux (~916 MB for torch). Redirecting to the pytorch CPU-only index reduces torch to ~189 MB — a 727 MB saving per cold-cache install. Following: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index fb0a98d48..28a4997a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,11 @@ optional-dependencies.dev = [ "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", "sybil==9.3.0", + # Listed explicitly (despite being transitive via vws-python-mock) so that + # [tool.uv.sources] can redirect to the CPU-only PyTorch index. + # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation + "torch>=2.5.1", + "torchvision>=0.20.1", "ty==0.0.17", "types-requests==2.32.4.20260107", "vulture==2.14", @@ -106,6 +111,11 @@ bdist_wheel.universal = true # Code to match this is in ``conf.py``. version_scheme = "post-release" +[tool.uv] +sources.torch = { index = "pytorch-cpu" } +sources.torchvision = { index = "pytorch-cpu" } +index = [ { name = "pytorch-cpu", url = "https://download.pytorch.org/whl/cpu", explicit = true } ] + [tool.ruff] line-length = 79 lint.select = [ @@ -277,6 +287,13 @@ pep621_dev_dependency_groups = [ "dev", "release", ] +# torch and torchvision are listed explicitly in dev deps to allow +# [tool.uv.sources] to redirect them to the CPU-only PyTorch index, +# but they are not directly imported in the vws-python source code. +per_rule_ignores.DEP002 = [ + "torch", + "torchvision", +] [tool.pyproject-fmt] indent = 4 From b46173516abbe846d8f80472fbca928a463d8b5b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:31:54 +0000 Subject: [PATCH 1287/1638] Bump vws-python-mock to 2026.2.18.2 Co-Authored-By: Claude Haiku 4.5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 28a4997a8..e6d42b7d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "ty==0.0.17", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.18", + "vws-python-mock==2026.2.18.2", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", From abe06b7bcd75830402f939581fdfe621091ed8c7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Feb 2026 00:31:41 +0000 Subject: [PATCH 1288/1638] Bump vws-python-mock to 2026.2.21 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update VuforiaDatabase → CloudDatabase and add_database → add_cloud_database(cloud_database=) to match new API. Co-Authored-By: Claude Sonnet 4.6 --- conftest.py | 6 +++--- docs/source/index.rst | 6 +++--- pyproject.toml | 2 +- tests/conftest.py | 14 +++++++------- tests/test_cloud_reco_exceptions.py | 10 +++++----- tests/test_query.py | 14 +++++++------- tests/test_vws.py | 26 +++++++++++++------------- tests/test_vws_exceptions.py | 10 +++++----- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/conftest.py b/conftest.py index 0e579a4db..89548f800 100644 --- a/conftest.py +++ b/conftest.py @@ -9,7 +9,7 @@ import pytest from beartype import beartype from mock_vws import MockVWS -from mock_vws.database import VuforiaDatabase +from mock_vws.database import CloudDatabase from sybil import Sybil from sybil.parsers.rest import ( ClearNamespaceParser, @@ -53,7 +53,7 @@ def fixture_mock_vws( client_access_key = uuid.uuid4().hex client_secret_key = uuid.uuid4().hex - database = VuforiaDatabase( + database = CloudDatabase( server_access_key=server_access_key, server_secret_key=server_secret_key, client_access_key=client_access_key, @@ -66,7 +66,7 @@ def fixture_mock_vws( monkeypatch.setenv(name="VWS_CLIENT_SECRET_KEY", value=client_secret_key) # We use a low processing time so that tests run quickly. with MockVWS(processing_time_seconds=0.2) as mock: - mock.add_database(database=database) + mock.add_cloud_database(cloud_database=database) yield diff --git a/docs/source/index.rst b/docs/source/index.rst index 818b0698d..c61c2a302 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -78,13 +78,13 @@ To write unit tests for code which uses this library, without using your Vuforia import pathlib from mock_vws import MockVWS - from mock_vws.database import VuforiaDatabase + from mock_vws.database import CloudDatabase from vws import VWS, CloudRecoService with MockVWS() as mock: - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, diff --git a/pyproject.toml b/pyproject.toml index e6d42b7d0..510f2c80b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "ty==0.0.17", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.18.2", + "vws-python-mock==2026.2.21", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", diff --git a/tests/conftest.py b/tests/conftest.py index 7c0647786..9073a8c03 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,23 +7,23 @@ import pytest from mock_vws import MockVWS -from mock_vws.database import VuforiaDatabase +from mock_vws.database import CloudDatabase from vws import VWS, CloudRecoService @pytest.fixture(name="_mock_database") -def fixture_mock_database() -> Generator[VuforiaDatabase]: - """Yield a mock ``VuforiaDatabase``.""" +def fixture_mock_database() -> Generator[CloudDatabase]: + """Yield a mock ``CloudDatabase``.""" # 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) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) yield database @pytest.fixture -def vws_client(_mock_database: VuforiaDatabase) -> VWS: +def vws_client(_mock_database: CloudDatabase) -> VWS: """A VWS client which connects to a mock database.""" return VWS( server_access_key=_mock_database.server_access_key, @@ -32,7 +32,7 @@ def vws_client(_mock_database: VuforiaDatabase) -> VWS: @pytest.fixture -def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService: +def cloud_reco_client(_mock_database: CloudDatabase) -> CloudRecoService: """A ``CloudRecoService`` client which connects to a mock database.""" return CloudRecoService( client_access_key=_mock_database.client_access_key, diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 5576f4d40..3b2922fd9 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -6,7 +6,7 @@ import pytest from mock_vws import MockVWS -from mock_vws.database import VuforiaDatabase +from mock_vws.database import CloudDatabase from mock_vws.states import States from vws import CloudRecoService @@ -85,13 +85,13 @@ def test_authentication_failure( key exists but the client secret key is incorrect. """ - database = VuforiaDatabase() + database = CloudDatabase() cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=uuid.uuid4().hex, ) with MockVWS() as mock: - mock.add_database(database=database) + mock.add_cloud_database(cloud_database=database) with pytest.raises( expected_exception=AuthenticationFailureError @@ -108,9 +108,9 @@ def test_inactive_project( An ``InactiveProject`` exception is raised when querying an inactive database. """ - database = VuforiaDatabase(state=States.PROJECT_INACTIVE) + database = CloudDatabase(state=States.PROJECT_INACTIVE) with MockVWS() as mock: - mock.add_database(database=database) + mock.add_cloud_database(cloud_database=database) cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=database.client_secret_key, diff --git a/tests/test_query.py b/tests/test_query.py index d7b64aff2..b5ced6dde 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -9,7 +9,7 @@ import requests from freezegun import freeze_time from mock_vws import MockVWS -from mock_vws.database import VuforiaDatabase +from mock_vws.database import CloudDatabase from vws import VWS, CloudRecoService from vws.include_target_data import CloudRecoIncludeTargetData @@ -75,8 +75,8 @@ def test_default_timeout( )[1], ) as mock, ): - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=database.client_secret_key, @@ -129,8 +129,8 @@ def test_custom_timeout( )[1], ) as mock, ): - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=database.client_secret_key, @@ -160,8 +160,8 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: """ base_vwq_url = "http://example.com" with MockVWS(base_vwq_url=base_vwq_url) as mock: - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, diff --git a/tests/test_vws.py b/tests/test_vws.py index f09906ee5..87cdbf8f0 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -11,7 +11,7 @@ import requests from freezegun import freeze_time from mock_vws import MockVWS -from mock_vws.database import VuforiaDatabase +from mock_vws.database import CloudDatabase from vws import VWS, CloudRecoService from vws.exceptions.custom_exceptions import TargetProcessingTimeoutError @@ -122,8 +122,8 @@ def test_default_timeout( )[1], ) as mock, ): - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, @@ -187,8 +187,8 @@ def test_custom_timeout( )[1], ) as mock, ): - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, @@ -228,8 +228,8 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: """ base_vws_url = "http://example.com" with MockVWS(base_vws_url=base_vws_url) as mock: - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, @@ -489,8 +489,8 @@ def test_default_seconds_between_requests( ) -> None: """By default, 0.2 seconds are waited between polling requests.""" with MockVWS(processing_time_seconds=0.5) as mock: - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, @@ -541,8 +541,8 @@ def test_custom_seconds_between_requests( requests. """ with MockVWS(processing_time_seconds=0.5) as mock: - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, @@ -589,8 +589,8 @@ def test_custom_seconds_between_requests( def test_custom_timeout(image: io.BytesIO | BinaryIO) -> None: """It is possible to set a maximum timeout.""" with MockVWS(processing_time_seconds=0.5) as mock: - database = VuforiaDatabase() - mock.add_database(database=database) + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 4262b3ea6..74374e3d0 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -7,7 +7,7 @@ import pytest from freezegun import freeze_time from mock_vws import MockVWS -from mock_vws.database import VuforiaDatabase +from mock_vws.database import CloudDatabase from mock_vws.states import States from vws import VWS @@ -175,9 +175,9 @@ def test_project_inactive( inactive database. """ - database = VuforiaDatabase(state=States.PROJECT_INACTIVE) + database = CloudDatabase(state=States.PROJECT_INACTIVE) with MockVWS() as mock: - mock.add_database(database=database) + mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, @@ -286,7 +286,7 @@ def test_authentication_failure( exists but the server secret key is incorrect, or when a client key is incorrect. """ - database = VuforiaDatabase() + database = CloudDatabase() vws_client = VWS( server_access_key=database.server_access_key, @@ -294,7 +294,7 @@ def test_authentication_failure( ) with MockVWS() as mock: - mock.add_database(database=database) + mock.add_cloud_database(cloud_database=database) with pytest.raises( expected_exception=AuthenticationFailureError From 1100913e2b1d0bf9a7efef1db2082788c6c1d84f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 18 Feb 2026 23:27:43 +0000 Subject: [PATCH 1289/1638] Add VuMark generation support Implement VuMark instance generation API with support for multiple image formats (PNG, SVG, PDF). Add InvalidAcceptHeaderError and InvalidInstanceIdError exceptions for proper error handling. Includes comprehensive tests for all VuMark formats. Co-Authored-By: Claude Haiku 4.5 --- docs/source/api-reference.rst | 4 + pyproject.toml | 3 + src/vws/exceptions/vws_exceptions.py | 16 ++++ src/vws/vumark_accept.py | 18 +++++ src/vws/vws.py | 116 +++++++++++++++++++++++++++ tests/test_vws.py | 53 ++++++++++++ tests/test_vws_exceptions.py | 29 +++++++ 7 files changed, 239 insertions(+) create mode 100644 src/vws/vumark_accept.py diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 01bba09b2..c94d810e1 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -13,6 +13,10 @@ API Reference :undoc-members: :members: +.. automodule:: vws.vumark_accept + :undoc-members: + :members: + .. automodule:: vws.response :undoc-members: :members: diff --git a/pyproject.toml b/pyproject.toml index 510f2c80b..a00c706fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -363,6 +363,9 @@ ignore_names = [ "pytest_plugins", # pytest fixtures - we name fixtures like this for this purpose "fixture_*", + # Enum members used dynamically + "PDF", + "SVG", # Sphinx "autoclass_content", "autoclass_content", diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 6b1447577..6143f7397 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -167,3 +167,19 @@ class TooManyRequestsError(VWSError): # pragma: no cover """Exception raised when Vuforia returns a response with a result code 'TooManyRequests'. """ + + +# This is not simulated by client code because the accept parameter uses +# the VuMarkAccept enum, which only allows valid values. +@beartype +class InvalidAcceptHeaderError(VWSError): # pragma: no cover + """Exception raised when Vuforia returns a response with a result code + 'InvalidAcceptHeader'. + """ + + +@beartype +class InvalidInstanceIdError(VWSError): + """Exception raised when Vuforia returns a response with a result code + 'InvalidInstanceId'. + """ diff --git a/src/vws/vumark_accept.py b/src/vws/vumark_accept.py new file mode 100644 index 000000000..5dd21ab08 --- /dev/null +++ b/src/vws/vumark_accept.py @@ -0,0 +1,18 @@ +"""Tools for managing ``VWS.generate_vumark_instance``'s ``accept``.""" + +from enum import StrEnum, unique + +from beartype import beartype + + +@beartype +@unique +class VuMarkAccept(StrEnum): + """ + Options for the ``accept`` parameter of + ``VWS.generate_vumark_instance``. + """ + + PNG = "image/png" + SVG = "image/svg+xml" + PDF = "application/pdf" diff --git a/src/vws/vws.py b/src/vws/vws.py index 4cb75ca32..7b026a3c3 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -23,6 +23,8 @@ DateRangeError, FailError, ImageTooLargeError, + InvalidAcceptHeaderError, + InvalidInstanceIdError, MetadataTooLargeError, ProjectHasNoAPIAccessError, ProjectInactiveError, @@ -44,6 +46,7 @@ TargetSummaryReport, ) from vws.response import Response +from vws.vumark_accept import VuMarkAccept _ImageType = io.BytesIO | BinaryIO @@ -700,3 +703,116 @@ def update_target( expected_result_code="Success", content_type="application/json", ) + + def generate_vumark_instance( + self, + *, + target_id: str, + instance_id: str, + accept: VuMarkAccept = VuMarkAccept.PNG, + ) -> bytes: + """Generate a VuMark instance image. + + See + https://developer.vuforia.com/library/vuforia-engine/web-api/vumark-generation-web-api/ + for parameter details. + + Args: + target_id: The ID of the VuMark target. + instance_id: The instance ID to encode in the VuMark. + accept: The image format to return. + + Returns: + The VuMark instance image bytes. + + Raises: + ~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.InvalidAcceptHeaderError: The + Accept header value is not supported. + ~vws.exceptions.vws_exceptions.InvalidInstanceIdError: The + instance ID is invalid. For example, it may be empty. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.TargetStatusNotSuccessError: The + target is not in the success state. + ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target + ID does not match a target in the database. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. + """ + request_path = f"/targets/{target_id}/instances" + content_type = "application/json" + request_data = json.dumps(obj={"instance_id": instance_id}).encode( + encoding="utf-8", + ) + date_string = rfc_1123_date() + + signature_string = authorization_header( + access_key=self._server_access_key, + secret_key=self._server_secret_key, + method=HTTPMethod.POST, + content=request_data, + content_type=content_type, + date=date_string, + request_path=request_path, + ) + + headers = { + "Authorization": signature_string, + "Date": date_string, + "Content-Type": content_type, + "Accept": accept, + } + + url = urljoin(base=self._base_vws_url, url=request_path) + + requests_response = requests.request( + method=HTTPMethod.POST, + url=url, + headers=headers, + data=request_data, + timeout=self._request_timeout_seconds, + ) + + if requests_response.status_code == HTTPStatus.OK: + return bytes(requests_response.content) + + 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, + tell_position=requests_response.raw.tell(), + ) + + if ( + requests_response.status_code == HTTPStatus.TOO_MANY_REQUESTS + ): # pragma: no cover + raise TooManyRequestsError(response=response) + + if ( + requests_response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + + result_code = json.loads(s=response.text)["result_code"] + + exception = { + "AuthenticationFailure": AuthenticationFailureError, + "DateRangeError": DateRangeError, + "Fail": FailError, + "InvalidAcceptHeader": InvalidAcceptHeaderError, + "InvalidInstanceId": InvalidInstanceIdError, + "RequestTimeTooSkewed": RequestTimeTooSkewedError, + "TargetStatusNotSuccess": TargetStatusNotSuccessError, + "UnknownTarget": UnknownTargetError, + }[result_code] + + raise exception(response=response) diff --git a/tests/test_vws.py b/tests/test_vws.py index 87cdbf8f0..1e077e16a 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -21,6 +21,7 @@ TargetStatuses, TargetSummaryReport, ) +from vws.vumark_accept import VuMarkAccept class TestAddTarget: @@ -729,3 +730,55 @@ def test_no_fields_given( ) vws_client.wait_for_target_processed(target_id=target_id) vws_client.update_target(target_id=target_id) + + +class TestGenerateVumarkInstance: + """Tests for generating VuMark instances.""" + + @staticmethod + @pytest.mark.parametrize( + argnames="accept", + argvalues=list(VuMarkAccept), + ) + def test_generate_vumark_instance( + vws_client: VWS, + high_quality_image: io.BytesIO, + accept: VuMarkAccept, + ) -> None: + """Bytes are returned when generating a VuMark instance.""" + target_id = vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + result = vws_client.generate_vumark_instance( + target_id=target_id, + instance_id="12345", + accept=accept, + ) + assert isinstance(result, bytes) + assert len(result) > 0 + + @staticmethod + def test_generate_vumark_default_accept( + vws_client: VWS, + high_quality_image: io.BytesIO, + ) -> None: + """By default, PNG is returned.""" + target_id = vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + result = vws_client.generate_vumark_instance( + target_id=target_id, + instance_id="12345", + ) + assert isinstance(result, bytes) + assert len(result) > 0 diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 74374e3d0..4a9f012de 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -21,6 +21,8 @@ DateRangeError, FailError, ImageTooLargeError, + InvalidAcceptHeaderError, + InvalidInstanceIdError, MetadataTooLargeError, ProjectHasNoAPIAccessError, ProjectInactiveError, @@ -342,6 +344,8 @@ def test_vwsexception_inheritance() -> None: DateRangeError, FailError, ImageTooLargeError, + InvalidAcceptHeaderError, + InvalidInstanceIdError, MetadataTooLargeError, ProjectInactiveError, ProjectHasNoAPIAccessError, @@ -358,6 +362,31 @@ def test_vwsexception_inheritance() -> None: assert issubclass(subclass, VWSError) +def test_invalid_instance_id( + vws_client: VWS, + high_quality_image: io.BytesIO, +) -> None: + """ + An ``InvalidInstanceId`` exception is raised when an empty instance + ID is given. + """ + target_id = vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + with pytest.raises(expected_exception=InvalidInstanceIdError) as exc: + vws_client.generate_vumark_instance( + target_id=target_id, + instance_id="", + ) + + assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + + def test_base_exception( vws_client: VWS, high_quality_image: io.BytesIO, From f5437a99a6948e1e96f8de7b141bc16c10deb5f5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 18 Feb 2026 23:34:16 +0000 Subject: [PATCH 1290/1638] Add BadRequestError and bump vws-python-mock to 2026.2.18.2 Add BadRequestError exception for the BadRequest result code returned by the VuMark endpoint when invalid JSON is sent. Map it in generate_vumark_instance and include it in the exception inheritance test. Bump vws-python-mock to 2026.2.18.2 which adds full VuMark auth endpoint testing support. Co-Authored-By: Claude Haiku 4.5 --- src/vws/exceptions/vws_exceptions.py | 9 +++++++++ src/vws/vws.py | 2 ++ tests/test_vws_exceptions.py | 2 ++ 3 files changed, 13 insertions(+) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 6143f7397..6baac80c6 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -183,3 +183,12 @@ class InvalidInstanceIdError(VWSError): """Exception raised when Vuforia returns a response with a result code 'InvalidInstanceId'. """ + + +# This is not simulated by client code because the request body +# is always valid JSON when using this client. +@beartype +class BadRequestError(VWSError): # pragma: no cover + """Exception raised when Vuforia returns a response with a result code + 'BadRequest'. + """ diff --git a/src/vws/vws.py b/src/vws/vws.py index 7b026a3c3..ccc5f0056 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -20,6 +20,7 @@ from vws.exceptions.vws_exceptions import ( AuthenticationFailureError, BadImageError, + BadRequestError, DateRangeError, FailError, ImageTooLargeError, @@ -806,6 +807,7 @@ def generate_vumark_instance( exception = { "AuthenticationFailure": AuthenticationFailureError, + "BadRequest": BadRequestError, "DateRangeError": DateRangeError, "Fail": FailError, "InvalidAcceptHeader": InvalidAcceptHeaderError, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 4a9f012de..4f5c3eded 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -18,6 +18,7 @@ from vws.exceptions.vws_exceptions import ( AuthenticationFailureError, BadImageError, + BadRequestError, DateRangeError, FailError, ImageTooLargeError, @@ -341,6 +342,7 @@ def test_vwsexception_inheritance() -> None: subclasses = [ AuthenticationFailureError, BadImageError, + BadRequestError, DateRangeError, FailError, ImageTooLargeError, From 1d8053baad08e87f99ed5fa6489839b4b9e6735e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:03:20 +0000 Subject: [PATCH 1291/1638] Add 'enum' to spelling private dict Fix pylint wrong-spelling-in-comment (C0401) for the word 'enum' in the VuMark exception comments. Co-Authored-By: Claude Haiku 4.5 --- spelling_private_dict.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index ce782a4af..d5d5d3e99 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -42,6 +42,7 @@ decodable dev dict docstring +enum filename foo formdata From 8f0d330d7e22cc9adc09eefe38dbef1e122365e2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:25:22 +0000 Subject: [PATCH 1292/1638] Assert format-specific content in VuMark tests Check magic bytes/prefix for each format (PNG, SVG, PDF) rather than just asserting non-empty bytes are returned. Co-Authored-By: Claude Sonnet 4.6 --- tests/test_vws.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/test_vws.py b/tests/test_vws.py index 1e077e16a..575612ca8 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -737,15 +737,20 @@ class TestGenerateVumarkInstance: @staticmethod @pytest.mark.parametrize( - argnames="accept", - argvalues=list(VuMarkAccept), + argnames=("accept", "expected_prefix"), + argvalues=[ + pytest.param(VuMarkAccept.PNG, b"\x89PNG\r\n\x1a\n", id="png"), + pytest.param(VuMarkAccept.SVG, b"<", id="svg"), + pytest.param(VuMarkAccept.PDF, b"%PDF", id="pdf"), + ], ) def test_generate_vumark_instance( vws_client: VWS, high_quality_image: io.BytesIO, accept: VuMarkAccept, + expected_prefix: bytes, ) -> None: - """Bytes are returned when generating a VuMark instance.""" + """The returned bytes match the requested format.""" target_id = vws_client.add_target( name="x", width=1, @@ -759,8 +764,7 @@ def test_generate_vumark_instance( instance_id="12345", accept=accept, ) - assert isinstance(result, bytes) - assert len(result) > 0 + assert result.startswith(expected_prefix) @staticmethod def test_generate_vumark_default_accept( @@ -780,5 +784,4 @@ def test_generate_vumark_default_accept( target_id=target_id, instance_id="12345", ) - assert isinstance(result, bytes) - assert len(result) > 0 + assert result.startswith(b"\x89PNG\r\n\x1a\n") From 9d37d6e796b5c2fcd75929c5da8501b9f8be994d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:26:48 +0000 Subject: [PATCH 1293/1638] Remove default for accept parameter in generate_vumark_instance Co-Authored-By: Claude Sonnet 4.6 --- src/vws/vws.py | 2 +- tests/test_vws.py | 20 -------------------- tests/test_vws_exceptions.py | 2 ++ 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index ccc5f0056..e0035ffcc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -710,7 +710,7 @@ def generate_vumark_instance( *, target_id: str, instance_id: str, - accept: VuMarkAccept = VuMarkAccept.PNG, + accept: VuMarkAccept, ) -> bytes: """Generate a VuMark instance image. diff --git a/tests/test_vws.py b/tests/test_vws.py index 575612ca8..8ac09a3e1 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -765,23 +765,3 @@ def test_generate_vumark_instance( accept=accept, ) assert result.startswith(expected_prefix) - - @staticmethod - def test_generate_vumark_default_accept( - vws_client: VWS, - high_quality_image: io.BytesIO, - ) -> None: - """By default, PNG is returned.""" - target_id = vws_client.add_target( - name="x", - width=1, - image=high_quality_image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - result = vws_client.generate_vumark_instance( - target_id=target_id, - instance_id="12345", - ) - assert result.startswith(b"\x89PNG\r\n\x1a\n") diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 4f5c3eded..b55f35fed 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -36,6 +36,7 @@ TargetStatusProcessingError, UnknownTargetError, ) +from vws.vumark_accept import VuMarkAccept def test_image_too_large( @@ -384,6 +385,7 @@ def test_invalid_instance_id( vws_client.generate_vumark_instance( target_id=target_id, instance_id="", + accept=VuMarkAccept.PNG, ) assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY From 628100943cc8856a7a0d53c37ef5b77ed6337698 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:27:57 +0000 Subject: [PATCH 1294/1638] Remove now-unnecessary vulture ignore for SVG and PDF enum members They are now referenced explicitly in the parametrized test. Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a00c706fb..510f2c80b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -363,9 +363,6 @@ ignore_names = [ "pytest_plugins", # pytest fixtures - we name fixtures like this for this purpose "fixture_*", - # Enum members used dynamically - "PDF", - "SVG", # Sphinx "autoclass_content", "autoclass_content", From d09630d330f962eca86aab15dc24f7c1f4610082 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:29:34 +0000 Subject: [PATCH 1295/1638] Add BadRequest, InvalidAcceptHeader, InvalidInstanceId to spelling dict Fix Sphinx spell checker failures for the result code names used in the new exception docstrings. Co-Authored-By: Claude Sonnet 4.6 --- spelling_private_dict.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index d5d5d3e99..5d095eabd 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -1,9 +1,12 @@ AuthenticationFailure BadImage +BadRequest ConnectionErrorPossiblyImageTooLarge DateRangeError ImageTooLarge InactiveProject +InvalidAcceptHeader +InvalidInstanceId JSONDecodeError MatchProcessing MaxNumResultsOutOfRange From dc7208b859cef76f2baf2115086b7f704d845e42 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:31:17 +0000 Subject: [PATCH 1296/1638] Use double backticks for result codes in exception docstrings Replace single-quoted result code names with double backticks so the Sphinx spell checker treats them as inline code rather than words. Co-Authored-By: Claude Sonnet 4.6 --- spelling_private_dict.txt | 3 --- src/vws/exceptions/vws_exceptions.py | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 5d095eabd..d5d5d3e99 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -1,12 +1,9 @@ AuthenticationFailure BadImage -BadRequest ConnectionErrorPossiblyImageTooLarge DateRangeError ImageTooLarge InactiveProject -InvalidAcceptHeader -InvalidInstanceId JSONDecodeError MatchProcessing MaxNumResultsOutOfRange diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 6baac80c6..e2d44ec35 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -174,14 +174,14 @@ class TooManyRequestsError(VWSError): # pragma: no cover @beartype class InvalidAcceptHeaderError(VWSError): # pragma: no cover """Exception raised when Vuforia returns a response with a result code - 'InvalidAcceptHeader'. + ``InvalidAcceptHeader``. """ @beartype class InvalidInstanceIdError(VWSError): """Exception raised when Vuforia returns a response with a result code - 'InvalidInstanceId'. + ``InvalidInstanceId``. """ @@ -190,5 +190,5 @@ class InvalidInstanceIdError(VWSError): @beartype class BadRequestError(VWSError): # pragma: no cover """Exception raised when Vuforia returns a response with a result code - 'BadRequest'. + ``BadRequest``. """ From 604f9262c5d9c2e7e1f77280b71a4e6d163eeefc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:36:57 +0000 Subject: [PATCH 1297/1638] Refactor generate_vumark_instance to use _target_api_request Adds extra_headers parameter to _target_api_request and content field to Response, allowing generate_vumark_instance to reuse shared auth/signing logic instead of duplicating it. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/query.py | 1 + src/vws/response.py | 1 + src/vws/vws.py | 51 +++++++++++++-------------------------------- 3 files changed, 17 insertions(+), 36 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index dd36e8f21..ad55d8a47 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -156,6 +156,7 @@ def query( headers=dict(requests_response.headers), request_body=requests_response.request.body, tell_position=requests_response.raw.tell(), + content=bytes(requests_response.content), ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: diff --git a/src/vws/response.py b/src/vws/response.py index e2060cb9e..71d1b9a48 100644 --- a/src/vws/response.py +++ b/src/vws/response.py @@ -16,3 +16,4 @@ class Response: headers: dict[str, str] request_body: bytes | str | None tell_position: int + content: bytes diff --git a/src/vws/vws.py b/src/vws/vws.py index e0035ffcc..f3455b809 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -73,6 +73,7 @@ def _target_api_request( request_path: str, base_vws_url: str, request_timeout_seconds: float | tuple[float, float], + extra_headers: dict[str, str] | None = None, ) -> Response: """Make a request to the Vuforia Target API. @@ -90,6 +91,7 @@ def _target_api_request( request_timeout_seconds: The timeout for the request, as used by ``requests.request``. This can be a float to set both the connect and read timeouts, or a (connect, read) tuple. + extra_headers: Additional headers to include in the request. Returns: The response to the request made by `requests`. @@ -110,6 +112,7 @@ def _target_api_request( "Authorization": signature_string, "Date": date_string, "Content-Type": content_type, + **(extra_headers or {}), } url = urljoin(base=base_vws_url, url=request_path) @@ -129,6 +132,7 @@ def _target_api_request( headers=dict(requests_response.headers), request_body=requests_response.request.body, tell_position=requests_response.raw.tell(), + content=bytes(requests_response.content), ) @@ -752,54 +756,29 @@ def generate_vumark_instance( request_data = json.dumps(obj={"instance_id": instance_id}).encode( encoding="utf-8", ) - date_string = rfc_1123_date() - signature_string = authorization_header( - access_key=self._server_access_key, - secret_key=self._server_secret_key, - method=HTTPMethod.POST, - content=request_data, + response = _target_api_request( content_type=content_type, - date=date_string, - request_path=request_path, - ) - - headers = { - "Authorization": signature_string, - "Date": date_string, - "Content-Type": content_type, - "Accept": accept, - } - - url = urljoin(base=self._base_vws_url, url=request_path) - - requests_response = requests.request( + server_access_key=self._server_access_key, + server_secret_key=self._server_secret_key, method=HTTPMethod.POST, - url=url, - headers=headers, data=request_data, - timeout=self._request_timeout_seconds, + request_path=request_path, + base_vws_url=self._base_vws_url, + request_timeout_seconds=self._request_timeout_seconds, + extra_headers={"Accept": accept}, ) - if requests_response.status_code == HTTPStatus.OK: - return bytes(requests_response.content) - - 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, - tell_position=requests_response.raw.tell(), - ) + if response.status_code == HTTPStatus.OK: + return response.content if ( - requests_response.status_code == HTTPStatus.TOO_MANY_REQUESTS + response.status_code == HTTPStatus.TOO_MANY_REQUESTS ): # pragma: no cover raise TooManyRequestsError(response=response) if ( - requests_response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR ): # pragma: no cover raise ServerError(response=response) From eb6f371af75431616a4bbdae6b4ce79dd6d9cd4b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:39:29 +0000 Subject: [PATCH 1298/1638] Move 429/5xx handling into _target_api_request Centralises TooManyRequestsError and ServerError raising so callers (make_request, generate_vumark_instance) no longer duplicate the logic. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/vws.py | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index f3455b809..e1d2eea46 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -95,6 +95,12 @@ def _target_api_request( Returns: The response to the request made by `requests`. + + Raises: + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. """ date_string = rfc_1123_date() @@ -125,7 +131,7 @@ def _target_api_request( timeout=request_timeout_seconds, ) - return Response( + response = Response( text=requests_response.text, url=requests_response.url, status_code=requests_response.status_code, @@ -135,6 +141,19 @@ def _target_api_request( content=bytes(requests_response.content), ) + if ( + response.status_code == HTTPStatus.TOO_MANY_REQUESTS + ): # pragma: no cover + # The Vuforia API returns a 429 response with no JSON body. + raise TooManyRequestsError(response=response) + + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + + return response + @beartype(conf=BeartypeConf(is_pep484_tower=True)) class VWS: @@ -207,17 +226,6 @@ def make_request( request_timeout_seconds=self._request_timeout_seconds, ) - if ( - response.status_code == HTTPStatus.TOO_MANY_REQUESTS - ): # pragma: no cover - # The Vuforia API returns a 429 response with no JSON body. - raise TooManyRequestsError(response=response) - - if ( - response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR - ): # pragma: no cover - raise ServerError(response=response) - result_code = json.loads(s=response.text)["result_code"] if result_code == expected_result_code: @@ -772,16 +780,6 @@ def generate_vumark_instance( if response.status_code == HTTPStatus.OK: return response.content - if ( - response.status_code == HTTPStatus.TOO_MANY_REQUESTS - ): # pragma: no cover - raise TooManyRequestsError(response=response) - - if ( - response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR - ): # pragma: no cover - raise ServerError(response=response) - result_code = json.loads(s=response.text)["result_code"] exception = { From 81a0741287f8609616a7483383254398cb2a686d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:45:47 +0000 Subject: [PATCH 1299/1638] Use make_request in generate_vumark_instance Adds extra_headers and optional expected_result_code (None = binary/HTTP-200 success) to make_request, and adds VuMark-specific result codes to its error dispatch dict, so generate_vumark_instance no longer needs to call _target_api_request directly. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/vws.py | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index e1d2eea46..c121e081d 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -187,8 +187,9 @@ def make_request( method: str, data: bytes, request_path: str, - expected_result_code: str, + expected_result_code: str | None, content_type: str, + extra_headers: dict[str, str] | None = None, ) -> Response: """Make a request to the Vuforia Target API. @@ -201,7 +202,11 @@ def make_request( request. expected_result_code: See "VWS API Result Codes" on https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api. + Pass ``None`` for endpoints that return a non-JSON success + response (e.g. binary data); success is then determined by an + HTTP 200 status code. content_type: The content type of the request. + extra_headers: Additional headers to include in the request. Returns: The response to the request made by `requests`. @@ -224,8 +229,15 @@ def make_request( request_path=request_path, base_vws_url=self._base_vws_url, request_timeout_seconds=self._request_timeout_seconds, + extra_headers=extra_headers, ) + if ( + response.status_code == HTTPStatus.OK + and expected_result_code is None + ): + return response + result_code = json.loads(s=response.text)["result_code"] if result_code == expected_result_code: @@ -234,9 +246,12 @@ def make_request( exception = { "AuthenticationFailure": AuthenticationFailureError, "BadImage": BadImageError, + "BadRequest": BadRequestError, "DateRangeError": DateRangeError, "Fail": FailError, "ImageTooLarge": ImageTooLargeError, + "InvalidAcceptHeader": InvalidAcceptHeaderError, + "InvalidInstanceId": InvalidInstanceIdError, "MetadataTooLarge": MetadataTooLargeError, "ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError, "ProjectInactive": ProjectInactiveError, @@ -765,33 +780,13 @@ def generate_vumark_instance( encoding="utf-8", ) - response = _target_api_request( - content_type=content_type, - server_access_key=self._server_access_key, - server_secret_key=self._server_secret_key, + response = self.make_request( method=HTTPMethod.POST, data=request_data, request_path=request_path, - base_vws_url=self._base_vws_url, - request_timeout_seconds=self._request_timeout_seconds, + expected_result_code=None, + content_type=content_type, extra_headers={"Accept": accept}, ) - if response.status_code == HTTPStatus.OK: - return response.content - - result_code = json.loads(s=response.text)["result_code"] - - exception = { - "AuthenticationFailure": AuthenticationFailureError, - "BadRequest": BadRequestError, - "DateRangeError": DateRangeError, - "Fail": FailError, - "InvalidAcceptHeader": InvalidAcceptHeaderError, - "InvalidInstanceId": InvalidInstanceIdError, - "RequestTimeTooSkewed": RequestTimeTooSkewedError, - "TargetStatusNotSuccess": TargetStatusNotSuccessError, - "UnknownTarget": UnknownTargetError, - }[result_code] - - raise exception(response=response) + return response.content From b326fd3b72b1bef381f4a51874a17f20d31e88aa Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:48:13 +0000 Subject: [PATCH 1300/1638] Move 429/5xx handling back to make_request Now that generate_vumark_instance uses make_request, _target_api_request can be a pure sign-and-send function again. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/vws.py | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index c121e081d..23d5dbcbc 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -95,12 +95,6 @@ def _target_api_request( Returns: The response to the request made by `requests`. - - Raises: - ~vws.exceptions.custom_exceptions.ServerError: There is an error - with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is - rate limiting access. """ date_string = rfc_1123_date() @@ -131,7 +125,7 @@ def _target_api_request( timeout=request_timeout_seconds, ) - response = Response( + return Response( text=requests_response.text, url=requests_response.url, status_code=requests_response.status_code, @@ -141,19 +135,6 @@ def _target_api_request( content=bytes(requests_response.content), ) - if ( - response.status_code == HTTPStatus.TOO_MANY_REQUESTS - ): # pragma: no cover - # The Vuforia API returns a 429 response with no JSON body. - raise TooManyRequestsError(response=response) - - if ( - response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR - ): # pragma: no cover - raise ServerError(response=response) - - return response - @beartype(conf=BeartypeConf(is_pep484_tower=True)) class VWS: @@ -232,6 +213,17 @@ def make_request( extra_headers=extra_headers, ) + if ( + response.status_code == HTTPStatus.TOO_MANY_REQUESTS + ): # pragma: no cover + # The Vuforia API returns a 429 response with no JSON body. + raise TooManyRequestsError(response=response) + + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + if ( response.status_code == HTTPStatus.OK and expected_result_code is None From bda9d1ddaeb8d6889b85974b44101644c88bdf78 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 09:49:31 +0000 Subject: [PATCH 1301/1638] Make extra_headers required in _target_api_request Co-Authored-By: Claude Sonnet 4.6 --- 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 23d5dbcbc..679d964bb 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -73,7 +73,7 @@ def _target_api_request( request_path: str, base_vws_url: str, request_timeout_seconds: float | tuple[float, float], - extra_headers: dict[str, str] | None = None, + extra_headers: dict[str, str], ) -> Response: """Make a request to the Vuforia Target API. @@ -112,7 +112,7 @@ def _target_api_request( "Authorization": signature_string, "Date": date_string, "Content-Type": content_type, - **(extra_headers or {}), + **extra_headers, } url = urljoin(base=base_vws_url, url=request_path) @@ -210,7 +210,7 @@ def make_request( request_path=request_path, base_vws_url=self._base_vws_url, request_timeout_seconds=self._request_timeout_seconds, - extra_headers=extra_headers, + extra_headers=extra_headers or {}, ) if ( From 9aec062cf5a3266889cb6d295d977fe7541ca23c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 10:28:54 +0000 Subject: [PATCH 1302/1638] Address PR comments: VuMark target type and target_id fix - Fix target_id property extraction for /targets/{id}/instances URL pattern - Add InvalidTargetTypeError exception - Add vumark_vws_client and vumark_target_id fixtures using a pre-populated VuMark template target (requires vws-python-mock#2962) - Update tests to use VuMark target instead of a standard cloud target - Add test_invalid_target_type test (requires vws-python-mock#2961) Co-Authored-By: Claude Sonnet 4.6 --- src/vws/exceptions/vws_exceptions.py | 28 +++++++++++++++++--------- src/vws/vws.py | 4 ++++ tests/conftest.py | 28 +++++++++++++++++++++++++- tests/test_vws.py | 16 ++++----------- tests/test_vws_exceptions.py | 30 +++++++++++++++++++++++----- 5 files changed, 79 insertions(+), 27 deletions(-) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index e2d44ec35..865d2372c 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -24,9 +24,10 @@ class UnknownTargetError(VWSError): def target_id(self) -> str: """The unknown target ID.""" 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] + # Every HTTP path which can raise this error has the target ID as the + # second path segment, e.g. `/something/{target_id}` or + # `/something/{target_id}/more`. + return path.split(sep="/")[2] @beartype @@ -68,9 +69,10 @@ class TargetStatusProcessingError(VWSError): def target_id(self) -> str: """The processing target ID.""" 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] + # Every HTTP path which can raise this error has the target ID as the + # second path segment, e.g. `/something/{target_id}` or + # `/something/{target_id}/more`. + return path.split(sep="/")[2] # This is not simulated by the mock. @@ -157,9 +159,10 @@ class TargetStatusNotSuccessError(VWSError): def target_id(self) -> str: """The unknown target ID.""" 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] + # Every HTTP path which can raise this error has the target ID as the + # second path segment, e.g. `/something/{target_id}` or + # `/something/{target_id}/more`. + return path.split(sep="/")[2] @beartype @@ -192,3 +195,10 @@ class BadRequestError(VWSError): # pragma: no cover """Exception raised when Vuforia returns a response with a result code ``BadRequest``. """ + + +@beartype +class InvalidTargetTypeError(VWSError): + """Exception raised when Vuforia returns a response with a result code + ``InvalidTargetType``. + """ diff --git a/src/vws/vws.py b/src/vws/vws.py index 679d964bb..329ee5425 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -26,6 +26,7 @@ ImageTooLargeError, InvalidAcceptHeaderError, InvalidInstanceIdError, + InvalidTargetTypeError, MetadataTooLargeError, ProjectHasNoAPIAccessError, ProjectInactiveError, @@ -244,6 +245,7 @@ def make_request( "ImageTooLarge": ImageTooLargeError, "InvalidAcceptHeader": InvalidAcceptHeaderError, "InvalidInstanceId": InvalidInstanceIdError, + "InvalidTargetType": InvalidTargetTypeError, "MetadataTooLarge": MetadataTooLargeError, "ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError, "ProjectInactive": ProjectInactiveError, @@ -755,6 +757,8 @@ def generate_vumark_instance( Accept header value is not supported. ~vws.exceptions.vws_exceptions.InvalidInstanceIdError: The instance ID is invalid. For example, it may be empty. + ~vws.exceptions.vws_exceptions.InvalidTargetTypeError: The target + is not a VuMark template target. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is an error with the time sent to Vuforia. ~vws.exceptions.vws_exceptions.TargetStatusNotSuccessError: The diff --git a/tests/conftest.py b/tests/conftest.py index 9073a8c03..bca6ff6c1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,7 +7,7 @@ import pytest from mock_vws import MockVWS -from mock_vws.database import CloudDatabase +from mock_vws.database import CloudDatabase, VuMarkDatabase, VuMarkTarget from vws import VWS, CloudRecoService @@ -22,6 +22,32 @@ def fixture_mock_database() -> Generator[CloudDatabase]: yield database +@pytest.fixture(name="_mock_vumark_database") +def fixture_mock_vumark_database() -> Generator[VuMarkDatabase]: + """Yield a mock ``VuMarkDatabase`` with a template target.""" + vumark_target = VuMarkTarget(name="vumark-template") + with MockVWS() as mock: + database = VuMarkDatabase(vumark_targets={vumark_target}) + mock.add_vumark_database(vumark_database=database) + yield database + + +@pytest.fixture +def vumark_vws_client(_mock_vumark_database: VuMarkDatabase) -> VWS: + """A VWS client which connects to a mock VuMark database.""" + return VWS( + server_access_key=_mock_vumark_database.server_access_key, + server_secret_key=_mock_vumark_database.server_secret_key, + ) + + +@pytest.fixture +def vumark_target_id(_mock_vumark_database: VuMarkDatabase) -> str: + """The ID of the VuMark template target.""" + (target,) = _mock_vumark_database.vumark_targets + return target.target_id + + @pytest.fixture def vws_client(_mock_database: CloudDatabase) -> VWS: """A VWS client which connects to a mock database.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index 8ac09a3e1..0926f3c85 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -745,22 +745,14 @@ class TestGenerateVumarkInstance: ], ) def test_generate_vumark_instance( - vws_client: VWS, - high_quality_image: io.BytesIO, + vumark_vws_client: VWS, + vumark_target_id: str, accept: VuMarkAccept, expected_prefix: bytes, ) -> None: """The returned bytes match the requested format.""" - target_id = vws_client.add_target( - name="x", - width=1, - image=high_quality_image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - result = vws_client.generate_vumark_instance( - target_id=target_id, + result = vumark_vws_client.generate_vumark_instance( + target_id=vumark_target_id, instance_id="12345", accept=accept, ) diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index b55f35fed..0c34d928a 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -24,6 +24,7 @@ ImageTooLargeError, InvalidAcceptHeaderError, InvalidInstanceIdError, + InvalidTargetTypeError, MetadataTooLargeError, ProjectHasNoAPIAccessError, ProjectInactiveError, @@ -349,6 +350,7 @@ def test_vwsexception_inheritance() -> None: ImageTooLargeError, InvalidAcceptHeaderError, InvalidInstanceIdError, + InvalidTargetTypeError, MetadataTooLargeError, ProjectInactiveError, ProjectHasNoAPIAccessError, @@ -366,13 +368,31 @@ def test_vwsexception_inheritance() -> None: def test_invalid_instance_id( - vws_client: VWS, - high_quality_image: io.BytesIO, + vumark_vws_client: VWS, + vumark_target_id: str, ) -> None: """ An ``InvalidInstanceId`` exception is raised when an empty instance ID is given. """ + with pytest.raises(expected_exception=InvalidInstanceIdError) as exc: + vumark_vws_client.generate_vumark_instance( + target_id=vumark_target_id, + instance_id="", + accept=VuMarkAccept.PNG, + ) + + assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + + +def test_invalid_target_type( + vws_client: VWS, + high_quality_image: io.BytesIO, +) -> None: + """ + An ``InvalidTargetType`` exception is raised when trying to generate + a VuMark instance from a non-VuMark target. + """ target_id = vws_client.add_target( name="x", width=1, @@ -381,14 +401,14 @@ def test_invalid_instance_id( application_metadata=None, ) vws_client.wait_for_target_processed(target_id=target_id) - with pytest.raises(expected_exception=InvalidInstanceIdError) as exc: + with pytest.raises(expected_exception=InvalidTargetTypeError) as exc: vws_client.generate_vumark_instance( target_id=target_id, - instance_id="", + instance_id="12345", accept=VuMarkAccept.PNG, ) - assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN def test_base_exception( From 5da612ed3fd50e7a3a5124403867d4d7bac75efc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 19 Feb 2026 14:51:14 +0000 Subject: [PATCH 1303/1638] Move generate_vumark_instance to a new VuMarkService class VuMark generation targets a different database type (VuMark vs Cloud Reco), so it belongs in its own class rather than VWS, mirroring how CloudRecoService is separate from VWS. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/__init__.py | 2 + src/vws/vumark_service.py | 143 +++++++++++++++++++++++++++++++++++ src/vws/vws.py | 68 ----------------- tests/conftest.py | 10 ++- tests/test_vws.py | 6 +- tests/test_vws_exceptions.py | 44 ++++++----- 6 files changed, 181 insertions(+), 92 deletions(-) create mode 100644 src/vws/vumark_service.py diff --git a/src/vws/__init__.py b/src/vws/__init__.py index bfd96d6c2..a091641f9 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -1,9 +1,11 @@ """A library for Vuforia Web Services.""" from .query import CloudRecoService +from .vumark_service import VuMarkService from .vws import VWS __all__ = [ "VWS", "CloudRecoService", + "VuMarkService", ] diff --git a/src/vws/vumark_service.py b/src/vws/vumark_service.py new file mode 100644 index 000000000..d4ad771b8 --- /dev/null +++ b/src/vws/vumark_service.py @@ -0,0 +1,143 @@ +"""Interface to the Vuforia VuMark Generation Web API.""" + +import json +from http import HTTPMethod, HTTPStatus + +from beartype import BeartypeConf, beartype + +from vws.exceptions.custom_exceptions import ServerError +from vws.exceptions.vws_exceptions import ( + AuthenticationFailureError, + BadRequestError, + DateRangeError, + FailError, + InvalidAcceptHeaderError, + InvalidInstanceIdError, + InvalidTargetTypeError, + RequestTimeTooSkewedError, + TargetStatusNotSuccessError, + TooManyRequestsError, + UnknownTargetError, +) +from vws.vumark_accept import VuMarkAccept +from vws.vws import _target_api_request + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class VuMarkService: + """An interface to the Vuforia VuMark Generation Web API.""" + + def __init__( + self, + server_access_key: str, + server_secret_key: str, + base_vws_url: str = "https://vws.vuforia.com", + request_timeout_seconds: float | tuple[float, float] = 30.0, + ) -> None: + """ + Args: + server_access_key: A VWS server access key. + server_secret_key: A VWS server secret key. + base_vws_url: The base URL for the VWS API. + request_timeout_seconds: The timeout for each HTTP request, as + used by ``requests.request``. This can be a float to set + both the connect and read timeouts, or a (connect, read) + tuple. + """ + self._server_access_key = server_access_key + self._server_secret_key = server_secret_key + self._base_vws_url = base_vws_url + self._request_timeout_seconds = request_timeout_seconds + + def generate_vumark_instance( + self, + *, + target_id: str, + instance_id: str, + accept: VuMarkAccept, + ) -> bytes: + """Generate a VuMark instance image. + + See + https://developer.vuforia.com/library/vuforia-engine/web-api/vumark-generation-web-api/ + for parameter details. + + Args: + target_id: The ID of the VuMark target. + instance_id: The instance ID to encode in the VuMark. + accept: The image format to return. + + Returns: + The VuMark instance image bytes. + + Raises: + ~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.InvalidAcceptHeaderError: The + Accept header value is not supported. + ~vws.exceptions.vws_exceptions.InvalidInstanceIdError: The + instance ID is invalid. For example, it may be empty. + ~vws.exceptions.vws_exceptions.InvalidTargetTypeError: The target + is not a VuMark template target. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.TargetStatusNotSuccessError: The + target is not in the success state. + ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target + ID does not match a target in the database. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. + """ + request_path = f"/targets/{target_id}/instances" + content_type = "application/json" + request_data = json.dumps(obj={"instance_id": instance_id}).encode( + encoding="utf-8", + ) + + response = _target_api_request( + content_type=content_type, + server_access_key=self._server_access_key, + server_secret_key=self._server_secret_key, + method=HTTPMethod.POST, + data=request_data, + request_path=request_path, + base_vws_url=self._base_vws_url, + request_timeout_seconds=self._request_timeout_seconds, + extra_headers={"Accept": accept}, + ) + + if ( + response.status_code == HTTPStatus.TOO_MANY_REQUESTS + ): # pragma: no cover + # The Vuforia API returns a 429 response with no JSON body. + raise TooManyRequestsError(response=response) + + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + + if response.status_code == HTTPStatus.OK: + return response.content + + result_code = json.loads(s=response.text)["result_code"] + + exception = { + "AuthenticationFailure": AuthenticationFailureError, + "BadRequest": BadRequestError, + "DateRangeError": DateRangeError, + "Fail": FailError, + "InvalidAcceptHeader": InvalidAcceptHeaderError, + "InvalidInstanceId": InvalidInstanceIdError, + "InvalidTargetType": InvalidTargetTypeError, + "RequestTimeTooSkewed": RequestTimeTooSkewedError, + "TargetStatusNotSuccess": TargetStatusNotSuccessError, + "UnknownTarget": UnknownTargetError, + }[result_code] + + raise exception(response=response) diff --git a/src/vws/vws.py b/src/vws/vws.py index 329ee5425..7accf1ea3 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -24,9 +24,6 @@ DateRangeError, FailError, ImageTooLargeError, - InvalidAcceptHeaderError, - InvalidInstanceIdError, - InvalidTargetTypeError, MetadataTooLargeError, ProjectHasNoAPIAccessError, ProjectInactiveError, @@ -48,7 +45,6 @@ TargetSummaryReport, ) from vws.response import Response -from vws.vumark_accept import VuMarkAccept _ImageType = io.BytesIO | BinaryIO @@ -243,9 +239,6 @@ def make_request( "DateRangeError": DateRangeError, "Fail": FailError, "ImageTooLarge": ImageTooLargeError, - "InvalidAcceptHeader": InvalidAcceptHeaderError, - "InvalidInstanceId": InvalidInstanceIdError, - "InvalidTargetType": InvalidTargetTypeError, "MetadataTooLarge": MetadataTooLargeError, "ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError, "ProjectInactive": ProjectInactiveError, @@ -725,64 +718,3 @@ def update_target( expected_result_code="Success", content_type="application/json", ) - - def generate_vumark_instance( - self, - *, - target_id: str, - instance_id: str, - accept: VuMarkAccept, - ) -> bytes: - """Generate a VuMark instance image. - - See - https://developer.vuforia.com/library/vuforia-engine/web-api/vumark-generation-web-api/ - for parameter details. - - Args: - target_id: The ID of the VuMark target. - instance_id: The instance ID to encode in the VuMark. - accept: The image format to return. - - Returns: - The VuMark instance image bytes. - - Raises: - ~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.InvalidAcceptHeaderError: The - Accept header value is not supported. - ~vws.exceptions.vws_exceptions.InvalidInstanceIdError: The - instance ID is invalid. For example, it may be empty. - ~vws.exceptions.vws_exceptions.InvalidTargetTypeError: The target - is not a VuMark template target. - ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is - an error with the time sent to Vuforia. - ~vws.exceptions.vws_exceptions.TargetStatusNotSuccessError: The - target is not in the success state. - ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target - ID does not match a target in the database. - ~vws.exceptions.custom_exceptions.ServerError: There is an error - with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is - rate limiting access. - """ - request_path = f"/targets/{target_id}/instances" - content_type = "application/json" - request_data = json.dumps(obj={"instance_id": instance_id}).encode( - encoding="utf-8", - ) - - response = self.make_request( - method=HTTPMethod.POST, - data=request_data, - request_path=request_path, - expected_result_code=None, - content_type=content_type, - extra_headers={"Accept": accept}, - ) - - return response.content diff --git a/tests/conftest.py b/tests/conftest.py index bca6ff6c1..bd7bf3740 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,7 +9,7 @@ from mock_vws import MockVWS from mock_vws.database import CloudDatabase, VuMarkDatabase, VuMarkTarget -from vws import VWS, CloudRecoService +from vws import VWS, CloudRecoService, VuMarkService @pytest.fixture(name="_mock_database") @@ -33,9 +33,11 @@ def fixture_mock_vumark_database() -> Generator[VuMarkDatabase]: @pytest.fixture -def vumark_vws_client(_mock_vumark_database: VuMarkDatabase) -> VWS: - """A VWS client which connects to a mock VuMark database.""" - return VWS( +def vumark_service_client( + _mock_vumark_database: VuMarkDatabase, +) -> VuMarkService: + """A ``VuMarkService`` client which connects to a mock VuMark database.""" + return VuMarkService( server_access_key=_mock_vumark_database.server_access_key, server_secret_key=_mock_vumark_database.server_secret_key, ) diff --git a/tests/test_vws.py b/tests/test_vws.py index 0926f3c85..de8b92cab 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -13,7 +13,7 @@ from mock_vws import MockVWS from mock_vws.database import CloudDatabase -from vws import VWS, CloudRecoService +from vws import VWS, CloudRecoService, VuMarkService from vws.exceptions.custom_exceptions import TargetProcessingTimeoutError from vws.reports import ( DatabaseSummaryReport, @@ -745,13 +745,13 @@ class TestGenerateVumarkInstance: ], ) def test_generate_vumark_instance( - vumark_vws_client: VWS, + vumark_service_client: VuMarkService, vumark_target_id: str, accept: VuMarkAccept, expected_prefix: bytes, ) -> None: """The returned bytes match the requested format.""" - result = vumark_vws_client.generate_vumark_instance( + result = vumark_service_client.generate_vumark_instance( target_id=vumark_target_id, instance_id="12345", accept=accept, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 0c34d928a..604bac87d 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -10,7 +10,7 @@ from mock_vws.database import CloudDatabase from mock_vws.states import States -from vws import VWS +from vws import VWS, VuMarkService from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ( ServerError, @@ -368,7 +368,7 @@ def test_vwsexception_inheritance() -> None: def test_invalid_instance_id( - vumark_vws_client: VWS, + vumark_service_client: VuMarkService, vumark_target_id: str, ) -> None: """ @@ -376,7 +376,7 @@ def test_invalid_instance_id( ID is given. """ with pytest.raises(expected_exception=InvalidInstanceIdError) as exc: - vumark_vws_client.generate_vumark_instance( + vumark_service_client.generate_vumark_instance( target_id=vumark_target_id, instance_id="", accept=VuMarkAccept.PNG, @@ -386,27 +386,37 @@ def test_invalid_instance_id( def test_invalid_target_type( - vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: """ An ``InvalidTargetType`` exception is raised when trying to generate a VuMark instance from a non-VuMark target. """ - target_id = vws_client.add_target( - name="x", - width=1, - image=high_quality_image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - with pytest.raises(expected_exception=InvalidTargetTypeError) as exc: - vws_client.generate_vumark_instance( - target_id=target_id, - instance_id="12345", - accept=VuMarkAccept.PNG, + database = VuforiaDatabase() + with MockVWS(processing_time_seconds=0.2) as mock: + mock.add_database(database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, ) + target_id = vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) + vumark_client = VuMarkService( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + with pytest.raises(expected_exception=InvalidTargetTypeError) as exc: + vumark_client.generate_vumark_instance( + target_id=target_id, + instance_id="12345", + accept=VuMarkAccept.PNG, + ) assert exc.value.response.status_code == HTTPStatus.FORBIDDEN From f12309a37988555e31677aeb31c7f7f2dc8370f0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 20 Feb 2026 14:06:29 +0000 Subject: [PATCH 1304/1638] Fix CI failures: spelling, is_vumark_template, test placeholder - Add 'vumark' to spelling dict - Remove is_vumark_template from Target() until mock#2962 is implemented - Make test_invalid_target_type a placeholder until mock#2961 is implemented - Rephrase fixture docstrings to avoid spelling check on 'pre' Co-Authored-By: Claude Sonnet 4.6 --- spelling_private_dict.txt | 1 + tests/test_vws_exceptions.py | 35 +++-------------------------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index d5d5d3e99..2329ef7f4 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -101,6 +101,7 @@ usefixtures validators vuforia vuforia's +vumark vwq vws xxx diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 604bac87d..49d0365c9 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -385,40 +385,11 @@ def test_invalid_instance_id( assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY -def test_invalid_target_type( - high_quality_image: io.BytesIO, -) -> None: +def test_invalid_target_type() -> None: """ - An ``InvalidTargetType`` exception is raised when trying to generate - a VuMark instance from a non-VuMark target. + See https://github.com/VWS-Python/vws-python-mock/issues/2961 for + writing this test. """ - database = VuforiaDatabase() - with MockVWS(processing_time_seconds=0.2) as mock: - mock.add_database(database=database) - vws_client = VWS( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - target_id = vws_client.add_target( - name="x", - width=1, - image=high_quality_image, - active_flag=True, - application_metadata=None, - ) - vws_client.wait_for_target_processed(target_id=target_id) - vumark_client = VuMarkService( - server_access_key=database.server_access_key, - server_secret_key=database.server_secret_key, - ) - with pytest.raises(expected_exception=InvalidTargetTypeError) as exc: - vumark_client.generate_vumark_instance( - target_id=target_id, - instance_id="12345", - accept=VuMarkAccept.PNG, - ) - - assert exc.value.response.status_code == HTTPStatus.FORBIDDEN def test_base_exception( From 22e80364d655f1b742f8248a8964ced62ada59b6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 20 Feb 2026 14:09:10 +0000 Subject: [PATCH 1305/1638] Move target_api_request to shared _vws_request module Fixes Pyright reportPrivateUsage error: _target_api_request was defined in vws.py but used in vumark_service.py. Move it to a shared private module with a public name so both can import it cleanly. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/_vws_request.py | 85 +++++++++++++++++++++++++++++++++++++++ src/vws/vumark_service.py | 4 +- src/vws/vws.py | 80 +----------------------------------- 3 files changed, 89 insertions(+), 80 deletions(-) create mode 100644 src/vws/_vws_request.py diff --git a/src/vws/_vws_request.py b/src/vws/_vws_request.py new file mode 100644 index 000000000..0ea914388 --- /dev/null +++ b/src/vws/_vws_request.py @@ -0,0 +1,85 @@ +"""Internal helper for making authenticated requests to the Vuforia Target +API. +""" + +from urllib.parse import urljoin + +import requests +from beartype import BeartypeConf, beartype +from vws_auth_tools import authorization_header, rfc_1123_date + +from vws.response import Response + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def target_api_request( + *, + content_type: str, + server_access_key: str, + server_secret_key: str, + method: str, + data: bytes, + request_path: str, + base_vws_url: str, + request_timeout_seconds: float | tuple[float, float], + extra_headers: dict[str, str], +) -> Response: + """Make a request to the Vuforia Target API. + + This uses `requests` to make a request against https://vws.vuforia.com. + + Args: + content_type: The content type of the request. + server_access_key: A VWS server access key. + server_secret_key: A VWS server secret key. + method: The HTTP method which will be used in the request. + 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. + request_timeout_seconds: The timeout for the request, as used by + ``requests.request``. This can be a float to set both the + connect and read timeouts, or a (connect, read) tuple. + extra_headers: Additional headers to include in the request. + + Returns: + The response to the request made by `requests`. + """ + date_string = rfc_1123_date() + + signature_string = authorization_header( + access_key=server_access_key, + secret_key=server_secret_key, + method=method, + content=data, + content_type=content_type, + date=date_string, + request_path=request_path, + ) + + headers = { + "Authorization": signature_string, + "Date": date_string, + "Content-Type": content_type, + **extra_headers, + } + + url = urljoin(base=base_vws_url, url=request_path) + + requests_response = requests.request( + method=method, + url=url, + headers=headers, + data=data, + timeout=request_timeout_seconds, + ) + + 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, + tell_position=requests_response.raw.tell(), + content=bytes(requests_response.content), + ) diff --git a/src/vws/vumark_service.py b/src/vws/vumark_service.py index d4ad771b8..a23ac33f2 100644 --- a/src/vws/vumark_service.py +++ b/src/vws/vumark_service.py @@ -5,6 +5,7 @@ from beartype import BeartypeConf, beartype +from vws._vws_request import target_api_request from vws.exceptions.custom_exceptions import ServerError from vws.exceptions.vws_exceptions import ( AuthenticationFailureError, @@ -20,7 +21,6 @@ UnknownTargetError, ) from vws.vumark_accept import VuMarkAccept -from vws.vws import _target_api_request @beartype(conf=BeartypeConf(is_pep484_tower=True)) @@ -99,7 +99,7 @@ def generate_vumark_instance( encoding="utf-8", ) - response = _target_api_request( + response = target_api_request( content_type=content_type, server_access_key=self._server_access_key, server_secret_key=self._server_secret_key, diff --git a/src/vws/vws.py b/src/vws/vws.py index 7accf1ea3..2eebf8542 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -7,12 +7,10 @@ from datetime import date from http import HTTPMethod, HTTPStatus from typing import BinaryIO -from urllib.parse import urljoin -import requests from beartype import BeartypeConf, beartype -from vws_auth_tools import authorization_header, rfc_1123_date +from vws._vws_request import target_api_request from vws.exceptions.custom_exceptions import ( ServerError, TargetProcessingTimeoutError, @@ -59,80 +57,6 @@ def _get_image_data(image: _ImageType) -> bytes: return image_data -@beartype(conf=BeartypeConf(is_pep484_tower=True)) -def _target_api_request( - *, - content_type: str, - server_access_key: str, - server_secret_key: str, - method: str, - data: bytes, - request_path: str, - base_vws_url: str, - request_timeout_seconds: float | tuple[float, float], - extra_headers: dict[str, str], -) -> Response: - """Make a request to the Vuforia Target API. - - This uses `requests` to make a request against https://vws.vuforia.com. - - Args: - content_type: The content type of the request. - server_access_key: A VWS server access key. - server_secret_key: A VWS server secret key. - method: The HTTP method which will be used in the request. - 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. - request_timeout_seconds: The timeout for the request, as used by - ``requests.request``. This can be a float to set both the - connect and read timeouts, or a (connect, read) tuple. - extra_headers: Additional headers to include in the request. - - Returns: - The response to the request made by `requests`. - """ - date_string = rfc_1123_date() - - signature_string = authorization_header( - access_key=server_access_key, - secret_key=server_secret_key, - method=method, - content=data, - content_type=content_type, - date=date_string, - request_path=request_path, - ) - - headers = { - "Authorization": signature_string, - "Date": date_string, - "Content-Type": content_type, - **extra_headers, - } - - url = urljoin(base=base_vws_url, url=request_path) - - requests_response = requests.request( - method=method, - url=url, - headers=headers, - data=data, - timeout=request_timeout_seconds, - ) - - 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, - tell_position=requests_response.raw.tell(), - content=bytes(requests_response.content), - ) - - @beartype(conf=BeartypeConf(is_pep484_tower=True)) class VWS: """An interface to Vuforia Web Services APIs.""" @@ -198,7 +122,7 @@ def make_request( This may happen if the server address is not a valid Vuforia server. """ - response = _target_api_request( + response = target_api_request( content_type=content_type, server_access_key=self._server_access_key, server_secret_key=self._server_secret_key, From 0730af2812577fc2c21b804ca5dcb0361285d388 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Feb 2026 00:44:17 +0000 Subject: [PATCH 1306/1638] Fix VuMarkTarget import: use mock_vws.target not mock_vws.database mypy flags VuMarkTarget as not explicitly exported from mock_vws.database; import it from mock_vws.target instead. Co-Authored-By: Claude Sonnet 4.6 --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index bd7bf3740..0f15e6a9a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,7 +7,8 @@ import pytest from mock_vws import MockVWS -from mock_vws.database import CloudDatabase, VuMarkDatabase, VuMarkTarget +from mock_vws.database import CloudDatabase, VuMarkDatabase +from mock_vws.target import VuMarkTarget from vws import VWS, CloudRecoService, VuMarkService From bf64c7faae80e9d67cdb83962b6e14801be8c7c1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Feb 2026 01:14:51 +0000 Subject: [PATCH 1307/1638] Remove dead expected_result_code=None branch from VWS.make_request No VWS method passes expected_result_code=None; VuMarkService handles binary responses via its own direct target_api_request call. Removing the unused branch restores 100% test coverage. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/vws.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 2eebf8542..6977ed18f 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -89,7 +89,7 @@ def make_request( method: str, data: bytes, request_path: str, - expected_result_code: str | None, + expected_result_code: str, content_type: str, extra_headers: dict[str, str] | None = None, ) -> Response: @@ -104,9 +104,6 @@ def make_request( request. expected_result_code: See "VWS API Result Codes" on https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api. - Pass ``None`` for endpoints that return a non-JSON success - response (e.g. binary data); success is then determined by an - HTTP 200 status code. content_type: The content type of the request. extra_headers: Additional headers to include in the request. @@ -145,12 +142,6 @@ def make_request( ): # pragma: no cover raise ServerError(response=response) - if ( - response.status_code == HTTPStatus.OK - and expected_result_code is None - ): - return response - result_code = json.loads(s=response.text)["result_code"] if result_code == expected_result_code: From 396941852d7aaa184b470bd82c7153d157d14740 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Feb 2026 02:17:10 +0000 Subject: [PATCH 1308/1638] Implement test_invalid_target_type to validate VuMark database type checking The test verifies that InvalidTargetTypeError is raised when attempting to generate a VuMark instance using credentials from a CloudDatabase (non-VuMark) database. This was previously a stub pending the mock implementation in vws-python-mock#2961. Co-Authored-By: Claude Haiku 4.5 --- tests/test_vws_exceptions.py | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 49d0365c9..2ab6510ee 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -385,11 +385,41 @@ def test_invalid_instance_id( assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY -def test_invalid_target_type() -> None: +def test_invalid_target_type( + high_quality_image: io.BytesIO, +) -> None: """ - See https://github.com/VWS-Python/vws-python-mock/issues/2961 for - writing this test. + An ``InvalidTargetType`` exception is raised when trying to generate + a VuMark instance from a non-VuMark database. """ + database = CloudDatabase() + with MockVWS(processing_time_seconds=0.2) as mock: + mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + target_id = vws_client.add_target( + name="example_target", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + vumark_service = VuMarkService( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + with pytest.raises( + expected_exception=InvalidTargetTypeError, + ) as exc: + vumark_service.generate_vumark_instance( + target_id=target_id, + instance_id="example_instance_id", + accept=VuMarkAccept.PNG, + ) + + assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY def test_base_exception( From 0ca5921b520f2d569d71e9680c6b6e95aa047bf2 Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Sat, 21 Feb 2026 08:32:28 +0000 Subject: [PATCH 1309/1638] Bump CHANGELOG --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 20a40ddb9..fffe7a623 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,10 @@ Changelog Next ---- +2026.02.21 +---------- + + 2026.02.15 ---------- From a0cf4c1a3905953a04ae8f5ebfa1dc371ffa2b9e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Feb 2026 09:34:18 +0000 Subject: [PATCH 1310/1638] Enforce keyword-only arguments Co-Authored-By: Claude Opus 4.6 --- src/vws/query.py | 2 ++ src/vws/vws.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vws/query.py b/src/vws/query.py index ad55d8a47..9c997177e 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -46,6 +46,7 @@ class CloudRecoService: def __init__( self, + *, client_access_key: str, client_secret_key: str, base_vwq_url: str = "https://cloudreco.vuforia.com", @@ -68,6 +69,7 @@ def __init__( def query( self, + *, image: _ImageType, max_num_results: int = 1, include_target_data: CloudRecoIncludeTargetData = ( diff --git a/src/vws/vws.py b/src/vws/vws.py index 6977ed18f..1aa11374a 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -63,6 +63,7 @@ class VWS: def __init__( self, + *, server_access_key: str, server_secret_key: str, base_vws_url: str = "https://vws.vuforia.com", @@ -171,11 +172,11 @@ def make_request( def add_target( self, + *, name: str, width: float, image: _ImageType, application_metadata: str | None, - *, active_flag: bool, ) -> str: """Add a target to a Vuforia Web Services database. @@ -302,6 +303,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: def wait_for_target_processed( self, + *, target_id: str, seconds_between_requests: float = 0.2, timeout_seconds: float = 60 * 5, From d81e5ac9795187564fc0ee0ee9ddeb7a09ace318 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Feb 2026 10:08:43 +0000 Subject: [PATCH 1311/1638] Use native pytest TOML configuration Remove `ini_options.` prefix from pytest configuration keys under `[tool.pytest]`, using the native TOML configuration format supported since pytest 9.0. Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 510f2c80b..8a13280ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -301,8 +301,8 @@ keep_full_version = true max_supported_python = "3.14" [tool.pytest] -ini_options.xfail_strict = true -ini_options.log_cli = true +xfail_strict = true +log_cli = true [tool.coverage] run.branch = true From 253bbea6d26ea2050a32dae30b3776739302c5ec Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 21 Feb 2026 23:59:26 +0000 Subject: [PATCH 1312/1638] Use keyword-only parameters in tests Enforce keyword-only arguments in test functions that accept multiple parameters, improving call-site clarity. Co-authored-by: Cursor --- tests/test_cloud_reco_exceptions.py | 2 ++ tests/test_query.py | 12 ++++++++++-- tests/test_vws.py | 17 ++++++++++++++--- tests/test_vws_exceptions.py | 14 +++++++++++++- 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 3b2922fd9..43a263d40 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -24,6 +24,7 @@ def test_too_many_max_results( + *, cloud_reco_client: CloudRecoService, high_quality_image: io.BytesIO, ) -> None: @@ -45,6 +46,7 @@ def test_too_many_max_results( def test_image_too_large( + *, cloud_reco_client: CloudRecoService, png_too_large: io.BytesIO | io.BufferedRandom, ) -> None: diff --git a/tests/test_query.py b/tests/test_query.py index b5ced6dde..b7f9687de 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -20,6 +20,7 @@ class TestQuery: @staticmethod def test_no_matches( + *, cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, ) -> None: @@ -29,6 +30,7 @@ def test_no_matches( @staticmethod def test_match( + *, vws_client: VWS, cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, @@ -55,8 +57,8 @@ class TestDefaultRequestTimeout: argvalues=[(29, False), (31, True)], ) def test_default_timeout( - image: io.BytesIO | BinaryIO, *, + image: io.BytesIO | BinaryIO, response_delay_seconds: int, expect_timeout: bool, ) -> None: @@ -110,8 +112,8 @@ class TestCustomRequestTimeout: ], ) def test_custom_timeout( - image: io.BytesIO | BinaryIO, *, + image: io.BytesIO | BinaryIO, custom_timeout: float | tuple[float, float], response_delay_seconds: float, expect_timeout: bool, @@ -194,6 +196,7 @@ class TestMaxNumResults: @staticmethod def test_default( + *, vws_client: VWS, cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, @@ -220,6 +223,7 @@ def test_default( @staticmethod def test_custom( + *, vws_client: VWS, cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, @@ -262,6 +266,7 @@ class TestIncludeTargetData: @staticmethod def test_default( + *, vws_client: VWS, cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, @@ -292,6 +297,7 @@ def test_default( @staticmethod def test_top( + *, vws_client: VWS, cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, @@ -327,6 +333,7 @@ def test_top( @staticmethod def test_none( + *, vws_client: VWS, cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, @@ -363,6 +370,7 @@ def test_none( @staticmethod def test_all( + *, vws_client: VWS, cloud_reco_client: CloudRecoService, image: io.BytesIO | BinaryIO, diff --git a/tests/test_vws.py b/tests/test_vws.py index de8b92cab..0b435503d 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -34,11 +34,11 @@ class TestAddTarget: ) @pytest.mark.parametrize(argnames="active_flag", argvalues=[True, False]) def test_add_target( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, application_metadata: bytes | None, cloud_reco_client: CloudRecoService, - *, active_flag: bool, ) -> None: """No exception is raised when adding one target.""" @@ -76,6 +76,7 @@ def test_add_target( @staticmethod def test_add_two_targets( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: @@ -103,8 +104,8 @@ class TestDefaultRequestTimeout: argvalues=[(29, False), (31, True)], ) def test_default_timeout( - image: io.BytesIO | BinaryIO, *, + image: io.BytesIO | BinaryIO, response_delay_seconds: int, expect_timeout: bool, ) -> None: @@ -169,8 +170,8 @@ class TestCustomRequestTimeout: ], ) def test_custom_timeout( - image: io.BytesIO | BinaryIO, *, + image: io.BytesIO | BinaryIO, custom_timeout: float | tuple[float, float], response_delay_seconds: float, expect_timeout: bool, @@ -251,6 +252,7 @@ class TestListTargets: @staticmethod def test_list_targets( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: @@ -277,6 +279,7 @@ class TestDelete: @staticmethod def test_delete_target( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: @@ -300,6 +303,7 @@ class TestGetTargetSummaryReport: @staticmethod def test_get_target_summary_report( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: @@ -398,6 +402,7 @@ class TestGetTargetRecord: @staticmethod def test_get_target_record( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: @@ -444,6 +449,7 @@ def test_get_target_record( @staticmethod def test_get_failed( + *, vws_client: VWS, image_file_failed_state: io.BytesIO, ) -> None: @@ -467,6 +473,7 @@ class TestWaitForTargetProcessed: @staticmethod def test_wait_for_target_processed( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: @@ -628,6 +635,7 @@ class TestGetDuplicateTargets: @staticmethod def test_get_duplicate_targets( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: @@ -658,6 +666,7 @@ class TestUpdateTarget: @staticmethod def test_update_target( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, different_high_quality_image: io.BytesIO, @@ -717,6 +726,7 @@ def test_update_target( @staticmethod def test_no_fields_given( + *, vws_client: VWS, image: io.BytesIO | BinaryIO, ) -> None: @@ -745,6 +755,7 @@ class TestGenerateVumarkInstance: ], ) def test_generate_vumark_instance( + *, vumark_service_client: VuMarkService, vumark_target_id: str, accept: VuMarkAccept, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 2ab6510ee..617016257 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -41,6 +41,7 @@ def test_image_too_large( + *, vws_client: VWS, png_too_large: io.BytesIO | io.BufferedRandom, ) -> None: @@ -75,7 +76,11 @@ 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, +) -> None: """ When a name with a bad character is given, a ``ServerError`` exception @@ -143,6 +148,7 @@ def test_bad_image(vws_client: VWS) -> None: def test_target_name_exist( + *, vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: @@ -201,6 +207,7 @@ def test_project_inactive( def test_target_status_processing( + *, vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: @@ -225,6 +232,7 @@ def test_target_status_processing( def test_metadata_too_large( + *, vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: @@ -246,6 +254,7 @@ def test_metadata_too_large( def test_request_time_too_skewed( + *, vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: @@ -316,6 +325,7 @@ def test_authentication_failure( def test_target_status_not_success( + *, vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: @@ -368,6 +378,7 @@ def test_vwsexception_inheritance() -> None: def test_invalid_instance_id( + *, vumark_service_client: VuMarkService, vumark_target_id: str, ) -> None: @@ -423,6 +434,7 @@ def test_invalid_target_type( def test_base_exception( + *, vws_client: VWS, high_quality_image: io.BytesIO, ) -> None: From a99022f2051daf7167bce129b40267ba72981396 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 00:59:14 +0000 Subject: [PATCH 1313/1638] Add @beartype to pytest_collection_modifyitems hook Add runtime type checking to the pytest hook that was missing it. Co-authored-by: Cursor --- conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conftest.py b/conftest.py index 89548f800..d5ef944b6 100644 --- a/conftest.py +++ b/conftest.py @@ -18,6 +18,7 @@ ) +@beartype def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: """Apply the beartype decorator to all collected test functions.""" for item in items: From 294661069a3b72f5b6d55baf987f9b5872db3d35 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 03:27:13 +0000 Subject: [PATCH 1314/1638] Replace urljoin with string concatenation for base URL construction urljoin(base, path) silently drops any path prefix from the base URL when path starts with '/', so base_vws_url values like 'http://localhost/mock' would have '/mock' ignored. String concatenation preserves the full base URL path as intended. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/_vws_request.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vws/_vws_request.py b/src/vws/_vws_request.py index 0ea914388..2fc7bd3bb 100644 --- a/src/vws/_vws_request.py +++ b/src/vws/_vws_request.py @@ -2,8 +2,6 @@ API. """ -from urllib.parse import urljoin - import requests from beartype import BeartypeConf, beartype from vws_auth_tools import authorization_header, rfc_1123_date @@ -64,7 +62,7 @@ def target_api_request( **extra_headers, } - url = urljoin(base=base_vws_url, url=request_path) + url = base_vws_url.rstrip("/") + request_path requests_response = requests.request( method=method, From 365c501d0305aff903afbba474ab7c4c8b588914 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 09:42:25 +0000 Subject: [PATCH 1315/1638] Fix urljoin in query.py and add path-prefix base URL tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Apply the same urljoin → string concatenation fix to query.py (CloudRecoService had the identical bug) - Add TestCustomBaseVWSURL::test_custom_base_url_with_path_prefix and TestCustomBaseVWQURL::test_custom_base_url_with_path_prefix to assert that a base URL containing a path prefix is preserved in the outgoing request URL; these tests would fail with the old urljoin approach Co-Authored-By: Claude Sonnet 4.6 --- src/vws/query.py | 3 +-- tests/test_query.py | 36 ++++++++++++++++++++++++++++++++++++ tests/test_vws.py | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 2 deletions(-) diff --git a/src/vws/query.py b/src/vws/query.py index 9c997177e..f5046bd1c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -5,7 +5,6 @@ import json from http import HTTPMethod, HTTPStatus from typing import Any, BinaryIO -from urllib.parse import urljoin import requests from beartype import BeartypeConf, beartype @@ -146,7 +145,7 @@ def query( requests_response = requests.request( method=method, - url=urljoin(base=self._base_vwq_url, url=request_path), + url=self._base_vwq_url.rstrip("/") + request_path, headers=headers, data=content, timeout=self._request_timeout_seconds, diff --git a/tests/test_query.py b/tests/test_query.py index b7f9687de..d296f47b2 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -2,11 +2,13 @@ import datetime import io +import secrets import uuid from typing import BinaryIO import pytest import requests +import responses as responses_mock from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import CloudDatabase @@ -190,6 +192,40 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: match = matches[0] assert match.target_id == target_id + @staticmethod + @responses_mock.activate + def test_custom_base_url_with_path_prefix( + image: io.BytesIO | BinaryIO, + ) -> None: + """ + A base VWQ URL with a path prefix is used as-is, without the + prefix + being dropped. + """ + base_vwq_url = "http://example.com/prefix" + responses_mock.add( + method=responses_mock.POST, + url="http://example.com/prefix/v1/query", + json={ + "result_code": "Success", + "results": [], + "query_id": "abc", + }, + status=200, + ) + cloud_reco_client = CloudRecoService( + client_access_key=secrets.token_hex(), + client_secret_key=secrets.token_hex(), + base_vwq_url=base_vwq_url, + ) + + cloud_reco_client.query(image=image) + + assert len(responses_mock.calls) == 1 + assert responses_mock.calls[0].request.url == ( + "http://example.com/prefix/v1/query" + ) + class TestMaxNumResults: """Tests for the ``max_num_results`` parameter of ``query``.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index 0b435503d..cc6038eba 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -9,6 +9,7 @@ import pytest import requests +import responses as responses_mock from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import CloudDatabase @@ -246,6 +247,38 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: application_metadata=None, ) + @staticmethod + @responses_mock.activate + def test_custom_base_url_with_path_prefix() -> None: + """ + A base VWS URL with a path prefix is used as-is, without the + prefix + being dropped. + """ + base_vws_url = "http://example.com/prefix" + responses_mock.add( + method=responses_mock.GET, + url="http://example.com/prefix/targets", + json={ + "result_code": "Success", + "results": [], + "transaction_id": "abc", + }, + status=200, + ) + vws_client = VWS( + server_access_key=secrets.token_hex(), + server_secret_key=secrets.token_hex(), + base_vws_url=base_vws_url, + ) + + vws_client.list_targets() + + assert len(responses_mock.calls) == 1 + assert responses_mock.calls[0].request.url == ( + "http://example.com/prefix/targets" + ) + class TestListTargets: """Tests for listing targets.""" From b4ecf17b5884aedf16394d16cdb7cfd43df2786f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 09:50:33 +0000 Subject: [PATCH 1316/1638] Simplify path-prefix tests: use MockVWS + ConnectionError Instead of using responses directly, set up MockVWS at the bare URL and assert ConnectionError when the client uses a path-prefix URL. With the old urljoin code the prefix would be silently dropped so the request would succeed; with string concatenation the prefix is preserved, the mock has no handler for it, and ConnectionError is raised as expected. Co-Authored-By: Claude Sonnet 4.6 --- tests/test_query.py | 38 +++++++++++--------------------------- tests/test_vws.py | 37 +++++++++++-------------------------- 2 files changed, 22 insertions(+), 53 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index d296f47b2..4ca315acb 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -2,13 +2,11 @@ import datetime import io -import secrets import uuid from typing import BinaryIO import pytest import requests -import responses as responses_mock from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import CloudDatabase @@ -193,38 +191,24 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: assert match.target_id == target_id @staticmethod - @responses_mock.activate def test_custom_base_url_with_path_prefix( image: io.BytesIO | BinaryIO, ) -> None: """ A base VWQ URL with a path prefix is used as-is, without the - prefix - being dropped. + prefix being dropped. """ - base_vwq_url = "http://example.com/prefix" - responses_mock.add( - method=responses_mock.POST, - url="http://example.com/prefix/v1/query", - json={ - "result_code": "Success", - "results": [], - "query_id": "abc", - }, - status=200, - ) - cloud_reco_client = CloudRecoService( - client_access_key=secrets.token_hex(), - client_secret_key=secrets.token_hex(), - base_vwq_url=base_vwq_url, - ) - - cloud_reco_client.query(image=image) + with MockVWS(base_vwq_url="http://example.com") as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + base_vwq_url="http://example.com/prefix", + ) - assert len(responses_mock.calls) == 1 - assert responses_mock.calls[0].request.url == ( - "http://example.com/prefix/v1/query" - ) + with pytest.raises(requests.exceptions.ConnectionError): + cloud_reco_client.query(image=image) class TestMaxNumResults: diff --git a/tests/test_vws.py b/tests/test_vws.py index cc6038eba..e2d43ecdd 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -9,7 +9,6 @@ import pytest import requests -import responses as responses_mock from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import CloudDatabase @@ -248,36 +247,22 @@ def test_custom_base_url(image: io.BytesIO | BinaryIO) -> None: ) @staticmethod - @responses_mock.activate def test_custom_base_url_with_path_prefix() -> None: """ A base VWS URL with a path prefix is used as-is, without the - prefix - being dropped. + prefix being dropped. """ - base_vws_url = "http://example.com/prefix" - responses_mock.add( - method=responses_mock.GET, - url="http://example.com/prefix/targets", - json={ - "result_code": "Success", - "results": [], - "transaction_id": "abc", - }, - status=200, - ) - vws_client = VWS( - server_access_key=secrets.token_hex(), - server_secret_key=secrets.token_hex(), - base_vws_url=base_vws_url, - ) - - vws_client.list_targets() + with MockVWS(base_vws_url="http://example.com") as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + base_vws_url="http://example.com/prefix", + ) - assert len(responses_mock.calls) == 1 - assert responses_mock.calls[0].request.url == ( - "http://example.com/prefix/targets" - ) + with pytest.raises(requests.exceptions.ConnectionError): + vws_client.list_targets() class TestListTargets: From da7546394b4f398b4081fca04b812470354df0cb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 09:51:43 +0000 Subject: [PATCH 1317/1638] Use keyword argument for pytest.raises Co-Authored-By: Claude Sonnet 4.6 --- tests/test_query.py | 4 +++- tests/test_vws.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_query.py b/tests/test_query.py index 4ca315acb..3b9546cc2 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -207,7 +207,9 @@ def test_custom_base_url_with_path_prefix( base_vwq_url="http://example.com/prefix", ) - with pytest.raises(requests.exceptions.ConnectionError): + with pytest.raises( + expected_exception=requests.exceptions.ConnectionError, + ): cloud_reco_client.query(image=image) diff --git a/tests/test_vws.py b/tests/test_vws.py index e2d43ecdd..5f3e7d278 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -261,7 +261,9 @@ def test_custom_base_url_with_path_prefix() -> None: base_vws_url="http://example.com/prefix", ) - with pytest.raises(requests.exceptions.ConnectionError): + with pytest.raises( + expected_exception=requests.exceptions.ConnectionError, + ): vws_client.list_targets() From 115bd8dbd071806f6ace4bceda92b187a2352317 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 12:06:35 +0000 Subject: [PATCH 1318/1638] Bump vws-python-mock to 2026.2.22.1 The new release fixes the urljoin bug in MockVWS so it correctly registers handlers at path-prefixed base URLs. The path-prefix tests stay as ConnectionError tests: MockVWS listens at the bare URL while the client uses the prefixed URL, so the prefix being preserved causes a ConnectionError -- the inverse of the urljoin behaviour where the prefix would be silently dropped and the mock would respond. (A fully positive round-trip test is not yet possible because the HMAC signing also needs to incorporate the base URL path prefix, which is a separate issue.) Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8a13280ec..18c09b913 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "ty==0.0.17", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.21", + "vws-python-mock==2026.2.22.1", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", From ec3c9683490d07face823c795c52fc38e94de810 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 12:52:24 +0000 Subject: [PATCH 1319/1638] Add positive path-prefix tests and fix auth signing for prefixed base URLs - Replace urljoin with string concatenation in both _vws_request.py and query.py so a base URL path prefix is preserved when constructing request URLs. - Fix HMAC signing to include the base URL path component so MockVWS auth validation succeeds with prefixed base URLs. - Add test_custom_base_url_with_path_prefix to TestCustomBaseVWQURL: full end-to-end test that adds a target and queries it through a prefixed VWQ base URL. - Add test_custom_base_url_with_path_prefix to TestCustomBaseVWSURL: verifies the prefixed URL reaches MockVWS; suppresses UnknownTargetError pending https://github.com/VWS-Python/vws-python-mock/issues/2995. Co-Authored-By: Claude Sonnet 4.6 --- src/vws/_vws_request.py | 7 ++++++- src/vws/query.py | 6 +++++- tests/test_query.py | 23 +++++++++++++++++------ tests/test_vws.py | 20 ++++++++++++++------ 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/vws/_vws_request.py b/src/vws/_vws_request.py index 2fc7bd3bb..5d2f4ea6a 100644 --- a/src/vws/_vws_request.py +++ b/src/vws/_vws_request.py @@ -2,6 +2,8 @@ API. """ +from urllib.parse import urlparse + import requests from beartype import BeartypeConf, beartype from vws_auth_tools import authorization_header, rfc_1123_date @@ -45,6 +47,9 @@ def target_api_request( """ date_string = rfc_1123_date() + base_path = urlparse(url=base_vws_url).path.rstrip("/") + full_request_path = base_path + request_path + signature_string = authorization_header( access_key=server_access_key, secret_key=server_secret_key, @@ -52,7 +57,7 @@ def target_api_request( content=data, content_type=content_type, date=date_string, - request_path=request_path, + request_path=full_request_path, ) headers = { diff --git a/src/vws/query.py b/src/vws/query.py index f5046bd1c..38775c566 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -5,6 +5,7 @@ import json from http import HTTPMethod, HTTPStatus from typing import Any, BinaryIO +from urllib.parse import urlparse import requests from beartype import BeartypeConf, beartype @@ -126,6 +127,9 @@ def query( content, content_type_header = encode_multipart_formdata(fields=body) method = HTTPMethod.POST + base_path = urlparse(url=self._base_vwq_url).path.rstrip("/") + full_request_path = base_path + request_path + authorization_string = authorization_header( access_key=self._client_access_key, secret_key=self._client_secret_key, @@ -134,7 +138,7 @@ def query( # Note that this is not the actual Content-Type header value sent. content_type="multipart/form-data", date=date, - request_path=request_path, + request_path=full_request_path, ) headers = { diff --git a/tests/test_query.py b/tests/test_query.py index 3b9546cc2..66d596118 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -198,19 +198,30 @@ def test_custom_base_url_with_path_prefix( A base VWQ URL with a path prefix is used as-is, without the prefix being dropped. """ - with MockVWS(base_vwq_url="http://example.com") as mock: + base_vwq_url = "http://example.com/prefix" + with MockVWS(base_vwq_url=base_vwq_url) as mock: database = CloudDatabase() mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + target_id = vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + vws_client.wait_for_target_processed(target_id=target_id) cloud_reco_client = CloudRecoService( client_access_key=database.client_access_key, client_secret_key=database.client_secret_key, - base_vwq_url="http://example.com/prefix", + base_vwq_url=base_vwq_url, ) - with pytest.raises( - expected_exception=requests.exceptions.ConnectionError, - ): - cloud_reco_client.query(image=image) + matches = cloud_reco_client.query(image=image) + assert len(matches) == 1 class TestMaxNumResults: diff --git a/tests/test_vws.py b/tests/test_vws.py index 5f3e7d278..0960a5d7a 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -1,6 +1,7 @@ """Tests for helper functions for managing a Vuforia database.""" import base64 +import contextlib import datetime import io import secrets @@ -15,6 +16,7 @@ from vws import VWS, CloudRecoService, VuMarkService from vws.exceptions.custom_exceptions import TargetProcessingTimeoutError +from vws.exceptions.vws_exceptions import UnknownTargetError from vws.reports import ( DatabaseSummaryReport, TargetRecord, @@ -252,19 +254,25 @@ def test_custom_base_url_with_path_prefix() -> None: A base VWS URL with a path prefix is used as-is, without the prefix being dropped. """ - with MockVWS(base_vws_url="http://example.com") as mock: + base_vws_url = "http://example.com/prefix" + with MockVWS(base_vws_url=base_vws_url) as mock: database = CloudDatabase() mock.add_cloud_database(cloud_database=database) vws_client = VWS( server_access_key=database.server_access_key, server_secret_key=database.server_secret_key, - base_vws_url="http://example.com/prefix", + base_vws_url=base_vws_url, ) - with pytest.raises( - expected_exception=requests.exceptions.ConnectionError, - ): - vws_client.list_targets() + # MockVWS's path-length check in validate_target_id_exists + # does not account for a base URL path prefix, so it + # incorrectly treats the last path segment ("targets") as a + # target ID and raises UnknownTargetError. + # See https://github.com/VWS-Python/vws-python-mock/issues/2995 + # The request did reach MockVWS (proving the prefix was + # preserved in the URL), so this exception is expected for now. + with contextlib.suppress(UnknownTargetError): + assert vws_client.list_targets() == [] class TestListTargets: From 165903879c68741e0c4bfb279f6b86fe0033dd0d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 20:26:46 +0000 Subject: [PATCH 1320/1638] Bump vws-python-mock to 2026.2.22.2 and clean up path-prefix handling Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 2 +- src/vws/_vws_request.py | 7 +------ src/vws/query.py | 6 +----- tests/test_vws.py | 12 +----------- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 18c09b913..f1baeabea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "ty==0.0.17", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.22.1", + "vws-python-mock==2026.2.22.2", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", diff --git a/src/vws/_vws_request.py b/src/vws/_vws_request.py index 5d2f4ea6a..2fc7bd3bb 100644 --- a/src/vws/_vws_request.py +++ b/src/vws/_vws_request.py @@ -2,8 +2,6 @@ API. """ -from urllib.parse import urlparse - import requests from beartype import BeartypeConf, beartype from vws_auth_tools import authorization_header, rfc_1123_date @@ -47,9 +45,6 @@ def target_api_request( """ date_string = rfc_1123_date() - base_path = urlparse(url=base_vws_url).path.rstrip("/") - full_request_path = base_path + request_path - signature_string = authorization_header( access_key=server_access_key, secret_key=server_secret_key, @@ -57,7 +52,7 @@ def target_api_request( content=data, content_type=content_type, date=date_string, - request_path=full_request_path, + request_path=request_path, ) headers = { diff --git a/src/vws/query.py b/src/vws/query.py index 38775c566..f5046bd1c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -5,7 +5,6 @@ import json from http import HTTPMethod, HTTPStatus from typing import Any, BinaryIO -from urllib.parse import urlparse import requests from beartype import BeartypeConf, beartype @@ -127,9 +126,6 @@ def query( content, content_type_header = encode_multipart_formdata(fields=body) method = HTTPMethod.POST - base_path = urlparse(url=self._base_vwq_url).path.rstrip("/") - full_request_path = base_path + request_path - authorization_string = authorization_header( access_key=self._client_access_key, secret_key=self._client_secret_key, @@ -138,7 +134,7 @@ def query( # Note that this is not the actual Content-Type header value sent. content_type="multipart/form-data", date=date, - request_path=full_request_path, + request_path=request_path, ) headers = { diff --git a/tests/test_vws.py b/tests/test_vws.py index 0960a5d7a..b98a73321 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -1,7 +1,6 @@ """Tests for helper functions for managing a Vuforia database.""" import base64 -import contextlib import datetime import io import secrets @@ -16,7 +15,6 @@ from vws import VWS, CloudRecoService, VuMarkService from vws.exceptions.custom_exceptions import TargetProcessingTimeoutError -from vws.exceptions.vws_exceptions import UnknownTargetError from vws.reports import ( DatabaseSummaryReport, TargetRecord, @@ -264,15 +262,7 @@ def test_custom_base_url_with_path_prefix() -> None: base_vws_url=base_vws_url, ) - # MockVWS's path-length check in validate_target_id_exists - # does not account for a base URL path prefix, so it - # incorrectly treats the last path segment ("targets") as a - # target ID and raises UnknownTargetError. - # See https://github.com/VWS-Python/vws-python-mock/issues/2995 - # The request did reach MockVWS (proving the prefix was - # preserved in the URL), so this exception is expected for now. - with contextlib.suppress(UnknownTargetError): - assert vws_client.list_targets() == [] + assert vws_client.list_targets() == [] class TestListTargets: From 13a0047ed0a2562e0400b4347403b3c98bef1f4f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 20:32:49 +0000 Subject: [PATCH 1321/1638] Use implicit booleaness check in path-prefix test Co-Authored-By: Claude Sonnet 4.6 --- tests/test_vws.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_vws.py b/tests/test_vws.py index b98a73321..29bd3aa3b 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -262,7 +262,7 @@ def test_custom_base_url_with_path_prefix() -> None: base_vws_url=base_vws_url, ) - assert vws_client.list_targets() == [] + assert not vws_client.list_targets() class TestListTargets: From 717464ce6a9483e5ed8b3301495e06de314f238d Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Sun, 22 Feb 2026 20:41:10 +0000 Subject: [PATCH 1322/1638] Bump CHANGELOG --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fffe7a623..ad0012ef1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,10 @@ Changelog Next ---- +2026.02.22 +---------- + + 2026.02.21 ---------- From 9a74bafa0e0a90a23430a873d825b30c14dc8f01 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Feb 2026 08:48:30 +0000 Subject: [PATCH 1323/1638] Fix wait_for_target_processed returning before status is stable. Add a confirmation check after target transitions from PROCESSING to guard against eventual consistency issues where other endpoints still see the target as processing. Co-Authored-By: Claude Haiku 4.5 --- src/vws/vws.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 1aa11374a..9b5ef124e 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -343,7 +343,15 @@ def wait_for_target_processed( while True: report = self.get_target_summary_report(target_id=target_id) if report.status != TargetStatuses.PROCESSING: - return + # Wait and verify once more to guard against the target + # still being seen as processing by other endpoints due + # to eventual consistency. + time.sleep(seconds_between_requests) + report = self.get_target_summary_report( + target_id=target_id, + ) + if report.status != TargetStatuses.PROCESSING: + return elapsed_time = time.monotonic() - start_time if elapsed_time > timeout_seconds: # pragma: no cover From 2486dad5488c9f39e6d7ae5c0afa7460962860f7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Feb 2026 08:55:30 +0000 Subject: [PATCH 1324/1638] Simplify verification to just a sleep to maintain 100% coverage. Co-Authored-By: Claude Opus 4.6 --- src/vws/vws.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/vws/vws.py b/src/vws/vws.py index 9b5ef124e..50b4f5e75 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -343,15 +343,11 @@ def wait_for_target_processed( while True: report = self.get_target_summary_report(target_id=target_id) if report.status != TargetStatuses.PROCESSING: - # Wait and verify once more to guard against the target - # still being seen as processing by other endpoints due - # to eventual consistency. + # Guard against the target still being seen as + # processing by other endpoints due to eventual + # consistency. time.sleep(seconds_between_requests) - report = self.get_target_summary_report( - target_id=target_id, - ) - if report.status != TargetStatuses.PROCESSING: - return + return elapsed_time = time.monotonic() - start_time if elapsed_time > timeout_seconds: # pragma: no cover From 62936f2d6da03eee79c273799f07143089a8ae67 Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Mon, 23 Feb 2026 09:10:51 +0000 Subject: [PATCH 1325/1638] Bump CHANGELOG --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ad0012ef1..2c3c2a875 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,10 @@ Changelog Next ---- +2026.02.23 +---------- + + 2026.02.22 ---------- From 4ab25423f4e4fcf4cbc2d2f331a0a06b6c4f2e42 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 23 Feb 2026 09:47:24 +0000 Subject: [PATCH 1326/1638] Use * for keyword-only arguments in pytest fixtures Co-authored-by: Cursor --- conftest.py | 2 ++ tests/conftest.py | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/conftest.py b/conftest.py index d5ef944b6..d9e955107 100644 --- a/conftest.py +++ b/conftest.py @@ -28,6 +28,7 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @pytest.fixture(name="make_image_file") def fixture_make_image_file( + *, high_quality_image: io.BytesIO, ) -> Generator[None]: """Make an image file available in the test directory. @@ -43,6 +44,7 @@ def fixture_make_image_file( @pytest.fixture(name="mock_vws") def fixture_mock_vws( + *, monkeypatch: pytest.MonkeyPatch, ) -> Generator[None]: """Yield a mock VWS. diff --git a/tests/conftest.py b/tests/conftest.py index 0f15e6a9a..eb8b3a573 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -35,6 +35,7 @@ def fixture_mock_vumark_database() -> Generator[VuMarkDatabase]: @pytest.fixture def vumark_service_client( + *, _mock_vumark_database: VuMarkDatabase, ) -> VuMarkService: """A ``VuMarkService`` client which connects to a mock VuMark database.""" @@ -45,14 +46,14 @@ def vumark_service_client( @pytest.fixture -def vumark_target_id(_mock_vumark_database: VuMarkDatabase) -> str: +def vumark_target_id(*, _mock_vumark_database: VuMarkDatabase) -> str: """The ID of the VuMark template target.""" (target,) = _mock_vumark_database.vumark_targets return target.target_id @pytest.fixture -def vws_client(_mock_database: CloudDatabase) -> VWS: +def vws_client(*, _mock_database: CloudDatabase) -> VWS: """A VWS client which connects to a mock database.""" return VWS( server_access_key=_mock_database.server_access_key, @@ -61,7 +62,7 @@ def vws_client(_mock_database: CloudDatabase) -> VWS: @pytest.fixture -def cloud_reco_client(_mock_database: CloudDatabase) -> CloudRecoService: +def cloud_reco_client(*, _mock_database: CloudDatabase) -> CloudRecoService: """A ``CloudRecoService`` client which connects to a mock database.""" return CloudRecoService( client_access_key=_mock_database.client_access_key, @@ -71,6 +72,7 @@ def cloud_reco_client(_mock_database: CloudDatabase) -> CloudRecoService: @pytest.fixture(name="image_file", params=["r+b", "rb"]) def fixture_image_file( + *, high_quality_image: io.BytesIO, tmp_path: Path, request: pytest.FixtureRequest, @@ -86,6 +88,7 @@ def fixture_image_file( @pytest.fixture(params=["high_quality_image", "image_file"]) def image( + *, request: pytest.FixtureRequest, high_quality_image: io.BytesIO, image_file: BinaryIO, From efd2f2653547222eaa5298b5f95208e6d22c36a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 11:24:21 +0000 Subject: [PATCH 1327/1638] Bump ty from 0.0.17 to 0.0.18 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.17 to 0.0.18. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.17...0.0.18) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.18 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1baeabea..21e97c3c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.17", + "ty==0.0.18", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2026.2.22.2", From 0e500caeaa27b25a103c0c6a8417c7ecf1d77081 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 11:24:52 +0000 Subject: [PATCH 1328/1638] Bump pylint[spelling] from 4.0.4 to 4.0.5 Bumps [pylint[spelling]](https://github.com/pylint-dev/pylint) from 4.0.4 to 4.0.5. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v4.0.4...v4.0.5) --- updated-dependencies: - dependency-name: pylint[spelling] dependency-version: 4.0.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1baeabea..c98390736 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", - "pylint[spelling]==4.0.4", + "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.16.1", "pyrefly==0.53.0", From 61256cf39fa0d1df0c9f58171a76de526cf2c98a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 11:25:04 +0000 Subject: [PATCH 1329/1638] Bump ruff from 0.15.1 to 0.15.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.1 to 0.15.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.15.1...0.15.2) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1baeabea..e02b114d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pytest==9.0.2", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.15.1", + "ruff==0.15.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From ca900fb09c5ed85cb83d7ff89d2b53b0ff13fd7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 11:29:13 +0000 Subject: [PATCH 1330/1638] Bump vws-python-mock from 2026.2.22.2 to 2026.2.22.3 Bumps [vws-python-mock](https://github.com/VWS-Python/vws-python-mock) from 2026.2.22.2 to 2026.2.22.3. - [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/2026.02.22.2...2026.02.22.3) --- updated-dependencies: - dependency-name: vws-python-mock dependency-version: 2026.2.22.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f8d587bfb..4d14b8f9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "ty==0.0.18", "types-requests==2.32.4.20260107", "vulture==2.14", - "vws-python-mock==2026.2.22.2", + "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.22.0", From f6fad17cda39e4608c5c87d7298ce32e958037fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 10:33:25 +0000 Subject: [PATCH 1331/1638] Bump pyproject-fmt from 2.16.1 to 2.16.2 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.16.1 to 2.16.2. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.16.1...pyproject-fmt/2.16.2) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.16.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d14b8f9a..a9c1955df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.16.1", + "pyproject-fmt==2.16.2", "pyrefly==0.53.0", "pyright==1.1.408", "pyroma==5.0.1", From e39eb4b08246d755881617452ffbf2ea1f51bde0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 10:37:51 +0000 Subject: [PATCH 1332/1638] Bump pyrefly from 0.53.0 to 0.54.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.53.0 to 0.54.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.53.0...0.54.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.54.0 dependency-type: direct:development 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 a9c1955df..b139857e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.16.2", - "pyrefly==0.53.0", + "pyrefly==0.54.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 92459c6ee1962cf1783cbe0238aa17ffcad9b4b7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 12:41:29 +0000 Subject: [PATCH 1333/1638] Add switchable HTTP transports (requests and httpx) Introduce a Transport protocol and two concrete implementations (RequestsTransport and HTTPXTransport) to allow users to choose between requests and httpx as the HTTP backend. All three client classes (VWS, CloudRecoService, VuMarkService) now accept an optional transport parameter, defaulting to RequestsTransport for backwards compatibility. The transport abstraction handles the full HTTP lifecycle and returns the library's Response dataclass. Co-Authored-By: Claude Haiku 4.5 --- docs/source/api-reference.rst | 4 + pyproject.toml | 1 + spelling_private_dict.txt | 1 + src/vws/__init__.py | 4 + src/vws/_vws_request.py | 37 ++++----- src/vws/query.py | 27 +++--- src/vws/transports.py | 151 ++++++++++++++++++++++++++++++++++ src/vws/vumark_service.py | 15 +++- src/vws/vws.py | 47 ++++++----- 9 files changed, 226 insertions(+), 61 deletions(-) create mode 100644 src/vws/transports.py diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index c94d810e1..3fc7441ce 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -20,3 +20,7 @@ API Reference .. automodule:: vws.response :undoc-members: :members: + +.. automodule:: vws.transports + :undoc-members: + :members: diff --git a/pyproject.toml b/pyproject.toml index 4d14b8f9a..ea0d7cd5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,7 @@ dynamic = [ ] dependencies = [ "beartype>=0.22.9", + "httpx>=0.28.0", "requests>=2.32.3", "urllib3>=2.2.3", "vws-auth-tools>=2024.7.12", diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 2329ef7f4..8831d3d34 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -54,6 +54,7 @@ hmac html http https +httpx iff io issuecomment diff --git a/src/vws/__init__.py b/src/vws/__init__.py index a091641f9..ad3d2de33 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -1,11 +1,15 @@ """A library for Vuforia Web Services.""" from .query import CloudRecoService +from .transports import HTTPXTransport, RequestsTransport, Transport from .vumark_service import VuMarkService from .vws import VWS __all__ = [ "VWS", "CloudRecoService", + "HTTPXTransport", + "RequestsTransport", + "Transport", "VuMarkService", ] diff --git a/src/vws/_vws_request.py b/src/vws/_vws_request.py index 2fc7bd3bb..797860dc6 100644 --- a/src/vws/_vws_request.py +++ b/src/vws/_vws_request.py @@ -2,11 +2,11 @@ API. """ -import requests from beartype import BeartypeConf, beartype from vws_auth_tools import authorization_header, rfc_1123_date from vws.response import Response +from vws.transports import Transport @beartype(conf=BeartypeConf(is_pep484_tower=True)) @@ -21,27 +21,30 @@ def target_api_request( base_vws_url: str, request_timeout_seconds: float | tuple[float, float], extra_headers: dict[str, str], + transport: Transport, ) -> Response: """Make a request to the Vuforia Target API. - This uses `requests` to make a request against https://vws.vuforia.com. - Args: content_type: The content type of the request. server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. - method: The HTTP method which will be used in the request. - data: The request body which will be used in the request. - request_path: The path to the endpoint which will be used in the + method: The HTTP method 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. - request_timeout_seconds: The timeout for the request, as used by - ``requests.request``. This can be a float to set both the - connect and read timeouts, or a (connect, read) tuple. - extra_headers: Additional headers to include in the request. + request_timeout_seconds: The timeout for the request. + This can be a float to set both the connect and + read timeouts, or a (connect, read) tuple. + extra_headers: Additional headers to include in the + request. + transport: The HTTP transport to use for the request. Returns: - The response to the request made by `requests`. + The response to the request. """ date_string = rfc_1123_date() @@ -64,20 +67,10 @@ def target_api_request( url = base_vws_url.rstrip("/") + request_path - requests_response = requests.request( + return transport( method=method, url=url, headers=headers, data=data, timeout=request_timeout_seconds, ) - - 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, - tell_position=requests_response.raw.tell(), - content=bytes(requests_response.content), - ) diff --git a/src/vws/query.py b/src/vws/query.py index f5046bd1c..fcca282de 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -6,7 +6,6 @@ from http import HTTPMethod, HTTPStatus from typing import Any, BinaryIO -import requests from beartype import BeartypeConf, beartype from urllib3.filepost import encode_multipart_formdata from vws_auth_tools import authorization_header, rfc_1123_date @@ -24,7 +23,7 @@ ) from vws.include_target_data import CloudRecoIncludeTargetData from vws.reports import QueryResult, TargetData -from vws.response import Response +from vws.transports import RequestsTransport, Transport _ImageType = io.BytesIO | BinaryIO @@ -50,21 +49,26 @@ def __init__( client_secret_key: str, base_vwq_url: str = "https://cloudreco.vuforia.com", request_timeout_seconds: float | tuple[float, float] = 30.0, + transport: Transport | None = None, ) -> None: """ Args: client_access_key: A VWS client access key. client_secret_key: A VWS client secret key. base_vwq_url: The base URL for the VWQ API. - request_timeout_seconds: The timeout for each HTTP request, as - used by ``requests.request``. This can be a float to set - both the connect and read timeouts, or a (connect, read) - tuple. + request_timeout_seconds: The timeout for each + HTTP request. This can be a float to set both + the connect and read timeouts, or a + (connect, read) tuple. + transport: The HTTP transport to use for + requests. Defaults to + ``RequestsTransport()``. """ self._client_access_key = client_access_key self._client_secret_key = client_secret_key self._base_vwq_url = base_vwq_url self._request_timeout_seconds = request_timeout_seconds + self._transport = transport or RequestsTransport() def query( self, @@ -143,22 +147,13 @@ def query( "Content-Type": content_type_header, } - requests_response = requests.request( + response = self._transport( method=method, url=self._base_vwq_url.rstrip("/") + request_path, headers=headers, data=content, timeout=self._request_timeout_seconds, ) - 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, - tell_position=requests_response.raw.tell(), - content=bytes(requests_response.content), - ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: raise RequestEntityTooLargeError(response=response) diff --git a/src/vws/transports.py b/src/vws/transports.py new file mode 100644 index 000000000..d9107691b --- /dev/null +++ b/src/vws/transports.py @@ -0,0 +1,151 @@ +"""HTTP transport implementations for VWS clients.""" + +from __future__ import annotations + +from typing import Protocol, runtime_checkable + +import httpx +import requests +from beartype import BeartypeConf, beartype + +from vws.response import Response + + +@runtime_checkable +class Transport(Protocol): + """Protocol for HTTP transports used by VWS clients. + + A transport is a callable that makes an HTTP request and + returns a ``Response``. + """ + + def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + timeout: float | tuple[float, float], + ) -> Response: + """Make an HTTP request. + + Args: + method: The HTTP method (e.g. "GET", "POST"). + url: The full URL to request. + headers: Headers to send with the request. + data: The request body as bytes. + timeout: The timeout for the request. A float + sets both the connect and read timeouts. A + (connect, read) tuple sets them individually. + + Returns: + A Response populated from the HTTP response. + """ + ... + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class RequestsTransport: + """HTTP transport using the ``requests`` library. + + This is the default transport. + """ + + def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + timeout: float | tuple[float, float], + ) -> Response: + """Make an HTTP request using ``requests``. + + Args: + method: The HTTP method. + url: The full URL. + headers: Request headers. + data: The request body. + timeout: The request timeout. + + Returns: + A Response populated from the requests response. + """ + requests_response = requests.request( + method=method, + url=url, + headers=headers, + data=data, + timeout=timeout, + ) + + 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, + tell_position=requests_response.raw.tell(), + content=bytes(requests_response.content), + ) + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class HTTPXTransport: + """HTTP transport using the ``httpx`` library. + + Use this transport for environments where ``httpx`` is + preferred over ``requests``. + """ + + def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + timeout: float | tuple[float, float], + ) -> Response: + """Make an HTTP request using ``httpx``. + + Args: + method: The HTTP method. + url: The full URL. + headers: Request headers. + data: The request body. + timeout: The request timeout. + + Returns: + A Response populated from the httpx response. + """ + if isinstance(timeout, tuple): + connect_timeout, read_timeout = timeout + httpx_timeout = httpx.Timeout( + connect=connect_timeout, + read=read_timeout, + write=None, + pool=None, + ) + else: + httpx_timeout = httpx.Timeout(timeout=timeout) + + httpx_response = httpx.request( + method=method, + url=url, + headers=headers, + content=data, + timeout=httpx_timeout, + ) + + return Response( + text=httpx_response.text, + url=str(object=httpx_response.url), + status_code=httpx_response.status_code, + headers=dict(httpx_response.headers), + request_body=bytes(httpx_response.request.content), + tell_position=0, + content=bytes(httpx_response.content), + ) diff --git a/src/vws/vumark_service.py b/src/vws/vumark_service.py index a23ac33f2..adb89ca71 100644 --- a/src/vws/vumark_service.py +++ b/src/vws/vumark_service.py @@ -20,6 +20,7 @@ TooManyRequestsError, UnknownTargetError, ) +from vws.transports import RequestsTransport, Transport from vws.vumark_accept import VuMarkAccept @@ -33,21 +34,26 @@ def __init__( server_secret_key: str, base_vws_url: str = "https://vws.vuforia.com", request_timeout_seconds: float | tuple[float, float] = 30.0, + transport: Transport | None = None, ) -> None: """ Args: server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. base_vws_url: The base URL for the VWS API. - request_timeout_seconds: The timeout for each HTTP request, as - used by ``requests.request``. This can be a float to set - both the connect and read timeouts, or a (connect, read) - tuple. + request_timeout_seconds: The timeout for each + HTTP request. This can be a float to set both + the connect and read timeouts, or a + (connect, read) tuple. + transport: The HTTP transport to use for + requests. Defaults to + ``RequestsTransport()``. """ self._server_access_key = server_access_key self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url self._request_timeout_seconds = request_timeout_seconds + self._transport = transport or RequestsTransport() def generate_vumark_instance( self, @@ -109,6 +115,7 @@ def generate_vumark_instance( base_vws_url=self._base_vws_url, request_timeout_seconds=self._request_timeout_seconds, extra_headers={"Accept": accept}, + transport=self._transport, ) if ( diff --git a/src/vws/vws.py b/src/vws/vws.py index 50b4f5e75..01315e6a9 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -43,6 +43,7 @@ TargetSummaryReport, ) from vws.response import Response +from vws.transports import RequestsTransport, Transport _ImageType = io.BytesIO | BinaryIO @@ -68,21 +69,26 @@ def __init__( server_secret_key: str, base_vws_url: str = "https://vws.vuforia.com", request_timeout_seconds: float | tuple[float, float] = 30.0, + transport: Transport | None = None, ) -> None: """ Args: server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. base_vws_url: The base URL for the VWS API. - request_timeout_seconds: The timeout for each HTTP request, as - used by ``requests.request``. This can be a float to set - both the connect and read timeouts, or a (connect, read) - tuple. + request_timeout_seconds: The timeout for each + HTTP request. This can be a float to set both + the connect and read timeouts, or a + (connect, read) tuple. + transport: The HTTP transport to use for + requests. Defaults to + ``RequestsTransport()``. """ self._server_access_key = server_access_key self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url self._request_timeout_seconds = request_timeout_seconds + self._transport = transport or RequestsTransport() def make_request( self, @@ -96,29 +102,31 @@ def make_request( ) -> Response: """Make a request to the Vuforia Target API. - This uses `requests` to make a request against Vuforia. - Args: - method: The HTTP method 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 + method: The HTTP method which will be used in + the request. + data: The request body which will be used in the request. - expected_result_code: See "VWS API Result Codes" on + request_path: The path to the endpoint which + will be used in the request. + expected_result_code: See + "VWS API Result Codes" on https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api. content_type: The content type of the request. - extra_headers: Additional headers to include in the request. + extra_headers: Additional headers to include in + the request. Returns: - The response to the request made by `requests`. + The response to the request. Raises: - ~vws.exceptions.custom_exceptions.ServerError: There is an error - with Vuforia's servers. - ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is - rate limiting access. - json.JSONDecodeError: The server did not respond with valid JSON. - This may happen if the server address is not a valid Vuforia - server. + ~vws.exceptions.custom_exceptions.ServerError: + There is an error with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: + Vuforia is rate limiting access. + 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( content_type=content_type, @@ -130,6 +138,7 @@ def make_request( base_vws_url=self._base_vws_url, request_timeout_seconds=self._request_timeout_seconds, extra_headers=extra_headers or {}, + transport=self._transport, ) if ( From e9041ec56912d55ee60731ff8c797aeaacfe37f5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 12:44:56 +0000 Subject: [PATCH 1334/1638] Remove transport re-exports from vws.__init__ Users should import transports from vws.transports directly. Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 2 ++ src/vws/__init__.py | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ea0d7cd5d..4fd78dfa7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -358,6 +358,8 @@ ignore_path = [ # Ideally we would limit the paths to the source code where we want to ignore names, # but Vulture does not enable this. ignore_names = [ + # Public API classes imported by users from vws.transports + "HTTPXTransport", # pytest configuration "pytest_collect_file", "pytest_collection_modifyitems", diff --git a/src/vws/__init__.py b/src/vws/__init__.py index ad3d2de33..a091641f9 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -1,15 +1,11 @@ """A library for Vuforia Web Services.""" from .query import CloudRecoService -from .transports import HTTPXTransport, RequestsTransport, Transport from .vumark_service import VuMarkService from .vws import VWS __all__ = [ "VWS", "CloudRecoService", - "HTTPXTransport", - "RequestsTransport", - "Transport", "VuMarkService", ] From c6c313bc84e86466daf6639fb8b3831e6744863d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 12:54:42 +0000 Subject: [PATCH 1335/1638] Fix pylint issues in transports and vumark_service Make VuMarkService.__init__ keyword-only to fix too-many-positional-arguments. Suppress unnecessary-ellipsis on Transport protocol method body. Co-Authored-By: Claude Opus 4.6 --- src/vws/transports.py | 2 +- src/vws/vumark_service.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vws/transports.py b/src/vws/transports.py index d9107691b..a719f8da5 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -42,7 +42,7 @@ def __call__( Returns: A Response populated from the HTTP response. """ - ... + ... # pylint: disable=unnecessary-ellipsis @beartype(conf=BeartypeConf(is_pep484_tower=True)) diff --git a/src/vws/vumark_service.py b/src/vws/vumark_service.py index adb89ca71..47d68d942 100644 --- a/src/vws/vumark_service.py +++ b/src/vws/vumark_service.py @@ -30,6 +30,7 @@ class VuMarkService: def __init__( self, + *, server_access_key: str, server_secret_key: str, base_vws_url: str = "https://vws.vuforia.com", From 5b3fd2c0703341d82f1b22017467cf148ca44fcd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 13:00:18 +0000 Subject: [PATCH 1336/1638] Remove future annotations, add HTTPXTransport tests Remove `from __future__ import annotations` from transports.py. Add tests for HTTPXTransport covering both float and tuple timeout branches to achieve 100% coverage. Co-Authored-By: Claude Opus 4.6 --- src/vws/transports.py | 2 -- tests/test_transports.py | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 tests/test_transports.py diff --git a/src/vws/transports.py b/src/vws/transports.py index a719f8da5..c4e466654 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -1,7 +1,5 @@ """HTTP transport implementations for VWS clients.""" -from __future__ import annotations - from typing import Protocol, runtime_checkable import httpx diff --git a/tests/test_transports.py b/tests/test_transports.py new file mode 100644 index 000000000..70d551869 --- /dev/null +++ b/tests/test_transports.py @@ -0,0 +1,57 @@ +"""Tests for HTTP transport implementations.""" + +from http import HTTPStatus + +import httpx +import respx + +from vws.response import Response +from vws.transports import HTTPXTransport + + +class TestHTTPXTransport: + """Tests for ``HTTPXTransport``.""" + + @respx.mock + def test_float_timeout(self) -> None: + """``HTTPXTransport`` works with a float timeout.""" + respx.post(url="https://example.com/test").mock( + return_value=httpx.Response( + status_code=HTTPStatus.OK, + text="OK", + ), + ) + transport = HTTPXTransport() + response = transport( + method="POST", + url="https://example.com/test", + headers={"Content-Type": "text/plain"}, + data=b"hello", + timeout=30.0, + ) + assert isinstance(response, Response) + assert response.status_code == HTTPStatus.OK + assert response.text == "OK" + assert response.tell_position == 0 + + @respx.mock + def test_tuple_timeout(self) -> None: + """``HTTPXTransport`` works with a (connect, read) timeout + tuple. + """ + respx.post(url="https://example.com/test").mock( + return_value=httpx.Response( + status_code=HTTPStatus.OK, + text="OK", + ), + ) + transport = HTTPXTransport() + response = transport( + method="POST", + url="https://example.com/test", + headers={"Content-Type": "text/plain"}, + data=b"hello", + timeout=(5.0, 30.0), + ) + assert isinstance(response, Response) + assert response.status_code == HTTPStatus.OK From fbff605d2419b88b7ed2b833a05cf05c4f3d6136 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 13:12:44 +0000 Subject: [PATCH 1337/1638] Address Bugbot review feedback on HTTPXTransport - Set tell_position to len(content) instead of 0 - Add follow_redirects=True to httpx.request() - Handle request_body None when content is empty Co-Authored-By: Claude Opus 4.6 --- src/vws/transports.py | 10 +++++++--- tests/test_transports.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vws/transports.py b/src/vws/transports.py index c4e466654..bc0f96880 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -136,14 +136,18 @@ def __call__( headers=headers, content=data, timeout=httpx_timeout, + follow_redirects=True, ) + content = bytes(httpx_response.content) + request_content = httpx_response.request.content + return Response( text=httpx_response.text, url=str(object=httpx_response.url), status_code=httpx_response.status_code, headers=dict(httpx_response.headers), - request_body=bytes(httpx_response.request.content), - tell_position=0, - content=bytes(httpx_response.content), + request_body=bytes(request_content) or None, + tell_position=len(content), + content=content, ) diff --git a/tests/test_transports.py b/tests/test_transports.py index 70d551869..bbd6e6334 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -32,7 +32,7 @@ def test_float_timeout(self) -> None: assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK assert response.text == "OK" - assert response.tell_position == 0 + assert response.tell_position == len(b"OK") @respx.mock def test_tuple_timeout(self) -> None: From c3076542dcede6bb9f54799edbdf4204cb21b91a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 13:16:29 +0000 Subject: [PATCH 1338/1638] Suppress pylint no-self-use for test files Use @staticmethod on test methods that don't reference self. Co-Authored-By: Claude Opus 4.6 --- tests/test_transports.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_transports.py b/tests/test_transports.py index bbd6e6334..972c83a15 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -12,8 +12,9 @@ class TestHTTPXTransport: """Tests for ``HTTPXTransport``.""" + @staticmethod @respx.mock - def test_float_timeout(self) -> None: + def test_float_timeout() -> None: """``HTTPXTransport`` works with a float timeout.""" respx.post(url="https://example.com/test").mock( return_value=httpx.Response( @@ -34,8 +35,9 @@ def test_float_timeout(self) -> None: assert response.text == "OK" assert response.tell_position == len(b"OK") + @staticmethod @respx.mock - def test_tuple_timeout(self) -> None: + def test_tuple_timeout() -> None: """``HTTPXTransport`` works with a (connect, read) timeout tuple. """ From e2bf8ce06eaaf63e8434b8a4509238e91f5dc38c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 13:34:18 +0000 Subject: [PATCH 1339/1638] Make float timeout consistent with tuple timeout in HTTPXTransport Both paths now only set connect and read timeouts, matching requests behavior. Previously the float path also set write and pool timeouts. Co-Authored-By: Claude Opus 4.6 --- src/vws/transports.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vws/transports.py b/src/vws/transports.py index bc0f96880..9e4c550c6 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -128,7 +128,12 @@ def __call__( pool=None, ) else: - httpx_timeout = httpx.Timeout(timeout=timeout) + httpx_timeout = httpx.Timeout( + connect=timeout, + read=timeout, + write=None, + pool=None, + ) httpx_response = httpx.request( method=method, From b977b52f5e853a622e26cfcb818e1010ef846551 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 14:23:36 +0000 Subject: [PATCH 1340/1638] Assert httpx mock routes are called in transport tests Co-Authored-By: Claude Opus 4.6 --- tests/test_transports.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_transports.py b/tests/test_transports.py index 972c83a15..7b77107cc 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -16,7 +16,7 @@ class TestHTTPXTransport: @respx.mock def test_float_timeout() -> None: """``HTTPXTransport`` works with a float timeout.""" - respx.post(url="https://example.com/test").mock( + route = respx.post(url="https://example.com/test").mock( return_value=httpx.Response( status_code=HTTPStatus.OK, text="OK", @@ -30,6 +30,7 @@ def test_float_timeout() -> None: data=b"hello", timeout=30.0, ) + assert route.called assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK assert response.text == "OK" @@ -41,7 +42,7 @@ def test_tuple_timeout() -> None: """``HTTPXTransport`` works with a (connect, read) timeout tuple. """ - respx.post(url="https://example.com/test").mock( + route = respx.post(url="https://example.com/test").mock( return_value=httpx.Response( status_code=HTTPStatus.OK, text="OK", @@ -55,5 +56,6 @@ def test_tuple_timeout() -> None: data=b"hello", timeout=(5.0, 30.0), ) + assert route.called assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK From cdc9e43163bac2c6e4cff7971cf28178db1b547c Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:48:11 +0000 Subject: [PATCH 1341/1638] Bump CHANGELOG --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2c3c2a875..f1da681fc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,10 @@ Changelog Next ---- +2026.02.24 +---------- + + 2026.02.23 ---------- From 90a452ef04082dad931b94f774fa2c3bfefa8c4c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 23:30:47 +0000 Subject: [PATCH 1342/1638] Rename transport `timeout` parameter to `request_timeout` Avoids triggering ruff ASYNC109 (which flags async functions with a `timeout` parameter) without needing a lint suppression. The name `request_timeout` is also more descriptive of its purpose as an HTTP request timeout passed through to httpx/requests. Co-Authored-By: Claude Haiku 4.5 --- src/vws/_vws_request.py | 2 +- src/vws/query.py | 2 +- src/vws/transports.py | 22 +++++++++++----------- tests/test_transports.py | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/vws/_vws_request.py b/src/vws/_vws_request.py index 797860dc6..8e08cf863 100644 --- a/src/vws/_vws_request.py +++ b/src/vws/_vws_request.py @@ -72,5 +72,5 @@ def target_api_request( url=url, headers=headers, data=data, - timeout=request_timeout_seconds, + request_timeout=request_timeout_seconds, ) diff --git a/src/vws/query.py b/src/vws/query.py index fcca282de..f24eec231 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -152,7 +152,7 @@ def query( url=self._base_vwq_url.rstrip("/") + request_path, headers=headers, data=content, - timeout=self._request_timeout_seconds, + request_timeout=self._request_timeout_seconds, ) if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: diff --git a/src/vws/transports.py b/src/vws/transports.py index 9e4c550c6..7980c5785 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -24,7 +24,7 @@ def __call__( url: str, headers: dict[str, str], data: bytes, - timeout: float | tuple[float, float], + request_timeout: float | tuple[float, float], ) -> Response: """Make an HTTP request. @@ -33,7 +33,7 @@ def __call__( url: The full URL to request. headers: Headers to send with the request. data: The request body as bytes. - timeout: The timeout for the request. A float + request_timeout: The timeout for the request. A float sets both the connect and read timeouts. A (connect, read) tuple sets them individually. @@ -57,7 +57,7 @@ def __call__( url: str, headers: dict[str, str], data: bytes, - timeout: float | tuple[float, float], + request_timeout: float | tuple[float, float], ) -> Response: """Make an HTTP request using ``requests``. @@ -66,7 +66,7 @@ def __call__( url: The full URL. headers: Request headers. data: The request body. - timeout: The request timeout. + request_timeout: The request timeout. Returns: A Response populated from the requests response. @@ -76,7 +76,7 @@ def __call__( url=url, headers=headers, data=data, - timeout=timeout, + timeout=request_timeout, ) return Response( @@ -105,7 +105,7 @@ def __call__( url: str, headers: dict[str, str], data: bytes, - timeout: float | tuple[float, float], + request_timeout: float | tuple[float, float], ) -> Response: """Make an HTTP request using ``httpx``. @@ -114,13 +114,13 @@ def __call__( url: The full URL. headers: Request headers. data: The request body. - timeout: The request timeout. + request_timeout: The request timeout. Returns: A Response populated from the httpx response. """ - if isinstance(timeout, tuple): - connect_timeout, read_timeout = timeout + if isinstance(request_timeout, tuple): + connect_timeout, read_timeout = request_timeout httpx_timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, @@ -129,8 +129,8 @@ def __call__( ) else: httpx_timeout = httpx.Timeout( - connect=timeout, - read=timeout, + connect=request_timeout, + read=request_timeout, write=None, pool=None, ) diff --git a/tests/test_transports.py b/tests/test_transports.py index 7b77107cc..37eaad4e7 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -28,7 +28,7 @@ def test_float_timeout() -> None: url="https://example.com/test", headers={"Content-Type": "text/plain"}, data=b"hello", - timeout=30.0, + request_timeout=30.0, ) assert route.called assert isinstance(response, Response) @@ -54,7 +54,7 @@ def test_tuple_timeout() -> None: url="https://example.com/test", headers={"Content-Type": "text/plain"}, data=b"hello", - timeout=(5.0, 30.0), + request_timeout=(5.0, 30.0), ) assert route.called assert isinstance(response, Response) From 83ef9f1b969a1b0cbadd35d8ae1a741771a99c4d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 23:37:12 +0000 Subject: [PATCH 1343/1638] Extract shared image utilities to reduce duplication Move _ImageType alias and _get_image_data function to new _image_utils module and import from both vws.py and query.py, eliminating duplicate code. Co-Authored-By: Claude Haiku 4.5 --- src/vws/_image_utils.py | 18 ++++++++++++++++++ src/vws/query.py | 17 +++-------------- src/vws/vws.py | 16 ++-------------- 3 files changed, 23 insertions(+), 28 deletions(-) create mode 100644 src/vws/_image_utils.py diff --git a/src/vws/_image_utils.py b/src/vws/_image_utils.py new file mode 100644 index 000000000..58ab58bfb --- /dev/null +++ b/src/vws/_image_utils.py @@ -0,0 +1,18 @@ +"""Image utility functions shared across VWS modules.""" + +import io +from typing import BinaryIO + +from beartype import beartype + +ImageType = io.BytesIO | BinaryIO + + +@beartype +def get_image_data(image: ImageType) -> bytes: + """Get the data of an image file.""" + original_tell = image.tell() + image.seek(0) + image_data = image.read() + image.seek(original_tell) + return image_data diff --git a/src/vws/query.py b/src/vws/query.py index fcca282de..7616e2f0f 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -1,15 +1,16 @@ """Tools for interacting with the Vuforia Cloud Recognition Web APIs.""" import datetime -import io import json from http import HTTPMethod, HTTPStatus -from typing import Any, BinaryIO +from typing import Any from beartype import BeartypeConf, beartype from urllib3.filepost import encode_multipart_formdata from vws_auth_tools import authorization_header, rfc_1123_date +from vws._image_utils import ImageType as _ImageType +from vws._image_utils import get_image_data as _get_image_data from vws.exceptions.cloud_reco_exceptions import ( AuthenticationFailureError, BadImageError, @@ -25,18 +26,6 @@ from vws.reports import QueryResult, TargetData from vws.transports import RequestsTransport, Transport -_ImageType = io.BytesIO | BinaryIO - - -@beartype -def _get_image_data(image: _ImageType) -> bytes: - """Get the data of an image file.""" - original_tell = image.tell() - image.seek(0) - image_data = image.read() - image.seek(original_tell) - return image_data - @beartype(conf=BeartypeConf(is_pep484_tower=True)) class CloudRecoService: diff --git a/src/vws/vws.py b/src/vws/vws.py index 01315e6a9..bed87c938 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -1,15 +1,15 @@ """Tools for interacting with Vuforia APIs.""" import base64 -import io import json import time from datetime import date from http import HTTPMethod, HTTPStatus -from typing import BinaryIO from beartype import BeartypeConf, beartype +from vws._image_utils import ImageType as _ImageType +from vws._image_utils import get_image_data as _get_image_data from vws._vws_request import target_api_request from vws.exceptions.custom_exceptions import ( ServerError, @@ -45,18 +45,6 @@ from vws.response import Response from vws.transports import RequestsTransport, Transport -_ImageType = io.BytesIO | BinaryIO - - -@beartype -def _get_image_data(image: _ImageType) -> bytes: - """Get the data of an image file.""" - original_tell = image.tell() - image.seek(0) - image_data = image.read() - image.seek(original_tell) - return image_data - @beartype(conf=BeartypeConf(is_pep484_tower=True)) class VWS: From db3fb18e3ca2a80deadfe85779445f70de8e9f1c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Feb 2026 23:24:13 +0000 Subject: [PATCH 1344/1638] Add asyncio support with async client classes Implement async versions of all three client classes (AsyncVWS, AsyncCloudRecoService, AsyncVuMarkService) alongside transport abstraction. Adds AsyncTransport protocol and AsyncHTTPXTransport using httpx.AsyncClient. Includes 99 new async integration tests with complete exception coverage. All 287 tests pass with strict mypy and ruff validation. Co-Authored-By: Claude Haiku 4.5 --- docs/source/api-reference.rst | 12 + pyproject.toml | 2 + spelling_private_dict.txt | 2 + src/vws/__init__.py | 6 + src/vws/_async_vws_request.py | 77 +++ src/vws/async_query.py | 226 +++++++ src/vws/async_vumark_service.py | 170 ++++++ src/vws/async_vws.py | 692 ++++++++++++++++++++++ src/vws/transports.py | 122 +++- tests/conftest.py | 55 +- tests/test_async_cloud_reco_exceptions.py | 120 ++++ tests/test_async_query.py | 225 +++++++ tests/test_async_vws.py | 500 ++++++++++++++++ tests/test_async_vws_exceptions.py | 304 ++++++++++ tests/test_transports.py | 147 ++++- 15 files changed, 2656 insertions(+), 4 deletions(-) create mode 100644 src/vws/_async_vws_request.py create mode 100644 src/vws/async_query.py create mode 100644 src/vws/async_vumark_service.py create mode 100644 src/vws/async_vws.py create mode 100644 tests/test_async_cloud_reco_exceptions.py create mode 100644 tests/test_async_query.py create mode 100644 tests/test_async_vws.py create mode 100644 tests/test_async_vws_exceptions.py diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index 3fc7441ce..c2765245d 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -5,6 +5,18 @@ API Reference :undoc-members: :members: +.. automodule:: vws.async_vws + :undoc-members: + :members: + +.. automodule:: vws.async_query + :undoc-members: + :members: + +.. automodule:: vws.async_vumark_service + :undoc-members: + :members: + .. automodule:: vws.reports :undoc-members: :members: diff --git a/pyproject.toml b/pyproject.toml index 88d229a1d..b4fbfeea3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,6 +60,7 @@ optional-dependencies.dev = [ "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", + "pytest-asyncio==1.3.0", "pytest-cov==7.0.0", "pyyaml==6.0.3", "ruff==0.15.2", @@ -359,6 +360,7 @@ ignore_path = [ # but Vulture does not enable this. ignore_names = [ # Public API classes imported by users from vws.transports + "AsyncHTTPXTransport", "HTTPXTransport", # pytest configuration "pytest_collect_file", diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 8831d3d34..73d358a00 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -27,6 +27,8 @@ admin api args ascii +async +asyncio beartype bool boolean diff --git a/src/vws/__init__.py b/src/vws/__init__.py index a091641f9..a181cb818 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -1,11 +1,17 @@ """A library for Vuforia Web Services.""" +from .async_query import AsyncCloudRecoService +from .async_vumark_service import AsyncVuMarkService +from .async_vws import AsyncVWS from .query import CloudRecoService from .vumark_service import VuMarkService from .vws import VWS __all__ = [ "VWS", + "AsyncCloudRecoService", + "AsyncVWS", + "AsyncVuMarkService", "CloudRecoService", "VuMarkService", ] diff --git a/src/vws/_async_vws_request.py b/src/vws/_async_vws_request.py new file mode 100644 index 000000000..4ebd50c86 --- /dev/null +++ b/src/vws/_async_vws_request.py @@ -0,0 +1,77 @@ +"""Internal helper for making authenticated async requests to the +Vuforia Target API. +""" + +from beartype import BeartypeConf, beartype +from vws_auth_tools import authorization_header, rfc_1123_date + +from vws.response import Response +from vws.transports import AsyncTransport + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +async def async_target_api_request( + *, + content_type: str, + server_access_key: str, + server_secret_key: str, + method: str, + data: bytes, + request_path: str, + base_vws_url: str, + request_timeout_seconds: float | tuple[float, float], + extra_headers: dict[str, str], + transport: AsyncTransport, +) -> Response: + """Make an async request to the Vuforia Target API. + + Args: + content_type: The content type of the request. + server_access_key: A VWS server access key. + server_secret_key: A VWS server secret key. + method: The HTTP method which will be used in the + request. + 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. + request_timeout_seconds: The timeout for the request. + This can be a float to set both the connect and + read timeouts, or a (connect, read) tuple. + extra_headers: Additional headers to include in the + request. + transport: The async HTTP transport to use for the + request. + + Returns: + The response to the request. + """ + date_string = rfc_1123_date() + + signature_string = authorization_header( + access_key=server_access_key, + secret_key=server_secret_key, + method=method, + content=data, + content_type=content_type, + date=date_string, + request_path=request_path, + ) + + headers = { + "Authorization": signature_string, + "Date": date_string, + "Content-Type": content_type, + **extra_headers, + } + + url = base_vws_url.rstrip("/") + request_path + + return await transport( + method=method, + url=url, + headers=headers, + data=data, + request_timeout=request_timeout_seconds, + ) diff --git a/src/vws/async_query.py b/src/vws/async_query.py new file mode 100644 index 000000000..56981d4e1 --- /dev/null +++ b/src/vws/async_query.py @@ -0,0 +1,226 @@ +"""Async tools for interacting with the Vuforia Cloud Recognition +Web APIs. +""" + +import datetime +import json +from http import HTTPMethod, HTTPStatus +from typing import Any, Self + +from beartype import BeartypeConf, beartype +from urllib3.filepost import encode_multipart_formdata +from vws_auth_tools import authorization_header, rfc_1123_date + +from vws._image_utils import ImageType as _ImageType +from vws._image_utils import get_image_data as _get_image_data +from vws.exceptions.cloud_reco_exceptions import ( + AuthenticationFailureError, + BadImageError, + InactiveProjectError, + MaxNumResultsOutOfRangeError, + RequestTimeTooSkewedError, +) +from vws.exceptions.custom_exceptions import ( + RequestEntityTooLargeError, + ServerError, +) +from vws.include_target_data import CloudRecoIncludeTargetData +from vws.reports import QueryResult, TargetData +from vws.transports import AsyncHTTPXTransport, AsyncTransport + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class AsyncCloudRecoService: + """An async interface to the Vuforia Cloud Recognition Web + APIs. + """ + + def __init__( + self, + *, + client_access_key: str, + client_secret_key: str, + base_vwq_url: str = "https://cloudreco.vuforia.com", + request_timeout_seconds: float | tuple[float, float] = 30.0, + transport: AsyncTransport | None = None, + ) -> None: + """ + Args: + client_access_key: A VWS client access key. + client_secret_key: A VWS client secret key. + base_vwq_url: The base URL for the VWQ API. + request_timeout_seconds: The timeout for each + HTTP request. This can be a float to set both + the connect and read timeouts, or a + (connect, read) tuple. + transport: The async HTTP transport to use for + requests. Defaults to + ``AsyncHTTPXTransport()``. + """ + self._client_access_key = client_access_key + self._client_secret_key = client_secret_key + self._base_vwq_url = base_vwq_url + self._request_timeout_seconds = request_timeout_seconds + self._transport = transport or AsyncHTTPXTransport() + + async def aclose(self) -> None: + """Close the underlying transport if it supports closing.""" + close = getattr(self._transport, "aclose", None) + if close is not None: + await close() + + async def __aenter__(self) -> Self: + """Enter the async context manager.""" + return self + + async def __aexit__(self, *_args: object) -> None: + """Exit the async context manager and close the transport.""" + await self.aclose() + + async def query( + self, + *, + image: _ImageType, + max_num_results: int = 1, + include_target_data: CloudRecoIncludeTargetData = ( + CloudRecoIncludeTargetData.TOP + ), + ) -> list[QueryResult]: + """Use the Vuforia Web Query API to make an Image + Recognition Query. + + See + https://developer.vuforia.com/library/web-api/vuforia-query-web-api + for parameter details. + + Args: + image: The image to make a query against. + max_num_results: The maximum number of matching + targets to be returned. + include_target_data: Indicates if target_data + records shall be returned for the matched + targets. Accepted values are top (default + value, only return target_data for top ranked + match), none (return no target_data), all + (for all matched targets). + + Raises: + ~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.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. + """ + image_content = _get_image_data(image=image) + body: dict[str, Any] = { + "image": ( + "image.jpeg", + image_content, + "image/jpeg", + ), + "max_num_results": ( + None, + int(max_num_results), + "text/plain", + ), + "include_target_data": ( + None, + include_target_data.value, + "text/plain", + ), + } + date = rfc_1123_date() + request_path = "/v1/query" + content, content_type_header = encode_multipart_formdata(fields=body) + method = HTTPMethod.POST + + authorization_string = authorization_header( + access_key=self._client_access_key, + secret_key=self._client_secret_key, + method=method, + content=content, + # Note that this is not the actual Content-Type + # header value sent. + content_type="multipart/form-data", + date=date, + request_path=request_path, + ) + + headers = { + "Authorization": authorization_string, + "Date": date, + "Content-Type": content_type_header, + } + + response = await self._transport( + method=method, + url=self._base_vwq_url.rstrip("/") + request_path, + headers=headers, + data=content, + request_timeout=self._request_timeout_seconds, + ) + + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + raise RequestEntityTooLargeError(response=response) + + if "Integer out of range" in response.text: + raise MaxNumResultsOutOfRangeError( + response=response, + ) + + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + + result_code = json.loads(s=response.text)["result_code"] + if result_code != "Success": + exception = { + "AuthenticationFailure": (AuthenticationFailureError), + "BadImage": BadImageError, + "InactiveProject": InactiveProjectError, + "RequestTimeTooSkewed": (RequestTimeTooSkewedError), + }[result_code] + raise exception(response=response) + + result: list[QueryResult] = [] + result_list = list( + json.loads(s=response.text)["results"], + ) + for item in result_list: + target_data: TargetData | None = None + if "target_data" in item: + target_data_dict = item["target_data"] + metadata = target_data_dict["application_metadata"] + timestamp_string = target_data_dict["target_timestamp"] + target_timestamp = datetime.datetime.fromtimestamp( + timestamp=timestamp_string, + tz=datetime.UTC, + ) + target_data = TargetData( + name=target_data_dict["name"], + application_metadata=metadata, + target_timestamp=target_timestamp, + ) + + query_result = QueryResult( + target_id=item["target_id"], + target_data=target_data, + ) + + result.append(query_result) + return result diff --git a/src/vws/async_vumark_service.py b/src/vws/async_vumark_service.py new file mode 100644 index 000000000..c1e189eeb --- /dev/null +++ b/src/vws/async_vumark_service.py @@ -0,0 +1,170 @@ +"""Async interface to the Vuforia VuMark Generation Web API.""" + +import json +from http import HTTPMethod, HTTPStatus +from typing import Self + +from beartype import BeartypeConf, beartype + +from vws._async_vws_request import async_target_api_request +from vws.exceptions.custom_exceptions import ServerError +from vws.exceptions.vws_exceptions import ( + AuthenticationFailureError, + BadRequestError, + DateRangeError, + FailError, + InvalidAcceptHeaderError, + InvalidInstanceIdError, + InvalidTargetTypeError, + RequestTimeTooSkewedError, + TargetStatusNotSuccessError, + TooManyRequestsError, + UnknownTargetError, +) +from vws.transports import AsyncHTTPXTransport, AsyncTransport +from vws.vumark_accept import VuMarkAccept + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class AsyncVuMarkService: + """An async interface to the Vuforia VuMark Generation Web + API. + """ + + def __init__( + self, + *, + server_access_key: str, + server_secret_key: str, + base_vws_url: str = "https://vws.vuforia.com", + request_timeout_seconds: float | tuple[float, float] = 30.0, + transport: AsyncTransport | None = None, + ) -> None: + """ + Args: + server_access_key: A VWS server access key. + server_secret_key: A VWS server secret key. + base_vws_url: The base URL for the VWS API. + request_timeout_seconds: The timeout for each + HTTP request. This can be a float to set both + the connect and read timeouts, or a + (connect, read) tuple. + transport: The async HTTP transport to use for + requests. Defaults to + ``AsyncHTTPXTransport()``. + """ + self._server_access_key = server_access_key + self._server_secret_key = server_secret_key + self._base_vws_url = base_vws_url + self._request_timeout_seconds = request_timeout_seconds + self._transport = transport or AsyncHTTPXTransport() + + async def aclose(self) -> None: + """Close the underlying transport if it supports closing.""" + close = getattr(self._transport, "aclose", None) + if close is not None: + await close() + + async def __aenter__(self) -> Self: + """Enter the async context manager.""" + return self + + async def __aexit__(self, *_args: object) -> None: + """Exit the async context manager and close the transport.""" + await self.aclose() + + async def generate_vumark_instance( + self, + *, + target_id: str, + instance_id: str, + accept: VuMarkAccept, + ) -> bytes: + """Generate a VuMark instance image. + + See + https://developer.vuforia.com/library/vuforia-engine/web-api/vumark-generation-web-api/ + for parameter details. + + Args: + target_id: The ID of the VuMark target. + instance_id: The instance ID to encode in the + VuMark. + accept: The image format to return. + + Returns: + The VuMark instance image bytes. + + Raises: + ~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.InvalidAcceptHeaderError: The + Accept header value is not supported. + ~vws.exceptions.vws_exceptions.InvalidInstanceIdError: The + instance ID is invalid. For example, it may be empty. + ~vws.exceptions.vws_exceptions.InvalidTargetTypeError: The target + is not a VuMark template target. + ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. + ~vws.exceptions.vws_exceptions.TargetStatusNotSuccessError: The + target is not in the success state. + ~vws.exceptions.vws_exceptions.UnknownTargetError: The given target + ID does not match a target in the database. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. + """ + request_path = f"/targets/{target_id}/instances" + content_type = "application/json" + request_data = json.dumps( + obj={"instance_id": instance_id}, + ).encode(encoding="utf-8") + + response = await async_target_api_request( + content_type=content_type, + server_access_key=self._server_access_key, + server_secret_key=self._server_secret_key, + method=HTTPMethod.POST, + data=request_data, + request_path=request_path, + base_vws_url=self._base_vws_url, + request_timeout_seconds=(self._request_timeout_seconds), + extra_headers={"Accept": accept}, + transport=self._transport, + ) + + if ( + response.status_code == HTTPStatus.TOO_MANY_REQUESTS + ): # pragma: no cover + # The Vuforia API returns a 429 response with no + # JSON body. + raise TooManyRequestsError(response=response) + + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + + if response.status_code == HTTPStatus.OK: + return response.content + + result_code = json.loads(s=response.text)["result_code"] + + exception = { + "AuthenticationFailure": (AuthenticationFailureError), + "BadRequest": BadRequestError, + "DateRangeError": DateRangeError, + "Fail": FailError, + "InvalidAcceptHeader": InvalidAcceptHeaderError, + "InvalidInstanceId": InvalidInstanceIdError, + "InvalidTargetType": InvalidTargetTypeError, + "RequestTimeTooSkewed": RequestTimeTooSkewedError, + "TargetStatusNotSuccess": (TargetStatusNotSuccessError), + "UnknownTarget": UnknownTargetError, + }[result_code] + + raise exception(response=response) diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py new file mode 100644 index 000000000..f0f9005a1 --- /dev/null +++ b/src/vws/async_vws.py @@ -0,0 +1,692 @@ +"""Async tools for interacting with Vuforia APIs.""" + +import asyncio +import base64 +import json +from datetime import date +from http import HTTPMethod, HTTPStatus +from typing import Self + +from beartype import BeartypeConf, beartype + +from vws._async_vws_request import async_target_api_request +from vws._image_utils import ImageType as _ImageType +from vws._image_utils import get_image_data as _get_image_data +from vws.exceptions.custom_exceptions import ( + ServerError, + TargetProcessingTimeoutError, +) +from vws.exceptions.vws_exceptions import ( + AuthenticationFailureError, + BadImageError, + BadRequestError, + DateRangeError, + FailError, + ImageTooLargeError, + MetadataTooLargeError, + ProjectHasNoAPIAccessError, + ProjectInactiveError, + ProjectSuspendedError, + RequestQuotaReachedError, + RequestTimeTooSkewedError, + TargetNameExistError, + TargetQuotaReachedError, + TargetStatusNotSuccessError, + TargetStatusProcessingError, + TooManyRequestsError, + UnknownTargetError, +) +from vws.reports import ( + DatabaseSummaryReport, + TargetRecord, + TargetStatusAndRecord, + TargetStatuses, + TargetSummaryReport, +) +from vws.response import Response +from vws.transports import AsyncHTTPXTransport, AsyncTransport + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class AsyncVWS: + """An async interface to Vuforia Web Services APIs.""" + + def __init__( + self, + *, + server_access_key: str, + server_secret_key: str, + base_vws_url: str = "https://vws.vuforia.com", + request_timeout_seconds: float | tuple[float, float] = 30.0, + transport: AsyncTransport | None = None, + ) -> None: + """ + Args: + server_access_key: A VWS server access key. + server_secret_key: A VWS server secret key. + base_vws_url: The base URL for the VWS API. + request_timeout_seconds: The timeout for each + HTTP request. This can be a float to set both + the connect and read timeouts, or a + (connect, read) tuple. + transport: The async HTTP transport to use for + requests. Defaults to + ``AsyncHTTPXTransport()``. + """ + self._server_access_key = server_access_key + self._server_secret_key = server_secret_key + self._base_vws_url = base_vws_url + self._request_timeout_seconds = request_timeout_seconds + self._transport = transport or AsyncHTTPXTransport() + + async def aclose(self) -> None: + """Close the underlying transport if it supports closing.""" + close = getattr(self._transport, "aclose", None) + if close is not None: + await close() + + async def __aenter__(self) -> Self: + """Enter the async context manager.""" + return self + + async def __aexit__(self, *_args: object) -> None: + """Exit the async context manager and close the transport.""" + await self.aclose() + + async def make_request( + self, + *, + method: str, + data: bytes, + request_path: str, + expected_result_code: str, + content_type: str, + extra_headers: dict[str, str] | None = None, + ) -> Response: + """Make an async request to the Vuforia Target API. + + Args: + method: The HTTP method 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 + "VWS API Result Codes" on + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api. + content_type: The content type of the request. + extra_headers: Additional headers to include in + the request. + + Returns: + The response to the request. + + Raises: + ~vws.exceptions.custom_exceptions.ServerError: + There is an error with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: + Vuforia is rate limiting access. + json.JSONDecodeError: The server did not respond + with valid JSON. This may happen if the + server address is not a valid Vuforia server. + """ + response = await async_target_api_request( + content_type=content_type, + server_access_key=self._server_access_key, + server_secret_key=self._server_secret_key, + method=method, + data=data, + request_path=request_path, + base_vws_url=self._base_vws_url, + request_timeout_seconds=self._request_timeout_seconds, + extra_headers=extra_headers or {}, + transport=self._transport, + ) + + if ( + response.status_code == HTTPStatus.TOO_MANY_REQUESTS + ): # pragma: no cover + # The Vuforia API returns a 429 response with no JSON body. + raise TooManyRequestsError(response=response) + + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + + result_code = json.loads(s=response.text)["result_code"] + + if result_code == expected_result_code: + return response + + exception = { + "AuthenticationFailure": AuthenticationFailureError, + "BadImage": BadImageError, + "BadRequest": BadRequestError, + "DateRangeError": DateRangeError, + "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) + + async def add_target( + self, + *, + name: str, + width: float, + image: _ImageType, + application_metadata: str | None, + active_flag: bool, + ) -> str: + """Add a target to a Vuforia Web Services database. + + See + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#add + for parameter details. + + Args: + name: The name of the target. + width: The width of the target. + image: The image of the target. + active_flag: Whether or not the target is active for query. + application_metadata: The application metadata of the target. + This must be base64 encoded, for example by using:: + + base64.b64encode('input_string').decode('ascii') + + Returns: + The target ID of the new target. + + Raises: + ~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.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.RequestTimeTooSkewedError: There is + an error with the time sent to Vuforia. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. This has been seen to happen when the + given name includes a bad character. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. + """ + image_data = _get_image_data(image=image) + image_data_encoded = base64.b64encode(s=image_data).decode( + encoding="ascii", + ) + + data = { + "name": name, + "width": width, + "image": image_data_encoded, + "active_flag": active_flag, + "application_metadata": application_metadata, + } + + content = json.dumps(obj=data).encode(encoding="utf-8") + + response = await self.make_request( + method=HTTPMethod.POST, + data=content, + request_path="/targets", + expected_result_code="TargetCreated", + content_type="application/json", + ) + + return str(object=json.loads(s=response.text)["target_id"]) + + async def get_target_record(self, target_id: str) -> TargetStatusAndRecord: + """Get a given target's target record from the Target + Management System. + + See + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record. + + Args: + target_id: The ID of the target to get details of. + + Returns: + Response details of a target from Vuforia. + + Raises: + ~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.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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + response = await self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path=f"/targets/{target_id}", + expected_result_code="Success", + content_type="application/json", + ) + + result_data = json.loads(s=response.text) + status = TargetStatuses(value=result_data["status"]) + target_record_dict = dict(result_data["target_record"]) + target_record = TargetRecord( + target_id=target_record_dict["target_id"], + active_flag=bool(target_record_dict["active_flag"]), + name=target_record_dict["name"], + width=float(target_record_dict["width"]), + tracking_rating=int(target_record_dict["tracking_rating"]), + reco_rating=target_record_dict["reco_rating"], + ) + return TargetStatusAndRecord( + status=status, + target_record=target_record, + ) + + async def wait_for_target_processed( + self, + *, + target_id: str, + seconds_between_requests: float = 0.2, + timeout_seconds: float = 60 * 5, + ) -> None: + """Wait up to five minutes (arbitrary) for a target to + get past the processing stage. + + Args: + target_id: The ID of the target to wait for. + seconds_between_requests: The number of seconds to + wait between requests made while polling the + target status. + We wait 0.2 seconds by default, rather than + less, than that to decrease the number of calls + made to the API, to decrease the likelihood of + hitting the request quota. + timeout_seconds: The maximum number of seconds to + wait for the target to be processed. + + Raises: + ~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.TargetProcessingTimeoutError: The + target remained in the processing stage for more than + ``timeout_seconds`` seconds. + ~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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + start_time = asyncio.get_event_loop().time() + while True: + report = await self.get_target_summary_report( + target_id=target_id, + ) + if report.status != TargetStatuses.PROCESSING: + # Guard against the target still being seen as + # processing by other endpoints due to eventual + # consistency. + await asyncio.sleep( + delay=seconds_between_requests, + ) + return + + elapsed_time = asyncio.get_event_loop().time() - start_time + if elapsed_time > timeout_seconds: # pragma: no cover + raise TargetProcessingTimeoutError + + await asyncio.sleep( + delay=seconds_between_requests, + ) + + async def list_targets(self) -> list[str]: + """List target IDs. + + See + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#details-list. + + Returns: + The IDs of all targets in the database. + + Raises: + ~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.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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + response = await self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path="/targets", + expected_result_code="Success", + content_type="application/json", + ) + + return list(json.loads(s=response.text)["results"]) + + async def get_target_summary_report( + self, target_id: str + ) -> TargetSummaryReport: + """Get a summary report for a target. + + See + 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. + + Returns: + Details of the target. + + Raises: + ~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.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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + response = await self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path=f"/summary/{target_id}", + expected_result_code="Success", + content_type="application/json", + ) + + result_data = dict(json.loads(s=response.text)) + return TargetSummaryReport( + 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"], + ), + active_flag=bool(result_data["active_flag"]), + tracking_rating=int( + result_data["tracking_rating"], + ), + total_recos=int(result_data["total_recos"]), + current_month_recos=int( + result_data["current_month_recos"], + ), + previous_month_recos=int( + result_data["previous_month_recos"], + ), + ) + + async def get_database_summary_report( + self, + ) -> DatabaseSummaryReport: + """Get a summary report for the database. + + See + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report. + + Returns: + Details of the database. + + Raises: + ~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.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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + response = await self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path="/summary", + expected_result_code="Success", + content_type="application/json", + ) + + response_data = dict(json.loads(s=response.text)) + return DatabaseSummaryReport( + active_images=int(response_data["active_images"]), + current_month_recos=int( + response_data["current_month_recos"], + ), + failed_images=int(response_data["failed_images"]), + inactive_images=int( + response_data["inactive_images"], + ), + name=str(object=response_data["name"]), + previous_month_recos=int( + response_data["previous_month_recos"], + ), + processing_images=int( + response_data["processing_images"], + ), + reco_threshold=int( + response_data["reco_threshold"], + ), + request_quota=int(response_data["request_quota"]), + request_usage=int(response_data["request_usage"]), + target_quota=int(response_data["target_quota"]), + total_recos=int(response_data["total_recos"]), + ) + + async def delete_target(self, target_id: str) -> None: + """Delete a given target. + + See + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#delete. + + Args: + target_id: The ID of the target to delete. + + Raises: + ~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.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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + await self.make_request( + method=HTTPMethod.DELETE, + data=b"", + request_path=f"/targets/{target_id}", + expected_result_code="Success", + content_type="application/json", + ) + + async def get_duplicate_targets(self, target_id: str) -> list[str]: + """Get targets which may be considered duplicates of a + given target. + + See + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#check. + + Args: + target_id: The ID of the target to delete. + + Returns: + The target IDs of duplicate targets. + + Raises: + ~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.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.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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + response = await self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path=f"/duplicates/{target_id}", + expected_result_code="Success", + content_type="application/json", + ) + + return list( + json.loads(s=response.text)["similar_targets"], + ) + + async def update_target( + self, + *, + target_id: str, + name: str | None = None, + width: float | None = None, + image: _ImageType | None = None, + active_flag: bool | None = None, + application_metadata: str | None = None, + ) -> None: + """Update a target in a Vuforia Web Services database. + + See + 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 update. + name: The name of the target. + width: The width of the target. + image: The image of the target. + active_flag: Whether or not the target is active + for query. + application_metadata: The application metadata of + the target. + This must be base64 encoded, for example by + using:: + + base64.b64encode('input_string').decode('ascii') + + Giving ``None`` will not change the application + metadata. + + Raises: + ~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.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.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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + data: dict[str, str | bool | float | int] = {} + + if name is not None: + data["name"] = name + + if width is not None: + data["width"] = width + + if image is not None: + image_data = _get_image_data(image=image) + image_data_encoded = base64.b64encode( + s=image_data, + ).decode(encoding="ascii") + data["image"] = image_data_encoded + + if active_flag is not None: + data["active_flag"] = active_flag + + if application_metadata is not None: + data["application_metadata"] = application_metadata + + content = json.dumps(obj=data).encode(encoding="utf-8") + + await self.make_request( + method=HTTPMethod.PUT, + data=content, + request_path=f"/targets/{target_id}", + expected_result_code="Success", + content_type="application/json", + ) diff --git a/src/vws/transports.py b/src/vws/transports.py index 7980c5785..6bf9ceb9e 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -1,6 +1,7 @@ """HTTP transport implementations for VWS clients.""" -from typing import Protocol, runtime_checkable +from collections.abc import Awaitable +from typing import Protocol, Self, runtime_checkable import httpx import requests @@ -156,3 +157,122 @@ def __call__( tell_position=len(content), content=content, ) + + +@runtime_checkable +class AsyncTransport(Protocol): + """Protocol for async HTTP transports used by VWS clients. + + An async transport is a callable that makes an HTTP request + and returns a ``Response``. + """ + + def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Awaitable[Response]: + """Make an async HTTP request. + + Args: + method: The HTTP method (e.g. "GET", "POST"). + url: The full URL to request. + headers: Headers to send with the request. + data: The request body as bytes. + request_timeout: The timeout for the request. A float + sets both the connect and read timeouts. A + (connect, read) tuple sets them individually. + + Returns: + A Response populated from the HTTP response. + """ + ... # pylint: disable=unnecessary-ellipsis + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class AsyncHTTPXTransport: + """Async HTTP transport using the ``httpx`` library. + + This is the default transport for async VWS clients. + A single ``httpx.AsyncClient`` is reused across requests + for connection pooling. + """ + + def __init__(self) -> None: + """Create an ``AsyncHTTPXTransport``.""" + self._client = httpx.AsyncClient() + + async def aclose(self) -> None: + """Close the underlying ``httpx.AsyncClient``.""" + await self._client.aclose() + + async def __aenter__(self) -> Self: + """Enter the async context manager.""" + return self + + async def __aexit__(self, *_args: object) -> None: + """Exit the async context manager and close the client.""" + await self.aclose() + + async def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Response: + """Make an async HTTP request using ``httpx``. + + Args: + method: The HTTP method. + url: The full URL. + headers: Request headers. + data: The request body. + request_timeout: The request timeout. + + Returns: + A Response populated from the httpx response. + """ + if isinstance(request_timeout, tuple): + connect_timeout, read_timeout = request_timeout + httpx_timeout = httpx.Timeout( + connect=connect_timeout, + read=read_timeout, + write=None, + pool=None, + ) + else: + httpx_timeout = httpx.Timeout( + connect=request_timeout, + read=request_timeout, + write=None, + pool=None, + ) + + httpx_response = await self._client.request( + method=method, + url=url, + headers=headers, + content=data, + timeout=httpx_timeout, + follow_redirects=True, + ) + + content = bytes(httpx_response.content) + request_content = httpx_response.request.content + + return Response( + text=httpx_response.text, + url=str(object=httpx_response.url), + status_code=httpx_response.status_code, + headers=dict(httpx_response.headers), + request_body=bytes(request_content) or None, + tell_position=len(content), + content=content, + ) diff --git a/tests/conftest.py b/tests/conftest.py index eb8b3a573..820908ba9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,16 +1,24 @@ """Configuration, plugins and fixtures for `pytest`.""" import io -from collections.abc import Generator +from collections.abc import AsyncGenerator, Generator from pathlib import Path from typing import BinaryIO, Literal import pytest +import pytest_asyncio from mock_vws import MockVWS from mock_vws.database import CloudDatabase, VuMarkDatabase from mock_vws.target import VuMarkTarget -from vws import VWS, CloudRecoService, VuMarkService +from vws import ( + VWS, + AsyncCloudRecoService, + AsyncVuMarkService, + AsyncVWS, + CloudRecoService, + VuMarkService, +) @pytest.fixture(name="_mock_database") @@ -70,6 +78,49 @@ def cloud_reco_client(*, _mock_database: CloudDatabase) -> CloudRecoService: ) +@pytest_asyncio.fixture +async def async_vws_client( + *, + _mock_database: CloudDatabase, +) -> AsyncGenerator[AsyncVWS]: + """An async VWS client which connects to a mock database.""" + async with AsyncVWS( + server_access_key=_mock_database.server_access_key, + server_secret_key=_mock_database.server_secret_key, + ) as client: + yield client + + +@pytest_asyncio.fixture +async def async_cloud_reco_client( + *, + _mock_database: CloudDatabase, +) -> AsyncGenerator[AsyncCloudRecoService]: + """An async ``CloudRecoService`` client which connects to a mock + database. + """ + async with AsyncCloudRecoService( + client_access_key=_mock_database.client_access_key, + client_secret_key=_mock_database.client_secret_key, + ) as client: + yield client + + +@pytest_asyncio.fixture +async def async_vumark_service_client( + *, + _mock_vumark_database: VuMarkDatabase, +) -> AsyncGenerator[AsyncVuMarkService]: + """An async ``VuMarkService`` client which connects to a mock VuMark + database. + """ + async with AsyncVuMarkService( + server_access_key=_mock_vumark_database.server_access_key, + server_secret_key=_mock_vumark_database.server_secret_key, + ) as client: + yield client + + @pytest.fixture(name="image_file", params=["r+b", "rb"]) def fixture_image_file( *, diff --git a/tests/test_async_cloud_reco_exceptions.py b/tests/test_async_cloud_reco_exceptions.py new file mode 100644 index 000000000..cbe2b22cc --- /dev/null +++ b/tests/test_async_cloud_reco_exceptions.py @@ -0,0 +1,120 @@ +"""Tests for exceptions raised when using the +AsyncCloudRecoService. +""" + +import io +import uuid +from http import HTTPStatus + +import pytest +from mock_vws import MockVWS +from mock_vws.database import CloudDatabase +from mock_vws.states import States + +from vws import AsyncCloudRecoService +from vws.exceptions.cloud_reco_exceptions import ( + AuthenticationFailureError, + InactiveProjectError, + MaxNumResultsOutOfRangeError, +) +from vws.exceptions.custom_exceptions import ( + RequestEntityTooLargeError, +) + + +@pytest.mark.asyncio +async def test_too_many_max_results( + *, + async_cloud_reco_client: AsyncCloudRecoService, + high_quality_image: io.BytesIO, +) -> None: + """A ``MaxNumResultsOutOfRange`` error is raised if the given + ``max_num_results`` is out of range. + """ + with pytest.raises( + expected_exception=MaxNumResultsOutOfRangeError, + ) as exc: + await async_cloud_reco_client.query( + image=high_quality_image, + max_num_results=51, + ) + + expected_value = ( + "Integer out of range (51) in form data part " + "'max_result'. " + "Accepted range is from 1 to 50 (inclusive)." + ) + assert str(object=exc.value) == exc.value.response.text == expected_value + + +@pytest.mark.asyncio +async def test_image_too_large( + *, + async_cloud_reco_client: AsyncCloudRecoService, + png_too_large: io.BytesIO | io.BufferedRandom, +) -> None: + """A ``RequestEntityTooLarge`` exception is raised if an + image which is too large is given. + """ + with pytest.raises( + expected_exception=RequestEntityTooLargeError, + ) as exc: + await async_cloud_reco_client.query( + image=png_too_large, + ) + + assert ( + exc.value.response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE + ) + + +@pytest.mark.asyncio +async def test_authentication_failure( + high_quality_image: io.BytesIO, +) -> None: + """An ``AuthenticationFailure`` exception is raised when the + client secret key is incorrect. + """ + database = CloudDatabase() + async_cloud_reco_client = AsyncCloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=uuid.uuid4().hex, + ) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + + with pytest.raises( + expected_exception=AuthenticationFailureError, + ) as exc: + await async_cloud_reco_client.query( + image=high_quality_image, + ) + + assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED + + +@pytest.mark.asyncio +async def test_inactive_project( + high_quality_image: io.BytesIO, +) -> None: + """An ``InactiveProject`` exception is raised when querying + an inactive database. + """ + database = CloudDatabase(state=States.PROJECT_INACTIVE) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + async_cloud_reco_client = AsyncCloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + with pytest.raises( + expected_exception=InactiveProjectError, + ) as exc: + await async_cloud_reco_client.query( + image=high_quality_image, + ) + + response = exc.value.response + assert response.status_code == HTTPStatus.FORBIDDEN + assert response.tell_position != 0 diff --git a/tests/test_async_query.py b/tests/test_async_query.py new file mode 100644 index 000000000..2de1ce833 --- /dev/null +++ b/tests/test_async_query.py @@ -0,0 +1,225 @@ +"""Tests for the ``AsyncCloudRecoService`` querying functionality.""" + +import io +import uuid +from typing import BinaryIO + +import pytest +from mock_vws import MockVWS +from mock_vws.database import CloudDatabase + +from vws import AsyncCloudRecoService, AsyncVWS +from vws.include_target_data import CloudRecoIncludeTargetData + + +class TestQuery: + """Tests for making async image queries.""" + + @staticmethod + @pytest.mark.asyncio + async def test_no_matches( + *, + async_cloud_reco_client: AsyncCloudRecoService, + image: io.BytesIO | BinaryIO, + ) -> None: + """An empty list is returned if there are no matches.""" + result = await async_cloud_reco_client.query( + image=image, + ) + assert result == [] + + @staticmethod + @pytest.mark.asyncio + async def test_match( + *, + async_vws_client: AsyncVWS, + async_cloud_reco_client: AsyncCloudRecoService, + image: io.BytesIO | BinaryIO, + ) -> None: + """Details of matching targets are returned.""" + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + [matching_target] = await async_cloud_reco_client.query( + image=image, + ) + assert matching_target.target_id == target_id + + +class TestCustomBaseVWQURL: + """Tests for using a custom base VWQ URL.""" + + @staticmethod + @pytest.mark.asyncio + async def test_custom_base_url( + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to query a target in a database under + a custom VWQ URL. + """ + base_vwq_url = "http://example.com" + with MockVWS(base_vwq_url=base_vwq_url) as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + async_vws_client = AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + + async_cloud_reco_client = AsyncCloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + base_vwq_url=base_vwq_url, + ) + + matches = await async_cloud_reco_client.query( + image=image, + ) + assert len(matches) == 1 + match = matches[0] + assert match.target_id == target_id + + +class TestMaxNumResults: + """Tests for the ``max_num_results`` parameter of + ``query``. + """ + + @staticmethod + @pytest.mark.asyncio + async def test_custom( + *, + async_vws_client: AsyncVWS, + async_cloud_reco_client: AsyncCloudRecoService, + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to set a custom + ``max_num_results``. + """ + target_id = await async_vws_client.add_target( + name=uuid.uuid4().hex, + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + target_id_2 = await async_vws_client.add_target( + name=uuid.uuid4().hex, + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + target_id_3 = await async_vws_client.add_target( + name=uuid.uuid4().hex, + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id_2, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id_3, + ) + max_num_results = 2 + matches = await async_cloud_reco_client.query( + image=image, + max_num_results=max_num_results, + ) + assert len(matches) == max_num_results + + +class TestIncludeTargetData: + """Tests for the ``include_target_data`` parameter of + ``query``. + """ + + @staticmethod + @pytest.mark.asyncio + async def test_none( + *, + async_vws_client: AsyncVWS, + async_cloud_reco_client: AsyncCloudRecoService, + image: io.BytesIO | BinaryIO, + ) -> None: + """When ``CloudRecoIncludeTargetData.NONE`` is given, + target data is not returned in any match. + """ + target_id = await async_vws_client.add_target( + name=uuid.uuid4().hex, + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + [match] = await async_cloud_reco_client.query( + image=image, + include_target_data=(CloudRecoIncludeTargetData.NONE), + ) + assert match.target_data is None + + @staticmethod + @pytest.mark.asyncio + async def test_all( + *, + async_vws_client: AsyncVWS, + async_cloud_reco_client: AsyncCloudRecoService, + image: io.BytesIO | BinaryIO, + ) -> None: + """When ``CloudRecoIncludeTargetData.ALL`` is given, + target data is returned in all matches. + """ + target_id = await async_vws_client.add_target( + name=uuid.uuid4().hex, + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + target_id_2 = await async_vws_client.add_target( + name=uuid.uuid4().hex, + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id_2, + ) + top_match, second_match = await async_cloud_reco_client.query( + image=image, + max_num_results=2, + include_target_data=(CloudRecoIncludeTargetData.ALL), + ) + assert top_match.target_data is not None + assert second_match.target_data is not None diff --git a/tests/test_async_vws.py b/tests/test_async_vws.py new file mode 100644 index 000000000..c08cf78a5 --- /dev/null +++ b/tests/test_async_vws.py @@ -0,0 +1,500 @@ +"""Tests for async helper functions for managing a Vuforia database.""" + +import base64 +import io +import uuid +from typing import BinaryIO + +import pytest +from mock_vws import MockVWS +from mock_vws.database import CloudDatabase + +from vws import AsyncCloudRecoService, AsyncVuMarkService, AsyncVWS +from vws.exceptions.custom_exceptions import ( + TargetProcessingTimeoutError, +) +from vws.reports import ( + DatabaseSummaryReport, + TargetRecord, + TargetStatuses, +) +from vws.vumark_accept import VuMarkAccept + + +class TestAddTarget: + """Tests for adding a target.""" + + @staticmethod + @pytest.mark.asyncio + @pytest.mark.parametrize( + argnames="application_metadata", + argvalues=[None, b"a"], + ) + @pytest.mark.parametrize( + argnames="active_flag", + argvalues=[True, False], + ) + async def test_add_target( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + application_metadata: bytes | None, + async_cloud_reco_client: AsyncCloudRecoService, + active_flag: bool, + ) -> None: + """No exception is raised when adding one target.""" + name = "x" + width = 1 + if application_metadata is None: + encoded_metadata = None + else: + encoded_metadata_bytes = base64.b64encode( + s=application_metadata, + ) + encoded_metadata = encoded_metadata_bytes.decode( + encoding="utf-8", + ) + + target_id = await async_vws_client.add_target( + name=name, + width=width, + image=image, + application_metadata=encoded_metadata, + active_flag=active_flag, + ) + target_record = ( + await async_vws_client.get_target_record( + target_id=target_id, + ) + ).target_record + assert target_record.name == name + assert target_record.width == width + assert target_record.active_flag is active_flag + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + matching_targets = await async_cloud_reco_client.query( + image=image, + ) + if active_flag: + [matching_target] = matching_targets + assert matching_target.target_id == target_id + assert matching_target.target_data is not None + query_metadata = matching_target.target_data.application_metadata + assert query_metadata == encoded_metadata + else: + assert matching_targets == [] + + @staticmethod + @pytest.mark.asyncio + async def test_add_two_targets( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + ) -> None: + """No exception is raised when adding two targets with + different names. + + This demonstrates that the image seek position is not + changed. + """ + for name in ("a", "b"): + await async_vws_client.add_target( + name=name, + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + +class TestCustomBaseVWSURL: + """Tests for using a custom base VWS URL.""" + + @staticmethod + @pytest.mark.asyncio + async def test_custom_base_url( + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to add a target to a database under a + custom VWS URL. + """ + base_vws_url = "http://example.com" + with MockVWS(base_vws_url=base_vws_url) as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + async_vws_client = AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + base_vws_url=base_vws_url, + ) + + await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + +class TestListTargets: + """Tests for listing targets.""" + + @staticmethod + @pytest.mark.asyncio + async def test_list_targets( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to get a list of target IDs.""" + id_1 = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + id_2 = await async_vws_client.add_target( + name="a", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + targets = await async_vws_client.list_targets() + assert sorted(targets) == sorted([id_1, id_2]) + + +class TestDelete: + """Test for deleting a target.""" + + @staticmethod + @pytest.mark.asyncio + async def test_delete_target( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to delete a target.""" + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + targets = await async_vws_client.list_targets() + assert target_id in targets + await async_vws_client.delete_target( + target_id=target_id, + ) + targets = await async_vws_client.list_targets() + assert target_id not in targets + + +class TestGetTargetSummaryReport: + """Tests for getting a summary report for a target.""" + + @staticmethod + @pytest.mark.asyncio + async def test_get_target_summary_report( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + ) -> None: + """Details of a target are returned by + ``get_target_summary_report``. + """ + target_name = uuid.uuid4().hex + target_id = await async_vws_client.add_target( + name=target_name, + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + report = await async_vws_client.get_target_summary_report( + target_id=target_id, + ) + + assert report.target_name == target_name + assert report.active_flag is True + assert report.total_recos == 0 + + +class TestGetDatabaseSummaryReport: + """Tests for getting a summary report for a database.""" + + @staticmethod + @pytest.mark.asyncio + async def test_get_target( + async_vws_client: AsyncVWS, + ) -> None: + """Details of a database are returned by + ``get_database_summary_report``. + """ + report = await async_vws_client.get_database_summary_report() + + assert isinstance(report, DatabaseSummaryReport) + assert report.active_images == 0 + + +class TestGetTargetRecord: + """Tests for getting a record of a target.""" + + @staticmethod + @pytest.mark.asyncio + async def test_get_target_record( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + ) -> None: + """Details of a target are returned by + ``get_target_record``. + """ + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + result = await async_vws_client.get_target_record( + target_id=target_id, + ) + expected_target_record = TargetRecord( + target_id=target_id, + active_flag=True, + name="x", + width=1, + tracking_rating=-1, + reco_rating="", + ) + + assert result.target_record == expected_target_record + assert result.status == TargetStatuses.PROCESSING + + +class TestWaitForTargetProcessed: + """Tests for waiting for a target to be processed.""" + + @staticmethod + @pytest.mark.asyncio + async def test_wait_for_target_processed( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to wait until a target is processed.""" + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + report = await async_vws_client.get_target_summary_report( + target_id=target_id, + ) + assert report.status == TargetStatuses.PROCESSING + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + report = await async_vws_client.get_target_summary_report( + target_id=target_id, + ) + assert report.status != TargetStatuses.PROCESSING + + @staticmethod + @pytest.mark.asyncio + async def test_custom_timeout( + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to set a maximum timeout.""" + with MockVWS(processing_time_seconds=0.5) as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + async_vws_client = AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + with pytest.raises( + expected_exception=(TargetProcessingTimeoutError), + ): + await async_vws_client.wait_for_target_processed( + target_id=target_id, + timeout_seconds=0.1, + ) + + +class TestGetDuplicateTargets: + """Tests for getting duplicate targets.""" + + @staticmethod + @pytest.mark.asyncio + async def test_get_duplicate_targets( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to get the IDs of similar targets.""" + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + similar_target_id = await async_vws_client.add_target( + name="a", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + await async_vws_client.wait_for_target_processed( + target_id=similar_target_id, + ) + duplicates = await async_vws_client.get_duplicate_targets( + target_id=target_id, + ) + assert duplicates == [similar_target_id] + + +class TestUpdateTarget: + """Tests for updating a target.""" + + @staticmethod + @pytest.mark.asyncio + async def test_update_target( + *, + async_vws_client: AsyncVWS, + async_cloud_reco_client: AsyncCloudRecoService, + image: io.BytesIO | BinaryIO, + different_high_quality_image: io.BytesIO, + ) -> None: + """It is possible to update a target.""" + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + [matching_target] = await async_cloud_reco_client.query( + image=image, + ) + assert matching_target.target_id == target_id + query_target_data = matching_target.target_data + assert query_target_data is not None + assert query_target_data.application_metadata is None + + new_name = uuid.uuid4().hex + new_width = 2.0 + new_application_metadata = base64.b64encode( + s=b"a", + ).decode(encoding="ascii") + await async_vws_client.update_target( + target_id=target_id, + name=new_name, + width=new_width, + active_flag=True, + image=different_high_quality_image, + application_metadata=new_application_metadata, + ) + + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + target_details = await async_vws_client.get_target_record( + target_id=target_id, + ) + assert target_details.target_record.name == new_name + assert target_details.target_record.active_flag + + @staticmethod + @pytest.mark.asyncio + async def test_no_fields_given( + *, + async_vws_client: AsyncVWS, + image: io.BytesIO | BinaryIO, + ) -> None: + """It is possible to give no update fields.""" + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=image, + active_flag=True, + application_metadata=None, + ) + await async_vws_client.wait_for_target_processed( + target_id=target_id, + ) + await async_vws_client.update_target( + target_id=target_id, + ) + + +class TestGenerateVumarkInstance: + """Tests for generating VuMark instances.""" + + @staticmethod + @pytest.mark.asyncio + @pytest.mark.parametrize( + argnames=("accept", "expected_prefix"), + argvalues=[ + pytest.param( + VuMarkAccept.PNG, + b"\x89PNG\r\n\x1a\n", + id="png", + ), + pytest.param( + VuMarkAccept.SVG, + b"<", + id="svg", + ), + pytest.param( + VuMarkAccept.PDF, + b"%PDF", + id="pdf", + ), + ], + ) + async def test_generate_vumark_instance( + *, + async_vumark_service_client: AsyncVuMarkService, + vumark_target_id: str, + accept: VuMarkAccept, + expected_prefix: bytes, + ) -> None: + """The returned bytes match the requested format.""" + result = await async_vumark_service_client.generate_vumark_instance( + target_id=vumark_target_id, + instance_id="12345", + accept=accept, + ) + assert result.startswith(expected_prefix) diff --git a/tests/test_async_vws_exceptions.py b/tests/test_async_vws_exceptions.py new file mode 100644 index 000000000..cd35854f1 --- /dev/null +++ b/tests/test_async_vws_exceptions.py @@ -0,0 +1,304 @@ +"""Tests for VWS exceptions raised from async clients.""" + +import io +import uuid +from http import HTTPStatus + +import pytest +from mock_vws import MockVWS +from mock_vws.database import CloudDatabase +from mock_vws.states import States + +from vws import AsyncVuMarkService, AsyncVWS +from vws.exceptions.custom_exceptions import ( + ServerError, +) +from vws.exceptions.vws_exceptions import ( + AuthenticationFailureError, + BadImageError, + FailError, + ImageTooLargeError, + InvalidInstanceIdError, + MetadataTooLargeError, + ProjectInactiveError, + TargetNameExistError, + TargetStatusProcessingError, + UnknownTargetError, +) +from vws.vumark_accept import VuMarkAccept + + +@pytest.mark.asyncio +async def test_image_too_large( + *, + async_vws_client: AsyncVWS, + png_too_large: io.BytesIO | io.BufferedRandom, +) -> None: + """When giving an image which is too large, an + ``ImageTooLarge`` exception is raised. + """ + with pytest.raises( + expected_exception=ImageTooLargeError, + ) as exc: + await async_vws_client.add_target( + name="x", + width=1, + image=png_too_large, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + + +@pytest.mark.asyncio +async def test_invalid_given_id( + async_vws_client: AsyncVWS, +) -> None: + """Giving an invalid ID causes an ``UnknownTarget`` + exception to be raised. + """ + target_id = "12345abc" + with pytest.raises( + expected_exception=UnknownTargetError, + ) as exc: + await async_vws_client.delete_target( + target_id=target_id, + ) + assert exc.value.response.status_code == HTTPStatus.NOT_FOUND + assert exc.value.target_id == target_id + + +@pytest.mark.asyncio +async def test_add_bad_name( + *, + async_vws_client: AsyncVWS, + high_quality_image: io.BytesIO, +) -> None: + """When a name with a bad character is given, a + ``ServerError`` exception is raised. + """ + max_char_value = 65535 + bad_name = chr(max_char_value + 1) + with pytest.raises( + expected_exception=ServerError, + ) as exc: + await async_vws_client.add_target( + name=bad_name, + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR + + +@pytest.mark.asyncio +async def test_fail(high_quality_image: io.BytesIO) -> None: + """A ``Fail`` exception is raised when the server access key + does not exist. + """ + with MockVWS(): + async_vws_client = AsyncVWS( + server_access_key=uuid.uuid4().hex, + server_secret_key=uuid.uuid4().hex, + ) + + with pytest.raises( + expected_exception=FailError, + ) as exc: + await async_vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.BAD_REQUEST + + +@pytest.mark.asyncio +async def test_bad_image( + async_vws_client: AsyncVWS, +) -> None: + """A ``BadImage`` exception is raised when a non-image is + given. + """ + not_an_image = io.BytesIO(initial_bytes=b"Not an image") + with pytest.raises( + expected_exception=BadImageError, + ) as exc: + await async_vws_client.add_target( + name="x", + width=1, + image=not_an_image, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + + +@pytest.mark.asyncio +async def test_target_name_exist( + *, + async_vws_client: AsyncVWS, + high_quality_image: io.BytesIO, +) -> None: + """A ``TargetNameExist`` exception is raised after adding + two targets with the same name. + """ + await async_vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + with pytest.raises( + expected_exception=TargetNameExistError, + ) as exc: + await async_vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + assert exc.value.target_name == "x" + + +@pytest.mark.asyncio +async def test_project_inactive( + high_quality_image: io.BytesIO, +) -> None: + """A ``ProjectInactive`` exception is raised if adding a + target to an inactive database. + """ + database = CloudDatabase(state=States.PROJECT_INACTIVE) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + async_vws_client = AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + with pytest.raises( + expected_exception=ProjectInactiveError, + ) as exc: + await async_vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + + +@pytest.mark.asyncio +async def test_target_status_processing( + *, + async_vws_client: AsyncVWS, + high_quality_image: io.BytesIO, +) -> None: + """A ``TargetStatusProcessing`` exception is raised if + trying to delete a target which is processing. + """ + target_id = await async_vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + + with pytest.raises( + expected_exception=TargetStatusProcessingError, + ) as exc: + await async_vws_client.delete_target( + target_id=target_id, + ) + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + assert exc.value.target_id == target_id + + +@pytest.mark.asyncio +async def test_metadata_too_large( + *, + async_vws_client: AsyncVWS, + high_quality_image: io.BytesIO, +) -> None: + """A ``MetadataTooLarge`` exception is raised if the metadata + given is too large. + """ + with pytest.raises( + expected_exception=MetadataTooLargeError, + ) as exc: + await async_vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata="a" * 1024 * 1024 * 10, + ) + + assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + + +@pytest.mark.asyncio +async def test_authentication_failure( + high_quality_image: io.BytesIO, +) -> None: + """An ``AuthenticationFailure`` exception is raised when the + server secret key is incorrect. + """ + database = CloudDatabase() + + async_vws_client = AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=uuid.uuid4().hex, + ) + + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + + with pytest.raises( + expected_exception=AuthenticationFailureError, + ) as exc: + await async_vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED + + +@pytest.mark.asyncio +async def test_invalid_instance_id( + *, + async_vumark_service_client: AsyncVuMarkService, + vumark_target_id: str, +) -> None: + """An ``InvalidInstanceId`` exception is raised when an + empty instance ID is given. + """ + with pytest.raises( + expected_exception=InvalidInstanceIdError, + ) as exc: + await async_vumark_service_client.generate_vumark_instance( + target_id=vumark_target_id, + instance_id="", + accept=VuMarkAccept.PNG, + ) + + assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY diff --git a/tests/test_transports.py b/tests/test_transports.py index 37eaad4e7..b8a34f708 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -3,10 +3,12 @@ from http import HTTPStatus import httpx +import pytest import respx +from vws import AsyncCloudRecoService, AsyncVuMarkService, AsyncVWS from vws.response import Response -from vws.transports import HTTPXTransport +from vws.transports import AsyncHTTPXTransport, HTTPXTransport class TestHTTPXTransport: @@ -59,3 +61,146 @@ def test_tuple_timeout() -> None: assert route.called assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK + + +class TestAsyncHTTPXTransport: + """Tests for ``AsyncHTTPXTransport``.""" + + @staticmethod + @pytest.mark.asyncio + @respx.mock + async def test_float_timeout() -> None: + """``AsyncHTTPXTransport`` works with a float timeout.""" + route = respx.post(url="https://example.com/test").mock( + return_value=httpx.Response( + status_code=HTTPStatus.OK, + text="OK", + ), + ) + transport = AsyncHTTPXTransport() + response = await transport( + method="POST", + url="https://example.com/test", + headers={"Content-Type": "text/plain"}, + data=b"hello", + request_timeout=30.0, + ) + assert route.called + assert isinstance(response, Response) + assert response.status_code == HTTPStatus.OK + assert response.text == "OK" + assert response.tell_position == len(b"OK") + + @staticmethod + @pytest.mark.asyncio + @respx.mock + async def test_tuple_timeout() -> None: + """``AsyncHTTPXTransport`` works with a (connect, read) + timeout tuple. + """ + route = respx.post(url="https://example.com/test").mock( + return_value=httpx.Response( + status_code=HTTPStatus.OK, + text="OK", + ), + ) + transport = AsyncHTTPXTransport() + response = await transport( + method="POST", + url="https://example.com/test", + headers={"Content-Type": "text/plain"}, + data=b"hello", + request_timeout=(5.0, 30.0), + ) + assert route.called + assert isinstance(response, Response) + assert response.status_code == HTTPStatus.OK + + @staticmethod + @pytest.mark.asyncio + @respx.mock + async def test_context_manager() -> None: + """``AsyncHTTPXTransport`` can be used as an async context + manager. + """ + route = respx.post(url="https://example.com/test").mock( + return_value=httpx.Response( + status_code=HTTPStatus.OK, + text="OK", + ), + ) + async with AsyncHTTPXTransport() as transport: + response = await transport( + method="POST", + url="https://example.com/test", + headers={"Content-Type": "text/plain"}, + data=b"hello", + request_timeout=30.0, + ) + assert route.called + assert isinstance(response, Response) + assert response.status_code == HTTPStatus.OK + + +class _NoCloseTransport: + """A minimal async transport without ``aclose``.""" + + async def __call__( # pragma: no cover + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Response: + """Not implemented.""" + raise NotImplementedError + + +_DUMMY_KEY = "x" + + +class TestAsyncClientAclose: + """Tests for ``aclose`` on async clients with transports that + lack ``aclose``. + """ + + @staticmethod + @pytest.mark.asyncio + async def test_vws_aclose_no_transport_aclose() -> None: + """``AsyncVWS.aclose`` works when the transport has no + ``aclose``. + """ + client = AsyncVWS( + server_access_key=_DUMMY_KEY, + server_secret_key=_DUMMY_KEY, + transport=_NoCloseTransport(), + ) + await client.aclose() + + @staticmethod + @pytest.mark.asyncio + async def test_cloud_reco_aclose_no_transport_aclose() -> None: + """``AsyncCloudRecoService.aclose`` works when the transport + has no ``aclose``. + """ + client = AsyncCloudRecoService( + client_access_key=_DUMMY_KEY, + client_secret_key=_DUMMY_KEY, + transport=_NoCloseTransport(), + ) + await client.aclose() + + @staticmethod + @pytest.mark.asyncio + async def test_vumark_aclose_no_transport_aclose() -> None: + """``AsyncVuMarkService.aclose`` works when the transport + has no ``aclose``. + """ + client = AsyncVuMarkService( + server_access_key=_DUMMY_KEY, + server_secret_key=_DUMMY_KEY, + transport=_NoCloseTransport(), + ) + await client.aclose() From 90c3dc01f6bf328d635c87830b0c9939a9fcae4b Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Wed, 25 Feb 2026 08:17:06 +0000 Subject: [PATCH 1345/1638] Bump CHANGELOG --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f1da681fc..43f10c4e2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,10 @@ Changelog Next ---- +2026.02.25 +---------- + + 2026.02.24 ---------- From 60f93d2d485286ef64c2e7417c8bf38e7544f75f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Feb 2026 08:46:01 +0000 Subject: [PATCH 1346/1638] Add from_response_dict classmethods to report classes Centralize API response parsing logic into classmethods on DatabaseSummaryReport, TargetSummaryReport, TargetStatusAndRecord, and QueryResult. This eliminates 75 lines of duplicated construction code across sync/async VWS and query clients. Co-Authored-By: Claude Haiku 4.5 --- src/vws/async_query.py | 28 ++--------------- src/vws/async_vws.py | 64 ++----------------------------------- src/vws/query.py | 28 ++--------------- src/vws/reports.py | 71 ++++++++++++++++++++++++++++++++++++++++++ src/vws/vws.py | 44 ++------------------------ 5 files changed, 81 insertions(+), 154 deletions(-) diff --git a/src/vws/async_query.py b/src/vws/async_query.py index 56981d4e1..ae5dd7e2b 100644 --- a/src/vws/async_query.py +++ b/src/vws/async_query.py @@ -2,7 +2,6 @@ Web APIs. """ -import datetime import json from http import HTTPMethod, HTTPStatus from typing import Any, Self @@ -25,7 +24,7 @@ ServerError, ) from vws.include_target_data import CloudRecoIncludeTargetData -from vws.reports import QueryResult, TargetData +from vws.reports import QueryResult from vws.transports import AsyncHTTPXTransport, AsyncTransport @@ -197,30 +196,7 @@ async def query( }[result_code] raise exception(response=response) - result: list[QueryResult] = [] result_list = list( json.loads(s=response.text)["results"], ) - for item in result_list: - target_data: TargetData | None = None - if "target_data" in item: - target_data_dict = item["target_data"] - metadata = target_data_dict["application_metadata"] - timestamp_string = target_data_dict["target_timestamp"] - target_timestamp = datetime.datetime.fromtimestamp( - timestamp=timestamp_string, - tz=datetime.UTC, - ) - target_data = TargetData( - name=target_data_dict["name"], - application_metadata=metadata, - target_timestamp=target_timestamp, - ) - - query_result = QueryResult( - target_id=item["target_id"], - target_data=target_data, - ) - - result.append(query_result) - return result + return [QueryResult.from_response_dict(item) for item in result_list] diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index f0f9005a1..a86efd287 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -3,7 +3,6 @@ import asyncio import base64 import json -from datetime import date from http import HTTPMethod, HTTPStatus from typing import Self @@ -38,7 +37,6 @@ ) from vws.reports import ( DatabaseSummaryReport, - TargetRecord, TargetStatusAndRecord, TargetStatuses, TargetSummaryReport, @@ -298,20 +296,7 @@ async def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - status = TargetStatuses(value=result_data["status"]) - target_record_dict = dict(result_data["target_record"]) - target_record = TargetRecord( - target_id=target_record_dict["target_id"], - active_flag=bool(target_record_dict["active_flag"]), - name=target_record_dict["name"], - width=float(target_record_dict["width"]), - tracking_rating=int(target_record_dict["tracking_rating"]), - reco_rating=target_record_dict["reco_rating"], - ) - return TargetStatusAndRecord( - status=status, - target_record=target_record, - ) + return TargetStatusAndRecord.from_response_dict(result_data) async def wait_for_target_processed( self, @@ -446,27 +431,7 @@ async def get_target_summary_report( ) result_data = dict(json.loads(s=response.text)) - return TargetSummaryReport( - 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"], - ), - active_flag=bool(result_data["active_flag"]), - tracking_rating=int( - result_data["tracking_rating"], - ), - total_recos=int(result_data["total_recos"]), - current_month_recos=int( - result_data["current_month_recos"], - ), - previous_month_recos=int( - result_data["previous_month_recos"], - ), - ) + return TargetSummaryReport.from_response_dict(result_data) async def get_database_summary_report( self, @@ -501,30 +466,7 @@ async def get_database_summary_report( ) response_data = dict(json.loads(s=response.text)) - return DatabaseSummaryReport( - active_images=int(response_data["active_images"]), - current_month_recos=int( - response_data["current_month_recos"], - ), - failed_images=int(response_data["failed_images"]), - inactive_images=int( - response_data["inactive_images"], - ), - name=str(object=response_data["name"]), - previous_month_recos=int( - response_data["previous_month_recos"], - ), - processing_images=int( - response_data["processing_images"], - ), - reco_threshold=int( - response_data["reco_threshold"], - ), - request_quota=int(response_data["request_quota"]), - request_usage=int(response_data["request_usage"]), - target_quota=int(response_data["target_quota"]), - total_recos=int(response_data["total_recos"]), - ) + return DatabaseSummaryReport.from_response_dict(response_data) async def delete_target(self, target_id: str) -> None: """Delete a given target. diff --git a/src/vws/query.py b/src/vws/query.py index 4b5433f38..2c682eb1c 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -1,6 +1,5 @@ """Tools for interacting with the Vuforia Cloud Recognition Web APIs.""" -import datetime import json from http import HTTPMethod, HTTPStatus from typing import Any @@ -23,7 +22,7 @@ ServerError, ) from vws.include_target_data import CloudRecoIncludeTargetData -from vws.reports import QueryResult, TargetData +from vws.reports import QueryResult from vws.transports import RequestsTransport, Transport @@ -165,28 +164,5 @@ def query( }[result_code] raise exception(response=response) - result: list[QueryResult] = [] result_list = list(json.loads(s=response.text)["results"]) - for item in result_list: - target_data: TargetData | None = None - if "target_data" in item: - target_data_dict = item["target_data"] - metadata = target_data_dict["application_metadata"] - timestamp_string = target_data_dict["target_timestamp"] - target_timestamp = datetime.datetime.fromtimestamp( - timestamp=timestamp_string, - tz=datetime.UTC, - ) - target_data = TargetData( - name=target_data_dict["name"], - application_metadata=metadata, - target_timestamp=target_timestamp, - ) - - query_result = QueryResult( - target_id=item["target_id"], - target_data=target_data, - ) - - result.append(query_result) - return result + return [QueryResult.from_response_dict(item) for item in result_list] diff --git a/src/vws/reports.py b/src/vws/reports.py index e59408aad..55cd3978d 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -3,6 +3,7 @@ import datetime from dataclasses import dataclass from enum import Enum, unique +from typing import Any, Self from beartype import BeartypeConf, beartype @@ -29,6 +30,24 @@ class DatabaseSummaryReport: target_quota: int total_recos: int + @classmethod + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + """Construct from a VWS API response dict.""" + return cls( + active_images=int(response_dict["active_images"]), + current_month_recos=int(response_dict["current_month_recos"]), + failed_images=int(response_dict["failed_images"]), + inactive_images=int(response_dict["inactive_images"]), + name=str(response_dict["name"]), + previous_month_recos=int(response_dict["previous_month_recos"]), + processing_images=int(response_dict["processing_images"]), + reco_threshold=int(response_dict["reco_threshold"]), + request_quota=int(response_dict["request_quota"]), + request_usage=int(response_dict["request_usage"]), + target_quota=int(response_dict["target_quota"]), + total_recos=int(response_dict["total_recos"]), + ) + @beartype @unique @@ -63,6 +82,23 @@ class TargetSummaryReport: current_month_recos: int previous_month_recos: int + @classmethod + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + """Construct from a VWS API response dict.""" + return cls( + status=TargetStatuses(value=response_dict["status"]), + database_name=response_dict["database_name"], + target_name=response_dict["target_name"], + upload_date=datetime.date.fromisoformat( + response_dict["upload_date"] + ), + active_flag=bool(response_dict["active_flag"]), + tracking_rating=int(response_dict["tracking_rating"]), + total_recos=int(response_dict["total_recos"]), + current_month_recos=int(response_dict["current_month_recos"]), + previous_month_recos=int(response_dict["previous_month_recos"]), + ) + @beartype(conf=BeartypeConf(is_pep484_tower=True)) @dataclass(frozen=True) @@ -103,6 +139,26 @@ class QueryResult: target_id: str target_data: TargetData | None + @classmethod + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + """Construct from a VWS API query result item dict.""" + target_data: TargetData | None = None + if "target_data" in response_dict: + target_data_dict = response_dict["target_data"] + target_timestamp = datetime.datetime.fromtimestamp( + timestamp=target_data_dict["target_timestamp"], + tz=datetime.UTC, + ) + target_data = TargetData( + name=target_data_dict["name"], + application_metadata=target_data_dict["application_metadata"], + target_timestamp=target_timestamp, + ) + return cls( + target_id=response_dict["target_id"], + target_data=target_data, + ) + @beartype @dataclass(frozen=True) @@ -115,3 +171,18 @@ class TargetStatusAndRecord: status: TargetStatuses target_record: TargetRecord + + @classmethod + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + """Construct from a VWS API response dict.""" + status = TargetStatuses(value=response_dict["status"]) + target_record_dict = dict(response_dict["target_record"]) + target_record = TargetRecord( + target_id=target_record_dict["target_id"], + active_flag=bool(target_record_dict["active_flag"]), + name=target_record_dict["name"], + width=float(target_record_dict["width"]), + tracking_rating=int(target_record_dict["tracking_rating"]), + reco_rating=target_record_dict["reco_rating"], + ) + return cls(status=status, target_record=target_record) diff --git a/src/vws/vws.py b/src/vws/vws.py index bed87c938..778686155 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -3,7 +3,6 @@ import base64 import json import time -from datetime import date from http import HTTPMethod, HTTPStatus from beartype import BeartypeConf, beartype @@ -37,7 +36,6 @@ ) from vws.reports import ( DatabaseSummaryReport, - TargetRecord, TargetStatusAndRecord, TargetStatuses, TargetSummaryReport, @@ -283,20 +281,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - status = TargetStatuses(value=result_data["status"]) - target_record_dict = dict(result_data["target_record"]) - target_record = TargetRecord( - target_id=target_record_dict["target_id"], - active_flag=bool(target_record_dict["active_flag"]), - name=target_record_dict["name"], - width=float(target_record_dict["width"]), - tracking_rating=int(target_record_dict["tracking_rating"]), - reco_rating=target_record_dict["reco_rating"], - ) - return TargetStatusAndRecord( - status=status, - target_record=target_record, - ) + return TargetStatusAndRecord.from_response_dict(result_data) def wait_for_target_processed( self, @@ -420,17 +405,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: ) result_data = dict(json.loads(s=response.text)) - return TargetSummaryReport( - 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"]), - active_flag=bool(result_data["active_flag"]), - tracking_rating=int(result_data["tracking_rating"]), - total_recos=int(result_data["total_recos"]), - current_month_recos=int(result_data["current_month_recos"]), - previous_month_recos=int(result_data["previous_month_recos"]), - ) + return TargetSummaryReport.from_response_dict(result_data) def get_database_summary_report(self) -> DatabaseSummaryReport: """Get a summary report for the database. @@ -463,20 +438,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: ) response_data = dict(json.loads(s=response.text)) - return DatabaseSummaryReport( - active_images=int(response_data["active_images"]), - current_month_recos=int(response_data["current_month_recos"]), - failed_images=int(response_data["failed_images"]), - inactive_images=int(response_data["inactive_images"]), - name=str(object=response_data["name"]), - previous_month_recos=int(response_data["previous_month_recos"]), - processing_images=int(response_data["processing_images"]), - reco_threshold=int(response_data["reco_threshold"]), - request_quota=int(response_data["request_quota"]), - request_usage=int(response_data["request_usage"]), - target_quota=int(response_data["target_quota"]), - total_recos=int(response_data["total_recos"]), - ) + return DatabaseSummaryReport.from_response_dict(response_data) def delete_target(self, target_id: str) -> None: """Delete a given target. From 2cb3a54da719bb27a4557812422d6e25ff0aee45 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Feb 2026 08:47:55 +0000 Subject: [PATCH 1347/1638] Add type ignores to suppress mypy errors from classmethods --- src/vws/async_query.py | 2 +- src/vws/async_vws.py | 6 ++-- src/vws/query.py | 2 +- src/vws/reports.py | 76 +++++++++++++++++++++--------------------- src/vws/vws.py | 6 ++-- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/vws/async_query.py b/src/vws/async_query.py index ae5dd7e2b..b153b63bd 100644 --- a/src/vws/async_query.py +++ b/src/vws/async_query.py @@ -199,4 +199,4 @@ async def query( result_list = list( json.loads(s=response.text)["results"], ) - return [QueryResult.from_response_dict(item) for item in result_list] + return [QueryResult.from_response_dict(item) for item in result_list] # type: ignore[arg-type] diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index a86efd287..244b3ed46 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -296,7 +296,7 @@ async def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - return TargetStatusAndRecord.from_response_dict(result_data) + return TargetStatusAndRecord.from_response_dict(result_data) # type: ignore[arg-type] async def wait_for_target_processed( self, @@ -431,7 +431,7 @@ async def get_target_summary_report( ) result_data = dict(json.loads(s=response.text)) - return TargetSummaryReport.from_response_dict(result_data) + return TargetSummaryReport.from_response_dict(result_data) # type: ignore[arg-type] async def get_database_summary_report( self, @@ -466,7 +466,7 @@ async def get_database_summary_report( ) response_data = dict(json.loads(s=response.text)) - return DatabaseSummaryReport.from_response_dict(response_data) + return DatabaseSummaryReport.from_response_dict(response_data) # type: ignore[arg-type] async def delete_target(self, target_id: str) -> None: """Delete a given target. diff --git a/src/vws/query.py b/src/vws/query.py index 2c682eb1c..f070937e2 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -165,4 +165,4 @@ def query( raise exception(response=response) result_list = list(json.loads(s=response.text)["results"]) - return [QueryResult.from_response_dict(item) for item in result_list] + return [QueryResult.from_response_dict(item) for item in result_list] # type: ignore[arg-type] diff --git a/src/vws/reports.py b/src/vws/reports.py index 55cd3978d..28c00b144 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -34,18 +34,18 @@ class DatabaseSummaryReport: def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: """Construct from a VWS API response dict.""" return cls( - active_images=int(response_dict["active_images"]), - current_month_recos=int(response_dict["current_month_recos"]), - failed_images=int(response_dict["failed_images"]), - inactive_images=int(response_dict["inactive_images"]), - name=str(response_dict["name"]), - previous_month_recos=int(response_dict["previous_month_recos"]), - processing_images=int(response_dict["processing_images"]), - reco_threshold=int(response_dict["reco_threshold"]), - request_quota=int(response_dict["request_quota"]), - request_usage=int(response_dict["request_usage"]), - target_quota=int(response_dict["target_quota"]), - total_recos=int(response_dict["total_recos"]), + active_images=int(response_dict["active_images"]), # type: ignore[arg-type] + current_month_recos=int(response_dict["current_month_recos"]), # type: ignore[arg-type] + failed_images=int(response_dict["failed_images"]), # type: ignore[arg-type] + inactive_images=int(response_dict["inactive_images"]), # type: ignore[arg-type] + name=response_dict["name"], # type: ignore[arg-type] + previous_month_recos=int(response_dict["previous_month_recos"]), # type: ignore[arg-type] + processing_images=int(response_dict["processing_images"]), # type: ignore[arg-type] + reco_threshold=int(response_dict["reco_threshold"]), # type: ignore[arg-type] + request_quota=int(response_dict["request_quota"]), # type: ignore[arg-type] + request_usage=int(response_dict["request_usage"]), # type: ignore[arg-type] + target_quota=int(response_dict["target_quota"]), # type: ignore[arg-type] + total_recos=int(response_dict["total_recos"]), # type: ignore[arg-type] ) @@ -83,20 +83,20 @@ class TargetSummaryReport: previous_month_recos: int @classmethod - def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: # type: ignore[name-defined] """Construct from a VWS API response dict.""" - return cls( - status=TargetStatuses(value=response_dict["status"]), - database_name=response_dict["database_name"], - target_name=response_dict["target_name"], + return cls( # type: ignore[arg-type] + status=TargetStatuses(value=response_dict["status"]), # type: ignore[arg-type] + database_name=response_dict["database_name"], # type: ignore[arg-type] + target_name=response_dict["target_name"], # type: ignore[arg-type] upload_date=datetime.date.fromisoformat( response_dict["upload_date"] - ), - active_flag=bool(response_dict["active_flag"]), - tracking_rating=int(response_dict["tracking_rating"]), - total_recos=int(response_dict["total_recos"]), - current_month_recos=int(response_dict["current_month_recos"]), - previous_month_recos=int(response_dict["previous_month_recos"]), + ), # type: ignore[arg-type] + active_flag=bool(response_dict["active_flag"]), # type: ignore[arg-type] + tracking_rating=int(response_dict["tracking_rating"]), # type: ignore[arg-type] + total_recos=int(response_dict["total_recos"]), # type: ignore[arg-type] + current_month_recos=int(response_dict["current_month_recos"]), # type: ignore[arg-type] + previous_month_recos=int(response_dict["previous_month_recos"]), # type: ignore[arg-type] ) @@ -140,22 +140,22 @@ class QueryResult: target_data: TargetData | None @classmethod - def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: # type: ignore[name-defined] """Construct from a VWS API query result item dict.""" target_data: TargetData | None = None if "target_data" in response_dict: target_data_dict = response_dict["target_data"] target_timestamp = datetime.datetime.fromtimestamp( - timestamp=target_data_dict["target_timestamp"], + timestamp=target_data_dict["target_timestamp"], # type: ignore[arg-type] tz=datetime.UTC, ) target_data = TargetData( - name=target_data_dict["name"], - application_metadata=target_data_dict["application_metadata"], + name=target_data_dict["name"], # type: ignore[arg-type] + application_metadata=target_data_dict["application_metadata"], # type: ignore[arg-type] target_timestamp=target_timestamp, ) - return cls( - target_id=response_dict["target_id"], + return cls( # type: ignore[arg-type] + target_id=response_dict["target_id"], # type: ignore[arg-type] target_data=target_data, ) @@ -173,16 +173,16 @@ class TargetStatusAndRecord: target_record: TargetRecord @classmethod - def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: # type: ignore[name-defined] """Construct from a VWS API response dict.""" - status = TargetStatuses(value=response_dict["status"]) + status = TargetStatuses(value=response_dict["status"]) # type: ignore[arg-type] target_record_dict = dict(response_dict["target_record"]) target_record = TargetRecord( - target_id=target_record_dict["target_id"], - active_flag=bool(target_record_dict["active_flag"]), - name=target_record_dict["name"], - width=float(target_record_dict["width"]), - tracking_rating=int(target_record_dict["tracking_rating"]), - reco_rating=target_record_dict["reco_rating"], + target_id=target_record_dict["target_id"], # type: ignore[arg-type] + active_flag=bool(target_record_dict["active_flag"]), # type: ignore[arg-type] + name=target_record_dict["name"], # type: ignore[arg-type] + width=float(target_record_dict["width"]), # type: ignore[arg-type] + tracking_rating=int(target_record_dict["tracking_rating"]), # type: ignore[arg-type] + reco_rating=target_record_dict["reco_rating"], # type: ignore[arg-type] ) - return cls(status=status, target_record=target_record) + return cls(status=status, target_record=target_record) # type: ignore[arg-type] diff --git a/src/vws/vws.py b/src/vws/vws.py index 778686155..8efee8498 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -281,7 +281,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - return TargetStatusAndRecord.from_response_dict(result_data) + return TargetStatusAndRecord.from_response_dict(result_data) # type: ignore[arg-type] def wait_for_target_processed( self, @@ -405,7 +405,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: ) result_data = dict(json.loads(s=response.text)) - return TargetSummaryReport.from_response_dict(result_data) + return TargetSummaryReport.from_response_dict(result_data) # type: ignore[arg-type] def get_database_summary_report(self) -> DatabaseSummaryReport: """Get a summary report for the database. @@ -438,7 +438,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: ) response_data = dict(json.loads(s=response.text)) - return DatabaseSummaryReport.from_response_dict(response_data) + return DatabaseSummaryReport.from_response_dict(response_data) # type: ignore[arg-type] def delete_target(self, target_id: str) -> None: """Delete a given target. From c5e06a21984e8bbce8c04e83e2aff49bfaea5f82 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Feb 2026 08:48:37 +0000 Subject: [PATCH 1348/1638] Fix mypy type: ignore error codes to use [misc] for Too many positional arguments --- src/vws/async_query.py | 2 +- src/vws/async_vws.py | 6 ++-- src/vws/query.py | 2 +- src/vws/reports.py | 76 +++++++++++++++++++++--------------------- src/vws/vws.py | 6 ++-- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/vws/async_query.py b/src/vws/async_query.py index b153b63bd..f1df2ac7c 100644 --- a/src/vws/async_query.py +++ b/src/vws/async_query.py @@ -199,4 +199,4 @@ async def query( result_list = list( json.loads(s=response.text)["results"], ) - return [QueryResult.from_response_dict(item) for item in result_list] # type: ignore[arg-type] + return [QueryResult.from_response_dict(item) for item in result_list] # type: ignore[misc] diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index 244b3ed46..b81c5e15a 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -296,7 +296,7 @@ async def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - return TargetStatusAndRecord.from_response_dict(result_data) # type: ignore[arg-type] + return TargetStatusAndRecord.from_response_dict(result_data) # type: ignore[misc] async def wait_for_target_processed( self, @@ -431,7 +431,7 @@ async def get_target_summary_report( ) result_data = dict(json.loads(s=response.text)) - return TargetSummaryReport.from_response_dict(result_data) # type: ignore[arg-type] + return TargetSummaryReport.from_response_dict(result_data) # type: ignore[misc] async def get_database_summary_report( self, @@ -466,7 +466,7 @@ async def get_database_summary_report( ) response_data = dict(json.loads(s=response.text)) - return DatabaseSummaryReport.from_response_dict(response_data) # type: ignore[arg-type] + return DatabaseSummaryReport.from_response_dict(response_data) # type: ignore[misc] async def delete_target(self, target_id: str) -> None: """Delete a given target. diff --git a/src/vws/query.py b/src/vws/query.py index f070937e2..a4810b73e 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -165,4 +165,4 @@ def query( raise exception(response=response) result_list = list(json.loads(s=response.text)["results"]) - return [QueryResult.from_response_dict(item) for item in result_list] # type: ignore[arg-type] + return [QueryResult.from_response_dict(item) for item in result_list] # type: ignore[misc] diff --git a/src/vws/reports.py b/src/vws/reports.py index 28c00b144..726f93b67 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -34,18 +34,18 @@ class DatabaseSummaryReport: def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: """Construct from a VWS API response dict.""" return cls( - active_images=int(response_dict["active_images"]), # type: ignore[arg-type] - current_month_recos=int(response_dict["current_month_recos"]), # type: ignore[arg-type] - failed_images=int(response_dict["failed_images"]), # type: ignore[arg-type] - inactive_images=int(response_dict["inactive_images"]), # type: ignore[arg-type] - name=response_dict["name"], # type: ignore[arg-type] - previous_month_recos=int(response_dict["previous_month_recos"]), # type: ignore[arg-type] - processing_images=int(response_dict["processing_images"]), # type: ignore[arg-type] - reco_threshold=int(response_dict["reco_threshold"]), # type: ignore[arg-type] - request_quota=int(response_dict["request_quota"]), # type: ignore[arg-type] - request_usage=int(response_dict["request_usage"]), # type: ignore[arg-type] - target_quota=int(response_dict["target_quota"]), # type: ignore[arg-type] - total_recos=int(response_dict["total_recos"]), # type: ignore[arg-type] + active_images=int(response_dict["active_images"]), + current_month_recos=int(response_dict["current_month_recos"]), + failed_images=int(response_dict["failed_images"]), + inactive_images=int(response_dict["inactive_images"]), + name=response_dict["name"], + previous_month_recos=int(response_dict["previous_month_recos"]), + processing_images=int(response_dict["processing_images"]), + reco_threshold=int(response_dict["reco_threshold"]), + request_quota=int(response_dict["request_quota"]), + request_usage=int(response_dict["request_usage"]), + target_quota=int(response_dict["target_quota"]), + total_recos=int(response_dict["total_recos"]), ) @@ -83,20 +83,20 @@ class TargetSummaryReport: previous_month_recos: int @classmethod - def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: # type: ignore[name-defined] + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: """Construct from a VWS API response dict.""" - return cls( # type: ignore[arg-type] - status=TargetStatuses(value=response_dict["status"]), # type: ignore[arg-type] - database_name=response_dict["database_name"], # type: ignore[arg-type] - target_name=response_dict["target_name"], # type: ignore[arg-type] + return cls( + status=TargetStatuses(value=response_dict["status"]), + database_name=response_dict["database_name"], + target_name=response_dict["target_name"], upload_date=datetime.date.fromisoformat( response_dict["upload_date"] - ), # type: ignore[arg-type] - active_flag=bool(response_dict["active_flag"]), # type: ignore[arg-type] - tracking_rating=int(response_dict["tracking_rating"]), # type: ignore[arg-type] - total_recos=int(response_dict["total_recos"]), # type: ignore[arg-type] - current_month_recos=int(response_dict["current_month_recos"]), # type: ignore[arg-type] - previous_month_recos=int(response_dict["previous_month_recos"]), # type: ignore[arg-type] + ), + active_flag=bool(response_dict["active_flag"]), + tracking_rating=int(response_dict["tracking_rating"]), + total_recos=int(response_dict["total_recos"]), + current_month_recos=int(response_dict["current_month_recos"]), + previous_month_recos=int(response_dict["previous_month_recos"]), ) @@ -140,22 +140,22 @@ class QueryResult: target_data: TargetData | None @classmethod - def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: # type: ignore[name-defined] + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: """Construct from a VWS API query result item dict.""" target_data: TargetData | None = None if "target_data" in response_dict: target_data_dict = response_dict["target_data"] target_timestamp = datetime.datetime.fromtimestamp( - timestamp=target_data_dict["target_timestamp"], # type: ignore[arg-type] + timestamp=target_data_dict["target_timestamp"], tz=datetime.UTC, ) target_data = TargetData( - name=target_data_dict["name"], # type: ignore[arg-type] - application_metadata=target_data_dict["application_metadata"], # type: ignore[arg-type] + name=target_data_dict["name"], + application_metadata=target_data_dict["application_metadata"], target_timestamp=target_timestamp, ) - return cls( # type: ignore[arg-type] - target_id=response_dict["target_id"], # type: ignore[arg-type] + return cls( + target_id=response_dict["target_id"], target_data=target_data, ) @@ -173,16 +173,16 @@ class TargetStatusAndRecord: target_record: TargetRecord @classmethod - def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: # type: ignore[name-defined] + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: """Construct from a VWS API response dict.""" - status = TargetStatuses(value=response_dict["status"]) # type: ignore[arg-type] + status = TargetStatuses(value=response_dict["status"]) target_record_dict = dict(response_dict["target_record"]) target_record = TargetRecord( - target_id=target_record_dict["target_id"], # type: ignore[arg-type] - active_flag=bool(target_record_dict["active_flag"]), # type: ignore[arg-type] - name=target_record_dict["name"], # type: ignore[arg-type] - width=float(target_record_dict["width"]), # type: ignore[arg-type] - tracking_rating=int(target_record_dict["tracking_rating"]), # type: ignore[arg-type] - reco_rating=target_record_dict["reco_rating"], # type: ignore[arg-type] + target_id=target_record_dict["target_id"], + active_flag=bool(target_record_dict["active_flag"]), + name=target_record_dict["name"], + width=float(target_record_dict["width"]), + tracking_rating=int(target_record_dict["tracking_rating"]), + reco_rating=target_record_dict["reco_rating"], ) - return cls(status=status, target_record=target_record) # type: ignore[arg-type] + return cls(status=status, target_record=target_record) diff --git a/src/vws/vws.py b/src/vws/vws.py index 8efee8498..346b7d621 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -281,7 +281,7 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - return TargetStatusAndRecord.from_response_dict(result_data) # type: ignore[arg-type] + return TargetStatusAndRecord.from_response_dict(result_data) # type: ignore[misc] def wait_for_target_processed( self, @@ -405,7 +405,7 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: ) result_data = dict(json.loads(s=response.text)) - return TargetSummaryReport.from_response_dict(result_data) # type: ignore[arg-type] + return TargetSummaryReport.from_response_dict(result_data) # type: ignore[misc] def get_database_summary_report(self) -> DatabaseSummaryReport: """Get a summary report for the database. @@ -438,7 +438,7 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: ) response_data = dict(json.loads(s=response.text)) - return DatabaseSummaryReport.from_response_dict(response_data) # type: ignore[arg-type] + return DatabaseSummaryReport.from_response_dict(response_data) # type: ignore[misc] def delete_target(self, target_id: str) -> None: """Delete a given target. From f3b356facc9877135747707aa6c34b61186b28b9 Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Wed, 25 Feb 2026 08:54:50 +0000 Subject: [PATCH 1349/1638] Bump CHANGELOG --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 43f10c4e2..56a5d3007 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,10 @@ Changelog Next ---- +2026.02.25.1 +------------ + + 2026.02.25 ---------- From 323c8e5daacd87e148707375a4079cb983919213 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Feb 2026 10:07:51 +0000 Subject: [PATCH 1350/1638] Use keyword args for response dict factories --- src/vws/async_query.py | 5 ++++- src/vws/async_vws.py | 12 +++++++++--- src/vws/query.py | 5 ++++- src/vws/vws.py | 12 +++++++++--- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/vws/async_query.py b/src/vws/async_query.py index f1df2ac7c..c229569ee 100644 --- a/src/vws/async_query.py +++ b/src/vws/async_query.py @@ -199,4 +199,7 @@ async def query( result_list = list( json.loads(s=response.text)["results"], ) - return [QueryResult.from_response_dict(item) for item in result_list] # type: ignore[misc] + return [ + QueryResult.from_response_dict(response_dict=item) + for item in result_list + ] diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index b81c5e15a..55c2aa1dd 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -296,7 +296,9 @@ async def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - return TargetStatusAndRecord.from_response_dict(result_data) # type: ignore[misc] + return TargetStatusAndRecord.from_response_dict( + response_dict=result_data, + ) async def wait_for_target_processed( self, @@ -431,7 +433,9 @@ async def get_target_summary_report( ) result_data = dict(json.loads(s=response.text)) - return TargetSummaryReport.from_response_dict(result_data) # type: ignore[misc] + return TargetSummaryReport.from_response_dict( + response_dict=result_data, + ) async def get_database_summary_report( self, @@ -466,7 +470,9 @@ async def get_database_summary_report( ) response_data = dict(json.loads(s=response.text)) - return DatabaseSummaryReport.from_response_dict(response_data) # type: ignore[misc] + return DatabaseSummaryReport.from_response_dict( + response_dict=response_data, + ) async def delete_target(self, target_id: str) -> None: """Delete a given target. diff --git a/src/vws/query.py b/src/vws/query.py index a4810b73e..44840d6f0 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -165,4 +165,7 @@ def query( raise exception(response=response) result_list = list(json.loads(s=response.text)["results"]) - return [QueryResult.from_response_dict(item) for item in result_list] # type: ignore[misc] + return [ + QueryResult.from_response_dict(response_dict=item) + for item in result_list + ] diff --git a/src/vws/vws.py b/src/vws/vws.py index 346b7d621..c93a9da8b 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -281,7 +281,9 @@ def get_target_record(self, target_id: str) -> TargetStatusAndRecord: ) result_data = json.loads(s=response.text) - return TargetStatusAndRecord.from_response_dict(result_data) # type: ignore[misc] + return TargetStatusAndRecord.from_response_dict( + response_dict=result_data, + ) def wait_for_target_processed( self, @@ -405,7 +407,9 @@ def get_target_summary_report(self, target_id: str) -> TargetSummaryReport: ) result_data = dict(json.loads(s=response.text)) - return TargetSummaryReport.from_response_dict(result_data) # type: ignore[misc] + return TargetSummaryReport.from_response_dict( + response_dict=result_data, + ) def get_database_summary_report(self) -> DatabaseSummaryReport: """Get a summary report for the database. @@ -438,7 +442,9 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: ) response_data = dict(json.loads(s=response.text)) - return DatabaseSummaryReport.from_response_dict(response_data) # type: ignore[misc] + return DatabaseSummaryReport.from_response_dict( + response_dict=response_data, + ) def delete_target(self, target_id: str) -> None: """Delete a given target. From ba1d67e74a22c0b4d4943ccb08025a32bd05c110 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Feb 2026 10:31:33 +0000 Subject: [PATCH 1351/1638] Add VWSError result code factory --- src/vws/async_vumark_service.py | 33 ++++--------------- src/vws/async_vws.py | 47 ++++----------------------- src/vws/exceptions/base_exceptions.py | 25 ++++++++++++++ src/vws/exceptions/vws_exceptions.py | 26 +++++++++++++++ src/vws/vumark_service.py | 33 ++++--------------- src/vws/vws.py | 47 ++++----------------------- tests/test_vws_exceptions.py | 22 +++++++++++++ 7 files changed, 97 insertions(+), 136 deletions(-) diff --git a/src/vws/async_vumark_service.py b/src/vws/async_vumark_service.py index c1e189eeb..a104f49c0 100644 --- a/src/vws/async_vumark_service.py +++ b/src/vws/async_vumark_service.py @@ -7,20 +7,9 @@ from beartype import BeartypeConf, beartype from vws._async_vws_request import async_target_api_request +from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ServerError -from vws.exceptions.vws_exceptions import ( - AuthenticationFailureError, - BadRequestError, - DateRangeError, - FailError, - InvalidAcceptHeaderError, - InvalidInstanceIdError, - InvalidTargetTypeError, - RequestTimeTooSkewedError, - TargetStatusNotSuccessError, - TooManyRequestsError, - UnknownTargetError, -) +from vws.exceptions.vws_exceptions import TooManyRequestsError from vws.transports import AsyncHTTPXTransport, AsyncTransport from vws.vumark_accept import VuMarkAccept @@ -154,17 +143,7 @@ async def generate_vumark_instance( result_code = json.loads(s=response.text)["result_code"] - exception = { - "AuthenticationFailure": (AuthenticationFailureError), - "BadRequest": BadRequestError, - "DateRangeError": DateRangeError, - "Fail": FailError, - "InvalidAcceptHeader": InvalidAcceptHeaderError, - "InvalidInstanceId": InvalidInstanceIdError, - "InvalidTargetType": InvalidTargetTypeError, - "RequestTimeTooSkewed": RequestTimeTooSkewedError, - "TargetStatusNotSuccess": (TargetStatusNotSuccessError), - "UnknownTarget": UnknownTargetError, - }[result_code] - - raise exception(response=response) + raise VWSError.from_result_code( + result_code=result_code, + response=response, + ) diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index 55c2aa1dd..feba724de 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -11,30 +11,12 @@ from vws._async_vws_request import async_target_api_request from vws._image_utils import ImageType as _ImageType from vws._image_utils import get_image_data as _get_image_data +from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ( ServerError, TargetProcessingTimeoutError, ) -from vws.exceptions.vws_exceptions import ( - AuthenticationFailureError, - BadImageError, - BadRequestError, - DateRangeError, - FailError, - ImageTooLargeError, - MetadataTooLargeError, - ProjectHasNoAPIAccessError, - ProjectInactiveError, - ProjectSuspendedError, - RequestQuotaReachedError, - RequestTimeTooSkewedError, - TargetNameExistError, - TargetQuotaReachedError, - TargetStatusNotSuccessError, - TargetStatusProcessingError, - TooManyRequestsError, - UnknownTargetError, -) +from vws.exceptions.vws_exceptions import TooManyRequestsError from vws.reports import ( DatabaseSummaryReport, TargetStatusAndRecord, @@ -158,27 +140,10 @@ async def make_request( if result_code == expected_result_code: return response - exception = { - "AuthenticationFailure": AuthenticationFailureError, - "BadImage": BadImageError, - "BadRequest": BadRequestError, - "DateRangeError": DateRangeError, - "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) + raise VWSError.from_result_code( + result_code=result_code, + response=response, + ) async def add_target( self, diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index fa031838a..4b8727e79 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -4,6 +4,9 @@ Cloud Recognition Web API. """ +from collections.abc import Mapping +from typing import ClassVar + from beartype import beartype from vws.response import Response @@ -35,6 +38,8 @@ class VWSError(Exception): https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes. """ + _exceptions_by_result_code: ClassVar[dict[str, type["VWSError"]]] = {} + def __init__(self, response: Response) -> None: """ Args: @@ -43,6 +48,26 @@ def __init__(self, response: Response) -> None: super().__init__() self._response = response + @classmethod + def register_exceptions_by_result_code( + cls, + *, + exceptions_by_result_code: Mapping[str, type["VWSError"]], + ) -> None: + """Register ``result_code`` to exception mappings.""" + cls._exceptions_by_result_code.update(exceptions_by_result_code) + + @classmethod + def from_result_code( + cls, + *, + result_code: str, + response: Response, + ) -> "VWSError": + """Create the mapped exception for a VWS ``result_code``.""" + exception_type = cls._exceptions_by_result_code[result_code] + return exception_type(response=response) + @property def response(self) -> Response: """The response returned by Vuforia which included this error.""" diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 865d2372c..de09cdeaa 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -202,3 +202,29 @@ class InvalidTargetTypeError(VWSError): """Exception raised when Vuforia returns a response with a result code ``InvalidTargetType``. """ + + +VWSError.register_exceptions_by_result_code( + exceptions_by_result_code={ + "AuthenticationFailure": AuthenticationFailureError, + "BadImage": BadImageError, + "BadRequest": BadRequestError, + "DateRangeError": DateRangeError, + "Fail": FailError, + "ImageTooLarge": ImageTooLargeError, + "InvalidAcceptHeader": InvalidAcceptHeaderError, + "InvalidInstanceId": InvalidInstanceIdError, + "InvalidTargetType": InvalidTargetTypeError, + "MetadataTooLarge": MetadataTooLargeError, + "ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError, + "ProjectInactive": ProjectInactiveError, + "ProjectSuspended": ProjectSuspendedError, + "RequestQuotaReached": RequestQuotaReachedError, + "RequestTimeTooSkewed": RequestTimeTooSkewedError, + "TargetNameExist": TargetNameExistError, + "TargetQuotaReached": TargetQuotaReachedError, + "TargetStatusNotSuccess": TargetStatusNotSuccessError, + "TargetStatusProcessing": TargetStatusProcessingError, + "UnknownTarget": UnknownTargetError, + }, +) diff --git a/src/vws/vumark_service.py b/src/vws/vumark_service.py index 47d68d942..f4b04152f 100644 --- a/src/vws/vumark_service.py +++ b/src/vws/vumark_service.py @@ -6,20 +6,9 @@ from beartype import BeartypeConf, beartype from vws._vws_request import target_api_request +from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ServerError -from vws.exceptions.vws_exceptions import ( - AuthenticationFailureError, - BadRequestError, - DateRangeError, - FailError, - InvalidAcceptHeaderError, - InvalidInstanceIdError, - InvalidTargetTypeError, - RequestTimeTooSkewedError, - TargetStatusNotSuccessError, - TooManyRequestsError, - UnknownTargetError, -) +from vws.exceptions.vws_exceptions import TooManyRequestsError from vws.transports import RequestsTransport, Transport from vws.vumark_accept import VuMarkAccept @@ -135,17 +124,7 @@ def generate_vumark_instance( result_code = json.loads(s=response.text)["result_code"] - exception = { - "AuthenticationFailure": AuthenticationFailureError, - "BadRequest": BadRequestError, - "DateRangeError": DateRangeError, - "Fail": FailError, - "InvalidAcceptHeader": InvalidAcceptHeaderError, - "InvalidInstanceId": InvalidInstanceIdError, - "InvalidTargetType": InvalidTargetTypeError, - "RequestTimeTooSkewed": RequestTimeTooSkewedError, - "TargetStatusNotSuccess": TargetStatusNotSuccessError, - "UnknownTarget": UnknownTargetError, - }[result_code] - - raise exception(response=response) + raise VWSError.from_result_code( + result_code=result_code, + response=response, + ) diff --git a/src/vws/vws.py b/src/vws/vws.py index c93a9da8b..7eda102fe 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -10,30 +10,12 @@ from vws._image_utils import ImageType as _ImageType from vws._image_utils import get_image_data as _get_image_data from vws._vws_request import target_api_request +from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ( ServerError, TargetProcessingTimeoutError, ) -from vws.exceptions.vws_exceptions import ( - AuthenticationFailureError, - BadImageError, - BadRequestError, - DateRangeError, - FailError, - ImageTooLargeError, - MetadataTooLargeError, - ProjectHasNoAPIAccessError, - ProjectInactiveError, - ProjectSuspendedError, - RequestQuotaReachedError, - RequestTimeTooSkewedError, - TargetNameExistError, - TargetQuotaReachedError, - TargetStatusNotSuccessError, - TargetStatusProcessingError, - TooManyRequestsError, - UnknownTargetError, -) +from vws.exceptions.vws_exceptions import TooManyRequestsError from vws.reports import ( DatabaseSummaryReport, TargetStatusAndRecord, @@ -143,27 +125,10 @@ def make_request( if result_code == expected_result_code: return response - exception = { - "AuthenticationFailure": AuthenticationFailureError, - "BadImage": BadImageError, - "BadRequest": BadRequestError, - "DateRangeError": DateRangeError, - "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) + raise VWSError.from_result_code( + result_code=result_code, + response=response, + ) def add_target( self, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 617016257..798d15f71 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -37,6 +37,7 @@ TargetStatusProcessingError, UnknownTargetError, ) +from vws.response import Response from vws.vumark_accept import VuMarkAccept @@ -451,3 +452,24 @@ def test_base_exception( active_flag=True, application_metadata=None, ) + + +def test_vwserror_from_result_code() -> None: + """``VWSError.from_result_code`` returns the mapped exception.""" + response = Response( + text='{"result_code":"UnknownTarget"}', + url="https://example.com/targets/123", + status_code=HTTPStatus.NOT_FOUND, + headers={}, + request_body=None, + tell_position=0, + content=b"", + ) + + exception = VWSError.from_result_code( + result_code="UnknownTarget", + response=response, + ) + + assert isinstance(exception, UnknownTargetError) + assert exception.response is response From 15f16d9bc30f30e185b93a2e816eb16c9dbe487a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:33:13 +0000 Subject: [PATCH 1352/1638] Bump ty from 0.0.18 to 0.0.19 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.18 to 0.0.19. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.18...0.0.19) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.19 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b4fbfeea3..1d655fdf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.18", + "ty==0.0.19", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2026.2.22.3", From 42fe4a8e069d5289fde7755f328fae387945667d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:33:37 +0000 Subject: [PATCH 1353/1638] Bump ruff from 0.15.2 to 0.15.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.2 to 0.15.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.15.2...0.15.4) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b4fbfeea3..d852829b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "pytest-asyncio==1.3.0", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.15.2", + "ruff==0.15.4", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 0ecce8d99ca084d464112a6e60564b664746d7df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:33:44 +0000 Subject: [PATCH 1354/1638] Bump doccmd from 2026.2.15 to 2026.2.27 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.2.15 to 2026.2.27. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.02.15...2026.02.27) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.2.27 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b4fbfeea3..e25e0e6ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.2.15", + "doccmd==2026.2.27", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 47d6d11ddea72632962212d3918a98e43f44a6e4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 1 Mar 2026 21:55:47 +0000 Subject: [PATCH 1355/1638] Bump doccmd to 2026.3.1 Made-with: Cursor --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e25e0e6ca..9c56186fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.2.27", + "doccmd==2026.3.1", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 62de85102ccff2cbbb8f408e36faae93fa81e763 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:24:29 +0000 Subject: [PATCH 1356/1638] Bump pyproject-fmt from 2.16.2 to 2.17.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.16.2 to 2.17.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.16.2...pyproject-fmt/2.17.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.17.0 dependency-type: direct:development 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 63e8d4db5..ded1e5728 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.16.2", + "pyproject-fmt==2.17.0", "pyrefly==0.54.0", "pyright==1.1.408", "pyroma==5.0.1", From a2c90163821020a49462e27cafd04f4251e4bb03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:24:58 +0000 Subject: [PATCH 1357/1638] Bump prek from 0.3.3 to 0.3.4 Bumps [prek](https://github.com/j178/prek) from 0.3.3 to 0.3.4. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.3...v0.3.4) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 63e8d4db5..3eabd42bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.3", + "prek==0.3.4", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", From 2b96845c7e065b99a7adb041ca16404d42a4fcac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 10:33:24 +0000 Subject: [PATCH 1358/1638] Bump pyrefly from 0.54.0 to 0.55.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.54.0 to 0.55.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.54.0...0.55.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.55.0 dependency-type: direct:development 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 c2b19e36d..cbf199d07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.17.0", - "pyrefly==0.54.0", + "pyrefly==0.55.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 34833f47f26fd34f2025d4c3a0b8c85637a473dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 10:33:31 +0000 Subject: [PATCH 1359/1638] Bump ty from 0.0.19 to 0.0.20 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.19 to 0.0.20. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.19...0.0.20) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.20 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c2b19e36d..4bc79933a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.19", + "ty==0.0.20", "types-requests==2.32.4.20260107", "vulture==2.14", "vws-python-mock==2026.2.22.3", From d44bc804647c37f8fe423655516a7da4d4f38168 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 10:33:41 +0000 Subject: [PATCH 1360/1638] Bump doccmd from 2026.3.1 to 2026.3.2 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.3.1 to 2026.3.2. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.03.01...2026.03.02) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.3.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c2b19e36d..2b311de50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.24.0", "doc8==2.0.0", - "doccmd==2026.3.1", + "doccmd==2026.3.2", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From b063cb407942d2206d6ec0bcde8e911476227cfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 10:38:35 +0000 Subject: [PATCH 1361/1638] Bump pyproject-fmt from 2.17.0 to 2.18.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.17.0 to 2.18.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.17.0...pyproject-fmt/2.18.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.18.0 dependency-type: direct:development 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 c45df07fc..cdd62cd5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.17.0", + "pyproject-fmt==2.18.0", "pyrefly==0.55.0", "pyright==1.1.408", "pyroma==5.0.1", From 61e7b954a3632d447a5148597d36cf98465e5549 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 4 Mar 2026 10:20:41 +0000 Subject: [PATCH 1362/1638] Apply pyproject-fmt 2.18 inline table key reordering Made-with: Cursor --- pyproject.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cdd62cd5b..b84fa445f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -159,11 +159,11 @@ lint.pydocstyle.convention = "google" [tool.pylint] # Allow the body of an if to be on the same line as the test if there is no # else. -"FORMAT".single-line-if-stmt = false +FORMAT.single-line-if-stmt = false # Pickle collected data for later comparisons. -"MASTER".persistent = true +MASTER.persistent = true # Use multiple processes to speed up Pylint. -"MASTER".jobs = 0 +MASTER.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. @@ -173,7 +173,7 @@ lint.pydocstyle.convention = "google" # - pylint.extensions.magic_value # - pylint.extensions.while_used # as they seemed to get in the way. -"MASTER".load-plugins = [ +MASTER.load-plugins = [ "pylint_per_file_ignores", "pylint.extensions.bad_builtin", "pylint.extensions.comparison_placement", @@ -193,7 +193,7 @@ lint.pydocstyle.convention = "google" ] # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. -"MASTER".unsafe-load-any-extension = false +MASTER.unsafe-load-any-extension = false # 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 @@ -250,12 +250,12 @@ lint.pydocstyle.convention = "google" ] # Spelling dictionary name. Available dictionaries: none. To make it working # install python-enchant package. -"SPELLING".spelling-dict = "en_US" +SPELLING.spelling-dict = "en_US" # A path to a file that contains private dictionary; one word per line. -"SPELLING".spelling-private-dict-file = "spelling_private_dict.txt" +SPELLING.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".spelling-store-unknown-words = "no" +SPELLING.spelling-store-unknown-words = "no" [tool.check-manifest] ignore = [ From 9d4069fb3dcb3cddeaf8ec8bf93ec76c0a954812 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Mar 2026 10:33:31 +0000 Subject: [PATCH 1363/1638] Bump pyproject-fmt from 2.18.0 to 2.18.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.18.0 to 2.18.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.18.0...pyproject-fmt/2.18.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.18.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b84fa445f..f7dc5b390 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.18.0", + "pyproject-fmt==2.18.1", "pyrefly==0.55.0", "pyright==1.1.408", "pyroma==5.0.1", From 17ddcb698e0896f620adc0a0029e03ee75e8b4a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 10:34:01 +0000 Subject: [PATCH 1364/1638] Bump vulture from 2.14 to 2.15 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.14 to 2.15. - [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.14...v2.15) --- updated-dependencies: - dependency-name: vulture dependency-version: '2.15' dependency-type: direct:development 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 f7dc5b390..324690dc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,7 @@ optional-dependencies.dev = [ "torchvision>=0.20.1", "ty==0.0.20", "types-requests==2.32.4.20260107", - "vulture==2.14", + "vulture==2.15", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", From cd250dac7b4c62decc0312cbb8e6974ceeab2572 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 10:33:21 +0000 Subject: [PATCH 1365/1638] Bump ruff from 0.15.4 to 0.15.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.4 to 0.15.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.15.4...0.15.5) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 324690dc0..52051ef1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "pytest-asyncio==1.3.0", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.15.4", + "ruff==0.15.5", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 53df71d66659cc079c698c93e86873c52dc59b75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 10:33:34 +0000 Subject: [PATCH 1366/1638] Bump ty from 0.0.20 to 0.0.21 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.20 to 0.0.21. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.20...0.0.21) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.21 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 324690dc0..a399ed37d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.20", + "ty==0.0.21", "types-requests==2.32.4.20260107", "vulture==2.15", "vws-python-mock==2026.2.22.3", From 851046a1155ebeab02eef5d6fc44a7ff40796272 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 11:10:23 +0000 Subject: [PATCH 1367/1638] Bump prek from 0.3.4 to 0.3.5 Bumps [prek](https://github.com/j178/prek) from 0.3.4 to 0.3.5. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.4...v0.3.5) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 562da1f8f..f9854b71f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.4", + "prek==0.3.5", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", From b82c0dede286d611e7bd0e6840b83501f6e978c2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 10 Mar 2026 10:04:49 +0000 Subject: [PATCH 1368/1638] Fix zizmor lint: upgrade to 1.23.1, disable superfluous-actions and secrets-outside-env Made-with: Cursor --- pyproject.toml | 2 +- zizmor.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f9854b71f..8ae0289f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.22.0", + "zizmor==1.23.1", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" diff --git a/zizmor.yml b/zizmor.yml index f63e179d2..11bb67ff5 100644 --- a/zizmor.yml +++ b/zizmor.yml @@ -8,5 +8,9 @@ rules: disable: true dependabot-cooldown: disable: true + superfluous-actions: + disable: true + secrets-outside-env: + disable: true template-injection: disable: true From 73683d2a550c78964c259cdf758f87f7c5a4f574 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 10 Mar 2026 10:11:06 +0000 Subject: [PATCH 1369/1638] Remove secrets-outside-env disable, add environment to jobs that use secrets Made-with: Cursor --- zizmor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/zizmor.yml b/zizmor.yml index 11bb67ff5..fab119cb0 100644 --- a/zizmor.yml +++ b/zizmor.yml @@ -10,7 +10,5 @@ rules: disable: true superfluous-actions: disable: true - secrets-outside-env: - disable: true template-injection: disable: true From db3d27bc6c5e222fd542c1ea8548a71ed3ff002c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 10:33:22 +0000 Subject: [PATCH 1370/1638] Bump pyrefly from 0.55.0 to 0.56.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.55.0 to 0.56.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.55.0...0.56.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.56.0 dependency-type: direct:development 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 8ae0289f3..41f24d581 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.18.1", - "pyrefly==0.55.0", + "pyrefly==0.56.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 9bb2e875c4d02341eb5aaa311b7c69e7817f6b72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 10:33:19 +0000 Subject: [PATCH 1371/1638] Bump ruff from 0.15.5 to 0.15.6 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.5 to 0.15.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.15.5...0.15.6) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 41f24d581..a45e667c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "pytest-asyncio==1.3.0", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.15.5", + "ruff==0.15.6", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 9066e1c62ad737ee3130049d23c462f8e8b72a74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 10:33:30 +0000 Subject: [PATCH 1372/1638] Bump ty from 0.0.21 to 0.0.22 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.21 to 0.0.22. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.21...0.0.22) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.22 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 41f24d581..b107e99cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.21", + "ty==0.0.22", "types-requests==2.32.4.20260107", "vulture==2.15", "vws-python-mock==2026.2.22.3", From 357a2c2152419789e55ca938a6f7c4aca8367e5f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 13 Mar 2026 16:33:39 +0000 Subject: [PATCH 1373/1638] Remove unused dependabot/fetch-metadata step --- .github/workflows/dependabot-merge.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml index 4932493cf..f2437640a 100644 --- a/.github/workflows/dependabot-merge.yml +++ b/.github/workflows/dependabot-merge.yml @@ -1,4 +1,5 @@ --- + name: Dependabot auto-merge on: pull_request @@ -11,11 +12,6 @@ jobs: runs-on: ubuntu-latest if: github.actor == 'dependabot[bot]' steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - name: Enable auto-merge for Dependabot PRs run: gh pr merge --auto --merge "$PR_URL" env: From 78b67312911a94b46fb1d52315380dca36f69311 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 10:56:26 +0000 Subject: [PATCH 1374/1638] Bump prek from 0.3.5 to 0.3.6 Bumps [prek](https://github.com/j178/prek) from 0.3.5 to 0.3.6. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.5...v0.3.6) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0aff7fd18..958493a98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.5", + "prek==0.3.6", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", From f5f6a84328e866ea60edd27e715f7aedcd591344 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 10:56:41 +0000 Subject: [PATCH 1375/1638] Bump ty from 0.0.22 to 0.0.23 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.22 to 0.0.23. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.22...0.0.23) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.23 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0aff7fd18..8b2343798 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.22", + "ty==0.0.23", "types-requests==2.32.4.20260107", "vulture==2.15", "vws-python-mock==2026.2.22.3", From a9cf44334bb398dae7b8e42c765fac2e3c702302 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Mar 2026 08:19:22 +0000 Subject: [PATCH 1376/1638] Move release and tag version into env vars to prevent template injection Made-with: Cursor --- .github/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e655a8a0..1785c8fc1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,8 +49,10 @@ jobs: - name: Get the changelog underline id: changelog_underline + env: + RELEASE: ${{ steps.calver.outputs.release }} run: | - underline="$(echo "${{ steps.calver.outputs.release }}" | tr -c '\n' '-')" + underline="$(echo "$RELEASE" | tr -c '\n' '-')" echo "underline=${underline}" >> "$GITHUB_OUTPUT" - name: Update changelog @@ -95,9 +97,11 @@ jobs: body: ${{ steps.tag_version.outputs.changelog }} - name: Build a binary wheel and a source tarball + env: + NEW_TAG: ${{ steps.tag_version.outputs.new_tag }} run: | git fetch --tags - git checkout ${{ steps.tag_version.outputs.new_tag }} + git checkout "$NEW_TAG" uv build --sdist --wheel --out-dir dist/ uv run --extra=release check-wheel-contents dist/*.whl From 01e584b47c1409b9e96ce52d96674d092d8d8610 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Mar 2026 08:27:55 +0000 Subject: [PATCH 1377/1638] Enable template-injection rule in zizmor config Made-with: Cursor --- zizmor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/zizmor.yml b/zizmor.yml index fab119cb0..863db3458 100644 --- a/zizmor.yml +++ b/zizmor.yml @@ -10,5 +10,3 @@ rules: disable: true superfluous-actions: disable: true - template-injection: - disable: true From fa2cb9adf1bec1b45e772a31303247313dff2698 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Mar 2026 08:31:58 +0000 Subject: [PATCH 1378/1638] Fix template-injection in Check steps Made-with: Cursor --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1785c8fc1..9d0e5b258 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,8 +66,10 @@ jobs: regex: false - name: Check Update changelog was modified + env: + MODIFIED_FILES: ${{ steps.update_changelog.outputs.modifiedFiles }} run: | - if [ "${{ steps.update_changelog.outputs.modifiedFiles }}" = "0" ]; then + if [ "$MODIFIED_FILES" = "0" ]; then echo "Error: No files were modified when updating changelog" exit 1 fi From 15a170a1401119f5503ab625991de357490c7a17 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 17 Mar 2026 09:13:30 +0000 Subject: [PATCH 1379/1638] fix: use pull_request.user.login instead of github.actor for bot check (fixes adamtheturtle/literalizer#146) Made-with: Cursor --- .github/workflows/dependabot-merge.yml | 2 +- zizmor.yml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml index f2437640a..69fa53039 100644 --- a/.github/workflows/dependabot-merge.yml +++ b/.github/workflows/dependabot-merge.yml @@ -10,7 +10,7 @@ permissions: jobs: dependabot: runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' + if: github.event.pull_request.user.login == 'dependabot[bot]' steps: - name: Enable auto-merge for Dependabot PRs run: gh pr merge --auto --merge "$PR_URL" diff --git a/zizmor.yml b/zizmor.yml index 863db3458..ce05fe5e8 100644 --- a/zizmor.yml +++ b/zizmor.yml @@ -4,8 +4,6 @@ rules: disable: true cache-poisoning: disable: true - bot-conditions: - disable: true dependabot-cooldown: disable: true superfluous-actions: From 2d8a4e8e62dd485f7961fdb30914b7a4f1f044d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 10:33:24 +0000 Subject: [PATCH 1380/1638] Bump pyrefly from 0.56.0 to 0.57.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.56.0 to 0.57.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.56.0...0.57.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.57.0 dependency-type: direct:development 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 2df6de4c3..e6e69b1c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.18.1", - "pyrefly==0.56.0", + "pyrefly==0.57.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From aac32cf2da46abc3510b5219e8cf46f021ce931d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 10:33:09 +0000 Subject: [PATCH 1381/1638] Bump pyrefly from 0.57.0 to 0.57.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.57.0 to 0.57.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.57.0...0.57.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.57.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e6e69b1c8..9062dc706 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.18.1", - "pyrefly==0.57.0", + "pyrefly==0.57.1", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From ad3548528ea5f4f80d4496f4499df2424703484f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 10:33:30 +0000 Subject: [PATCH 1382/1638] Bump deptry from 0.24.0 to 0.25.1 Bumps [deptry](https://github.com/osprey-oss/deptry) from 0.24.0 to 0.25.1. - [Release notes](https://github.com/osprey-oss/deptry/releases) - [Changelog](https://github.com/osprey-oss/deptry/blob/main/CHANGELOG.md) - [Commits](https://github.com/osprey-oss/deptry/compare/0.24.0...0.25.1) --- updated-dependencies: - dependency-name: deptry dependency-version: 0.25.1 dependency-type: direct:development 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 e6e69b1c8..d1f7e418a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ optional-dependencies.dev = [ "actionlint-py==1.7.11.24", "check-manifest==0.51", - "deptry==0.24.0", + "deptry==0.25.1", "doc8==2.0.0", "doccmd==2026.3.2", "freezegun==1.5.5", From dccf0542d22d48efabb9ac67261b27fc5107bae0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 10:38:47 +0000 Subject: [PATCH 1383/1638] Bump pyproject-fmt from 2.18.1 to 2.20.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.18.1 to 2.20.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.18.1...pyproject-fmt/2.20.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.20.0 dependency-type: direct:development 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 c4c30a731..66b6dfd7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.19.2", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.18.1", + "pyproject-fmt==2.20.0", "pyrefly==0.57.1", "pyright==1.1.408", "pyroma==5.0.1", From 2063110729a2d7ddbd81d6ac4da1f4289456a668 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 10:33:18 +0000 Subject: [PATCH 1384/1638] Bump ruff from 0.15.6 to 0.15.7 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.6 to 0.15.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.15.6...0.15.7) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.7 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c4c30a731..865330c9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "pytest-asyncio==1.3.0", "pytest-cov==7.0.0", "pyyaml==6.0.3", - "ruff==0.15.6", + "ruff==0.15.7", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From bc3dab43a0cabff11677f41c5b1bfde659732f7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 10:33:44 +0000 Subject: [PATCH 1385/1638] Bump ty from 0.0.23 to 0.0.24 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.23 to 0.0.24. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.23...0.0.24) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.24 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c4c30a731..8feac69ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.23", + "ty==0.0.24", "types-requests==2.32.4.20260107", "vulture==2.15", "vws-python-mock==2026.2.22.3", From a90f526ac43b3d2d3fab23332ce43781c320fd39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 10:56:20 +0000 Subject: [PATCH 1386/1638] Bump prek from 0.3.6 to 0.3.8 Bumps [prek](https://github.com/j178/prek) from 0.3.6 to 0.3.8. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.6...v0.3.8) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c22f713e8..aca561b99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.6", + "prek==0.3.8", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.19.2", From 11c5b25b4028fd76066975bf8793242ace1c3359 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 10:56:35 +0000 Subject: [PATCH 1387/1638] Bump pytest-cov from 7.0.0 to 7.1.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 7.0.0 to 7.1.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v7.0.0...v7.1.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-version: 7.1.0 dependency-type: direct:development 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 c22f713e8..5d5994d94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pyroma==5.0.1", "pytest==9.0.2", "pytest-asyncio==1.3.0", - "pytest-cov==7.0.0", + "pytest-cov==7.1.0", "pyyaml==6.0.3", "ruff==0.15.7", # We add shellcheck-py not only for shell scripts and shell code blocks, From a46d7cabd229f25c47d4e5eb5a21aa90d73688f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 10:33:32 +0000 Subject: [PATCH 1388/1638] Bump types-requests from 2.32.4.20260107 to 2.32.4.20260324 Bumps [types-requests](https://github.com/typeshed-internal/stub_uploader) from 2.32.4.20260107 to 2.32.4.20260324. - [Commits](https://github.com/typeshed-internal/stub_uploader/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.32.4.20260324 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 21c949910..89758ed3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "ty==0.0.24", - "types-requests==2.32.4.20260107", + "types-requests==2.32.4.20260324", "vulture==2.15", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From 06a827647a144796209aaff8ac106c694b3be73b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 26 Mar 2026 08:34:42 +0000 Subject: [PATCH 1389/1638] Apply pyproject-fmt 2.20.0 formatting --- pyproject.toml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 66b6dfd7e..ecf75496f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -302,17 +302,6 @@ indent = 4 keep_full_version = true max_supported_python = "3.14" -[tool.pytest] -xfail_strict = true -log_cli = true - -[tool.coverage] -run.branch = true -report.exclude_also = [ - "if TYPE_CHECKING:", -] -report.show_missing = true - [tool.mypy] strict = true files = [ "." ] @@ -330,6 +319,17 @@ enableTypeIgnoreComments = false reportUnnecessaryTypeIgnoreComment = true typeCheckingMode = "strict" +[tool.pytest] +xfail_strict = true +log_cli = true + +[tool.coverage] +run.branch = true +report.exclude_also = [ + "if TYPE_CHECKING:", +] +report.show_missing = true + [tool.pydocstringformatter] write = true split-summary-body = false From ab1c7e5dba82ae655dc81277f1c98e9c8cb9aa7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 08:40:33 +0000 Subject: [PATCH 1390/1638] Bump pyrefly from 0.57.1 to 0.58.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.57.1 to 0.58.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.57.1...0.58.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.58.0 dependency-type: direct:development 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 c129a17eb..64a3525ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.20.0", - "pyrefly==0.57.1", + "pyrefly==0.58.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 2dae1e2131826c69693a24c2e24815228d33a0a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 08:40:46 +0000 Subject: [PATCH 1391/1638] Bump ty from 0.0.24 to 0.0.25 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.24 to 0.0.25. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.24...0.0.25) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.25 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c129a17eb..8fa2fceae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.24", + "ty==0.0.25", "types-requests==2.32.4.20260324", "vulture==2.15", "vws-python-mock==2026.2.22.3", From f47a9b153c72f2fb497d9c833768defd5e6f076d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:33:17 +0000 Subject: [PATCH 1392/1638] Bump vulture from 2.15 to 2.16 Bumps [vulture](https://github.com/jendrikseipp/vulture) from 2.15 to 2.16. - [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.15...v2.16) --- updated-dependencies: - dependency-name: vulture dependency-version: '2.16' dependency-type: direct:development 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 db1991dd7..3586fe4e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,7 @@ optional-dependencies.dev = [ "torchvision>=0.20.1", "ty==0.0.25", "types-requests==2.32.4.20260324", - "vulture==2.15", + "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", From 7a7940e06526c9b229827fac5f7f723af60c5eac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:33:31 +0000 Subject: [PATCH 1393/1638] Bump doccmd from 2026.3.2 to 2026.3.26.1 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.3.2 to 2026.3.26.1. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.03.02...2026.03.26.1) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.3.26.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index db1991dd7..513a02430 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", - "doccmd==2026.3.2", + "doccmd==2026.3.26.1", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 1a2265d055531fa77d2f1fc9bac585b928db6d0e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 26 Mar 2026 13:10:38 +0000 Subject: [PATCH 1394/1638] Bump doccmd to 2026.3.26.2 Made-with: Cursor --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bacd71d2a..a16fed62a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", - "doccmd==2026.3.26.1", + "doccmd==2026.3.26.2", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From b6ee9a4767b28629fd383cff5123f2bb9895cb20 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 27 Mar 2026 09:06:34 +0000 Subject: [PATCH 1395/1638] Remove getattr calls in async transport closing Add aclose to the AsyncTransport protocol and call it directly instead of using getattr to check for its existence. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/vws/async_query.py | 4 +--- src/vws/async_vumark_service.py | 4 +--- src/vws/async_vws.py | 4 +--- src/vws/transports.py | 4 ++++ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/vws/async_query.py b/src/vws/async_query.py index c229569ee..bebd3089d 100644 --- a/src/vws/async_query.py +++ b/src/vws/async_query.py @@ -64,9 +64,7 @@ def __init__( async def aclose(self) -> None: """Close the underlying transport if it supports closing.""" - close = getattr(self._transport, "aclose", None) - if close is not None: - await close() + await self._transport.aclose() async def __aenter__(self) -> Self: """Enter the async context manager.""" diff --git a/src/vws/async_vumark_service.py b/src/vws/async_vumark_service.py index a104f49c0..51c2ef349 100644 --- a/src/vws/async_vumark_service.py +++ b/src/vws/async_vumark_service.py @@ -50,9 +50,7 @@ def __init__( async def aclose(self) -> None: """Close the underlying transport if it supports closing.""" - close = getattr(self._transport, "aclose", None) - if close is not None: - await close() + await self._transport.aclose() async def __aenter__(self) -> Self: """Enter the async context manager.""" diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index feba724de..92675ac18 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -61,9 +61,7 @@ def __init__( async def aclose(self) -> None: """Close the underlying transport if it supports closing.""" - close = getattr(self._transport, "aclose", None) - if close is not None: - await close() + await self._transport.aclose() async def __aenter__(self) -> Self: """Enter the async context manager.""" diff --git a/src/vws/transports.py b/src/vws/transports.py index 6bf9ceb9e..5b2618832 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -167,6 +167,10 @@ class AsyncTransport(Protocol): and returns a ``Response``. """ + async def aclose(self) -> None: + """Close the transport and release resources.""" + ... # pylint: disable=unnecessary-ellipsis + def __call__( self, *, From 366f93ed6c3a8cd44df5609f37936c87ddfbe057 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 27 Mar 2026 09:08:05 +0000 Subject: [PATCH 1396/1638] Remove tests for transports without aclose The AsyncTransport protocol now requires aclose, so these tests for transports lacking aclose are no longer applicable. Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/test_transports.py | 65 ---------------------------------------- 1 file changed, 65 deletions(-) diff --git a/tests/test_transports.py b/tests/test_transports.py index b8a34f708..96518f163 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -6,7 +6,6 @@ import pytest import respx -from vws import AsyncCloudRecoService, AsyncVuMarkService, AsyncVWS from vws.response import Response from vws.transports import AsyncHTTPXTransport, HTTPXTransport @@ -140,67 +139,3 @@ async def test_context_manager() -> None: assert route.called assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK - - -class _NoCloseTransport: - """A minimal async transport without ``aclose``.""" - - async def __call__( # pragma: no cover - self, - *, - method: str, - url: str, - headers: dict[str, str], - data: bytes, - request_timeout: float | tuple[float, float], - ) -> Response: - """Not implemented.""" - raise NotImplementedError - - -_DUMMY_KEY = "x" - - -class TestAsyncClientAclose: - """Tests for ``aclose`` on async clients with transports that - lack ``aclose``. - """ - - @staticmethod - @pytest.mark.asyncio - async def test_vws_aclose_no_transport_aclose() -> None: - """``AsyncVWS.aclose`` works when the transport has no - ``aclose``. - """ - client = AsyncVWS( - server_access_key=_DUMMY_KEY, - server_secret_key=_DUMMY_KEY, - transport=_NoCloseTransport(), - ) - await client.aclose() - - @staticmethod - @pytest.mark.asyncio - async def test_cloud_reco_aclose_no_transport_aclose() -> None: - """``AsyncCloudRecoService.aclose`` works when the transport - has no ``aclose``. - """ - client = AsyncCloudRecoService( - client_access_key=_DUMMY_KEY, - client_secret_key=_DUMMY_KEY, - transport=_NoCloseTransport(), - ) - await client.aclose() - - @staticmethod - @pytest.mark.asyncio - async def test_vumark_aclose_no_transport_aclose() -> None: - """``AsyncVuMarkService.aclose`` works when the transport - has no ``aclose``. - """ - client = AsyncVuMarkService( - server_access_key=_DUMMY_KEY, - server_secret_key=_DUMMY_KEY, - transport=_NoCloseTransport(), - ) - await client.aclose() From 345ce5e45c509b0f53986a24df1274fcca2bea22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 10:33:11 +0000 Subject: [PATCH 1397/1638] Bump doccmd from 2026.3.26.1 to 2026.3.26.2 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.3.26.1 to 2026.3.26.2. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.03.26.1...2026.03.26.2) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.3.26.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bacd71d2a..a16fed62a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", - "doccmd==2026.3.26.1", + "doccmd==2026.3.26.2", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 3f34c30ff1a105dd5ae5ec75799650d814df4c1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 10:33:24 +0000 Subject: [PATCH 1398/1638] Bump types-requests from 2.32.4.20260324 to 2.33.0.20260327 Bumps [types-requests](https://github.com/python/typeshed) from 2.32.4.20260324 to 2.33.0.20260327. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.33.0.20260327 dependency-type: direct:development 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 bacd71d2a..f6a66a514 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "ty==0.0.25", - "types-requests==2.32.4.20260324", + "types-requests==2.33.0.20260327", "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From 15c38165958ff295f5a4b7e1944fbee4cd80a037 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 10:33:48 +0000 Subject: [PATCH 1399/1638] Bump ruff from 0.15.7 to 0.15.8 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.7 to 0.15.8. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.7...0.15.8) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bacd71d2a..05686b266 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "pytest-asyncio==1.3.0", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.7", + "ruff==0.15.8", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 7aafe9e8253a1fe5680b097e2375f763fc73197e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 10:38:55 +0000 Subject: [PATCH 1400/1638] Bump ty from 0.0.25 to 0.0.26 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.25 to 0.0.26. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.25...0.0.26) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.26 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f42f0ecfd..44b3a50c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.25", + "ty==0.0.26", "types-requests==2.33.0.20260327", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 0f813231200c0d54c16d5c25fdcac9fbd9e23d0a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 29 Mar 2026 07:40:24 +0100 Subject: [PATCH 1401/1638] Add kw_only to large frozen report and response dataclasses DatabaseSummaryReport, TargetSummaryReport, TargetRecord, and Response now require keyword arguments at construction, reducing positional argument mistakes as fields evolve. Made-with: Cursor --- src/vws/reports.py | 6 +++--- src/vws/response.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vws/reports.py b/src/vws/reports.py index 726f93b67..1767a812c 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -9,7 +9,7 @@ @beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class DatabaseSummaryReport: """A database summary report. @@ -64,7 +64,7 @@ class TargetStatuses(Enum): @beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class TargetSummaryReport: """A target summary report. @@ -101,7 +101,7 @@ def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: @beartype(conf=BeartypeConf(is_pep484_tower=True)) -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class TargetRecord: """A target record. diff --git a/src/vws/response.py b/src/vws/response.py index 71d1b9a48..d6456819e 100644 --- a/src/vws/response.py +++ b/src/vws/response.py @@ -5,7 +5,7 @@ from beartype import beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) @beartype class Response: """A response from a request.""" From bb571893ab06730b220bd1d9007a26a224b5f8e5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 29 Mar 2026 08:11:25 +0100 Subject: [PATCH 1402/1638] Add kw_only=True to remaining dataclasses in reports module TargetData, QueryResult, and TargetStatusAndRecord now match other report types and require keyword arguments at construction time. Made-with: Cursor --- src/vws/reports.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vws/reports.py b/src/vws/reports.py index 1767a812c..007a0d443 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -118,7 +118,7 @@ class TargetRecord: @beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class TargetData: """The target data optionally included with a query match.""" @@ -128,7 +128,7 @@ class TargetData: @beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class QueryResult: """One query match result. @@ -161,7 +161,7 @@ def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: @beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class TargetStatusAndRecord: """The target status and a target record. From 6a02e819de0bb1f29cb7b92bdeaf3458dcd04635 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 29 Mar 2026 08:19:46 +0100 Subject: [PATCH 1403/1638] Use shared httpx.Client in HTTPXTransport for connection pooling Co-Authored-By: Claude Opus 4.6 (1M context) --- src/vws/transports.py | 20 +++++++++++++++++++- tests/test_transports.py | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/vws/transports.py b/src/vws/transports.py index 5b2618832..33e261a2c 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -97,8 +97,26 @@ class HTTPXTransport: Use this transport for environments where ``httpx`` is preferred over ``requests``. + A single ``httpx.Client`` is reused across requests + for connection pooling. """ + def __init__(self) -> None: + """Create an ``HTTPXTransport``.""" + self._client = httpx.Client() + + def close(self) -> None: + """Close the underlying ``httpx.Client``.""" + self._client.close() + + def __enter__(self) -> Self: + """Enter the context manager.""" + return self + + def __exit__(self, *_args: object) -> None: + """Exit the context manager and close the client.""" + self.close() + def __call__( self, *, @@ -136,7 +154,7 @@ def __call__( pool=None, ) - httpx_response = httpx.request( + httpx_response = self._client.request( method=method, url=url, headers=headers, diff --git a/tests/test_transports.py b/tests/test_transports.py index 96518f163..4130859dc 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -61,6 +61,28 @@ def test_tuple_timeout() -> None: assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK + @staticmethod + @respx.mock + def test_context_manager() -> None: + """``HTTPXTransport`` can be used as a context manager.""" + route = respx.post(url="https://example.com/test").mock( + return_value=httpx.Response( + status_code=HTTPStatus.OK, + text="OK", + ), + ) + with HTTPXTransport() as transport: + response = transport( + method="POST", + url="https://example.com/test", + headers={"Content-Type": "text/plain"}, + data=b"hello", + request_timeout=30.0, + ) + assert route.called + assert isinstance(response, Response) + assert response.status_code == HTTPStatus.OK + class TestAsyncHTTPXTransport: """Tests for ``AsyncHTTPXTransport``.""" From aa13fada03f1bded33ca7a222f9c9ca89a616f78 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 29 Mar 2026 08:28:14 +0100 Subject: [PATCH 1404/1638] Add close() to Transport protocol for resource cleanup parity Co-Authored-By: Claude Opus 4.6 (1M context) --- src/vws/transports.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/vws/transports.py b/src/vws/transports.py index 33e261a2c..80aa989f3 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -18,6 +18,10 @@ class Transport(Protocol): returns a ``Response``. """ + def close(self) -> None: + """Close the transport and release resources.""" + ... # pylint: disable=unnecessary-ellipsis + def __call__( self, *, @@ -51,6 +55,13 @@ class RequestsTransport: This is the default transport. """ + def close(self) -> None: + """Close the transport. + + This is a no-op for ``RequestsTransport`` as it does not + hold persistent connections. + """ + def __call__( self, *, From 19987cba52f3b45b0bbbd9655f000b4dd90fefe5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:12:05 +0000 Subject: [PATCH 1405/1638] Bump pygments from 2.19.2 to 2.20.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.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.19.2...2.20.0) --- updated-dependencies: - dependency-name: pygments dependency-version: 2.20.0 dependency-type: direct:development 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 44b3a50c4..31318ec1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ optional-dependencies.dev = [ "prek==0.3.8", "pydocstringformatter==0.7.5", "pydocstyle==6.3", - "pygments==2.19.2", + "pygments==2.20.0", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.20.0", From 77e95b738a4de084fcd7d48e9975dee40a27c677 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 10:33:19 +0000 Subject: [PATCH 1406/1638] Bump actionlint-py from 1.7.11.24 to 1.7.12.24 Bumps [actionlint-py](https://github.com/Mateusz-Grzelinski/actionlint-py) from 1.7.11.24 to 1.7.12.24. - [Commits](https://github.com/Mateusz-Grzelinski/actionlint-py/compare/v1.7.11.24...v1.7.12.24) --- updated-dependencies: - dependency-name: actionlint-py dependency-version: 1.7.12.24 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 31318ec1e..04863aa79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "vws-auth-tools>=2024.7.12", ] optional-dependencies.dev = [ - "actionlint-py==1.7.11.24", + "actionlint-py==1.7.12.24", "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", From 296345ed53cd5c8cdf51fe0c8c6528f6ccbf5ff2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 10:33:29 +0000 Subject: [PATCH 1407/1638] Bump pyproject-fmt from 2.20.0 to 2.21.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.20.0 to 2.21.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/commits) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.21.0 dependency-type: direct:development 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 31318ec1e..61dcfd49c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", - "pyproject-fmt==2.20.0", + "pyproject-fmt==2.21.0", "pyrefly==0.58.0", "pyright==1.1.408", "pyroma==5.0.1", From 5e32e1b160a9cb082e5c9b625bea41461cbf6930 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 12:04:42 +0000 Subject: [PATCH 1408/1638] Bump mypy from 1.19.1 to 1.20.0 Bumps [mypy](https://github.com/python/mypy) from 1.19.1 to 1.20.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.19.1...v1.20.0) --- updated-dependencies: - dependency-name: mypy dependency-version: 1.20.0 dependency-type: direct:development 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 cb5765848..115e821fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", - "mypy[faster-cache]==1.19.1", + "mypy[faster-cache]==1.20.0", "mypy-strict-kwargs==2026.1.12", "prek==0.3.8", "pydocstringformatter==0.7.5", From bfa8f808bf4784b3b84daac3fdf0bd5e907044f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 12:04:53 +0000 Subject: [PATCH 1409/1638] Bump pyrefly from 0.58.0 to 0.59.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.58.0 to 0.59.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.58.0...0.59.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.59.0 dependency-type: direct:development 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 cb5765848..86f380a98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.21.0", - "pyrefly==0.58.0", + "pyrefly==0.59.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From d23a2bd9ed104dd748386eb31dc8ecac9e71d64e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 12:05:24 +0000 Subject: [PATCH 1410/1638] Bump ty from 0.0.26 to 0.0.27 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.26 to 0.0.27. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.26...0.0.27) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.27 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cb5765848..fa75711d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.26", + "ty==0.0.27", "types-requests==2.33.0.20260327", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 6f8baa0f9b465acb49b346d2c1652b8f571a1948 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 10:33:14 +0000 Subject: [PATCH 1411/1638] Bump types-requests from 2.33.0.20260327 to 2.33.0.20260402 Bumps [types-requests](https://github.com/python/typeshed) from 2.33.0.20260327 to 2.33.0.20260402. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.33.0.20260402 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5ff8857f..703d96f54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "ty==0.0.27", - "types-requests==2.33.0.20260327", + "types-requests==2.33.0.20260402", "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From c0866230cdc1e306a434cb034b56d215ad5b33b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 10:33:20 +0000 Subject: [PATCH 1412/1638] Bump pyrefly from 0.59.0 to 0.59.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.59.0 to 0.59.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.59.0...0.59.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.59.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5ff8857f..6c92b27dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.0", "pyproject-fmt==2.21.0", - "pyrefly==0.59.0", + "pyrefly==0.59.1", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From 84b1186cd519c8f16015cf5967cab8832b5272e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 10:33:13 +0000 Subject: [PATCH 1413/1638] Bump ruff from 0.15.8 to 0.15.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.8 to 0.15.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.8...0.15.9) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.9 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3f579633..d14b813f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "pytest-asyncio==1.3.0", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.8", + "ruff==0.15.9", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From f83af513e6c80fc74f5df7eae922f54ef48fbb8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 10:33:21 +0000 Subject: [PATCH 1414/1638] Bump ty from 0.0.27 to 0.0.28 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.27 to 0.0.28. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.27...0.0.28) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.28 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3f579633..6dbb19eed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.27", + "ty==0.0.28", "types-requests==2.33.0.20260402", "vulture==2.16", "vws-python-mock==2026.2.22.3", From dc7db891fdd9ac87288951e75456e29c46ee580e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 10:44:59 +0000 Subject: [PATCH 1415/1638] Bump ty from 0.0.28 to 0.0.29 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.28 to 0.0.29. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.28...0.0.29) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.29 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3301fd584..41e6c5705 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.28", + "ty==0.0.29", "types-requests==2.33.0.20260402", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 0c075b0c536e36e93ff92b07374a0b9bcbb7e0b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 10:45:16 +0000 Subject: [PATCH 1416/1638] Bump pylint-per-file-ignores from 3.2.0 to 3.2.1 Bumps [pylint-per-file-ignores](https://github.com/SAP/pylint-per-file-ignores) from 3.2.0 to 3.2.1. - [Release notes](https://github.com/SAP/pylint-per-file-ignores/releases) - [Changelog](https://github.com/SAP/pylint-per-file-ignores/blob/main/CHANGELOG.md) - [Commits](https://github.com/SAP/pylint-per-file-ignores/compare/v3.2.0...v3.2.1) --- updated-dependencies: - dependency-name: pylint-per-file-ignores dependency-version: 3.2.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3301fd584..55f05d3e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ optional-dependencies.dev = [ "pydocstyle==6.3", "pygments==2.20.0", "pylint[spelling]==4.0.5", - "pylint-per-file-ignores==3.2.0", + "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.0", "pyrefly==0.59.1", "pyright==1.1.408", From f7c77da5b377f13296bc153899169c66c25124a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 10:33:33 +0000 Subject: [PATCH 1417/1638] Bump pyrefly from 0.59.1 to 0.60.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.59.1 to 0.60.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.59.1...0.60.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.60.0 dependency-type: direct:development 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 0b1305c77..365076b83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.0", - "pyrefly==0.59.1", + "pyrefly==0.60.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.2", From e5851cd6a572b5e5312b3c72bc049581c69542bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 10:33:36 +0000 Subject: [PATCH 1418/1638] Bump pytest from 9.0.2 to 9.0.3 Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.0.2 to 9.0.3. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/9.0.2...9.0.3) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.0.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 365076b83..df335c92e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pyrefly==0.60.0", "pyright==1.1.408", "pyroma==5.0.1", - "pytest==9.0.2", + "pytest==9.0.3", "pytest-asyncio==1.3.0", "pytest-cov==7.1.0", "pyyaml==6.0.3", From 3a371017343d1da45dfaef4769728cdef51325b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 10:33:42 +0000 Subject: [PATCH 1419/1638] Bump types-requests from 2.33.0.20260402 to 2.33.0.20260408 Bumps [types-requests](https://github.com/python/typeshed) from 2.33.0.20260402 to 2.33.0.20260408. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.33.0.20260408 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 365076b83..22695e7d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "ty==0.0.29", - "types-requests==2.33.0.20260402", + "types-requests==2.33.0.20260408", "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From f077b84691f327599b59aa209e2c7662f87d3e05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:33:09 +0000 Subject: [PATCH 1420/1638] Bump pyrefly from 0.60.0 to 0.60.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.60.0 to 0.60.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.60.0...0.60.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.60.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bdd206628..c9b151a57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.0", - "pyrefly==0.60.0", + "pyrefly==0.60.1", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.3", From 84ada8afd3fe2096e735e19b9776a7153e1bb80f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:33:37 +0000 Subject: [PATCH 1421/1638] Bump ruff from 0.15.9 to 0.15.10 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.9 to 0.15.10. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.9...0.15.10) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.10 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bdd206628..c2fdf231a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "pytest-asyncio==1.3.0", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.9", + "ruff==0.15.10", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 96179178ddc62d9f7bc3361b5e24cbfa50bfe0ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:18:59 +0000 Subject: [PATCH 1422/1638] Bump zizmor from 1.23.1 to 1.24.0 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.23.1 to 1.24.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.23.1...v1.24.0) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.24.0 dependency-type: direct:development 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 902e1a658..c327239fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.23.1", + "zizmor==1.24.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From f8f341bdca8f9118da5a263c7b590dfee44f7ed3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:19:13 +0000 Subject: [PATCH 1423/1638] Bump mypy from 1.20.0 to 1.20.1 Bumps [mypy](https://github.com/python/mypy) from 1.20.0 to 1.20.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.20.0...v1.20.1) --- updated-dependencies: - dependency-name: mypy dependency-version: 1.20.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 902e1a658..42110c7ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", - "mypy[faster-cache]==1.20.0", + "mypy[faster-cache]==1.20.1", "mypy-strict-kwargs==2026.1.12", "prek==0.3.8", "pydocstringformatter==0.7.5", From fe0074318798b56ab6e7882c3b23d30a68c26a97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:19:21 +0000 Subject: [PATCH 1424/1638] Bump pyrefly from 0.60.1 to 0.60.2 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.60.1 to 0.60.2. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.60.1...0.60.2) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.60.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 902e1a658..ef20666a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.0", - "pyrefly==0.60.1", + "pyrefly==0.60.2", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.3", From 4bccb0d7926a938946d4eb6f12cd0c66a8231477 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:33:14 +0000 Subject: [PATCH 1425/1638] Bump zizmor from 1.24.0 to 1.24.1 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.24.0 to 1.24.1. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.24.0...v1.24.1) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.24.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3ecd2044a..fb7ed8c57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.24.0", + "zizmor==1.24.1", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 008af7a294206f57fb735411f48a11b31be92c83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:33:27 +0000 Subject: [PATCH 1426/1638] Bump pyproject-fmt from 2.21.0 to 2.21.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.21.0 to 2.21.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.21.0...pyproject-fmt/2.21.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.21.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3ecd2044a..e89167b86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.21.0", + "pyproject-fmt==2.21.1", "pyrefly==0.60.2", "pyright==1.1.408", "pyroma==5.0.1", From 44236a9272227b07ecb575ad3d4eedfd0a67dfb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:33:43 +0000 Subject: [PATCH 1427/1638] Bump prek from 0.3.8 to 0.3.9 Bumps [prek](https://github.com/j178/prek) from 0.3.8 to 0.3.9. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.8...v0.3.9) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.9 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3ecd2044a..ec7b92028 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.20.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.8", + "prek==0.3.9", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From 22d16657f986de404f8b15a34c46ef943903d779 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:39:11 +0000 Subject: [PATCH 1428/1638] Bump pyrefly from 0.60.2 to 0.61.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.60.2 to 0.61.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.60.2...0.61.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.61.0 dependency-type: direct:development 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 8ea78d85c..e385056e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.1", - "pyrefly==0.60.2", + "pyrefly==0.61.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.3", From 76496991445fe18a6cddb97a199401b9f4634974 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 10:33:30 +0000 Subject: [PATCH 1429/1638] Bump ty from 0.0.29 to 0.0.30 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.29 to 0.0.30. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.29...0.0.30) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.30 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e385056e9..3bde23295 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.29", + "ty==0.0.30", "types-requests==2.33.0.20260408", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 04c02033c41e6655c65c67c0b8dafeca69631bae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 10:33:27 +0000 Subject: [PATCH 1430/1638] Bump ty from 0.0.30 to 0.0.31 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.30 to 0.0.31. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.30...0.0.31) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.31 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3bde23295..5fb095f64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.30", + "ty==0.0.31", "types-requests==2.33.0.20260408", "vulture==2.16", "vws-python-mock==2026.2.22.3", From b47ad334e6d8a8859a5a3dffed7bd0b88b6a5756 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 10:33:33 +0000 Subject: [PATCH 1431/1638] Bump ruff from 0.15.10 to 0.15.11 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.10 to 0.15.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/0.15.10...0.15.11) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.11 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5fb095f64..41895f733 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ optional-dependencies.dev = [ "pytest-asyncio==1.3.0", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.10", + "ruff==0.15.11", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From b748867534c28948ddae3d8e7255bb71dc782bd4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 19 Apr 2026 08:01:36 +0100 Subject: [PATCH 1432/1638] chore: rename deptry pep621_dev_dependency_groups Use optional_dependencies_dev_groups (deptry 0.25+). Made-with: Cursor --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 41895f733..6d5ce09a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -285,7 +285,7 @@ ignore = [ ] [tool.deptry] -pep621_dev_dependency_groups = [ +optional_dependencies_dev_groups = [ "dev", "release", ] From 010d63e6553d258f115a3d53a5e9fdbf251b58f9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 19 Apr 2026 09:57:00 +0100 Subject: [PATCH 1433/1638] Use pytest-beartype-tests plugin for test beartype Replace manual pytest_collection_modifyitems hooks with the https://github.com/adamtheturtle/pytest-beartype-tests dev dependency. --- conftest.py | 9 --------- pyproject.toml | 5 ++++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/conftest.py b/conftest.py index d9e955107..8e5442cf0 100644 --- a/conftest.py +++ b/conftest.py @@ -7,7 +7,6 @@ from pathlib import Path import pytest -from beartype import beartype from mock_vws import MockVWS from mock_vws.database import CloudDatabase from sybil import Sybil @@ -18,14 +17,6 @@ ) -@beartype -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.fixture(name="make_image_file") def fixture_make_image_file( *, diff --git a/pyproject.toml b/pyproject.toml index 6d5ce09a7..26fc3d821 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,6 +88,7 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.24.1", + "pytest-beartype-tests==2026.4.19.1", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" @@ -364,7 +365,6 @@ ignore_names = [ "HTTPXTransport", # pytest configuration "pytest_collect_file", - "pytest_collection_modifyitems", "pytest_plugins", # pytest fixtures - we name fixtures like this for this purpose "fixture_*", @@ -402,3 +402,6 @@ exclude = [ ".venv" ] [tool.yamlfix] section_whitelines = 1 whitelines = 1 + +[dependency-groups] +dev = [] From e86ba237f4a5e5ac8bb1a8a08b0ac042513107c6 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 Apr 2026 08:58:11 +0000 Subject: [PATCH 1434/1638] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 26fc3d821..c9aadf7e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ optional-dependencies.dev = [ "pyroma==5.0.1", "pytest==9.0.3", "pytest-asyncio==1.3.0", + "pytest-beartype-tests==2026.4.19.1", "pytest-cov==7.1.0", "pyyaml==6.0.3", "ruff==0.15.11", @@ -88,12 +89,14 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.24.1", - "pytest-beartype-tests==2026.4.19.1", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" urls.Source = "https://github.com/VWS-Python/vws-python" +[dependency-groups] +dev = [] + [tool.setuptools] zip-safe = false package-data.vws = [ @@ -402,6 +405,3 @@ exclude = [ ".venv" ] [tool.yamlfix] section_whitelines = 1 whitelines = 1 - -[dependency-groups] -dev = [] From 95b5a4695bc73defb4aa66bdc4e184b538d35e1f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 19 Apr 2026 10:12:02 +0100 Subject: [PATCH 1435/1638] Pin pytest-beartype-tests to git revision (Sybil-safe) Use git+https dependency until the next PyPI release includes https://github.com/adamtheturtle/pytest-beartype-tests/commit/bc81d99. --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c9aadf7e0..933b59d4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pyroma==5.0.1", "pytest==9.0.3", "pytest-asyncio==1.3.0", - "pytest-beartype-tests==2026.4.19.1", + "pytest-beartype-tests", "pytest-cov==7.1.0", "pyyaml==6.0.3", "ruff==0.15.11", @@ -118,6 +118,7 @@ bdist_wheel.universal = true version_scheme = "post-release" [tool.uv] +sources.pytest-beartype-tests = { git = "https://github.com/adamtheturtle/pytest-beartype-tests.git", rev = "bc81d99" } sources.torch = { index = "pytorch-cpu" } sources.torchvision = { index = "pytorch-cpu" } index = [ { name = "pytorch-cpu", url = "https://download.pytorch.org/whl/cpu", explicit = true } ] From 3971dc4e5165e73b5db30d0094cab8201377e277 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 20 Apr 2026 07:39:32 +0100 Subject: [PATCH 1436/1638] Pin pytest-beartype-tests to 2026.4.20 on PyPI Replace the temporary [tool.uv.sources] git pin to bc81d99 with the published wheel on PyPI (same Sybil-safe plugin behavior). Made-with: Cursor --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 933b59d4f..85e5e27b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pyroma==5.0.1", "pytest==9.0.3", "pytest-asyncio==1.3.0", - "pytest-beartype-tests", + "pytest-beartype-tests==2026.4.20", "pytest-cov==7.1.0", "pyyaml==6.0.3", "ruff==0.15.11", @@ -118,7 +118,6 @@ bdist_wheel.universal = true version_scheme = "post-release" [tool.uv] -sources.pytest-beartype-tests = { git = "https://github.com/adamtheturtle/pytest-beartype-tests.git", rev = "bc81d99" } sources.torch = { index = "pytorch-cpu" } sources.torchvision = { index = "pytorch-cpu" } index = [ { name = "pytorch-cpu", url = "https://download.pytorch.org/whl/cpu", explicit = true } ] From ca8827131cf8607833295f0cfb7edc34f3247ed0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:02:35 +0000 Subject: [PATCH 1437/1638] Bump pyrefly from 0.61.0 to 0.61.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.61.0 to 0.61.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.61.0...0.61.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.61.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 933b59d4f..f24946ba7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.1", - "pyrefly==0.61.0", + "pyrefly==0.61.1", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.3", From 40116be25f171497ef5c646da775f08896a5027e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 10:33:36 +0000 Subject: [PATCH 1438/1638] Bump ty from 0.0.31 to 0.0.32 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.31 to 0.0.32. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.31...0.0.32) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.32 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 18b22d9d5..4961f4219 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.31", + "ty==0.0.32", "types-requests==2.33.0.20260408", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 62b944ce13d610217d866062bf15fae7b3b8a235 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 10:33:50 +0000 Subject: [PATCH 1439/1638] Bump pyrefly from 0.61.1 to 0.62.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.61.1 to 0.62.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.61.1...0.62.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.62.0 dependency-type: direct:development 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 18b22d9d5..acc13f1d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.1", - "pyrefly==0.61.1", + "pyrefly==0.62.0", "pyright==1.1.408", "pyroma==5.0.1", "pytest==9.0.3", From 8bc059813809015bc2ac2808f8e92fe0188d523a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 22 Apr 2026 08:36:13 +0100 Subject: [PATCH 1440/1638] chore: define uv version once in pre-commit config Made-with: Cursor --- .pre-commit-config.yaml | 74 +++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c64693b9d..6473e04a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,8 @@ --- fail_fast: true +.uv_version: &uv_version uv==0.9.5 + # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks @@ -101,7 +103,7 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: pydocstringformatter @@ -109,7 +111,7 @@ repos: entry: uv run --extra=dev pydocstringformatter language: python types_or: [python] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: shellcheck @@ -117,7 +119,7 @@ repos: entry: uv run --extra=dev shellcheck --shell=bash language: python types_or: [shell] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: shellcheck-docs @@ -126,7 +128,7 @@ repos: --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: shfmt @@ -134,7 +136,7 @@ repos: entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: shfmt-docs @@ -143,7 +145,7 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: mypy @@ -153,7 +155,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] # We do not use --example-workers 0 due to https://github.com/python/mypy/issues/18283 - id: mypy-docs @@ -162,7 +164,7 @@ repos: entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: check-manifest name: check-manifest @@ -170,7 +172,7 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: pyright name: pyright @@ -179,7 +181,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: pyright-docs name: pyright-docs @@ -188,7 +190,7 @@ repos: --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: vulture name: vulture @@ -196,7 +198,7 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: vulture-docs @@ -205,7 +207,7 @@ repos: --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: pyroma @@ -214,7 +216,7 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: deptry @@ -222,7 +224,7 @@ repos: entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: pylint @@ -231,7 +233,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: pylint-docs name: pylint-docs @@ -240,14 +242,14 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: ruff-check-fix-docs @@ -255,7 +257,7 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: ruff-format-fix @@ -263,7 +265,7 @@ repos: entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: ruff-format-fix-docs @@ -272,7 +274,7 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: doc8 @@ -280,7 +282,7 @@ repos: entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: interrogate @@ -288,7 +290,7 @@ repos: entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: interrogate-docs @@ -297,7 +299,7 @@ repos: --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: pyproject-fmt-fix @@ -306,7 +308,7 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: linkcheck @@ -317,7 +319,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: spelling name: spelling @@ -327,7 +329,7 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: docs name: Build Documentation @@ -335,7 +337,7 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: pyright-verifytypes name: pyright-verifytypes @@ -344,7 +346,7 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: ty name: ty @@ -353,7 +355,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: ty-docs name: ty-docs @@ -362,14 +364,14 @@ repos: --command="ty check" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: zizmor @@ -378,7 +380,7 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: sphinx-lint @@ -386,7 +388,7 @@ repos: entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long language: python types_or: [rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] stages: [pre-commit] - id: pyrefly @@ -396,7 +398,7 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] - id: pyrefly-docs name: pyrefly-docs @@ -405,4 +407,4 @@ repos: --command="pyrefly check" language: python types_or: [markdown, rst] - additional_dependencies: [uv==0.9.5] + additional_dependencies: [*uv_version] From e5d0f676a8cbc1d2856a748b797795481877df56 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 Apr 2026 07:37:10 +0000 Subject: [PATCH 1441/1638] [pre-commit.ci lite] apply automatic fixes --- .pre-commit-config.yaml | 108 ++++++++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 36 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6473e04a0..2156fa8e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -103,7 +103,8 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: pydocstringformatter @@ -111,7 +112,8 @@ repos: entry: uv run --extra=dev pydocstringformatter language: python types_or: [python] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: shellcheck @@ -119,7 +121,8 @@ repos: entry: uv run --extra=dev shellcheck --shell=bash language: python types_or: [shell] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: shellcheck-docs @@ -128,7 +131,8 @@ repos: --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: shfmt @@ -136,7 +140,8 @@ repos: entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 language: python types_or: [shell] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: shfmt-docs @@ -145,7 +150,8 @@ repos: --no-pad-file --command="shfmt --write --space-redirects --indent=4" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: mypy @@ -155,7 +161,8 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version # We do not use --example-workers 0 due to https://github.com/python/mypy/issues/18283 - id: mypy-docs @@ -164,7 +171,8 @@ repos: entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: check-manifest name: check-manifest @@ -172,7 +180,8 @@ repos: entry: uv run --extra=dev -m check_manifest language: python pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: pyright name: pyright @@ -181,7 +190,8 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: pyright-docs name: pyright-docs @@ -190,7 +200,8 @@ repos: --command="pyright" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: vulture name: vulture @@ -198,7 +209,8 @@ repos: language: python types_or: [python] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: vulture-docs @@ -207,7 +219,8 @@ repos: --command="vulture" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: pyroma @@ -216,7 +229,8 @@ repos: language: python pass_filenames: false types_or: [toml] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: deptry @@ -224,7 +238,8 @@ repos: entry: uv run --extra=dev -m deptry src/ language: python pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: pylint @@ -233,7 +248,8 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: pylint-docs name: pylint-docs @@ -242,14 +258,16 @@ repos: language: python stages: [manual] types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix language: python types_or: [python] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: ruff-check-fix-docs @@ -257,7 +275,8 @@ repos: entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: ruff-format-fix @@ -265,7 +284,8 @@ repos: entry: uv run --extra=dev -m ruff format language: python types_or: [python] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: ruff-format-fix-docs @@ -274,7 +294,8 @@ repos: format" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: doc8 @@ -282,7 +303,8 @@ repos: entry: uv run --extra=dev -m doc8 language: python types_or: [rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: interrogate @@ -290,7 +312,8 @@ repos: entry: uv run --extra=dev -m interrogate language: python types_or: [python] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: interrogate-docs @@ -299,7 +322,8 @@ repos: --command="interrogate" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: pyproject-fmt-fix @@ -308,7 +332,8 @@ repos: language: python types_or: [toml] files: pyproject.toml - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: linkcheck @@ -319,7 +344,8 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: spelling name: spelling @@ -329,7 +355,8 @@ repos: types_or: [rst] stages: [manual] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: docs name: Build Documentation @@ -337,7 +364,8 @@ repos: language: python stages: [manual] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: pyright-verifytypes name: pyright-verifytypes @@ -346,7 +374,8 @@ repos: language: python pass_filenames: false types_or: [python] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: ty name: ty @@ -355,7 +384,8 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: ty-docs name: ty-docs @@ -364,14 +394,16 @@ repos: --command="ty check" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: yamlfix name: yamlfix entry: uv run --extra=dev yamlfix language: python types_or: [yaml] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: zizmor @@ -380,7 +412,8 @@ repos: language: python pass_filenames: false types_or: [yaml] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: sphinx-lint @@ -388,7 +421,8 @@ repos: entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long language: python types_or: [rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version stages: [pre-commit] - id: pyrefly @@ -398,7 +432,8 @@ repos: language: python types_or: [python, toml] pass_filenames: false - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version - id: pyrefly-docs name: pyrefly-docs @@ -407,4 +442,5 @@ repos: --command="pyrefly check" language: python types_or: [markdown, rst] - additional_dependencies: [*uv_version] + additional_dependencies: + - *uv_version From 7d62b772aae713cf4d0a537141934175033f5736 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 10:33:06 +0000 Subject: [PATCH 1442/1638] Bump prek from 0.3.9 to 0.3.10 Bumps [prek](https://github.com/j178/prek) from 0.3.9 to 0.3.10. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.9...v0.3.10) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.10 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 565d570c0..61b2ed868 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.20.1", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.9", + "prek==0.3.10", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From aecefb0f990c50f42d95961da3685004847c2875 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 10:33:18 +0000 Subject: [PATCH 1443/1638] Bump mypy from 1.20.1 to 1.20.2 Bumps [mypy](https://github.com/python/mypy) from 1.20.1 to 1.20.2. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.20.1...v1.20.2) --- updated-dependencies: - dependency-name: mypy dependency-version: 1.20.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 565d570c0..55476541d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", - "mypy[faster-cache]==1.20.1", + "mypy[faster-cache]==1.20.2", "mypy-strict-kwargs==2026.1.12", "prek==0.3.9", "pydocstringformatter==0.7.5", From c5dc6e33bb4b734ea470bf47ea6ba459e87894f0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 22 Apr 2026 10:58:05 +0100 Subject: [PATCH 1444/1638] chore: bump uv to 0.11.7 for pre-commit hooks Made-with: Cursor --- .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 2156fa8e7..d4049620e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- fail_fast: true -.uv_version: &uv_version uv==0.9.5 +.uv_version: &uv_version uv==0.11.7 # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks From fbe5c2f6214076ae392b52bd766e8617bf4abbb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 10:33:30 +0000 Subject: [PATCH 1445/1638] Bump pyright from 1.1.408 to 1.1.409 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.408 to 1.1.409. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.408...v1.1.409) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.409 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c5a25761..8c2f8c3cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.1", "pyrefly==0.62.0", - "pyright==1.1.408", + "pyright==1.1.409", "pyroma==5.0.1", "pytest==9.0.3", "pytest-asyncio==1.3.0", From 2b961f049cb54d5a39ce7214b0644563fbf57701 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 12:19:06 +0000 Subject: [PATCH 1446/1638] Bump prek from 0.3.10 to 0.3.11 Bumps [prek](https://github.com/j178/prek) from 0.3.10 to 0.3.11. - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.10...v0.3.11) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.11 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8c2f8c3cf..96a7037d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.20.2", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.10", + "prek==0.3.11", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From 21531d05eac3a9f835494fbcb0b7978ba66d0f60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 12:19:24 +0000 Subject: [PATCH 1447/1638] Bump ruff from 0.15.11 to 0.15.12 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.11 to 0.15.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/0.15.11...0.15.12) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.12 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8c2f8c3cf..8d5428105 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.20", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.11", + "ruff==0.15.12", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 28fdd562222c60c33b6d5a707d3887d596b1682e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 12:19:46 +0000 Subject: [PATCH 1448/1638] Bump pytest-beartype-tests from 2026.4.20 to 2026.4.26 Bumps [pytest-beartype-tests](https://github.com/adamtheturtle/pytest-beartype-tests) from 2026.4.20 to 2026.4.26. - [Release notes](https://github.com/adamtheturtle/pytest-beartype-tests/releases) - [Changelog](https://github.com/adamtheturtle/pytest-beartype-tests/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/pytest-beartype-tests/compare/2026.04.20...2026.04.26) --- updated-dependencies: - dependency-name: pytest-beartype-tests dependency-version: 2026.4.26 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8c2f8c3cf..58a9757cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ optional-dependencies.dev = [ "pyroma==5.0.1", "pytest==9.0.3", "pytest-asyncio==1.3.0", - "pytest-beartype-tests==2026.4.20", + "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", "ruff==0.15.11", From 98a859980d66e38b3120930ca984afe234743cc5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:33:27 +0000 Subject: [PATCH 1449/1638] Bump pyrefly from 0.62.0 to 0.63.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.62.0 to 0.63.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.62.0...0.63.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.63.0 dependency-type: direct:development 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 bdded3a1e..d4e6375a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.1", - "pyrefly==0.62.0", + "pyrefly==0.63.0", "pyright==1.1.409", "pyroma==5.0.1", "pytest==9.0.3", From 8d5e63b4cb308230d3156ef7115e59295e057a97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 10:33:36 +0000 Subject: [PATCH 1450/1638] chore(deps-dev): Bump ty from 0.0.32 to 0.0.33 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.32 to 0.0.33. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.32...0.0.33) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.33 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d4e6375a2..48cd70582 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.32", + "ty==0.0.33", "types-requests==2.33.0.20260408", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 08c4c618d523cddab2f7ba487265719be29a17a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 10:33:51 +0000 Subject: [PATCH 1451/1638] chore(deps-dev): Bump pyrefly from 0.63.0 to 0.63.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.63.0 to 0.63.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.63.0...0.63.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.63.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d4e6375a2..1ce589858 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.1", - "pyrefly==0.63.0", + "pyrefly==0.63.1", "pyright==1.1.409", "pyroma==5.0.1", "pytest==9.0.3", From 35b7d4d86e7620bea75e2c56ea967dc2b73c7a61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 12:49:22 +0000 Subject: [PATCH 1452/1638] chore(deps-dev): Bump types-requests Bumps [types-requests](https://github.com/python/typeshed) from 2.33.0.20260408 to 2.33.0.20260503. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.33.0.20260503 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3f220632a..c34ae086b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "ty==0.0.33", - "types-requests==2.33.0.20260408", + "types-requests==2.33.0.20260503", "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From 307fb2f939a2a1b2425cdafe407f9025a80e2491 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 10:33:44 +0000 Subject: [PATCH 1453/1638] chore(deps-dev): Bump prek from 0.3.11 to 0.3.12 Bumps [prek](https://github.com/j178/prek) from 0.3.11 to 0.3.12. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.11...v0.3.12) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.12 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c34ae086b..f6d452e30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.20.2", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.11", + "prek==0.3.12", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From ea65ffd9114014eff42cd8a83680b053fb4c1b25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 10:34:00 +0000 Subject: [PATCH 1454/1638] chore(deps-dev): Bump pyproject-fmt from 2.21.1 to 2.21.2 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.21.1 to 2.21.2. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.21.1...pyproject-fmt/2.21.2) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.21.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c34ae086b..f9718d50a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.21.1", + "pyproject-fmt==2.21.2", "pyrefly==0.63.1", "pyright==1.1.409", "pyroma==5.0.1", From 9e2f5e971686169d749f56fe6cc3e9e04ecc1601 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 10:39:17 +0000 Subject: [PATCH 1455/1638] chore(deps-dev): Bump ty from 0.0.33 to 0.0.34 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.33 to 0.0.34. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.33...0.0.34) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.34 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e20d3e320..38e0ae68a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.33", + "ty==0.0.34", "types-requests==2.33.0.20260503", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 7ee74516e064727643c031829fd201297b5e424a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 10:33:52 +0000 Subject: [PATCH 1456/1638] chore(deps-dev): Bump prek from 0.3.12 to 0.3.13 Bumps [prek](https://github.com/j178/prek) from 0.3.12 to 0.3.13. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.12...v0.3.13) --- updated-dependencies: - dependency-name: prek dependency-version: 0.3.13 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 38e0ae68a..358a62a72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.20.2", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.12", + "prek==0.3.13", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From 88f76df85bcd690c657cb41bcbb7e8b13dd7350f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 6 May 2026 19:16:00 +0100 Subject: [PATCH 1457/1638] ci: bump astral-sh/setup-uv from v7 to v8.1.0 Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bec50283..3bd4f560c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c6f0c8074..f1ed8e80e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d0e5b258..a723a2b4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' From 24d64e9a7b66e38d1fcf3c865684f4b39f0bf293 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 10:32:18 +0000 Subject: [PATCH 1458/1638] chore(deps-dev): Bump doccmd from 2026.3.26.2 to 2026.5.6 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.3.26.2 to 2026.5.6. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.03.26.2...2026.05.06) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.5.6 dependency-type: direct:development 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 358a62a72..746dd24df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", - "doccmd==2026.3.26.2", + "doccmd==2026.5.6", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From ea627c796caef92a3bc7703c92b2af4fc959716b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 10:32:23 +0000 Subject: [PATCH 1459/1638] chore(deps-dev): Bump mypy from 1.20.2 to 2.0.0 Bumps [mypy](https://github.com/python/mypy) from 1.20.2 to 2.0.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.20.2...v2.0.0) --- updated-dependencies: - dependency-name: mypy dependency-version: 2.0.0 dependency-type: direct:development 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 358a62a72..f60ff4280 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", - "mypy[faster-cache]==1.20.2", + "mypy[faster-cache]==2.0.0", "mypy-strict-kwargs==2026.1.12", "prek==0.3.13", "pydocstringformatter==0.7.5", From a5038dafd9b1ede4113aff01dffcf4f18ce278ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 10:32:30 +0000 Subject: [PATCH 1460/1638] chore(deps-dev): Bump pyrefly from 0.63.1 to 0.64.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.63.1 to 0.64.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.63.1...0.64.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.64.0 dependency-type: direct:development 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 358a62a72..cce5c8e26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.2", - "pyrefly==0.63.1", + "pyrefly==0.64.0", "pyright==1.1.409", "pyroma==5.0.1", "pytest==9.0.3", From df725392015744f577e1cf483875df44f7e97ef3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 7 May 2026 12:10:42 +0100 Subject: [PATCH 1461/1638] Bump mypy dependency to 2.0.0. Align static type-checker versioning with the mypy 2 baseline for consistent behavior across local and CI runs. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 358a62a72..f60ff4280 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", - "mypy[faster-cache]==1.20.2", + "mypy[faster-cache]==2.0.0", "mypy-strict-kwargs==2026.1.12", "prek==0.3.13", "pydocstringformatter==0.7.5", From 15aef7d5e5a593340e9cc83caa7e2e96aa1e0eb7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 7 May 2026 13:10:16 +0100 Subject: [PATCH 1462/1638] Enable mypy parallel workers in pre-commit. Co-authored-by: Cursor --- .pre-commit-config.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2156fa8e7..9cc02b74d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -157,7 +157,7 @@ repos: - id: mypy name: mypy stages: [pre-push] - entry: uv run --extra=dev -m mypy + entry: uv run --extra=dev -m mypy --num-workers=4 language: python types_or: [python, toml] pass_filenames: false @@ -168,7 +168,8 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy + --num-workers=4" language: python types_or: [markdown, rst] additional_dependencies: From 49550db9bc56660a217b44ba073b9c39a3281f3d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 7 May 2026 13:32:35 +0100 Subject: [PATCH 1463/1638] Normalize mypy docs pre-commit worker flag style. Keep `mypy-docs` aligned with `mypy` by keeping `--num-workers=4` inline in the mypy command argument. Co-authored-by: Cursor --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9cc02b74d..0a0debcf6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -168,8 +168,8 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy - --num-workers=4" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python + args: [--command=mypy --num-workers=4] language: python types_or: [markdown, rst] additional_dependencies: From 2d87cce6d3703693764cc923f869fed20596044a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 7 May 2026 13:35:45 +0100 Subject: [PATCH 1464/1638] Inline mypy-docs command to keep worker flags together. Co-authored-by: Cursor --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a0debcf6..9cc02b74d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -168,8 +168,8 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python - args: [--command=mypy --num-workers=4] + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy + --num-workers=4" language: python types_or: [markdown, rst] additional_dependencies: From ce7098fe9944232ee31780c6b95850efb91f8e65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 10:33:11 +0000 Subject: [PATCH 1465/1638] chore(deps-dev): Bump pyrefly from 0.64.0 to 0.64.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.64.0 to 0.64.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.64.0...0.64.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 0.64.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3be79ba9a..0aa576518 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.2", - "pyrefly==0.64.0", + "pyrefly==0.64.1", "pyright==1.1.409", "pyroma==5.0.1", "pytest==9.0.3", From 1c713fc99acd0d4eb03133ecd7fc9f1a9eaa8879 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 10:33:27 +0000 Subject: [PATCH 1466/1638] chore(deps-dev): Bump types-requests Bumps [types-requests](https://github.com/python/typeshed) from 2.33.0.20260503 to 2.33.0.20260508. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.33.0.20260508 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3be79ba9a..1e9e8fac7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "ty==0.0.34", - "types-requests==2.33.0.20260503", + "types-requests==2.33.0.20260508", "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From 7611cc4e81264e770dfd52b5045360200156a79e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 16:17:57 +0000 Subject: [PATCH 1467/1638] chore(deps-dev): Bump ty from 0.0.34 to 0.0.35 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.34 to 0.0.35. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.34...0.0.35) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.35 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 41edec51b..ec0655f66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.34", + "ty==0.0.35", "types-requests==2.33.0.20260508", "vulture==2.16", "vws-python-mock==2026.2.22.3", From e2985b2af831e83479f1a0c69b10280b041ad876 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 16:35:27 +0000 Subject: [PATCH 1468/1638] chore(deps-dev): Bump mypy from 2.0.0 to 2.1.0 Bumps [mypy](https://github.com/python/mypy) from 2.0.0 to 2.1.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v2.0.0...v2.1.0) --- updated-dependencies: - dependency-name: mypy dependency-version: 2.1.0 dependency-type: direct:development 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 ec0655f66..c2a74f0fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", - "mypy[faster-cache]==2.0.0", + "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.1.12", "prek==0.3.13", "pydocstringformatter==0.7.5", From 5d4b2456c9d5b293a994cd04bd914752377f92e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 10:38:23 +0000 Subject: [PATCH 1469/1638] chore(deps-dev): Bump shfmt-py from 3.12.0.2 to 4.0.0 Bumps [shfmt-py](https://github.com/maxwinterstein/shfmt-py) from 3.12.0.2 to 4.0.0. - [Release notes](https://github.com/maxwinterstein/shfmt-py/releases) - [Commits](https://github.com/maxwinterstein/shfmt-py/commits/v4.0.0) --- updated-dependencies: - dependency-name: shfmt-py dependency-version: 4.0.0 dependency-type: direct:development 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 c2a74f0fa..92408f02e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. "shellcheck-py==0.11.0.1", - "shfmt-py==3.12.0.2", + "shfmt-py==4.0.0", "sphinx==9.1.0", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", From 17de68e292905152e02fa7cf3f08434ccb319372 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 10:38:30 +0000 Subject: [PATCH 1470/1638] chore(deps-dev): Bump pyrefly from 0.64.1 to 1.0.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 0.64.1 to 1.0.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.64.1...1.0.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 1.0.0 dependency-type: direct:development 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 c2a74f0fa..c16617077 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.2", - "pyrefly==0.64.1", + "pyrefly==1.0.0", "pyright==1.1.409", "pyroma==5.0.1", "pytest==9.0.3", From cd3c310660607dbe684653649a9cfd36707ef1bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 10:38:38 +0000 Subject: [PATCH 1471/1638] chore(deps-dev): Bump types-requests Bumps [types-requests](https://github.com/python/typeshed) from 2.33.0.20260508 to 2.33.0.20260513. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.33.0.20260513 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c2a74f0fa..975df99d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "ty==0.0.35", - "types-requests==2.33.0.20260508", + "types-requests==2.33.0.20260513", "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From 4fff0d8f6ff70f3535ca60911e5e02136936693b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 10:34:26 +0000 Subject: [PATCH 1472/1638] chore(deps-dev): Bump zizmor from 1.24.1 to 1.25.0 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.24.1 to 1.25.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.24.1...v1.25.0) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.25.0 dependency-type: direct:development 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 47c26d82e..57bf426df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.24.1", + "zizmor==1.25.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From c4390385f59d0da98170bdae4eb07794ec1badc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 10:34:36 +0000 Subject: [PATCH 1473/1638] chore(deps-dev): Bump prek from 0.3.13 to 0.4.0 Bumps [prek](https://github.com/j178/prek) from 0.3.13 to 0.4.0. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.3.13...v0.4.0) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.0 dependency-type: direct:development 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 47c26d82e..79688dac5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.1.12", - "prek==0.3.13", + "prek==0.4.0", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From 447227c3b8aef1208f14e2fa45acdf29fae91f97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 10:34:56 +0000 Subject: [PATCH 1474/1638] chore(deps-dev): Bump ruff from 0.15.12 to 0.15.13 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.12 to 0.15.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/0.15.12...0.15.13) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.13 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 47c26d82e..99d7acdcd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.12", + "ruff==0.15.13", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 4521c6fd2dec1fbf60a1a894b607c63288c005c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 10:35:16 +0000 Subject: [PATCH 1475/1638] chore(deps-dev): Bump ty from 0.0.35 to 0.0.36 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.35 to 0.0.36. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.35...0.0.36) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.36 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 47c26d82e..fac7d53c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.35", + "ty==0.0.36", "types-requests==2.33.0.20260513", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 7f27d1b88987e8e1390f95a5748056c3a13a190a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 18 May 2026 14:13:05 +0100 Subject: [PATCH 1476/1638] Add strict-kwargs as a local pre-commit hook (dev dependency) --- .pre-commit-config.yaml | 12 ++++++++++++ pyproject.toml | 1 + 2 files changed, 13 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 27537657d..97b912cf0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,7 @@ ci: skip: - actionlint - sphinx-lint + - strict-kwargs-fix - check-manifest - deptry - doc8 @@ -299,6 +300,17 @@ repos: - *uv_version stages: [pre-commit] + + - id: strict-kwargs-fix + name: strict-kwargs + entry: uv run --extra=dev strict-kwargs fix + language: python + types_or: [python] + additional_dependencies: + - *uv_version + stages: [pre-commit] + require_serial: true + - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 diff --git a/pyproject.toml b/pyproject.toml index 6d5c70d40..87bb8c9a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,6 +82,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", + "strict-kwargs==2026.5.18", "ty==0.0.36", "types-requests==2.33.0.20260513", "vulture==2.16", From 31a429ac376ca152b109e1a567611995df23a42e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 18 May 2026 15:12:40 +0100 Subject: [PATCH 1477/1638] Fix strict-kwargs dev dependency alphabetical order --- pyproject.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 87bb8c9a9..c0cdf9227 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,8 +38,7 @@ dependencies = [ "urllib3>=2.2.3", "vws-auth-tools>=2024.7.12", ] -optional-dependencies.dev = [ - "actionlint-py==1.7.12.24", +optional-dependencies.dev = [ "actionlint-py==1.7.12.24", "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", @@ -76,13 +75,13 @@ optional-dependencies.dev = [ "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", + "strict-kwargs==2026.5.18", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "strict-kwargs==2026.5.18", "ty==0.0.36", "types-requests==2.33.0.20260513", "vulture==2.16", From a6f265886d62df9de9c765669cb109de7d1a02f4 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, 18 May 2026 14:13:41 +0000 Subject: [PATCH 1478/1638] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c0cdf9227..8a024a537 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,8 @@ dependencies = [ "urllib3>=2.2.3", "vws-auth-tools>=2024.7.12", ] -optional-dependencies.dev = [ "actionlint-py==1.7.12.24", +optional-dependencies.dev = [ + "actionlint-py==1.7.12.24", "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", From 96d519cba92d26afb9d535a5c17b0063a9bfd8d1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 18 May 2026 15:14:21 +0100 Subject: [PATCH 1479/1638] Fix strict-kwargs dev dependency alphabetical order --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8a024a537..c0cdf9227 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,8 +38,7 @@ dependencies = [ "urllib3>=2.2.3", "vws-auth-tools>=2024.7.12", ] -optional-dependencies.dev = [ - "actionlint-py==1.7.12.24", +optional-dependencies.dev = [ "actionlint-py==1.7.12.24", "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", From ec2d44beef61fc928e04a056068a7e65640f8824 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, 18 May 2026 14:17:36 +0000 Subject: [PATCH 1480/1638] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c0cdf9227..8a024a537 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,8 @@ dependencies = [ "urllib3>=2.2.3", "vws-auth-tools>=2024.7.12", ] -optional-dependencies.dev = [ "actionlint-py==1.7.12.24", +optional-dependencies.dev = [ + "actionlint-py==1.7.12.24", "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", From ec23d71bc6c0fb0931b2282d01ad9f551cedcde1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 18 May 2026 15:19:53 +0100 Subject: [PATCH 1481/1638] Fix malformed dev dependencies list in pyproject.toml --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 8a024a537..9c93fabec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,6 +90,7 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.25.0", + ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 06df3802c04a9acdd6a7c3c309e772e6941e90d7 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, 18 May 2026 14:21:32 +0000 Subject: [PATCH 1482/1638] [pre-commit.ci lite] apply automatic fixes --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9c93fabec..8a024a537 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,7 +90,6 @@ optional-dependencies.dev = [ "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.25.0", - ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 9aa039f25b71b6c1d2879c41442c93e43f229524 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 18 May 2026 15:49:18 +0100 Subject: [PATCH 1483/1638] Bump strict-kwargs to 2026.5.18.post1 and revert Python changes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8a024a537..453c885c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", - "strict-kwargs==2026.5.18", + "strict-kwargs==2026.5.18.post1", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. From 287d91c78bc7712b10f7b4bd2e7f87d7c05ed4a3 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, 18 May 2026 14:50:22 +0000 Subject: [PATCH 1484/1638] [pre-commit.ci lite] apply automatic fixes --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 97b912cf0..31eea11f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -300,7 +300,6 @@ repos: - *uv_version stages: [pre-commit] - - id: strict-kwargs-fix name: strict-kwargs entry: uv run --extra=dev strict-kwargs fix From fa35c296cd83b5407ece0a503e3658b2e184442a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 19:32:37 +0000 Subject: [PATCH 1485/1638] chore(deps-dev): Bump strict-kwargs Bumps [strict-kwargs](https://github.com/adamtheturtle/strict-kwargs) from 2026.5.18.post1 to 2026.5.18.post3. - [Release notes](https://github.com/adamtheturtle/strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/strict-kwargs/compare/2026.5.18-post.1...2026.5.18-post.3) --- updated-dependencies: - dependency-name: strict-kwargs dependency-version: 2026.5.18.post3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 453c885c3..329f640e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", - "strict-kwargs==2026.5.18.post1", + "strict-kwargs==2026.5.18.post3", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. From 664e4dada195513222137f2b153603579d4a4866 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 19:32:46 +0000 Subject: [PATCH 1486/1638] chore(deps-dev): Bump types-requests Bumps [types-requests](https://github.com/python/typeshed) from 2.33.0.20260513 to 2.33.0.20260518. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.33.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 453c885c3..d8d4f2792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "ty==0.0.36", - "types-requests==2.33.0.20260513", + "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From 4ea83f4c7613f25f0821c0b285a72c4527aa8b31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 19:32:54 +0000 Subject: [PATCH 1487/1638] chore(deps-dev): Bump zizmor from 1.25.0 to 1.25.2 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.25.0 to 1.25.2. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.25.0...v1.25.2) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.25.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 453c885c3..bfbe8dc9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.25.0", + "zizmor==1.25.2", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 099d130b8a392c46a997c4104a4d95f8e67c5e5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 19:38:54 +0000 Subject: [PATCH 1488/1638] chore(deps-dev): Bump ty from 0.0.36 to 0.0.37 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.36 to 0.0.37. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.36...0.0.37) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.37 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1f0b8c1e..cc4d41f3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", - "ty==0.0.36", + "ty==0.0.37", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 7664bc0cb25085b1671c96344598721585a7df5e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 18 May 2026 20:51:14 +0100 Subject: [PATCH 1489/1638] Fix doccmd pylint ignores --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cc4d41f3f..d8cbe66fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", - "doccmd==2026.5.6", + "doccmd==2026.5.16", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", @@ -251,7 +251,9 @@ MASTER.unsafe-load-any-extension = false "MESSAGES CONTROL".per-file-ignores = [ "docs/source/conf.py:invalid-name", "docs/source/doccmd_*.py:invalid-name", + "docs/source/doccmd_*/*.py:invalid-name", "doccmd_README_rst_*.py:invalid-name", + "doccmd_*/*.py:invalid-name", ] # Spelling dictionary name. Available dictionaries: none. To make it working # install python-enchant package. From 7a7b277e9b22f8b6b5699c3e3b4fbddd01e5e19a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 19 May 2026 12:34:21 +0100 Subject: [PATCH 1490/1638] Deduplicate httpx timeout construction --- src/vws/transports.py | 59 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/src/vws/transports.py b/src/vws/transports.py index 80aa989f3..38d07af36 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -10,6 +10,29 @@ from vws.response import Response +def _httpx_timeout( + request_timeout: float | tuple[float, float], +) -> httpx.Timeout: + """Convert a VWS request timeout to an ``httpx`` timeout.""" + match request_timeout: + case (connect_timeout, read_timeout): + return httpx.Timeout( + connect=connect_timeout, + read=read_timeout, + write=None, + pool=None, + ) + case float() | int() as timeout: + return httpx.Timeout( + connect=timeout, + read=timeout, + write=None, + pool=None, + ) + case _: + raise AssertionError + + @runtime_checkable class Transport(Protocol): """Protocol for HTTP transports used by VWS clients. @@ -149,28 +172,12 @@ def __call__( Returns: A Response populated from the httpx response. """ - if isinstance(request_timeout, tuple): - connect_timeout, read_timeout = request_timeout - httpx_timeout = httpx.Timeout( - connect=connect_timeout, - read=read_timeout, - write=None, - pool=None, - ) - else: - httpx_timeout = httpx.Timeout( - connect=request_timeout, - read=request_timeout, - write=None, - pool=None, - ) - httpx_response = self._client.request( method=method, url=url, headers=headers, content=data, - timeout=httpx_timeout, + timeout=_httpx_timeout(request_timeout=request_timeout), follow_redirects=True, ) @@ -272,28 +279,12 @@ async def __call__( Returns: A Response populated from the httpx response. """ - if isinstance(request_timeout, tuple): - connect_timeout, read_timeout = request_timeout - httpx_timeout = httpx.Timeout( - connect=connect_timeout, - read=read_timeout, - write=None, - pool=None, - ) - else: - httpx_timeout = httpx.Timeout( - connect=request_timeout, - read=request_timeout, - write=None, - pool=None, - ) - httpx_response = await self._client.request( method=method, url=url, headers=headers, content=data, - timeout=httpx_timeout, + timeout=_httpx_timeout(request_timeout=request_timeout), follow_redirects=True, ) From e17a819465983da7967810a47e41dfd90978cae0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 19 May 2026 12:42:09 +0100 Subject: [PATCH 1491/1638] Fix timeout helper coverage --- src/vws/transports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vws/transports.py b/src/vws/transports.py index 38d07af36..991c76be4 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -29,7 +29,7 @@ def _httpx_timeout( write=None, pool=None, ) - case _: + case _: # pragma: no cover raise AssertionError From 885af7c61471475087ead04aac1461eaadf00243 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 19 May 2026 12:52:02 +0100 Subject: [PATCH 1492/1638] Inline httpx timeout match handling --- src/vws/transports.py | 63 ++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/src/vws/transports.py b/src/vws/transports.py index 991c76be4..2adaa3231 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -10,29 +10,6 @@ from vws.response import Response -def _httpx_timeout( - request_timeout: float | tuple[float, float], -) -> httpx.Timeout: - """Convert a VWS request timeout to an ``httpx`` timeout.""" - match request_timeout: - case (connect_timeout, read_timeout): - return httpx.Timeout( - connect=connect_timeout, - read=read_timeout, - write=None, - pool=None, - ) - case float() | int() as timeout: - return httpx.Timeout( - connect=timeout, - read=timeout, - write=None, - pool=None, - ) - case _: # pragma: no cover - raise AssertionError - - @runtime_checkable class Transport(Protocol): """Protocol for HTTP transports used by VWS clients. @@ -172,12 +149,30 @@ def __call__( Returns: A Response populated from the httpx response. """ + match request_timeout: + case (connect_timeout, read_timeout): + httpx_timeout = httpx.Timeout( + connect=connect_timeout, + read=read_timeout, + write=None, + pool=None, + ) + case float() | int() as timeout: + httpx_timeout = httpx.Timeout( + connect=timeout, + read=timeout, + write=None, + pool=None, + ) + case _: # pragma: no cover + raise AssertionError + httpx_response = self._client.request( method=method, url=url, headers=headers, content=data, - timeout=_httpx_timeout(request_timeout=request_timeout), + timeout=httpx_timeout, follow_redirects=True, ) @@ -279,12 +274,30 @@ async def __call__( Returns: A Response populated from the httpx response. """ + match request_timeout: + case (connect_timeout, read_timeout): + httpx_timeout = httpx.Timeout( + connect=connect_timeout, + read=read_timeout, + write=None, + pool=None, + ) + case float() | int() as timeout: + httpx_timeout = httpx.Timeout( + connect=timeout, + read=timeout, + write=None, + pool=None, + ) + case _: # pragma: no cover + raise AssertionError + httpx_response = await self._client.request( method=method, url=url, headers=headers, content=data, - timeout=_httpx_timeout(request_timeout=request_timeout), + timeout=httpx_timeout, follow_redirects=True, ) From acaf4b906798e2bd68a6f1e01882a4c93123bad1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 19 May 2026 12:58:05 +0100 Subject: [PATCH 1493/1638] Use assert_never for timeout match fallback --- pyproject.toml | 1 + src/vws/transports.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d8cbe66fe..898d266eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -333,6 +333,7 @@ log_cli = true [tool.coverage] run.branch = true report.exclude_also = [ + "case _ as unreachable:\n\\s*assert_never\\(", "if TYPE_CHECKING:", ] report.show_missing = true diff --git a/src/vws/transports.py b/src/vws/transports.py index 2adaa3231..5c193cc10 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -1,7 +1,7 @@ """HTTP transport implementations for VWS clients.""" from collections.abc import Awaitable -from typing import Protocol, Self, runtime_checkable +from typing import Protocol, Self, assert_never, runtime_checkable import httpx import requests @@ -164,8 +164,8 @@ def __call__( write=None, pool=None, ) - case _: # pragma: no cover - raise AssertionError + case _ as unreachable: + assert_never(unreachable) # pyrefly: ignore[bad-argument-type] # ty: ignore[type-assertion-failure] httpx_response = self._client.request( method=method, @@ -289,8 +289,8 @@ async def __call__( write=None, pool=None, ) - case _: # pragma: no cover - raise AssertionError + case _ as unreachable: + assert_never(unreachable) # pyrefly: ignore[bad-argument-type] # ty: ignore[type-assertion-failure] httpx_response = await self._client.request( method=method, From 431b2fce5cacef2e6afc4b74145bd457a92b1792 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 19 May 2026 13:00:58 +0100 Subject: [PATCH 1494/1638] Add type checker names to spelling dictionary --- spelling_private_dict.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 73d358a00..04814bdea 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -79,6 +79,7 @@ plugins png pragma py +pyrefly pyright pytest readme @@ -97,6 +98,7 @@ todo traceback travis txt +ty unmocked untyped url From 8db0c59d86f5b6d4f2afbcfad288c6ade88ad823 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 19 May 2026 13:19:42 +0100 Subject: [PATCH 1495/1638] Avoid timeout match suppressions --- pyproject.toml | 1 - spelling_private_dict.txt | 2 -- src/vws/transports.py | 16 ++++++-------- tests/test_transports.py | 45 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 898d266eb..d8cbe66fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -333,7 +333,6 @@ log_cli = true [tool.coverage] run.branch = true report.exclude_also = [ - "case _ as unreachable:\n\\s*assert_never\\(", "if TYPE_CHECKING:", ] report.show_missing = true diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 04814bdea..73d358a00 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -79,7 +79,6 @@ plugins png pragma py -pyrefly pyright pytest readme @@ -98,7 +97,6 @@ todo traceback travis txt -ty unmocked untyped url diff --git a/src/vws/transports.py b/src/vws/transports.py index 5c193cc10..74fadb9fe 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -1,7 +1,7 @@ """HTTP transport implementations for VWS clients.""" from collections.abc import Awaitable -from typing import Protocol, Self, assert_never, runtime_checkable +from typing import Protocol, Self, runtime_checkable import httpx import requests @@ -150,22 +150,21 @@ def __call__( A Response populated from the httpx response. """ match request_timeout: - case (connect_timeout, read_timeout): + case tuple() as timeout: + connect_timeout, read_timeout = timeout httpx_timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=None, pool=None, ) - case float() | int() as timeout: + case timeout: httpx_timeout = httpx.Timeout( connect=timeout, read=timeout, write=None, pool=None, ) - case _ as unreachable: - assert_never(unreachable) # pyrefly: ignore[bad-argument-type] # ty: ignore[type-assertion-failure] httpx_response = self._client.request( method=method, @@ -275,22 +274,21 @@ async def __call__( A Response populated from the httpx response. """ match request_timeout: - case (connect_timeout, read_timeout): + case tuple() as timeout: + connect_timeout, read_timeout = timeout httpx_timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=None, pool=None, ) - case float() | int() as timeout: + case timeout: httpx_timeout = httpx.Timeout( connect=timeout, read=timeout, write=None, pool=None, ) - case _ as unreachable: - assert_never(unreachable) # pyrefly: ignore[bad-argument-type] # ty: ignore[type-assertion-failure] httpx_response = await self._client.request( method=method, diff --git a/tests/test_transports.py b/tests/test_transports.py index 4130859dc..752b0ef23 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -61,6 +61,28 @@ def test_tuple_timeout() -> None: assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK + @staticmethod + @respx.mock + def test_int_timeout() -> None: + """``HTTPXTransport`` works with an int timeout.""" + route = respx.post(url="https://example.com/test").mock( + return_value=httpx.Response( + status_code=HTTPStatus.OK, + text="OK", + ), + ) + transport = HTTPXTransport() + response = transport( + method="POST", + url="https://example.com/test", + headers={"Content-Type": "text/plain"}, + data=b"hello", + request_timeout=30, + ) + assert route.called + assert isinstance(response, Response) + assert response.status_code == HTTPStatus.OK + @staticmethod @respx.mock def test_context_manager() -> None: @@ -137,6 +159,29 @@ async def test_tuple_timeout() -> None: assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK + @staticmethod + @pytest.mark.asyncio + @respx.mock + async def test_int_timeout() -> None: + """``AsyncHTTPXTransport`` works with an int timeout.""" + route = respx.post(url="https://example.com/test").mock( + return_value=httpx.Response( + status_code=HTTPStatus.OK, + text="OK", + ), + ) + transport = AsyncHTTPXTransport() + response = await transport( + method="POST", + url="https://example.com/test", + headers={"Content-Type": "text/plain"}, + data=b"hello", + request_timeout=30, + ) + assert route.called + assert isinstance(response, Response) + assert response.status_code == HTTPStatus.OK + @staticmethod @pytest.mark.asyncio @respx.mock From afd1a6ec682c024555af9622367c7e600381f1dd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 19 May 2026 13:53:06 +0100 Subject: [PATCH 1496/1638] Bump strict-kwargs and use diff mode --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31eea11f8..feef09332 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -302,7 +302,7 @@ repos: - id: strict-kwargs-fix name: strict-kwargs - entry: uv run --extra=dev strict-kwargs fix + entry: uv run --extra=dev strict-kwargs fix --diff language: python types_or: [python] additional_dependencies: diff --git a/pyproject.toml b/pyproject.toml index d8cbe66fe..1d8cfdca7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", - "strict-kwargs==2026.5.18.post3", + "strict-kwargs==2026.5.19.post1", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. From 0f0c52a7e6312a0f70831feb1856e99d37dd2b4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 22:24:42 +0000 Subject: [PATCH 1497/1638] chore(deps-dev): Bump strict-kwargs Bumps [strict-kwargs](https://github.com/adamtheturtle/strict-kwargs) from 2026.5.19.post1 to 2026.5.19.post3. - [Release notes](https://github.com/adamtheturtle/strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/strict-kwargs/compare/2026.5.19-post.1...2026.5.19-post.3) --- updated-dependencies: - dependency-name: strict-kwargs dependency-version: 2026.5.19.post3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d8cfdca7..bfe56a84e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", - "strict-kwargs==2026.5.19.post1", + "strict-kwargs==2026.5.19.post3", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. From 4b572d639618666bd3b3366a248e894e0b3b2605 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 22:24:54 +0000 Subject: [PATCH 1498/1638] chore(deps-dev): Bump doccmd from 2026.5.16 to 2026.5.19 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.5.16 to 2026.5.19. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.05.16...2026.05.19) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.5.19 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d8cfdca7..05a212946 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", - "doccmd==2026.5.16", + "doccmd==2026.5.19", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 1ced42dbc15a0d75004e7705bda7b646d1fa4b6f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 20 May 2026 07:44:12 +0100 Subject: [PATCH 1499/1638] Ban dynamic builtins and typing.cast in lint config. Align pylint and ruff with literalizer: forbid bare filter, getattr, hasattr, map, and setattr via pylint, and ban typing.cast via ruff. Fix or exempt existing violations. --- pyproject.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 75bfea22a..c9b8b1b38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -159,6 +159,7 @@ lint.per-file-ignores."tests/*.py" = [ lint.unfixable = [ "ERA001", ] +lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: use explicit type narrowing or a typed variable instead." lint.pydocstyle.convention = "google" [tool.pylint] @@ -199,6 +200,17 @@ MASTER.load-plugins = [ # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. MASTER.unsafe-load-any-extension = false +DEPRECATED_BUILTINS.bad-functions = [ + # Use Pylint until Ruff can ban bare builtin calls, or until custom rules + # make this removable: + # https://github.com/astral-sh/ruff/issues/10079 + # https://github.com/astral-sh/ruff/issues/970 + "filter", + "getattr", + "hasattr", + "map", + "setattr", +] # 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 From a573f07847ecf129e580d70df123dd2cb74a2302 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 20 May 2026 12:05:34 +0100 Subject: [PATCH 1500/1638] Drive changelog releases from towncrier --- .github/workflows/release.yml | 38 ++++++++++++------------------- CHANGELOG.rst | 3 +-- docs/source/conf.py | 9 ++++++++ docs/source/index.rst | 1 + docs/source/unreleased.rst | 8 +++++++ docs/towncrier_template.rst.jinja | 14 ++++++++++++ newsfragments/.gitkeep | 0 pyproject.toml | 33 +++++++++++++++++++++++++++ 8 files changed, 80 insertions(+), 26 deletions(-) create mode 100644 docs/source/unreleased.rst create mode 100644 docs/towncrier_template.rst.jinja create mode 100644 newsfragments/.gitkeep diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a723a2b4c..44d64e250 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,37 +47,27 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get the changelog underline - id: changelog_underline + # towncrier writes the rendered notes to stdout (informational + # chatter goes to stderr), so this is the curated release body for + # this version, not github-tag-action's commit-derived changelog. + - name: Generate the GitHub release notes env: RELEASE: ${{ steps.calver.outputs.release }} - run: | - underline="$(echo "$RELEASE" | tr -c '\n' '-')" - echo "underline=${underline}" >> "$GITHUB_OUTPUT" - - - name: Update changelog - id: update_changelog - uses: jacobtomlinson/gha-find-replace@v3 - with: - find: "Next\n----" - replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\ - \ }}\n" - include: CHANGELOG.rst - regex: false + run: uv run --extra=release towncrier build --draft --version "$RELEASE" > + release-notes.md - - name: Check Update changelog was modified + # Assemble the same fragments into CHANGELOG.rst under a new + # ``$RELEASE`` section and delete the consumed fragment files. + - name: Update the changelog env: - MODIFIED_FILES: ${{ steps.update_changelog.outputs.modifiedFiles }} - run: | - if [ "$MODIFIED_FILES" = "0" ]; then - echo "Error: No files were modified when updating changelog" - exit 1 - fi + RELEASE: ${{ steps.calver.outputs.release }} + run: uv run --extra=release towncrier build --yes --version "$RELEASE" + - uses: stefanzweifel/git-auto-commit-action@v7 id: commit with: commit_message: Bump CHANGELOG - file_pattern: CHANGELOG.rst + file_pattern: CHANGELOG.rst newsfragments # Error if there are no changes. skip_dirty_check: true @@ -96,7 +86,7 @@ jobs: tag: ${{ steps.tag_version.outputs.new_tag }} makeLatest: true name: Release ${{ steps.tag_version.outputs.new_tag }} - body: ${{ steps.tag_version.outputs.changelog }} + bodyFile: release-notes.md - name: Build a binary wheel and a source tarball env: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 56a5d3007..b6688933c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,8 +1,7 @@ Changelog ========= -Next ----- +.. towncrier release notes start 2026.02.25.1 ------------ diff --git a/docs/source/conf.py b/docs/source/conf.py index 920ba1a4b..12553403f 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,8 +23,17 @@ "sphinx.ext.napoleon", "sphinx_substitution_extensions", "sphinxcontrib.spelling", + "sphinxcontrib.towncrier.ext", ] +# Render the unreleased ``newsfragments/`` entries into +# ``docs/source/unreleased.rst`` so the Sphinx spelling, doc-build and +# link-checking gates cover the prose before it is assembled into +# CHANGELOG.rst at release time. +towncrier_draft_autoversion_mode = "draft" +towncrier_draft_include_empty = True +towncrier_draft_working_directory = f"{_pyproject_file.parent}" + templates_path = ["_templates"] source_suffix = ".rst" master_doc = "index" diff --git a/docs/source/index.rst b/docs/source/index.rst index c61c2a302..ae5712825 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -124,4 +124,5 @@ Reference exceptions contributing release-process + unreleased changelog diff --git a/docs/source/unreleased.rst b/docs/source/unreleased.rst new file mode 100644 index 000000000..22ac74723 --- /dev/null +++ b/docs/source/unreleased.rst @@ -0,0 +1,8 @@ +Unreleased changes +================== + +Changes that have landed on the main branch but are not yet part of a +tagged release. These entries are assembled into the +:doc:`changelog` when the next release is published. + +.. towncrier-draft-entries:: diff --git a/docs/towncrier_template.rst.jinja b/docs/towncrier_template.rst.jinja new file mode 100644 index 000000000..6da878330 --- /dev/null +++ b/docs/towncrier_template.rst.jinja @@ -0,0 +1,14 @@ + +{% for section_name, section in sections.items() %} +{% if section %} +{% for category, entries in section.items() %} +{% for text, _ in entries.items() %} +- {{ text }} + +{% endfor %} +{% endfor %} +{% else %} +No significant changes. + +{% endif %} +{% endfor %} diff --git a/newsfragments/.gitkeep b/newsfragments/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pyproject.toml b/pyproject.toml index c9b8b1b38..91ac42e5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,9 @@ optional-dependencies.dev = [ "sphinx-pyproject==0.3.0", "sphinx-substitution-extensions==2026.1.12", "sphinxcontrib-spelling==8.0.2", + # ``sphinxcontrib-towncrier`` renders unreleased news fragments + # into docs/source/unreleased.rst during Sphinx builds. + "sphinxcontrib-towncrier==0.5.0a0", "strict-kwargs==2026.5.19.post3", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that @@ -83,6 +86,7 @@ optional-dependencies.dev = [ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation "torch>=2.5.1", "torchvision>=0.20.1", + "towncrier==25.8.0", "ty==0.0.37", "types-requests==2.33.0.20260518", "vulture==2.16", @@ -284,6 +288,8 @@ ignore = [ "*.enc", ".pre-commit-config.yaml", "CHANGELOG.rst", + "newsfragments", + "newsfragments/**", "CODE_OF_CONDUCT.rst", "CONTRIBUTING.rst", "LICENSE", @@ -349,6 +355,30 @@ report.exclude_also = [ ] report.show_missing = true +[tool.towncrier] +# The changelog and the per-release GitHub release notes are both built +# from news fragments under ``newsfragments/``. The release workflow +# runs ``towncrier build`` to assemble them; contributors add one +# fragment file per user-facing change. +directory = "newsfragments" +filename = "CHANGELOG.rst" +# Custom template so an assembled version reproduces the historical +# style exactly: a bare ```` heading (no project name, no +# date) followed by a flat bullet list with no per-type sub-headings. +template = "docs/towncrier_template.rst.jinja" +title_format = "{version}" +# ``title_format`` underline first, then any nested headings. A bare +# version such as ``2026.05.18`` underlined with ``-`` matches every +# pre-towncrier entry in CHANGELOG.rst. +underlines = [ "-", "~", "^" ] +issue_format = "#{issue}" +type = [ + # A single, unnamed fragment type keeps the assembled output as one + # flat bullet list, matching the historical changelog (which never + # grouped entries under "Features"/"Bugfixes"/... sub-headings). + { directory = "change", name = "", showcontent = true }, +] + [tool.pydocstringformatter] write = true split-summary-body = false @@ -413,6 +443,9 @@ ignore_names = [ "spelling_word_list_filename", "templates_path", "warning_is_error", + "towncrier_draft_autoversion_mode", + "towncrier_draft_include_empty", + "towncrier_draft_working_directory", ] # Duplicate some of .gitignore exclude = [ ".venv" ] From de47475dff8a8ea9cac8d4ee064f3db37caaff2d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 20 May 2026 12:40:43 +0100 Subject: [PATCH 1501/1638] Add towncrier to release extra --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 91ac42e5f..fdd3e5207 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ optional-dependencies.dev = [ "yamlfix==1.19.1", "zizmor==1.25.2", ] -optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] +optional-dependencies.release = [ "check-wheel-contents==0.6.3", "towncrier==25.8.0" ] urls.Documentation = "https://vws-python.github.io/vws-python/" urls.Source = "https://github.com/VWS-Python/vws-python" From 1fe5f0464aba56f8504bfb01f43347817fd193c3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 20 May 2026 12:46:38 +0100 Subject: [PATCH 1502/1638] Make useless Pylint suppressions fail lint --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c9b8b1b38..750ad7142 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -200,6 +200,10 @@ MASTER.load-plugins = [ # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. MASTER.unsafe-load-any-extension = false +# Return non-zero exit code if useless-suppression is emitted. +MAIN.fail-on = [ + "useless-suppression", +] DEPRECATED_BUILTINS.bad-functions = [ # Use Pylint until Ruff can ban bare builtin calls, or until custom rules # make this removable: From bc5dcf3743721d3e0af7fa40b57eacca63a855ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 16:23:05 +0000 Subject: [PATCH 1503/1638] chore(deps-dev): Bump ty from 0.0.37 to 0.0.38 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.37 to 0.0.38. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.37...0.0.38) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.38 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc55e6a28..83bf39092 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.37", + "ty==0.0.38", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 44ec4b67fce8bfd73ceb230e695eb81a5d4a2235 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 16:23:31 +0000 Subject: [PATCH 1504/1638] chore(deps-dev): Bump prek from 0.4.0 to 0.4.1 Bumps [prek](https://github.com/j178/prek) from 0.4.0 to 0.4.1. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.0...v0.4.1) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc55e6a28..09d3d9e5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.1.12", - "prek==0.4.0", + "prek==0.4.1", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From d04c145d49cbf6c878ea45e6c72d8d044b2aa930 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 16:30:36 +0000 Subject: [PATCH 1505/1638] chore(deps-dev): Bump mypy-strict-kwargs from 2026.1.12 to 2026.5.20.1 Bumps [mypy-strict-kwargs](https://github.com/adamtheturtle/mypy-strict-kwargs) from 2026.1.12 to 2026.5.20.1. - [Release notes](https://github.com/adamtheturtle/mypy-strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/mypy-strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/mypy-strict-kwargs/compare/2026.01.12...2026.05.20.1) --- updated-dependencies: - dependency-name: mypy-strict-kwargs dependency-version: 2026.5.20.1 dependency-type: direct:development 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 417596d44..c2462a248 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "furo==2025.12.19", "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", - "mypy-strict-kwargs==2026.1.12", + "mypy-strict-kwargs==2026.5.20.1", "prek==0.4.1", "pydocstringformatter==0.7.5", "pydocstyle==6.3", From f7b3fbfa414a463c2eb4767ca58214fce3e0e342 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 16:30:48 +0000 Subject: [PATCH 1506/1638] chore(deps-dev): Bump strict-kwargs from 2026.5.19.post3 to 2026.5.20 Bumps [strict-kwargs](https://github.com/adamtheturtle/strict-kwargs) from 2026.5.19.post3 to 2026.5.20. - [Release notes](https://github.com/adamtheturtle/strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/strict-kwargs/compare/2026.5.19-post.3...2026.5.20) --- updated-dependencies: - dependency-name: strict-kwargs dependency-version: 2026.5.20 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 417596d44..5020ebb82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ optional-dependencies.dev = [ # ``sphinxcontrib-towncrier`` renders unreleased news fragments # into docs/source/unreleased.rst during Sphinx builds. "sphinxcontrib-towncrier==0.5.0a0", - "strict-kwargs==2026.5.19.post3", + "strict-kwargs==2026.5.20", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. From 4e51570f84e72874cb1615a63f7c34be7dbd99d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 10:39:29 +0000 Subject: [PATCH 1507/1638] chore(deps-dev): Bump ruff from 0.15.13 to 0.15.14 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.13 to 0.15.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/0.15.13...0.15.14) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.14 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64b0a581d..a8405cf19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.13", + "ruff==0.15.14", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From b13f71eabeeb11e574f184940491bda06c18aed7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 16:11:55 +0000 Subject: [PATCH 1508/1638] chore(deps-dev): Bump doccmd from 2026.5.19 to 2026.5.25 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.5.19 to 2026.5.25. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.05.19...2026.05.25) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.5.25 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a8405cf19..6aec88594 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", - "doccmd==2026.5.19", + "doccmd==2026.5.25", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From 91d4dc1033968c7d0f7aeccf96703024e8ddd30a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 16:12:35 +0000 Subject: [PATCH 1509/1638] chore(deps-dev): Bump ty from 0.0.38 to 0.0.39 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.38 to 0.0.39. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.38...0.0.39) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.39 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a8405cf19..d536bd98b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.38", + "ty==0.0.39", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 667fd51a4ce2de4ec4da5af31467a1d5c3029f57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 18:11:54 +0000 Subject: [PATCH 1510/1638] chore(deps-dev): Bump prek from 0.4.1 to 0.4.2 Bumps [prek](https://github.com/j178/prek) from 0.4.1 to 0.4.2. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.1...v0.4.2) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b232ba0a8..77308b676 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.5.20.1", - "prek==0.4.1", + "prek==0.4.2", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From 5b7e8ef97cc4a7467cab619f19fc2ec26e9fa1e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 18:12:21 +0000 Subject: [PATCH 1511/1638] chore(deps-dev): Bump pytest-asyncio from 1.3.0 to 1.4.0 Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: pytest-asyncio dependency-version: 1.4.0 dependency-type: direct:development 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 b232ba0a8..dfda929eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ optional-dependencies.dev = [ "pyright==1.1.409", "pyroma==5.0.1", "pytest==9.0.3", - "pytest-asyncio==1.3.0", + "pytest-asyncio==1.4.0", "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", From 4d9e40b800cb57fa9bd11d19a163ddc4b9f8a5f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 12:30:09 +0000 Subject: [PATCH 1512/1638] chore(deps-dev): Bump prek from 0.4.2 to 0.4.3 Bumps [prek](https://github.com/j178/prek) from 0.4.2 to 0.4.3. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.2...v0.4.3) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6d56e7802..a4af6ad91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.5.20.1", - "prek==0.4.2", + "prek==0.4.3", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From 5bd3df6ea1d655eedfd834458c1f5850961ec0d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 11:23:34 +0000 Subject: [PATCH 1513/1638] chore(deps-dev): Bump ty from 0.0.39 to 0.0.40 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.39 to 0.0.40. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.39...0.0.40) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.40 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a4af6ad91..25cfc013b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.39", + "ty==0.0.40", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 51dbb5213969ff1525d3d4b6563eb195ed9ffdc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 06:50:42 +0000 Subject: [PATCH 1514/1638] chore(deps-dev): Bump pyright from 1.1.409 to 1.1.410 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.409 to 1.1.410. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.409...v1.1.410) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.410 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 25cfc013b..dcb03b4c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.21.2", "pyrefly==1.0.0", - "pyright==1.1.409", + "pyright==1.1.410", "pyroma==5.0.1", "pytest==9.0.3", "pytest-asyncio==1.4.0", From 69af780ed178a0f1d5ec64a0dbf430edf92bd44d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 06:50:59 +0000 Subject: [PATCH 1515/1638] chore(deps-dev): Bump ty from 0.0.40 to 0.0.42 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.40 to 0.0.42. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.40...0.0.42) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.42 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 25cfc013b..c524984d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.40", + "ty==0.0.42", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 5ae7cac07997437059350b53d8341cb9155274ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 06:57:17 +0000 Subject: [PATCH 1516/1638] chore(deps-dev): Bump pyproject-fmt from 2.21.2 to 2.23.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.21.2 to 2.23.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.21.2...pyproject-fmt/2.23.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.23.0 dependency-type: direct:development 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 94e860864..40a03e3a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.21.2", + "pyproject-fmt==2.23.0", "pyrefly==1.0.0", "pyright==1.1.410", "pyroma==5.0.1", From 4c9308d7db6e3d814ccb70aa4cd33242c7e77ae5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 3 Jun 2026 06:26:15 +0100 Subject: [PATCH 1517/1638] Apply pyproject-fmt 2.23.0 formatting changes. Dependabot only bumped the version pin; run the formatter so pre-commit passes. Co-authored-by: Cursor --- pyproject.toml | 294 ++++++++++++++++++++++++------------------------- 1 file changed, 147 insertions(+), 147 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 40a03e3a2..d6d141097 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,13 +103,13 @@ urls.Source = "https://github.com/VWS-Python/vws-python" dev = [] [tool.setuptools] -zip-safe = false -package-data.vws = [ - "py.typed", -] packages.find.where = [ "src", ] +package-data.vws = [ + "py.typed", +] +zip-safe = false [tool.distutils] bdist_wheel.universal = true @@ -167,11 +167,80 @@ lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: lint.pydocstyle.convention = "google" [tool.pylint] +# 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" +"MESSAGES CONTROL".disable = [ + # Too difficult to please + "duplicate-code", + # Let ruff handle long lines + "line-too-long", + "locally-disabled", + "missing-return-type-doc", + # We don't need everything to be documented because of mypy + "missing-type-doc", + "too-few-public-methods", + "too-many-arguments", + "too-many-instance-attributes", + "too-many-lines", + "too-many-locals", + "too-many-return-statements", + # Let ruff deal with sorting + "ungrouped-imports", + # Let ruff handle unused imports + "unused-import", + # mypy does not want untyped parameters. + "useless-type-doc", + # Let ruff handle imports + "wrong-import-order", +] +# 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. +"MESSAGES CONTROL".enable = [ + "bad-inline-option", + "deprecated-pragma", + "file-ignored", + "spelling", + "use-symbolic-message-instead", + "useless-suppression", +] +# We ignore invalid names because: +# - We want to use generated module names, which may not be valid, but are never seen. +# - We want to use global variables in documentation, which may not be uppercase. +# - conf.py is a Sphinx configuration file which requires lowercase global variable names. +"MESSAGES CONTROL".per-file-ignores = [ + "docs/source/conf.py:invalid-name", + "docs/source/doccmd_*.py:invalid-name", + "docs/source/doccmd_*/*.py:invalid-name", + "doccmd_README_rst_*.py:invalid-name", + "doccmd_*/*.py:invalid-name", +] +DEPRECATED_BUILTINS.bad-functions = [ + # Use Pylint until Ruff can ban bare builtin calls, or until custom rules + # make this removable: + # https://github.com/astral-sh/ruff/issues/10079 + # https://github.com/astral-sh/ruff/issues/970 + "filter", + "getattr", + "hasattr", + "map", + "setattr", +] # Allow the body of an if to be on the same line as the test if there is no # else. FORMAT.single-line-if-stmt = false -# Pickle collected data for later comparisons. -MASTER.persistent = true +# Return non-zero exit code if useless-suppression is emitted. +MAIN.fail-on = [ + "useless-suppression", +] # Use multiple processes to speed up Pylint. MASTER.jobs = 0 # List of plugins (as comma separated values of python modules names) to load, @@ -184,7 +253,6 @@ MASTER.jobs = 0 # - pylint.extensions.while_used # as they seemed to get in the way. MASTER.load-plugins = [ - "pylint_per_file_ignores", "pylint.extensions.bad_builtin", "pylint.extensions.comparison_placement", "pylint.extensions.consider_refactoring_into_while_condition", @@ -200,81 +268,13 @@ MASTER.load-plugins = [ "pylint.extensions.redefined_variable_type", "pylint.extensions.set_membership", "pylint.extensions.typing", + "pylint_per_file_ignores", ] +# Pickle collected data for later comparisons. +MASTER.persistent = true # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. MASTER.unsafe-load-any-extension = false -# Return non-zero exit code if useless-suppression is emitted. -MAIN.fail-on = [ - "useless-suppression", -] -DEPRECATED_BUILTINS.bad-functions = [ - # Use Pylint until Ruff can ban bare builtin calls, or until custom rules - # make this removable: - # https://github.com/astral-sh/ruff/issues/10079 - # https://github.com/astral-sh/ruff/issues/970 - "filter", - "getattr", - "hasattr", - "map", - "setattr", -] -# 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. -"MESSAGES CONTROL".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" -"MESSAGES CONTROL".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", -] -# We ignore invalid names because: -# - We want to use generated module names, which may not be valid, but are never seen. -# - We want to use global variables in documentation, which may not be uppercase. -# - conf.py is a Sphinx configuration file which requires lowercase global variable names. -"MESSAGES CONTROL".per-file-ignores = [ - "docs/source/conf.py:invalid-name", - "docs/source/doccmd_*.py:invalid-name", - "docs/source/doccmd_*/*.py:invalid-name", - "doccmd_README_rst_*.py:invalid-name", - "doccmd_*/*.py:invalid-name", -] # Spelling dictionary name. Available dictionaries: none. To make it working # install python-enchant package. SPELLING.spelling-dict = "en_US" @@ -284,40 +284,41 @@ SPELLING.spelling-private-dict-file = "spelling_private_dict.txt" # --spelling-private-dict-file option instead of raising a message. SPELLING.spelling-store-unknown-words = "no" +[tool.interrogate] +fail-under = 100 +verbose = 2 +omit-covered-files = true + [tool.check-manifest] ignore = [ + "*.enc", ".checkmake-config.ini", + ".git_archival.txt", + ".pre-commit-config.yaml", ".prettierrc", ".yamlfmt", - "*.enc", - ".pre-commit-config.yaml", "CHANGELOG.rst", - "newsfragments", - "newsfragments/**", - "CODE_OF_CONDUCT.rst", - "CONTRIBUTING.rst", - "LICENSE", - "Makefile", "ci", "ci/**", + "CODE_OF_CONDUCT.rst", + "CONTRIBUTING.rst", "doc8.ini", "docs", "docs/**", - ".git_archival.txt", + "LICENSE", + "lint.mk", + "Makefile", + "newsfragments", + "newsfragments/**", "spelling_private_dict.txt", "tests", "tests-pylintrc", "tests/**", "vuforia_secrets.env.example", - "lint.mk", "zizmor.yml", ] [tool.deptry] -optional_dependencies_dev_groups = [ - "dev", - "release", -] # torch and torchvision are listed explicitly in dev deps to allow # [tool.uv.sources] to redirect them to the CPU-only PyTorch index, # but they are not directly imported in the vws-python source code. @@ -325,6 +326,56 @@ per_rule_ignores.DEP002 = [ "torch", "torchvision", ] +optional_dependencies_dev_groups = [ + "dev", + "release", +] + +[tool.vulture] +# Duplicate some of .gitignore +exclude = [ ".venv" ] +# Ideally we would limit the paths to the source code where we want to ignore names, +# but Vulture does not enable this. +ignore_names = [ + # Public API classes imported by users from vws.transports + "AsyncHTTPXTransport", + # Sphinx + "autoclass_content", + "autoclass_content", + "autodoc_member_order", + "copybutton_exclude", + "extensions", + # pytest fixtures - we name fixtures like this for this purpose + "fixture_*", + "html_show_copyright", + "html_show_sourcelink", + "html_show_sphinx", + "html_theme", + "html_theme_options", + "html_title", + "htmlhelp_basename", + "HTTPXTransport", + "intersphinx_mapping", + "language", + "linkcheck_ignore", + "linkcheck_retries", + "master_doc", + "nitpick_ignore", + "nitpicky", + "project_copyright", + "pygments_style", + # pytest configuration + "pytest_collect_file", + "pytest_plugins", + "rst_prolog", + "source_suffix", + "spelling_word_list_filename", + "templates_path", + "towncrier_draft_autoversion_mode", + "towncrier_draft_include_empty", + "towncrier_draft_working_directory", + "warning_is_error", +] [tool.pyproject-fmt] indent = 4 @@ -332,10 +383,10 @@ keep_full_version = true max_supported_python = "3.14" [tool.mypy] -strict = true files = [ "." ] exclude = [ "build" ] follow_untyped_imports = true +strict = true plugins = [ "mypy_strict_kwargs", ] @@ -344,13 +395,13 @@ plugins = [ errors.non-exhaustive-match = "error" [tool.pyright] +typeCheckingMode = "strict" enableTypeIgnoreComments = false reportUnnecessaryTypeIgnoreComment = true -typeCheckingMode = "strict" [tool.pytest] -xfail_strict = true log_cli = true +xfail_strict = true [tool.coverage] run.branch = true @@ -371,11 +422,11 @@ filename = "CHANGELOG.rst" # date) followed by a flat bullet list with no per-type sub-headings. template = "docs/towncrier_template.rst.jinja" title_format = "{version}" +issue_format = "#{issue}" # ``title_format`` underline first, then any nested headings. A bare # version such as ``2026.05.18`` underlined with ``-`` matches every # pre-towncrier entry in CHANGELOG.rst. underlines = [ "-", "~", "^" ] -issue_format = "#{issue}" type = [ # A single, unnamed fragment type keeps the assembled output as one # flat bullet list, matching the historical changelog (which never @@ -392,11 +443,6 @@ split-summary-body = false max-line-length = 75 linewrap-full-docstring = true -[tool.interrogate] -fail-under = 100 -omit-covered-files = true -verbose = 2 - [tool.doc8] max_line_length = 2000 ignore_path = [ @@ -408,52 +454,6 @@ ignore_path = [ "./src/*/_setuptools_scm_version.txt", ] -[tool.vulture] -# Ideally we would limit the paths to the source code where we want to ignore names, -# but Vulture does not enable this. -ignore_names = [ - # Public API classes imported by users from vws.transports - "AsyncHTTPXTransport", - "HTTPXTransport", - # pytest configuration - "pytest_collect_file", - "pytest_plugins", - # pytest fixtures - we name fixtures like this for this purpose - "fixture_*", - # Sphinx - "autoclass_content", - "autoclass_content", - "autodoc_member_order", - "copybutton_exclude", - "extensions", - "html_show_copyright", - "html_show_sourcelink", - "html_show_sphinx", - "html_theme", - "html_theme_options", - "html_title", - "htmlhelp_basename", - "intersphinx_mapping", - "language", - "linkcheck_ignore", - "linkcheck_retries", - "master_doc", - "nitpicky", - "nitpick_ignore", - "project_copyright", - "pygments_style", - "rst_prolog", - "source_suffix", - "spelling_word_list_filename", - "templates_path", - "warning_is_error", - "towncrier_draft_autoversion_mode", - "towncrier_draft_include_empty", - "towncrier_draft_working_directory", -] -# Duplicate some of .gitignore -exclude = [ ".venv" ] - [tool.yamlfix] section_whitelines = 1 whitelines = 1 From 0b16fc0c481d75d0a53766c2308d0c393fd3b7fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 05:32:51 +0000 Subject: [PATCH 1518/1638] chore(deps-dev): Bump ruff from 0.15.14 to 0.15.15 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.14 to 0.15.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/0.15.14...0.15.15) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.15 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d6d141097..df925f003 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.14", + "ruff==0.15.15", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 9e6ab8d1a6ba3bc5c32e6722f9a8aacfe2d52c93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 23:54:40 +0000 Subject: [PATCH 1519/1638] chore(deps): Bump astral-sh/setup-uv from 8.1.0 to 8.2.0 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 8.1.0 to 8.2.0. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v8.1.0...v8.2.0) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 8.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bd4f560c..0fb49823c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.1.0 + uses: astral-sh/setup-uv@v8.2.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f1ed8e80e..25caa85e9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.1.0 + uses: astral-sh/setup-uv@v8.2.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44d64e250..b424ca055 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v8.1.0 + uses: astral-sh/setup-uv@v8.2.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' From a64180d7e4ce536de42fa0c4ef595645b64c1ff3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 10:32:57 +0000 Subject: [PATCH 1520/1638] chore(deps-dev): Bump ty from 0.0.42 to 0.0.43 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.42 to 0.0.43. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.42...0.0.43) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.43 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index df925f003..f5a283fb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.42", + "ty==0.0.43", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From ae0b5a5538478ea9b4aaf800035d3430299a87ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 10:33:22 +0000 Subject: [PATCH 1521/1638] chore(deps-dev): Bump prek from 0.4.3 to 0.4.4 Bumps [prek](https://github.com/j178/prek) from 0.4.3 to 0.4.4. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.3...v0.4.4) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index df925f003..56d30d22c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.5.20.1", - "prek==0.4.3", + "prek==0.4.4", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From cedb405d618e8f88ed5c78c9a5cdb2e26db37ce1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 10:32:45 +0000 Subject: [PATCH 1522/1638] chore(deps-dev): Bump ty from 0.0.43 to 0.0.44 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.43 to 0.0.44. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.43...0.0.44) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.44 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 76ebcab7a..2f82705d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.43", + "ty==0.0.44", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 064aa33d8fce635bac8ed93428bb578ba36be942 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 10:32:58 +0000 Subject: [PATCH 1523/1638] chore(deps-dev): Bump ruff from 0.15.15 to 0.15.16 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.15 to 0.15.16. - [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.15.15...0.15.16) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.16 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 76ebcab7a..97f8a88a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.15", + "ruff==0.15.16", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From e49db7319770643d574ca6a4cb7ab5dd67e22b92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 10:33:07 +0000 Subject: [PATCH 1524/1638] chore(deps-dev): Bump strict-kwargs from 2026.5.20 to 2026.6.4 Bumps [strict-kwargs](https://github.com/adamtheturtle/strict-kwargs) from 2026.5.20 to 2026.6.4. - [Release notes](https://github.com/adamtheturtle/strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/strict-kwargs/compare/2026.5.20...2026.6.4) --- updated-dependencies: - dependency-name: strict-kwargs dependency-version: 2026.6.4 dependency-type: direct:development 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 76ebcab7a..cbc0ae7a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ optional-dependencies.dev = [ # ``sphinxcontrib-towncrier`` renders unreleased news fragments # into docs/source/unreleased.rst during Sphinx builds. "sphinxcontrib-towncrier==0.5.0a0", - "strict-kwargs==2026.5.20", + "strict-kwargs==2026.6.4", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. From ede14fc7f82010d9cd7e8e2759632041a04348d4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 5 Jun 2026 15:54:57 +0100 Subject: [PATCH 1525/1638] Fix strict-kwargs pre-commit hook entry for new CLI strict-kwargs 2026.6.4 switched to a Ruff-like CLI where 'fix' is now 'check --fix'. Update the hook entry accordingly. Co-Authored-By: Claude Sonnet 4.6 --- .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 feef09332..f4629bbd1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -302,7 +302,7 @@ repos: - id: strict-kwargs-fix name: strict-kwargs - entry: uv run --extra=dev strict-kwargs fix --diff + entry: uv run --extra=dev strict-kwargs check --fix --diff language: python types_or: [python] additional_dependencies: From 1e4cddb151ae801d8f0b0f69c92a077d94a828ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 10:32:52 +0000 Subject: [PATCH 1526/1638] chore(deps-dev): Bump strict-kwargs from 2026.6.4 to 2026.6.8.post1 Bumps [strict-kwargs](https://github.com/adamtheturtle/strict-kwargs) from 2026.6.4 to 2026.6.8.post1. - [Release notes](https://github.com/adamtheturtle/strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/strict-kwargs/compare/2026.6.4...2026.6.8-post.1) --- updated-dependencies: - dependency-name: strict-kwargs dependency-version: 2026.6.8.post1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3cd49b53..f234379b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ optional-dependencies.dev = [ # ``sphinxcontrib-towncrier`` renders unreleased news fragments # into docs/source/unreleased.rst during Sphinx builds. "sphinxcontrib-towncrier==0.5.0a0", - "strict-kwargs==2026.6.4", + "strict-kwargs==2026.6.8.post1", "sybil==9.3.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. From 0908b142de01fbc0f90c172ee766653a39b2fc86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 10:33:16 +0000 Subject: [PATCH 1527/1638] chore(deps-dev): Bump ty from 0.0.44 to 0.0.46 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.44 to 0.0.46. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.44...0.0.46) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.46 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3cd49b53..38e5d76ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.44", + "ty==0.0.46", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 64b8ea35db0af6ca02d46bf4223b3f57f4aeacd2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jun 2026 10:32:49 +0000 Subject: [PATCH 1528/1638] chore(deps-dev): Bump pyproject-fmt from 2.23.0 to 2.24.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.23.0 to 2.24.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.23.0...pyproject-fmt/2.24.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.24.0 dependency-type: direct:development 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 501bf9bcc..b227aafb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.23.0", + "pyproject-fmt==2.24.0", "pyrefly==1.0.0", "pyright==1.1.410", "pyroma==5.0.1", From 33d7d374c93e60701d04b1fbe91eeaa6a42f15f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jun 2026 10:33:16 +0000 Subject: [PATCH 1529/1638] chore(deps-dev): Bump ty from 0.0.46 to 0.0.48 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.46 to 0.0.48. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.46...0.0.48) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.48 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 501bf9bcc..559889884 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.46", + "ty==0.0.48", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 9e67f7d75f745deb34c231577bfadcf80e940398 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 10:33:00 +0000 Subject: [PATCH 1530/1638] chore(deps-dev): Bump ty from 0.0.48 to 0.0.49 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.48 to 0.0.49. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.48...0.0.49) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.49 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e351a17f7..76e9ca0f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.48", + "ty==0.0.49", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From e040a567929637ac9eaf510d2b6821b29d6bba61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 10:33:21 +0000 Subject: [PATCH 1531/1638] chore(deps-dev): Bump ruff from 0.15.16 to 0.15.17 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.16 to 0.15.17. - [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.15.16...0.15.17) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.17 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e351a17f7..179d87da9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.16", + "ruff==0.15.17", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 2d71b86f56ce6a2459f25b0b1e1d2b4b2e560698 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:33:00 +0000 Subject: [PATCH 1532/1638] chore(deps-dev): Bump pylint from 4.0.5 to 4.0.6 Bumps [pylint](https://github.com/pylint-dev/pylint) from 4.0.5 to 4.0.6. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v4.0.5...v4.0.6) --- updated-dependencies: - dependency-name: pylint dependency-version: 4.0.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6bbab5b8b..6ab67667f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", - "pylint[spelling]==4.0.5", + "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.24.0", "pyrefly==1.0.0", From 138559376fac4fb78437b6896a2120683be59714 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:33:09 +0000 Subject: [PATCH 1533/1638] chore(deps-dev): Bump pytest from 9.0.3 to 9.1.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.0.3 to 9.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/9.0.3...9.1.0) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.1.0 dependency-type: direct:development 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 6bbab5b8b..23baf3206 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pyrefly==1.0.0", "pyright==1.1.410", "pyroma==5.0.1", - "pytest==9.0.3", + "pytest==9.1.0", "pytest-asyncio==1.4.0", "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", From 2219b83108c1e8e499bf7f62d0a75f8168fe968f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:33:14 +0000 Subject: [PATCH 1534/1638] chore(deps-dev): Bump sybil from 9.3.0 to 10.1.0 Bumps [sybil](https://github.com/simplistix/sybil) from 9.3.0 to 10.1.0. - [Changelog](https://github.com/simplistix/sybil/blob/main/CHANGELOG.rst) - [Commits](https://github.com/simplistix/sybil/compare/9.3.0...10.1.0) --- updated-dependencies: - dependency-name: sybil dependency-version: 10.1.0 dependency-type: direct:development 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 6bbab5b8b..842746806 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ optional-dependencies.dev = [ # into docs/source/unreleased.rst during Sphinx builds. "sphinxcontrib-towncrier==0.5.0a0", "strict-kwargs==2026.6.8.post1", - "sybil==9.3.0", + "sybil==10.1.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation From 147476db46fee2cfe040c87619b0c6174c98c722 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:33:28 +0000 Subject: [PATCH 1535/1638] chore(deps-dev): Bump pyproject-fmt from 2.24.0 to 2.24.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.24.0 to 2.24.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.24.0...pyproject-fmt/2.24.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.24.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6bbab5b8b..bc54e77db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.5", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.24.0", + "pyproject-fmt==2.24.1", "pyrefly==1.0.0", "pyright==1.1.410", "pyroma==5.0.1", From 6486d10bdeb67581174eb85f27329d4d58dadf36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 10:33:17 +0000 Subject: [PATCH 1536/1638] chore(deps-dev): Bump prek from 0.4.4 to 0.4.5 Bumps [prek](https://github.com/j178/prek) from 0.4.4 to 0.4.5. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.4...v0.4.5) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cb2f4497b..9506226d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.5.20.1", - "prek==0.4.4", + "prek==0.4.5", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From cc2cf1edcdbf750c6421e95ffd7f32e4563f179c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:33:03 +0000 Subject: [PATCH 1537/1638] chore(deps-dev): Bump sphinx-substitution-extensions Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2026.1.12 to 2026.6.17. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2026.01.12...2026.06.17) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2026.6.17 dependency-type: direct:development 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 9506226d4..7389d5498 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2026.1.12", + "sphinx-substitution-extensions==2026.6.17", "sphinxcontrib-spelling==8.0.2", # ``sphinxcontrib-towncrier`` renders unreleased news fragments # into docs/source/unreleased.rst during Sphinx builds. From 33a1cb5ce848c252b88f175c0146b21c384491c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:32:44 +0000 Subject: [PATCH 1538/1638] chore(deps-dev): Bump pyproject-fmt from 2.24.1 to 2.25.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.24.1 to 2.25.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.24.1...pyproject-fmt/2.25.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.25.0 dependency-type: direct:development 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 7389d5498..3de995405 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.24.1", + "pyproject-fmt==2.25.0", "pyrefly==1.0.0", "pyright==1.1.410", "pyroma==5.0.1", From ecb8449f2e0eb9ce570b9fcbcb3c5ca3fbbfc5a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:33:17 +0000 Subject: [PATCH 1539/1638] chore(deps-dev): Bump ty from 0.0.49 to 0.0.50 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.49 to 0.0.50. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.49...0.0.50) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.50 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7389d5498..67bd4e75f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.49", + "ty==0.0.50", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 2d9fa2c14b58ac83dbe7b1eba65ef1d4512974b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:39:13 +0000 Subject: [PATCH 1540/1638] chore(deps-dev): Bump pyrefly from 1.0.0 to 1.1.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 1.0.0 to 1.1.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/1.0.0...1.1.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 1.1.0 dependency-type: direct:development 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 bea308a58..b62e16bcd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.25.0", - "pyrefly==1.0.0", + "pyrefly==1.1.0", "pyright==1.1.410", "pyroma==5.0.1", "pytest==9.1.0", From e6bfdd8654fd3aac7cb04129f7262c2c190b3846 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:32:19 +0000 Subject: [PATCH 1541/1638] chore(deps): Bump actions/checkout from 6 to 7 Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fb49823c..503bdb3e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: persist-credentials: false diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 25caa85e9..cb7110624 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: persist-credentials: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b424ca055..6a4aa244d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: contents: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: # zizmor: ignore[artipacked] git-auto-commit-action requires credentials # See # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches From 1bb2e5e69af1584bbf5bb63841b62858f98f2ae8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:32:44 +0000 Subject: [PATCH 1542/1638] chore(deps-dev): Bump ty from 0.0.50 to 0.0.51 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.50 to 0.0.51. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.50...0.0.51) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.51 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b62e16bcd..e110341f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.50", + "ty==0.0.51", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 3b64d01a8421b89d48fc0a990717f06809366470 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:33:13 +0000 Subject: [PATCH 1543/1638] chore(deps-dev): Bump ruff from 0.15.17 to 0.15.18 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.17 to 0.15.18. - [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.15.17...0.15.18) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.18 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b62e16bcd..a59838c49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.17", + "ruff==0.15.18", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From c195d7e83efbab65746c68f0ef7eca2d9729c5b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:33:20 +0000 Subject: [PATCH 1544/1638] chore(deps-dev): Bump pyrefly from 1.1.0 to 1.1.1 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/1.1.0...1.1.1) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 1.1.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b62e16bcd..23e929789 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.25.0", - "pyrefly==1.1.0", + "pyrefly==1.1.1", "pyright==1.1.410", "pyroma==5.0.1", "pytest==9.1.0", From c77e077275aee09498f85612227b8dbd8e82a87a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 10:32:57 +0000 Subject: [PATCH 1545/1638] chore(deps-dev): Bump pytest from 9.1.0 to 9.1.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.1.0 to 9.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/9.1.0...9.1.1) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.1.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f613aba94..07e6237a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.dev = [ "pyrefly==1.1.1", "pyright==1.1.410", "pyroma==5.0.1", - "pytest==9.1.0", + "pytest==9.1.1", "pytest-asyncio==1.4.0", "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", From 5844c59230bf5c08b88ad1883b7e4a854304210e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 10:33:09 +0000 Subject: [PATCH 1546/1638] chore(deps-dev): Bump zizmor from 1.25.2 to 1.26.1 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.25.2 to 1.26.1. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.25.2...v1.26.1) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.26.1 dependency-type: direct:development 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 f613aba94..17c3c3c13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,7 +93,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.25.2", + "zizmor==1.26.1", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3", "towncrier==25.8.0" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 0da0d65fc3e4fd9327f81d5419f949da385b6bc9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 10:32:58 +0000 Subject: [PATCH 1547/1638] chore(deps-dev): Bump ty from 0.0.51 to 0.0.52 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.51 to 0.0.52. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.51...0.0.52) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.52 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a42af41e7..e2d950865 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.51", + "ty==0.0.52", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 68f4f0e2c8bb4a586e8c360bb6b0e03bbc1f36f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 10:32:43 +0000 Subject: [PATCH 1548/1638] chore(deps-dev): Bump ty from 0.0.52 to 0.0.53 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.52 to 0.0.53. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/commits) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.53 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2d950865..e19f7ee94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.52", + "ty==0.0.53", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 646f22efb96cbc70e1d1a0d63c23836b5ba529ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 10:33:21 +0000 Subject: [PATCH 1549/1638] chore(deps-dev): Bump ruff from 0.15.18 to 0.15.19 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.18 to 0.15.19. - [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.15.18...0.15.19) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.19 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2d950865..f2f102b14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.18", + "ruff==0.15.19", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 5dbf0de18c41d2fb5bc5cb94188e301cdfb308fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jun 2026 10:32:45 +0000 Subject: [PATCH 1550/1638] chore(deps-dev): Bump pyright from 1.1.410 to 1.1.411 Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.410 to 1.1.411. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.410...v1.1.411) --- updated-dependencies: - dependency-name: pyright dependency-version: 1.1.411 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 081832b13..d8ad962f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ optional-dependencies.dev = [ "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.25.0", "pyrefly==1.1.1", - "pyright==1.1.410", + "pyright==1.1.411", "pyroma==5.0.1", "pytest==9.1.1", "pytest-asyncio==1.4.0", From ae7abb1bc9d495a44553139d8d77dd73a70ac50e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 10:32:45 +0000 Subject: [PATCH 1551/1638] chore(deps-dev): Bump ty from 0.0.53 to 0.0.54 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.53 to 0.0.54. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.53...0.0.54) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.54 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d8ad962f3..b9ea18ce0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.53", + "ty==0.0.54", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 7febd97687a4e2ccd08f5ff35b8cbda23997860e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 10:33:02 +0000 Subject: [PATCH 1552/1638] chore(deps-dev): Bump pyproject-fmt from 2.25.0 to 2.25.1 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.25.0 to 2.25.1. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.25.0...pyproject-fmt/2.25.1) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.25.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d8ad962f3..da1a5c9bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.25.0", + "pyproject-fmt==2.25.1", "pyrefly==1.1.1", "pyright==1.1.411", "pyroma==5.0.1", From 501b9f07db95c671c124e153b2dbf4367f76b9bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 10:33:15 +0000 Subject: [PATCH 1553/1638] chore(deps-dev): Bump ruff from 0.15.19 to 0.15.20 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.19 to 0.15.20. - [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.15.19...0.15.20) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.20 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d8ad962f3..9f54fadc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.19", + "ruff==0.15.20", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From ff249f530487a1d54e9c44d718c20966ffa92cf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 10:33:03 +0000 Subject: [PATCH 1554/1638] chore(deps-dev): Bump ty from 0.0.54 to 0.0.55 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.54 to 0.0.55. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.54...0.0.55) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.55 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index de8c5fbd2..4a002b406 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.54", + "ty==0.0.55", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From fcc13157fbf6d2e57e397062d73918c49e6302f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 10:32:55 +0000 Subject: [PATCH 1555/1638] chore(deps-dev): Bump prek from 0.4.5 to 0.4.6 Bumps [prek](https://github.com/j178/prek) from 0.4.5 to 0.4.6. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.5...v0.4.6) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a002b406..3b821e8f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.5.20.1", - "prek==0.4.5", + "prek==0.4.6", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From 6379135b43f13f4f1b9a6c0c59848beeccc04817 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 10:33:07 +0000 Subject: [PATCH 1556/1638] chore(deps-dev): Bump ty from 0.0.55 to 0.0.56 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.55 to 0.0.56. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.55...0.0.56) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.56 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b821e8f3..0a59529b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.55", + "ty==0.0.56", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From d7ae70a00182cd9444f8df93350b45ca422eb42f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 10:32:39 +0000 Subject: [PATCH 1557/1638] chore(deps): Bump astral-sh/setup-uv from 8.2.0 to 8.3.0 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 8.2.0 to 8.3.0. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v8.2.0...v8.3.0) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 8.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 503bdb3e0..d32f8fe0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.2.0 + uses: astral-sh/setup-uv@v8.3.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cb7110624..6f0a61090 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.2.0 + uses: astral-sh/setup-uv@v8.3.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a4aa244d..cd142b6db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v8.2.0 + uses: astral-sh/setup-uv@v8.3.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' From d072b3459269194d50fca3b38ae817b948eab6c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 10:33:00 +0000 Subject: [PATCH 1558/1638] chore(deps-dev): Bump prek from 0.4.6 to 0.4.8 Bumps [prek](https://github.com/j178/prek) from 0.4.6 to 0.4.8. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.6...v0.4.8) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0a59529b8..a9660d038 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.5.20.1", - "prek==0.4.6", + "prek==0.4.8", "pydocstringformatter==0.7.5", "pydocstyle==6.3", "pygments==2.20.0", From d436d4fc42eaeed62958ba0967200068c5eb9916 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 10:39:29 +0000 Subject: [PATCH 1559/1638] chore(deps-dev): Bump pydocstringformatter from 0.7.5 to 1.0.0 Bumps [pydocstringformatter](https://github.com/DanielNoord/pydocstringformatter) from 0.7.5 to 1.0.0. - [Release notes](https://github.com/DanielNoord/pydocstringformatter/releases) - [Commits](https://github.com/DanielNoord/pydocstringformatter/compare/v0.7.5...v1.0.0) --- updated-dependencies: - dependency-name: pydocstringformatter dependency-version: 1.0.0 dependency-type: direct:development 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 a9660d038..62596a17a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ optional-dependencies.dev = [ "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.5.20.1", "prek==0.4.8", - "pydocstringformatter==0.7.5", + "pydocstringformatter==1.0.0", "pydocstyle==6.3", "pygments==2.20.0", "pylint[spelling]==4.0.6", From ea481d79c862ce3f36179b427d3e024406acfa3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 10:32:37 +0000 Subject: [PATCH 1560/1638] chore(deps): Bump astral-sh/setup-uv from 8.3.0 to 8.3.1 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 8.3.0 to 8.3.1. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v8.3.0...v8.3.1) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 8.3.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d32f8fe0d..30b0fffba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.3.0 + uses: astral-sh/setup-uv@v8.3.1 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f0a61090..89971549e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.3.0 + uses: astral-sh/setup-uv@v8.3.1 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd142b6db..724ab1aee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v8.3.0 + uses: astral-sh/setup-uv@v8.3.1 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' From 161a2aae5981e661bf0c39f33b1cf6356e56ec28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 10:33:04 +0000 Subject: [PATCH 1561/1638] chore(deps-dev): Bump ruff from 0.15.20 to 0.15.21 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.20 to 0.15.21. - [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.15.20...0.15.21) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.21 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 62596a17a..45dc64048 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.20", + "ruff==0.15.21", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 2bc9b90229d866f9f05a3064b26966c65afa36a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 10:33:36 +0000 Subject: [PATCH 1562/1638] chore(deps-dev): Bump ty from 0.0.56 to 0.0.58 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.56 to 0.0.58. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.56...0.0.58) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.58 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 62596a17a..5a6615553 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.56", + "ty==0.0.58", "types-requests==2.33.0.20260518", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 3f44d754e73503b9db3bdf95623b63bd55745819 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 10:32:58 +0000 Subject: [PATCH 1563/1638] chore(deps-dev): Bump types-requests --- updated-dependencies: - dependency-name: types-requests dependency-version: 2.33.0.20260712 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aea789e99..d27281db5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,7 @@ optional-dependencies.dev = [ "torchvision>=0.20.1", "towncrier==25.8.0", "ty==0.0.58", - "types-requests==2.33.0.20260518", + "types-requests==2.33.0.20260712", "vulture==2.16", "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", From 54fc2c2fc2296a5d0809875f98e033ac4cb99795 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 10:33:22 +0000 Subject: [PATCH 1564/1638] chore(deps-dev): Bump prek from 0.4.8 to 0.4.9 Bumps [prek](https://github.com/j178/prek) from 0.4.8 to 0.4.9. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.8...v0.4.9) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.9 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aea789e99..c2ccb439f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.1.0", "mypy-strict-kwargs==2026.5.20.1", - "prek==0.4.8", + "prek==0.4.9", "pydocstringformatter==1.0.0", "pydocstyle==6.3", "pygments==2.20.0", From 9866fb9202ea519cd35e95432f63e052d0750d60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 10:39:23 +0000 Subject: [PATCH 1565/1638] chore(deps-dev): Bump mypy from 2.1.0 to 2.2.0 Bumps [mypy](https://github.com/python/mypy) from 2.1.0 to 2.2.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v2.1.0...v2.2.0) --- updated-dependencies: - dependency-name: mypy dependency-version: 2.2.0 dependency-type: direct:development 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 32671d984..9ac412232 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", - "mypy[faster-cache]==2.1.0", + "mypy[faster-cache]==2.2.0", "mypy-strict-kwargs==2026.5.20.1", "prek==0.4.9", "pydocstringformatter==1.0.0", From b6e0481b7fb481f3d8687c5b6079f6b402049f1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 10:39:26 +0000 Subject: [PATCH 1566/1638] chore(deps-dev): Bump ty from 0.0.58 to 0.0.59 --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.59 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 32671d984..565eab46a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.58", + "ty==0.0.59", "types-requests==2.33.0.20260712", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 748ff0490679a642f0b1e8531f8547240fd02691 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2026 10:32:50 +0000 Subject: [PATCH 1567/1638] chore(deps-dev): Bump pyproject-fmt from 2.25.1 to 2.25.3 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.25.1 to 2.25.3. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.25.1...pyproject-fmt/2.25.3) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.25.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ba9c9bb67..856449c5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.25.1", + "pyproject-fmt==2.25.3", "pyrefly==1.1.1", "pyright==1.1.411", "pyroma==5.0.1", From d988c316f4362ed8094e8ec8451d7ed55c7a1f35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2026 10:33:02 +0000 Subject: [PATCH 1568/1638] chore(deps-dev): Bump mypy from 2.2.0 to 2.3.0 Bumps [mypy](https://github.com/python/mypy) from 2.2.0 to 2.3.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v2.2.0...v2.3.0) --- updated-dependencies: - dependency-name: mypy dependency-version: 2.3.0 dependency-type: direct:development 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 ba9c9bb67..f444829b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ optional-dependencies.dev = [ "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", - "mypy[faster-cache]==2.2.0", + "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.5.20.1", "prek==0.4.9", "pydocstringformatter==1.0.0", From ebc699c1c0cda82dc3dffe439f07872a45d8de75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2026 10:33:14 +0000 Subject: [PATCH 1569/1638] chore(deps-dev): Bump zizmor from 1.26.1 to 1.27.0 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.26.1 to 1.27.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.26.1...v1.27.0) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.27.0 dependency-type: direct:development 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 ba9c9bb67..f1cedf3eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,7 +93,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.26.1", + "zizmor==1.27.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3", "towncrier==25.8.0" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 0fc029e3daf45b50c77a657c0cbd14c8f97f02c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 10:32:58 +0000 Subject: [PATCH 1570/1638] chore(deps-dev): Bump ty from 0.0.59 to 0.0.60 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.59 to 0.0.60. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.59...0.0.60) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.60 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d5f820845..bf774fc40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.59", + "ty==0.0.60", "types-requests==2.33.0.20260712", "vulture==2.16", "vws-python-mock==2026.2.22.3", From af4e84073c8ca0f2f225c284679e2c399757a335 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 10:33:20 +0000 Subject: [PATCH 1571/1638] chore(deps-dev): Bump prek from 0.4.9 to 0.4.10 Bumps [prek](https://github.com/j178/prek) from 0.4.9 to 0.4.10. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.9...v0.4.10) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.10 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d5f820845..9f179def3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.5.20.1", - "prek==0.4.9", + "prek==0.4.10", "pydocstringformatter==1.0.0", "pydocstyle==6.3", "pygments==2.20.0", From 6969f8700751e387f63e3e2da9380f06eb8f003a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 17 Jul 2026 07:59:04 +0100 Subject: [PATCH 1572/1638] Fix target_id when base_vws_url has a path prefix. Parse the target ID from the path segment after targets, summary, or duplicates so prefixed base URLs work. Closes #3091. Co-authored-by: Cursor --- newsfragments/3091.change.rst | 1 + src/vws/exceptions/vws_exceptions.py | 36 +++++++++++-------- tests/test_vws_exceptions.py | 53 ++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 15 deletions(-) create mode 100644 newsfragments/3091.change.rst diff --git a/newsfragments/3091.change.rst b/newsfragments/3091.change.rst new file mode 100644 index 000000000..b2696ec2a --- /dev/null +++ b/newsfragments/3091.change.rst @@ -0,0 +1 @@ +Fix ``target_id`` on target exceptions when ``base_vws_url`` includes a path prefix. diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index de09cdeaa..ac44cfd3e 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -14,6 +14,24 @@ from vws.exceptions.base_exceptions import VWSError +def _target_id_from_url(*, url: str) -> str: + """Return the target ID from a VWS response URL. + + Paths may include a custom base URL prefix. The target ID is the + path segment after ``targets``, ``summary``, or ``duplicates``. + """ + path = urlparse(url=url).path + parts = [part for part in path.split(sep="/") if part] + for marker in ("targets", "summary", "duplicates"): + try: + marker_index = parts.index(marker) + except ValueError: + continue + return parts[marker_index + 1] + message = f"Could not find a target ID in URL path {path!r}" + raise ValueError(message) # pragma: no cover + + @beartype class UnknownTargetError(VWSError): """Exception raised when Vuforia returns a response with a result code @@ -23,11 +41,7 @@ class UnknownTargetError(VWSError): @property def target_id(self) -> str: """The unknown target ID.""" - path = urlparse(url=self.response.url).path - # Every HTTP path which can raise this error has the target ID as the - # second path segment, e.g. `/something/{target_id}` or - # `/something/{target_id}/more`. - return path.split(sep="/")[2] + return _target_id_from_url(url=self.response.url) @beartype @@ -68,11 +82,7 @@ class TargetStatusProcessingError(VWSError): @property def target_id(self) -> str: """The processing target ID.""" - path = urlparse(url=self.response.url).path - # Every HTTP path which can raise this error has the target ID as the - # second path segment, e.g. `/something/{target_id}` or - # `/something/{target_id}/more`. - return path.split(sep="/")[2] + return _target_id_from_url(url=self.response.url) # This is not simulated by the mock. @@ -158,11 +168,7 @@ class TargetStatusNotSuccessError(VWSError): @property def target_id(self) -> str: """The unknown target ID.""" - path = urlparse(url=self.response.url).path - # Every HTTP path which can raise this error has the target ID as the - # second path segment, e.g. `/something/{target_id}` or - # `/something/{target_id}/more`. - return path.split(sep="/")[2] + return _target_id_from_url(url=self.response.url) @beartype diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 798d15f71..1bb34ce18 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -473,3 +473,56 @@ def test_vwserror_from_result_code() -> None: assert isinstance(exception, UnknownTargetError) assert exception.response is response + + +@pytest.mark.parametrize( + argnames=("exception_type", "url"), + argvalues=[ + (UnknownTargetError, "https://vws.vuforia.com/targets/abc"), + (UnknownTargetError, "https://example.com/prefix/targets/abc"), + (UnknownTargetError, "https://example.com/prefix/summary/abc"), + (UnknownTargetError, "https://example.com/prefix/duplicates/abc"), + ( + TargetStatusProcessingError, + "https://vws.vuforia.com/targets/abc", + ), + ( + TargetStatusProcessingError, + "https://example.com/prefix/targets/abc", + ), + ( + TargetStatusNotSuccessError, + "https://vws.vuforia.com/targets/abc", + ), + ( + TargetStatusNotSuccessError, + "https://example.com/prefix/targets/abc", + ), + ( + TargetStatusNotSuccessError, + "https://example.com/prefix/targets/abc/instances", + ), + ], +) +def test_target_id_with_base_url_prefixes( + *, + exception_type: type[ + UnknownTargetError + | TargetStatusProcessingError + | TargetStatusNotSuccessError + ], + url: str, +) -> None: + """``target_id`` is correct even when ``base_vws_url`` has a path + prefix. + """ + response = Response( + text="{}", + url=url, + status_code=HTTPStatus.NOT_FOUND, + headers={}, + request_body=None, + tell_position=0, + content=b"", + ) + assert exception_type(response=response).target_id == "abc" From 8640d397f9771f00a24e7d2bbefb869e9aa6e05e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 17 Jul 2026 08:01:46 +0100 Subject: [PATCH 1573/1638] Retain explicitly provided falsy custom transports. Only None should select the default transport across all sync and async clients. Closes #3092. Co-authored-by: Cursor --- newsfragments/3092.change.rst | 1 + src/vws/async_query.py | 4 +- src/vws/async_vumark_service.py | 4 +- src/vws/async_vws.py | 4 +- src/vws/query.py | 4 +- src/vws/vumark_service.py | 4 +- src/vws/vws.py | 4 +- tests/test_transports.py | 201 ++++++++++++++++++++++++++++++++ 8 files changed, 220 insertions(+), 6 deletions(-) create mode 100644 newsfragments/3092.change.rst diff --git a/newsfragments/3092.change.rst b/newsfragments/3092.change.rst new file mode 100644 index 000000000..a15105df8 --- /dev/null +++ b/newsfragments/3092.change.rst @@ -0,0 +1 @@ +Retain explicitly provided falsy custom transports instead of replacing them with defaults. diff --git a/src/vws/async_query.py b/src/vws/async_query.py index bebd3089d..88536144f 100644 --- a/src/vws/async_query.py +++ b/src/vws/async_query.py @@ -60,7 +60,9 @@ def __init__( self._client_secret_key = client_secret_key self._base_vwq_url = base_vwq_url self._request_timeout_seconds = request_timeout_seconds - self._transport = transport or AsyncHTTPXTransport() + self._transport = ( + transport if transport is not None else AsyncHTTPXTransport() + ) async def aclose(self) -> None: """Close the underlying transport if it supports closing.""" diff --git a/src/vws/async_vumark_service.py b/src/vws/async_vumark_service.py index 51c2ef349..24191d7c6 100644 --- a/src/vws/async_vumark_service.py +++ b/src/vws/async_vumark_service.py @@ -46,7 +46,9 @@ def __init__( self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url self._request_timeout_seconds = request_timeout_seconds - self._transport = transport or AsyncHTTPXTransport() + self._transport = ( + transport if transport is not None else AsyncHTTPXTransport() + ) async def aclose(self) -> None: """Close the underlying transport if it supports closing.""" diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index 92675ac18..5ec523565 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -57,7 +57,9 @@ def __init__( self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url self._request_timeout_seconds = request_timeout_seconds - self._transport = transport or AsyncHTTPXTransport() + self._transport = ( + transport if transport is not None else AsyncHTTPXTransport() + ) async def aclose(self) -> None: """Close the underlying transport if it supports closing.""" diff --git a/src/vws/query.py b/src/vws/query.py index 44840d6f0..3d9e19d7f 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -56,7 +56,9 @@ def __init__( self._client_secret_key = client_secret_key self._base_vwq_url = base_vwq_url self._request_timeout_seconds = request_timeout_seconds - self._transport = transport or RequestsTransport() + self._transport = ( + transport if transport is not None else RequestsTransport() + ) def query( self, diff --git a/src/vws/vumark_service.py b/src/vws/vumark_service.py index f4b04152f..a11eb5fc5 100644 --- a/src/vws/vumark_service.py +++ b/src/vws/vumark_service.py @@ -43,7 +43,9 @@ def __init__( self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url self._request_timeout_seconds = request_timeout_seconds - self._transport = transport or RequestsTransport() + self._transport = ( + transport if transport is not None else RequestsTransport() + ) def generate_vumark_instance( self, diff --git a/src/vws/vws.py b/src/vws/vws.py index 7eda102fe..b5122ae5f 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -56,7 +56,9 @@ def __init__( self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url self._request_timeout_seconds = request_timeout_seconds - self._transport = transport or RequestsTransport() + self._transport = ( + transport if transport is not None else RequestsTransport() + ) def make_request( self, diff --git a/tests/test_transports.py b/tests/test_transports.py index 752b0ef23..f8865e57d 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -1,13 +1,24 @@ """Tests for HTTP transport implementations.""" +import io +import uuid from http import HTTPStatus import httpx import pytest import respx +from vws import ( + VWS, + AsyncCloudRecoService, + AsyncVuMarkService, + AsyncVWS, + CloudRecoService, + VuMarkService, +) from vws.response import Response from vws.transports import AsyncHTTPXTransport, HTTPXTransport +from vws.vumark_accept import VuMarkAccept class TestHTTPXTransport: @@ -206,3 +217,193 @@ async def test_context_manager() -> None: assert route.called assert isinstance(response, Response) assert response.status_code == HTTPStatus.OK + + +class _FalsyTransport: + """A sync transport that is falsy but protocol-conforming.""" + + def __bool__(self) -> bool: + """Return ``False`` so truthiness checks would skip this + transport. + """ + return False + + def close(self) -> None: + """Close the transport.""" + + def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Response: + """Return a successful API response for the requested URL.""" + del method, headers, request_timeout + if url.endswith("/query"): + body = '{"result_code":"Success","results":[]}' + return Response( + text=body, + url=url, + status_code=HTTPStatus.OK, + headers={}, + request_body=data, + tell_position=0, + content=body.encode(), + ) + if "/instances" in url: + content = b"vumark-bytes" + return Response( + text="", + url=url, + status_code=HTTPStatus.OK, + headers={}, + request_body=data, + tell_position=0, + content=content, + ) + body = '{"result_code":"Success","results":[]}' + return Response( + text=body, + url=url, + status_code=HTTPStatus.OK, + headers={}, + request_body=data, + tell_position=0, + content=body.encode(), + ) + + +class _FalsyAsyncTransport: + """An async transport that is falsy but protocol-conforming.""" + + def __bool__(self) -> bool: + """Return ``False`` so truthiness checks would skip this + transport. + """ + return False + + async def aclose(self) -> None: + """Close the transport.""" + + async def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Response: + """Return a successful API response for the requested URL.""" + del method, headers, request_timeout + if url.endswith("/query"): + body = '{"result_code":"Success","results":[]}' + return Response( + text=body, + url=url, + status_code=HTTPStatus.OK, + headers={}, + request_body=data, + tell_position=0, + content=body.encode(), + ) + if "/instances" in url: + content = b"vumark-bytes" + return Response( + text="", + url=url, + status_code=HTTPStatus.OK, + headers={}, + request_body=data, + tell_position=0, + content=content, + ) + body = '{"result_code":"Success","results":[]}' + return Response( + text=body, + url=url, + status_code=HTTPStatus.OK, + headers={}, + request_body=data, + tell_position=0, + content=body.encode(), + ) + + +def test_falsy_sync_transport_is_retained( + high_quality_image: io.BytesIO, +) -> None: + """Falsy custom sync transports are not replaced by the default.""" + access_key = uuid.uuid4().hex + secret_key = uuid.uuid4().hex + transport = _FalsyTransport() + + assert ( + VWS( + server_access_key=access_key, + server_secret_key=secret_key, + transport=transport, + ).list_targets() + == [] + ) + assert ( + CloudRecoService( + client_access_key=access_key, + client_secret_key=secret_key, + transport=transport, + ).query(image=high_quality_image) + == [] + ) + assert ( + VuMarkService( + server_access_key=access_key, + server_secret_key=secret_key, + transport=transport, + ).generate_vumark_instance( + target_id="target", + instance_id="instance", + accept=VuMarkAccept.PNG, + ) + == b"vumark-bytes" + ) + + +@pytest.mark.asyncio +async def test_falsy_async_transport_is_retained( + high_quality_image: io.BytesIO, +) -> None: + """Falsy custom async transports are not replaced by the default.""" + access_key = uuid.uuid4().hex + secret_key = uuid.uuid4().hex + transport = _FalsyAsyncTransport() + + async with AsyncVWS( + server_access_key=access_key, + server_secret_key=secret_key, + transport=transport, + ) as vws_client: + assert await vws_client.list_targets() == [] + + async with AsyncCloudRecoService( + client_access_key=access_key, + client_secret_key=secret_key, + transport=transport, + ) as cloud_reco_client: + assert await cloud_reco_client.query(image=high_quality_image) == [] + + async with AsyncVuMarkService( + server_access_key=access_key, + server_secret_key=secret_key, + transport=transport, + ) as vumark_client: + assert ( + await vumark_client.generate_vumark_instance( + target_id="target", + instance_id="instance", + accept=VuMarkAccept.PNG, + ) + == b"vumark-bytes" + ) From 9a410355bc78e25d8e8acdbc5b5e3902331ab4ad Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 17 Jul 2026 08:03:42 +0100 Subject: [PATCH 1574/1638] Cover target_id helper fallback when the URL has no marker. Co-authored-by: Cursor --- src/vws/exceptions/vws_exceptions.py | 2 +- tests/test_vws_exceptions.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index ac44cfd3e..3e7e12265 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -29,7 +29,7 @@ def _target_id_from_url(*, url: str) -> str: continue return parts[marker_index + 1] message = f"Could not find a target ID in URL path {path!r}" - raise ValueError(message) # pragma: no cover + raise ValueError(message) @beartype diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 1bb34ce18..92b33d539 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -526,3 +526,21 @@ def test_target_id_with_base_url_prefixes( content=b"", ) assert exception_type(response=response).target_id == "abc" + + +def test_target_id_missing_from_url() -> None: + """A clear error is raised when the response URL has no target ID.""" + response = Response( + text="{}", + url="https://example.com/no-target-here", + status_code=HTTPStatus.NOT_FOUND, + headers={}, + request_body=None, + tell_position=0, + content=b"", + ) + with pytest.raises( + expected_exception=ValueError, + match="Could not find a target ID", + ): + _ = UnknownTargetError(response=response).target_id From 211f333b83edb390a29a2d85029eae59518ef6bc Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 17 Jul 2026 08:06:06 +0100 Subject: [PATCH 1575/1638] Fix spelling and pylint issues in falsy transport tests. Co-authored-by: Cursor --- spelling_private_dict.txt | 2 ++ tests/test_transports.py | 50 ++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 73d358a00..382e8ccd3 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -2,6 +2,7 @@ AuthenticationFailure BadImage ConnectionErrorPossiblyImageTooLarge DateRangeError +Falsy ImageTooLarge InactiveProject JSONDecodeError @@ -45,6 +46,7 @@ dev dict docstring enum +falsy filename foo formdata diff --git a/tests/test_transports.py b/tests/test_transports.py index f8865e57d..fa3c7aef8 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -341,34 +341,30 @@ def test_falsy_sync_transport_is_retained( secret_key = uuid.uuid4().hex transport = _FalsyTransport() - assert ( - VWS( - server_access_key=access_key, - server_secret_key=secret_key, - transport=transport, - ).list_targets() - == [] - ) - assert ( - CloudRecoService( - client_access_key=access_key, - client_secret_key=secret_key, - transport=transport, - ).query(image=high_quality_image) - == [] - ) - assert ( - VuMarkService( - server_access_key=access_key, - server_secret_key=secret_key, - transport=transport, - ).generate_vumark_instance( - target_id="target", - instance_id="instance", - accept=VuMarkAccept.PNG, - ) - == b"vumark-bytes" + targets = VWS( + server_access_key=access_key, + server_secret_key=secret_key, + transport=transport, + ).list_targets() + assert targets == [] + + query_results = CloudRecoService( + client_access_key=access_key, + client_secret_key=secret_key, + transport=transport, + ).query(image=high_quality_image) + assert query_results == [] + + vumark_bytes = VuMarkService( + server_access_key=access_key, + server_secret_key=secret_key, + transport=transport, + ).generate_vumark_instance( + target_id="target", + instance_id="instance", + accept=VuMarkAccept.PNG, ) + assert vumark_bytes == b"vumark-bytes" @pytest.mark.asyncio From 30e00318eda53bd05b07b86d81fcd265b48b5ce3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 07:08:26 +0000 Subject: [PATCH 1576/1638] chore(deps): Bump astral-sh/setup-uv from 8.3.1 to 8.3.2 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 8.3.1 to 8.3.2. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v8.3.1...v8.3.2) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 8.3.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30b0fffba..220fdfa64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.3.1 + uses: astral-sh/setup-uv@v8.3.2 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 89971549e..04816ee8e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.3.1 + uses: astral-sh/setup-uv@v8.3.2 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 724ab1aee..08139a653 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v8.3.1 + uses: astral-sh/setup-uv@v8.3.2 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' From c1edafb7edc3c225b9be1dd247c89ebba9ac3436 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 17 Jul 2026 08:08:42 +0100 Subject: [PATCH 1577/1638] Satisfy pylint empty-list comparison check in transport tests. Co-authored-by: Cursor --- tests/test_transports.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_transports.py b/tests/test_transports.py index fa3c7aef8..78c3ff0cf 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -346,14 +346,14 @@ def test_falsy_sync_transport_is_retained( server_secret_key=secret_key, transport=transport, ).list_targets() - assert targets == [] + assert not targets query_results = CloudRecoService( client_access_key=access_key, client_secret_key=secret_key, transport=transport, ).query(image=high_quality_image) - assert query_results == [] + assert not query_results vumark_bytes = VuMarkService( server_access_key=access_key, @@ -381,14 +381,14 @@ async def test_falsy_async_transport_is_retained( server_secret_key=secret_key, transport=transport, ) as vws_client: - assert await vws_client.list_targets() == [] + assert not await vws_client.list_targets() async with AsyncCloudRecoService( client_access_key=access_key, client_secret_key=secret_key, transport=transport, ) as cloud_reco_client: - assert await cloud_reco_client.query(image=high_quality_image) == [] + assert not await cloud_reco_client.query(image=high_quality_image) async with AsyncVuMarkService( server_access_key=access_key, From 9a9bf49c58faf9fd2ec7afb4b6b6daf931be8da6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 17 Jul 2026 08:14:43 +0100 Subject: [PATCH 1578/1638] Cover falsy transport __bool__ methods in retention tests. Co-authored-by: Cursor --- tests/test_transports.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_transports.py b/tests/test_transports.py index 78c3ff0cf..f208339d4 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -340,6 +340,7 @@ def test_falsy_sync_transport_is_retained( access_key = uuid.uuid4().hex secret_key = uuid.uuid4().hex transport = _FalsyTransport() + assert not transport targets = VWS( server_access_key=access_key, @@ -375,6 +376,7 @@ async def test_falsy_async_transport_is_retained( access_key = uuid.uuid4().hex secret_key = uuid.uuid4().hex transport = _FalsyAsyncTransport() + assert not transport async with AsyncVWS( server_access_key=access_key, From 937622c75ddfbcbb3f9f7e133014d65f6213c6dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 10:33:02 +0000 Subject: [PATCH 1579/1638] chore(deps-dev): Bump ruff from 0.15.21 to 0.15.22 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.21 to 0.15.22. - [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.15.21...0.15.22) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.22 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2f964703b..7de4546bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.21", + "ruff==0.15.22", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 498baf99c31c48ea001d3b4cb1550c11b21738f7 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sat, 18 Jul 2026 18:23:05 +0100 Subject: [PATCH 1580/1638] Remove obsolete bdist_wheel.universal setting. Universal wheels claim Python 2 support; these projects require Python 3 only, and the setting triggers setuptools deprecation warnings. Co-authored-by: Cursor --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7de4546bf..62406665c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,9 +111,6 @@ package-data.vws = [ ] zip-safe = false -[tool.distutils] -bdist_wheel.universal = true - [tool.setuptools_scm] # This keeps the start of the version the same as the last release. # This is useful for our documentation to include e.g. binary links From dc8eae121685a132bfaf0342f009c1a51486b226 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 10:33:02 +0000 Subject: [PATCH 1581/1638] chore(deps-dev): Bump doccmd from 2026.5.25 to 2026.7.19 Bumps [doccmd](https://github.com/adamtheturtle/doccmd) from 2026.5.25 to 2026.7.19. - [Release notes](https://github.com/adamtheturtle/doccmd/releases) - [Changelog](https://github.com/adamtheturtle/doccmd/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/doccmd/compare/2026.05.25...2026.07.19) --- updated-dependencies: - dependency-name: doccmd dependency-version: 2026.7.19 dependency-type: direct:development 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 62406665c..238d4e64c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ optional-dependencies.dev = [ "check-manifest==0.51", "deptry==0.25.1", "doc8==2.0.0", - "doccmd==2026.5.25", + "doccmd==2026.7.19", "freezegun==1.5.5", "furo==2025.12.19", "interrogate==1.7.0", From a656fa07d4b17fa61798d7337c17c99cc48cf39a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 10:33:25 +0000 Subject: [PATCH 1582/1638] chore(deps-dev): Bump mypy-strict-kwargs from 2026.5.20.1 to 2026.7.19.1 Bumps [mypy-strict-kwargs](https://github.com/adamtheturtle/mypy-strict-kwargs) from 2026.5.20.1 to 2026.7.19.1. - [Release notes](https://github.com/adamtheturtle/mypy-strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/mypy-strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/mypy-strict-kwargs/compare/2026.05.20.1...2026.07.19.1) --- updated-dependencies: - dependency-name: mypy-strict-kwargs dependency-version: 2026.7.19.1 dependency-type: direct:development 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 62406665c..2b900867d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "furo==2025.12.19", "interrogate==1.7.0", "mypy[faster-cache]==2.3.0", - "mypy-strict-kwargs==2026.5.20.1", + "mypy-strict-kwargs==2026.7.19.1", "prek==0.4.10", "pydocstringformatter==1.0.0", "pydocstyle==6.3", From 54f195d4c8dd2f35fcea050a2e72ef88df5ec15a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 10:33:36 +0000 Subject: [PATCH 1583/1638] chore(deps-dev): Bump ty from 0.0.60 to 0.0.61 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.60 to 0.0.61. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.60...0.0.61) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.61 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 62406665c..f22f49b69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.60", + "ty==0.0.61", "types-requests==2.33.0.20260712", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 3aecfa222266d5e0d235f02a417d75b0060d17c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:32:34 +0000 Subject: [PATCH 1584/1638] chore(deps): Bump astral-sh/setup-uv from 8.3.2 to 9.0.0 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 8.3.2 to 9.0.0. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v8.3.2...v9.0.0) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 220fdfa64..7a89a87c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.3.2 + uses: astral-sh/setup-uv@v9.0.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 04816ee8e..091929e2a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@v8.3.2 + uses: astral-sh/setup-uv@v9.0.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08139a653..3337a2415 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v8.3.2 + uses: astral-sh/setup-uv@v9.0.0 with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' From 3acaae0efa58789386e7d83a446704b8fc5119d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:32:43 +0000 Subject: [PATCH 1585/1638] chore(deps-dev): Bump zizmor from 1.27.0 to 1.28.0 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.27.0 to 1.28.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.27.0...v1.28.0) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.28.0 dependency-type: direct:development 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 4a69e6cc3..0fd555456 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,7 +93,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.2.22.3", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.27.0", + "zizmor==1.28.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3", "towncrier==25.8.0" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 0d9b9391899e382cbf7aa9aeedd9ccb9a094971d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:33:05 +0000 Subject: [PATCH 1586/1638] chore(deps-dev): Bump ty from 0.0.61 to 0.0.62 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.61 to 0.0.62. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.61...0.0.62) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.62 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a69e6cc3..75387e4c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.61", + "ty==0.0.62", "types-requests==2.33.0.20260712", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 076d311c6f5fa7fe859e9c71b6de95030f0eb003 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 10:33:00 +0000 Subject: [PATCH 1587/1638] chore(deps-dev): Bump strict-kwargs from 2026.6.8.post1 to 2026.7.24 Bumps [strict-kwargs](https://github.com/adamtheturtle/strict-kwargs) from 2026.6.8.post1 to 2026.7.24. - [Release notes](https://github.com/adamtheturtle/strict-kwargs/releases) - [Changelog](https://github.com/adamtheturtle/strict-kwargs/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/strict-kwargs/compare/2026.6.8-post.1...2026.7.24) --- updated-dependencies: - dependency-name: strict-kwargs dependency-version: 2026.7.24 dependency-type: direct:development 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 9574388b2..9e1f46ab8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ optional-dependencies.dev = [ # ``sphinxcontrib-towncrier`` renders unreleased news fragments # into docs/source/unreleased.rst during Sphinx builds. "sphinxcontrib-towncrier==0.5.0a0", - "strict-kwargs==2026.6.8.post1", + "strict-kwargs==2026.7.24", "sybil==10.1.0", # Listed explicitly (despite being transitive via vws-python-mock) so that # [tool.uv.sources] can redirect to the CPU-only PyTorch index. From 8909f2213e663c0c3ecf163a1a99158199a6914b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 10:33:17 +0000 Subject: [PATCH 1588/1638] chore(deps-dev): Bump ty from 0.0.62 to 0.0.63 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.62 to 0.0.63. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.62...0.0.63) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.63 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9574388b2..b294e3eb7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.62", + "ty==0.0.63", "types-requests==2.33.0.20260712", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 004e7a9f88ff2f993c0ce29411a78017191ed2c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 10:33:31 +0000 Subject: [PATCH 1589/1638] chore(deps-dev): Bump ruff from 0.15.22 to 0.16.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.22 to 0.16.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.15.22...0.16.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.0 dependency-type: direct:development 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 9574388b2..c039d1d11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.15.22", + "ruff==0.16.0", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From 328a4ffbf786e4f6f5c4f3b75d90bc9fd97d32df Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 24 Jul 2026 13:03:33 +0100 Subject: [PATCH 1590/1638] Fix strict-kwargs pre-commit arguments --- .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 f4629bbd1..863357160 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -302,7 +302,7 @@ repos: - id: strict-kwargs-fix name: strict-kwargs - entry: uv run --extra=dev strict-kwargs check --fix --diff + entry: uv run --extra=dev strict-kwargs check --fix language: python types_or: [python] additional_dependencies: From dfc391ff351b4b18f0ac663be4b01844c7c1933d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 24 Jul 2026 16:55:15 +0100 Subject: [PATCH 1591/1638] Configure Ruff 0.16 defaults --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c039d1d11..8c9299ce0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -132,6 +132,8 @@ lint.select = [ lint.ignore = [ # Ruff warns that this conflicts with the formatter. "COM812", + # This project does not use per-file copyright notices. + "CPY001", # Allow our chosen docstring line-style - pydocstringformatter handles formatting # but doesn't enforce D205 (blank line after summary) or D212 (summary on first line). "D205", From 3cadb213cda39be5ce16a1d7268b95aa43b1b5be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 10:32:50 +0000 Subject: [PATCH 1592/1638] chore(deps-dev): Bump prek from 0.4.10 to 0.4.11 Bumps [prek](https://github.com/j178/prek) from 0.4.10 to 0.4.11. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.10...v0.4.11) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.11 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f9d908c15..bf05a3854 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.7.19.1", - "prek==0.4.10", + "prek==0.4.11", "pydocstringformatter==1.0.0", "pydocstyle==6.3", "pygments==2.20.0", From 4f1e5f41df4798b4be6f2edb1f35f87787c597a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 10:33:06 +0000 Subject: [PATCH 1593/1638] chore(deps-dev): Bump pyproject-fmt from 2.25.3 to 2.25.4 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.25.3 to 2.25.4. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.25.3...pyproject-fmt/2.25.4) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.25.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f9d908c15..fd3c4d350 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.25.3", + "pyproject-fmt==2.25.4", "pyrefly==1.1.1", "pyright==1.1.411", "pyroma==5.0.1", From 8dfd770607f45f5d9ed8d607293c1277b0257136 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 10:32:53 +0000 Subject: [PATCH 1594/1638] chore(deps-dev): Bump ty from 0.0.63 to 0.0.64 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.63 to 0.0.64. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.63...0.0.64) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.64 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8870419d1..3cf6a3476 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.63", + "ty==0.0.64", "types-requests==2.33.0.20260712", "vulture==2.16", "vws-python-mock==2026.2.22.3", From 8498102346bd5d457cf969fc14e54634283299bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 10:33:09 +0000 Subject: [PATCH 1595/1638] chore(deps-dev): Bump pyproject-fmt from 2.25.4 to 2.26.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.25.4 to 2.26.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.25.4...pyproject-fmt/2.26.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.26.0 dependency-type: direct:development 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 8870419d1..9a77c6c47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.25.4", + "pyproject-fmt==2.26.0", "pyrefly==1.1.1", "pyright==1.1.411", "pyroma==5.0.1", From 0738dc2084b4c53e03e18d7922d2c7a33e1388da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:32:50 +0000 Subject: [PATCH 1596/1638] chore(deps-dev): Bump ty from 0.0.64 to 0.0.65 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.64 to 0.0.65. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.64...0.0.65) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.65 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8054c2d35..b1825aeba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "torch>=2.5.1", "torchvision>=0.20.1", "towncrier==25.8.0", - "ty==0.0.64", + "ty==0.0.65", "types-requests==2.33.0.20260712", "vulture==2.16", "vws-python-mock==2026.2.22.3", From cc3b349fbc060413ee1fb8a9270394345b6482e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:33:19 +0000 Subject: [PATCH 1597/1638] chore(deps-dev): Bump ruff from 0.16.0 to 0.16.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.0 to 0.16.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.16.0...0.16.1) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b1825aeba..35b19ff6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.16.0", + "ruff==0.16.1", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From def8cc92a1954e417dbf1a753bf14e8fa37a66c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 10:33:00 +0000 Subject: [PATCH 1598/1638] chore(deps-dev): Bump pyrefly from 1.1.1 to 1.2.0 Bumps [pyrefly](https://github.com/facebook/pyrefly) from 1.1.1 to 1.2.0. - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/1.1.1...1.2.0) --- updated-dependencies: - dependency-name: pyrefly dependency-version: 1.2.0 dependency-type: direct:development 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 35b19ff6c..99e3bb1bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ optional-dependencies.dev = [ "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.26.0", - "pyrefly==1.1.1", + "pyrefly==1.2.0", "pyright==1.1.411", "pyroma==5.0.1", "pytest==9.1.1", From 8a73d4b9a4b6ea0f666d34122ca0354a2cc552b2 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 4 Aug 2026 11:58:41 +0100 Subject: [PATCH 1599/1638] Use VWS Python Mock 2026.8.4 --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/publish-site.yml | 2 +- README.rst | 2 +- newsfragments/822.change.rst | 1 + pyproject.toml | 5 +- src/vws/exceptions/vws_exceptions.py | 12 ++--- tests/test_async_vws_exceptions.py | 75 ++++++++++++++++++++++++++++ tests/test_vws_exceptions.py | 66 ++++++++++++++++++++++-- 9 files changed, 148 insertions(+), 19 deletions(-) create mode 100644 newsfragments/822.change.rst diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a89a87c1..21f12ba8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: build: strategy: matrix: - python-version: ['3.13', '3.14'] + python-version: ['3.14'] platform: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 091929e2a..3a0e1e1d9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: build: strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] platform: [ubuntu-latest, windows-latest] hook-stage: [pre-commit, pre-push, manual] diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml index 8f5a347a4..fceb50805 100644 --- a/.github/workflows/publish-site.yml +++ b/.github/workflows/publish-site.yml @@ -22,7 +22,7 @@ jobs: with: documentation_path: docs/source pyproject_extras: dev - python_version: '3.13' + python_version: '3.14' sphinx_build_options: -W cache: true publish: ${{ github.ref_name == 'main' }} diff --git a/README.rst b/README.rst index dea6bb93d..b11993035 100644 --- a/README.rst +++ b/README.rst @@ -73,4 +73,4 @@ See the `full documentation `__. :target: https://github.com/VWS-Python/vws-python/actions .. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg :target: https://badge.fury.io/py/VWS-Python -.. |minimum-python-version| replace:: 3.13 +.. |minimum-python-version| replace:: 3.14 diff --git a/newsfragments/822.change.rst b/newsfragments/822.change.rst new file mode 100644 index 000000000..18195db79 --- /dev/null +++ b/newsfragments/822.change.rst @@ -0,0 +1 @@ +Drop Python 3.13 support, update VWS Python Mock, and test quota and project-state error responses against the mock. diff --git a/pyproject.toml b/pyproject.toml index 99e3bb1bd..8bdb08085 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,14 +18,13 @@ license = "MIT" authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com" }, ] -requires-python = ">=3.13" +requires-python = ">=3.14" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", ] dynamic = [ @@ -90,7 +89,7 @@ optional-dependencies.dev = [ "ty==0.0.65", "types-requests==2.33.0.20260712", "vulture==2.16", - "vws-python-mock==2026.2.22.3", + "vws-python-mock==2026.8.4", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.28.0", diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 3e7e12265..3749b5619 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -65,9 +65,8 @@ class AuthenticationFailureError(VWSError): """ -# See https://github.com/VWS-Python/vws-python/issues/822. @beartype -class RequestQuotaReachedError(VWSError): # pragma: no cover +class RequestQuotaReachedError(VWSError): """Exception raised when Vuforia returns a response with a result code 'RequestQuotaReached'. """ @@ -93,25 +92,22 @@ class DateRangeError(VWSError): # pragma: no cover """ -# This is not simulated by the mock. @beartype -class TargetQuotaReachedError(VWSError): # pragma: no cover +class TargetQuotaReachedError(VWSError): """Exception raised when Vuforia returns a response with a result code 'TargetQuotaReached'. """ -# This is not simulated by the mock. @beartype -class ProjectSuspendedError(VWSError): # pragma: no cover +class ProjectSuspendedError(VWSError): """Exception raised when Vuforia returns a response with a result code 'ProjectSuspended'. """ -# This is not simulated by the mock. @beartype -class ProjectHasNoAPIAccessError(VWSError): # pragma: no cover +class ProjectHasNoAPIAccessError(VWSError): """Exception raised when Vuforia returns a response with a result code 'ProjectHasNoAPIAccess'. """ diff --git a/tests/test_async_vws_exceptions.py b/tests/test_async_vws_exceptions.py index cd35854f1..daa57423a 100644 --- a/tests/test_async_vws_exceptions.py +++ b/tests/test_async_vws_exceptions.py @@ -10,6 +10,7 @@ from mock_vws.states import States from vws import AsyncVuMarkService, AsyncVWS +from vws.exceptions.base_exceptions import VWSError # noqa: TC001 from vws.exceptions.custom_exceptions import ( ServerError, ) @@ -20,8 +21,12 @@ ImageTooLargeError, InvalidInstanceIdError, MetadataTooLargeError, + ProjectHasNoAPIAccessError, ProjectInactiveError, + ProjectSuspendedError, + RequestQuotaReachedError, TargetNameExistError, + TargetQuotaReachedError, TargetStatusProcessingError, UnknownTargetError, ) @@ -94,6 +99,76 @@ async def test_add_bad_name( assert exc.value.response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR +@pytest.mark.asyncio +async def test_request_quota_reached() -> None: + """A ``RequestQuotaReached`` exception is raised at the quota.""" + database = CloudDatabase(request_quota=0) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + async_vws_client = AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + with pytest.raises(expected_exception=RequestQuotaReachedError) as exc: + await async_vws_client.list_targets() + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + + +@pytest.mark.asyncio +async def test_target_quota_reached( + high_quality_image: io.BytesIO, +) -> None: + """A ``TargetQuotaReached`` exception is raised at the quota.""" + database = CloudDatabase(target_quota=0) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + async_vws_client = AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + with pytest.raises(expected_exception=TargetQuotaReachedError) as exc: + await async_vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + argnames=("state", "expected_exception"), + argvalues=[ + (States.PROJECT_SUSPENDED, ProjectSuspendedError), + (States.PROJECT_HAS_NO_API_ACCESS, ProjectHasNoAPIAccessError), + ], +) +async def test_project_state_error( + *, + state: States, + expected_exception: type[VWSError], +) -> None: + """Configured project states raise their matching exceptions.""" + database = CloudDatabase(state=state) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + async_vws_client = AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + with pytest.raises(expected_exception=expected_exception) as exc: + await async_vws_client.list_targets() + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + + @pytest.mark.asyncio async def test_fail(high_quality_image: io.BytesIO) -> None: """A ``Fail`` exception is raised when the server access key diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 92b33d539..f05436e5c 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -105,10 +105,68 @@ def test_add_bad_name( def test_request_quota_reached() -> None: - """ - See https://github.com/VWS-Python/vws-python/issues/822 for writing - this test. - """ + """A ``RequestQuotaReached`` exception is raised at the quota.""" + database = CloudDatabase(request_quota=0) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + with pytest.raises(expected_exception=RequestQuotaReachedError) as exc: + vws_client.list_targets() + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + + +def test_target_quota_reached(high_quality_image: io.BytesIO) -> None: + """A ``TargetQuotaReached`` exception is raised at the quota.""" + database = CloudDatabase(target_quota=0) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + with pytest.raises(expected_exception=TargetQuotaReachedError) as exc: + vws_client.add_target( + name="x", + width=1, + image=high_quality_image, + active_flag=True, + application_metadata=None, + ) + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + + +@pytest.mark.parametrize( + argnames=("state", "expected_exception"), + argvalues=[ + (States.PROJECT_SUSPENDED, ProjectSuspendedError), + (States.PROJECT_HAS_NO_API_ACCESS, ProjectHasNoAPIAccessError), + ], +) +def test_project_state_error( + *, + state: States, + expected_exception: type[VWSError], +) -> None: + """Configured project states raise their matching exceptions.""" + database = CloudDatabase(state=state) + with MockVWS() as mock: + mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + ) + + with pytest.raises(expected_exception=expected_exception) as exc: + vws_client.list_targets() + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN def test_fail(high_quality_image: io.BytesIO) -> None: From 3dcd12a7b5dae00937ef28672e868a3e7cbfbe96 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 11:00:46 +0000 Subject: [PATCH 1600/1638] [pre-commit.ci lite] apply automatic fixes --- src/vws/exceptions/base_exceptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index 4b8727e79..ce96ac4e0 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -38,7 +38,7 @@ class VWSError(Exception): https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes. """ - _exceptions_by_result_code: ClassVar[dict[str, type["VWSError"]]] = {} + _exceptions_by_result_code: ClassVar[dict[str, type[VWSError]]] = {} def __init__(self, response: Response) -> None: """ @@ -52,7 +52,7 @@ def __init__(self, response: Response) -> None: def register_exceptions_by_result_code( cls, *, - exceptions_by_result_code: Mapping[str, type["VWSError"]], + exceptions_by_result_code: Mapping[str, type[VWSError]], ) -> None: """Register ``result_code`` to exception mappings.""" cls._exceptions_by_result_code.update(exceptions_by_result_code) @@ -63,7 +63,7 @@ def from_result_code( *, result_code: str, response: Response, - ) -> "VWSError": + ) -> VWSError: """Create the mapped exception for a VWS ``result_code``.""" exception_type = cls._exceptions_by_result_code[result_code] return exception_type(response=response) From aa0222d29bdf865556437221a1c2f6173a3867f5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 4 Aug 2026 12:11:26 +0100 Subject: [PATCH 1601/1638] Fix Ruff typing import checks --- conftest.py | 4 ++-- src/vws/_async_vws_request.py | 4 ++-- src/vws/_vws_request.py | 4 ++-- src/vws/async_vumark_service.py | 2 +- src/vws/async_vws.py | 2 +- src/vws/exceptions/base_exceptions.py | 4 ++-- src/vws/exceptions/custom_exceptions.py | 2 +- src/vws/transports.py | 6 ++++-- src/vws/vumark_service.py | 2 +- src/vws/vws.py | 2 +- tests/conftest.py | 6 +++--- tests/test_async_cloud_reco_exceptions.py | 2 +- tests/test_async_query.py | 2 +- tests/test_async_vws.py | 2 +- tests/test_cloud_reco_exceptions.py | 2 +- tests/test_query.py | 2 +- tests/test_transports.py | 2 +- tests/test_vws.py | 2 +- 18 files changed, 27 insertions(+), 25 deletions(-) diff --git a/conftest.py b/conftest.py index 8e5442cf0..f82cefc93 100644 --- a/conftest.py +++ b/conftest.py @@ -1,8 +1,8 @@ """Setup for Sybil.""" -import io +import io # noqa: TC003 import uuid -from collections.abc import Generator +from collections.abc import Generator # noqa: TC003 from doctest import ELLIPSIS from pathlib import Path diff --git a/src/vws/_async_vws_request.py b/src/vws/_async_vws_request.py index 4ebd50c86..bd8d91422 100644 --- a/src/vws/_async_vws_request.py +++ b/src/vws/_async_vws_request.py @@ -5,8 +5,8 @@ from beartype import BeartypeConf, beartype from vws_auth_tools import authorization_header, rfc_1123_date -from vws.response import Response -from vws.transports import AsyncTransport +from vws.response import Response # noqa: TC001 +from vws.transports import AsyncTransport # noqa: TC001 @beartype(conf=BeartypeConf(is_pep484_tower=True)) diff --git a/src/vws/_vws_request.py b/src/vws/_vws_request.py index 8e08cf863..3153dce0c 100644 --- a/src/vws/_vws_request.py +++ b/src/vws/_vws_request.py @@ -5,8 +5,8 @@ from beartype import BeartypeConf, beartype from vws_auth_tools import authorization_header, rfc_1123_date -from vws.response import Response -from vws.transports import Transport +from vws.response import Response # noqa: TC001 +from vws.transports import Transport # noqa: TC001 @beartype(conf=BeartypeConf(is_pep484_tower=True)) diff --git a/src/vws/async_vumark_service.py b/src/vws/async_vumark_service.py index 24191d7c6..9a050afdd 100644 --- a/src/vws/async_vumark_service.py +++ b/src/vws/async_vumark_service.py @@ -11,7 +11,7 @@ from vws.exceptions.custom_exceptions import ServerError from vws.exceptions.vws_exceptions import TooManyRequestsError from vws.transports import AsyncHTTPXTransport, AsyncTransport -from vws.vumark_accept import VuMarkAccept +from vws.vumark_accept import VuMarkAccept # noqa: TC001 @beartype(conf=BeartypeConf(is_pep484_tower=True)) diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index 5ec523565..aad205768 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -23,7 +23,7 @@ TargetStatuses, TargetSummaryReport, ) -from vws.response import Response +from vws.response import Response # noqa: TC001 from vws.transports import AsyncHTTPXTransport, AsyncTransport diff --git a/src/vws/exceptions/base_exceptions.py b/src/vws/exceptions/base_exceptions.py index ce96ac4e0..616e0682f 100644 --- a/src/vws/exceptions/base_exceptions.py +++ b/src/vws/exceptions/base_exceptions.py @@ -4,12 +4,12 @@ Cloud Recognition Web API. """ -from collections.abc import Mapping +from collections.abc import Mapping # noqa: TC003 from typing import ClassVar from beartype import beartype -from vws.response import Response +from vws.response import Response # noqa: TC001 @beartype diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index cf3902264..c53f5db29 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -6,7 +6,7 @@ from beartype import beartype -from vws.response import Response +from vws.response import Response # noqa: TC001 @beartype diff --git a/src/vws/transports.py b/src/vws/transports.py index 74fadb9fe..e699fc718 100644 --- a/src/vws/transports.py +++ b/src/vws/transports.py @@ -1,7 +1,6 @@ """HTTP transport implementations for VWS clients.""" -from collections.abc import Awaitable -from typing import Protocol, Self, runtime_checkable +from typing import TYPE_CHECKING, Protocol, Self, runtime_checkable import httpx import requests @@ -9,6 +8,9 @@ from vws.response import Response +if TYPE_CHECKING: + from collections.abc import Awaitable + @runtime_checkable class Transport(Protocol): diff --git a/src/vws/vumark_service.py b/src/vws/vumark_service.py index a11eb5fc5..0a5eb98a1 100644 --- a/src/vws/vumark_service.py +++ b/src/vws/vumark_service.py @@ -10,7 +10,7 @@ from vws.exceptions.custom_exceptions import ServerError from vws.exceptions.vws_exceptions import TooManyRequestsError from vws.transports import RequestsTransport, Transport -from vws.vumark_accept import VuMarkAccept +from vws.vumark_accept import VuMarkAccept # noqa: TC001 @beartype(conf=BeartypeConf(is_pep484_tower=True)) diff --git a/src/vws/vws.py b/src/vws/vws.py index b5122ae5f..fc54c30fd 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -22,7 +22,7 @@ TargetStatuses, TargetSummaryReport, ) -from vws.response import Response +from vws.response import Response # noqa: TC001 from vws.transports import RequestsTransport, Transport diff --git a/tests/conftest.py b/tests/conftest.py index 820908ba9..15ef17dab 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,8 +1,8 @@ """Configuration, plugins and fixtures for `pytest`.""" -import io -from collections.abc import AsyncGenerator, Generator -from pathlib import Path +import io # noqa: TC003 +from collections.abc import AsyncGenerator, Generator # noqa: TC003 +from pathlib import Path # noqa: TC003 from typing import BinaryIO, Literal import pytest diff --git a/tests/test_async_cloud_reco_exceptions.py b/tests/test_async_cloud_reco_exceptions.py index cbe2b22cc..f425be299 100644 --- a/tests/test_async_cloud_reco_exceptions.py +++ b/tests/test_async_cloud_reco_exceptions.py @@ -2,7 +2,7 @@ AsyncCloudRecoService. """ -import io +import io # noqa: TC003 import uuid from http import HTTPStatus diff --git a/tests/test_async_query.py b/tests/test_async_query.py index 2de1ce833..2026d491a 100644 --- a/tests/test_async_query.py +++ b/tests/test_async_query.py @@ -1,6 +1,6 @@ """Tests for the ``AsyncCloudRecoService`` querying functionality.""" -import io +import io # noqa: TC003 import uuid from typing import BinaryIO diff --git a/tests/test_async_vws.py b/tests/test_async_vws.py index c08cf78a5..f59c5f2e4 100644 --- a/tests/test_async_vws.py +++ b/tests/test_async_vws.py @@ -1,7 +1,7 @@ """Tests for async helper functions for managing a Vuforia database.""" import base64 -import io +import io # noqa: TC003 import uuid from typing import BinaryIO diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 43a263d40..cb50a9db5 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -1,6 +1,6 @@ """Tests for exceptions raised when using the CloudRecoService.""" -import io +import io # noqa: TC003 import uuid from http import HTTPStatus diff --git a/tests/test_query.py b/tests/test_query.py index 66d596118..dac206b25 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -1,7 +1,7 @@ """Tests for the ``CloudRecoService`` querying functionality.""" import datetime -import io +import io # noqa: TC003 import uuid from typing import BinaryIO diff --git a/tests/test_transports.py b/tests/test_transports.py index f208339d4..c039ea7a1 100644 --- a/tests/test_transports.py +++ b/tests/test_transports.py @@ -1,6 +1,6 @@ """Tests for HTTP transport implementations.""" -import io +import io # noqa: TC003 import uuid from http import HTTPStatus diff --git a/tests/test_vws.py b/tests/test_vws.py index 29bd3aa3b..dff029c2f 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -2,7 +2,7 @@ import base64 import datetime -import io +import io # noqa: TC003 import secrets import uuid from typing import BinaryIO From bf4cdd947e6529aee89dac537c17eaa1078f7d70 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 4 Aug 2026 14:35:19 +0100 Subject: [PATCH 1602/1638] Handle non-JSON Cloud Query errors --- newsfragments/3093.change.rst | 1 + pyproject.toml | 19 +-------- src/vws/async_query.py | 25 +++++++++-- src/vws/query.py | 23 +++++++++- tests/test_async_cloud_reco_exceptions.py | 52 ++++++++++++++++++++++- tests/test_cloud_reco_exceptions.py | 50 +++++++++++++++++++++- 6 files changed, 144 insertions(+), 26 deletions(-) create mode 100644 newsfragments/3093.change.rst diff --git a/newsfragments/3093.change.rst b/newsfragments/3093.change.rst new file mode 100644 index 000000000..7a603b777 --- /dev/null +++ b/newsfragments/3093.change.rst @@ -0,0 +1 @@ +Raise a response-carrying ``CloudRecoError`` when Cloud Query returns a documented empty or non-JSON 4xx response instead of leaking ``JSONDecodeError``. diff --git a/pyproject.toml b/pyproject.toml index 8bdb08085..eabcc8401 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,16 +80,11 @@ optional-dependencies.dev = [ "sphinxcontrib-towncrier==0.5.0a0", "strict-kwargs==2026.7.24", "sybil==10.1.0", - # Listed explicitly (despite being transitive via vws-python-mock) so that - # [tool.uv.sources] can redirect to the CPU-only PyTorch index. - # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation - "torch>=2.5.1", - "torchvision>=0.20.1", "towncrier==25.8.0", "ty==0.0.65", "types-requests==2.33.0.20260712", "vulture==2.16", - "vws-python-mock==2026.8.4", + "vws-python-mock==2026.8.4.1", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.28.0", @@ -118,11 +113,6 @@ zip-safe = false # Code to match this is in ``conf.py``. version_scheme = "post-release" -[tool.uv] -sources.torch = { index = "pytorch-cpu" } -sources.torchvision = { index = "pytorch-cpu" } -index = [ { name = "pytorch-cpu", url = "https://download.pytorch.org/whl/cpu", explicit = true } ] - [tool.ruff] line-length = 79 lint.select = [ @@ -317,13 +307,6 @@ ignore = [ ] [tool.deptry] -# torch and torchvision are listed explicitly in dev deps to allow -# [tool.uv.sources] to redirect them to the CPU-only PyTorch index, -# but they are not directly imported in the vws-python source code. -per_rule_ignores.DEP002 = [ - "torch", - "torchvision", -] optional_dependencies_dev_groups = [ "dev", "release", diff --git a/src/vws/async_query.py b/src/vws/async_query.py index 88536144f..9e5bd782a 100644 --- a/src/vws/async_query.py +++ b/src/vws/async_query.py @@ -12,6 +12,7 @@ from vws._image_utils import ImageType as _ImageType from vws._image_utils import get_image_data as _get_image_data +from vws.exceptions.base_exceptions import CloudRecoError from vws.exceptions.cloud_reco_exceptions import ( AuthenticationFailureError, BadImageError, @@ -119,6 +120,8 @@ async def query( given image is too large. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. + ~vws.exceptions.base_exceptions.CloudRecoError: Vuforia returned + a client error without a recognized JSON body. Returns: An ordered list of target details of matching @@ -186,7 +189,23 @@ async def query( ): # pragma: no cover raise ServerError(response=response) - result_code = json.loads(s=response.text)["result_code"] + content_type = { + key.lower(): value for key, value in response.headers.items() + }.get("content-type", "") + if ( + response.status_code >= HTTPStatus.BAD_REQUEST + and not content_type.lower().startswith("application/json") + ): + raise CloudRecoError(response=response) + + try: + response_body = json.loads(s=response.text) + except json.JSONDecodeError as exc: + if response.status_code >= HTTPStatus.BAD_REQUEST: + raise CloudRecoError(response=response) from exc + raise + + result_code = response_body["result_code"] if result_code != "Success": exception = { "AuthenticationFailure": (AuthenticationFailureError), @@ -196,9 +215,7 @@ async def query( }[result_code] raise exception(response=response) - result_list = list( - json.loads(s=response.text)["results"], - ) + result_list = list(response_body["results"]) return [ QueryResult.from_response_dict(response_dict=item) for item in result_list diff --git a/src/vws/query.py b/src/vws/query.py index 3d9e19d7f..7c5fce3d5 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -10,6 +10,7 @@ from vws._image_utils import ImageType as _ImageType from vws._image_utils import get_image_data as _get_image_data +from vws.exceptions.base_exceptions import CloudRecoError from vws.exceptions.cloud_reco_exceptions import ( AuthenticationFailureError, BadImageError, @@ -101,6 +102,8 @@ def query( given image is too large. ~vws.exceptions.custom_exceptions.ServerError: There is an error with Vuforia's servers. + ~vws.exceptions.base_exceptions.CloudRecoError: Vuforia returned + a client error without a recognized JSON body. Returns: An ordered list of target details of matching targets. @@ -156,7 +159,23 @@ def query( ): # pragma: no cover raise ServerError(response=response) - result_code = json.loads(s=response.text)["result_code"] + content_type = { + key.lower(): value for key, value in response.headers.items() + }.get("content-type", "") + if ( + response.status_code >= HTTPStatus.BAD_REQUEST + and not content_type.lower().startswith("application/json") + ): + raise CloudRecoError(response=response) + + try: + response_body = json.loads(s=response.text) + except json.JSONDecodeError as exc: + if response.status_code >= HTTPStatus.BAD_REQUEST: + raise CloudRecoError(response=response) from exc + raise + + result_code = response_body["result_code"] if result_code != "Success": exception = { "AuthenticationFailure": AuthenticationFailureError, @@ -166,7 +185,7 @@ def query( }[result_code] raise exception(response=response) - result_list = list(json.loads(s=response.text)["results"]) + result_list = list(response_body["results"]) return [ QueryResult.from_response_dict(response_dict=item) for item in result_list diff --git a/tests/test_async_cloud_reco_exceptions.py b/tests/test_async_cloud_reco_exceptions.py index f425be299..d3f443d12 100644 --- a/tests/test_async_cloud_reco_exceptions.py +++ b/tests/test_async_cloud_reco_exceptions.py @@ -7,11 +7,12 @@ from http import HTTPStatus import pytest -from mock_vws import MockVWS +from mock_vws import CloudQueryFailureResponse, MockVWS from mock_vws.database import CloudDatabase from mock_vws.states import States from vws import AsyncCloudRecoService +from vws.exceptions.base_exceptions import CloudRecoError from vws.exceptions.cloud_reco_exceptions import ( AuthenticationFailureError, InactiveProjectError, @@ -118,3 +119,52 @@ async def test_inactive_project( response = exc.value.response assert response.status_code == HTTPStatus.FORBIDDEN assert response.tell_position != 0 + + +@pytest.mark.parametrize( + argnames=("body", "headers"), + argvalues=[ + ("", {"X-Query-Failure": "empty"}), + ( + "Arbitrary upstream failure", + { + "Content-Type": "application/json", + "X-Query-Failure": "text", + }, + ), + ], + ids=["empty", "arbitrary-text"], +) +@pytest.mark.asyncio +async def test_non_json_client_error( + *, + high_quality_image: io.BytesIO, + body: str, + headers: dict[str, str], +) -> None: + """Non-JSON 4xx responses raise a response-carrying error.""" + database = CloudDatabase() + failure_response = CloudQueryFailureResponse( + status_code=HTTPStatus.BAD_REQUEST, + headers=headers, + body=body, + ) + cloud_reco_client = AsyncCloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + with MockVWS(cloud_query_failure_response=failure_response) as mock: + mock.add_cloud_database(cloud_database=database) + with pytest.raises(expected_exception=CloudRecoError) as exc: + await cloud_reco_client.query(image=high_quality_image) + + response = exc.value.response + assert response.status_code == HTTPStatus.BAD_REQUEST + assert response.text == body + assert response.content == body.encode() + response_headers = { + key.lower(): value for key, value in response.headers.items() + } + assert response_headers["x-query-failure"] == headers["X-Query-Failure"] + assert response.request_body diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index cb50a9db5..562247757 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -5,7 +5,7 @@ from http import HTTPStatus import pytest -from mock_vws import MockVWS +from mock_vws import CloudQueryFailureResponse, MockVWS from mock_vws.database import CloudDatabase from mock_vws.states import States @@ -126,3 +126,51 @@ def test_inactive_project( # We need one test which checks tell position # and so we choose this one almost at random. assert response.tell_position != 0 + + +@pytest.mark.parametrize( + argnames=("body", "headers"), + argvalues=[ + ("", {"X-Query-Failure": "empty"}), + ( + "Arbitrary upstream failure", + { + "Content-Type": "application/json", + "X-Query-Failure": "text", + }, + ), + ], + ids=["empty", "arbitrary-text"], +) +def test_non_json_client_error( + *, + high_quality_image: io.BytesIO, + body: str, + headers: dict[str, str], +) -> None: + """Non-JSON 4xx responses raise a response-carrying error.""" + database = CloudDatabase() + failure_response = CloudQueryFailureResponse( + status_code=HTTPStatus.BAD_REQUEST, + headers=headers, + body=body, + ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + with MockVWS(cloud_query_failure_response=failure_response) as mock: + mock.add_cloud_database(cloud_database=database) + with pytest.raises(expected_exception=CloudRecoError) as exc: + cloud_reco_client.query(image=high_quality_image) + + response = exc.value.response + assert response.status_code == HTTPStatus.BAD_REQUEST + assert response.text == body + assert response.content == body.encode() + response_headers = { + key.lower(): value for key, value in response.headers.items() + } + assert response_headers["x-query-failure"] == headers["X-Query-Failure"] + assert response.request_body From e16688846f19309c16dd21c69e03a26579a560d6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 4 Aug 2026 16:18:17 +0100 Subject: [PATCH 1603/1638] Cover malformed successful query responses --- src/vws/async_query.py | 2 ++ src/vws/query.py | 2 ++ tests/test_async_cloud_reco_exceptions.py | 24 +++++++++++++++++++++++ tests/test_cloud_reco_exceptions.py | 23 ++++++++++++++++++++++ 4 files changed, 51 insertions(+) diff --git a/src/vws/async_query.py b/src/vws/async_query.py index 9e5bd782a..ec0704ef4 100644 --- a/src/vws/async_query.py +++ b/src/vws/async_query.py @@ -122,6 +122,8 @@ async def query( error with Vuforia's servers. ~vws.exceptions.base_exceptions.CloudRecoError: Vuforia returned a client error without a recognized JSON body. + json.JSONDecodeError: Vuforia returned a successful response with + an invalid JSON body. Returns: An ordered list of target details of matching diff --git a/src/vws/query.py b/src/vws/query.py index 7c5fce3d5..3f69261ef 100644 --- a/src/vws/query.py +++ b/src/vws/query.py @@ -104,6 +104,8 @@ def query( error with Vuforia's servers. ~vws.exceptions.base_exceptions.CloudRecoError: Vuforia returned a client error without a recognized JSON body. + json.JSONDecodeError: Vuforia returned a successful response with + an invalid JSON body. Returns: An ordered list of target details of matching targets. diff --git a/tests/test_async_cloud_reco_exceptions.py b/tests/test_async_cloud_reco_exceptions.py index d3f443d12..a9c1395a5 100644 --- a/tests/test_async_cloud_reco_exceptions.py +++ b/tests/test_async_cloud_reco_exceptions.py @@ -3,6 +3,7 @@ """ import io # noqa: TC003 +import json import uuid from http import HTTPStatus @@ -168,3 +169,26 @@ async def test_non_json_client_error( } assert response_headers["x-query-failure"] == headers["X-Query-Failure"] assert response.request_body + + +@pytest.mark.asyncio +async def test_non_json_success_response( + *, + high_quality_image: io.BytesIO, +) -> None: + """Malformed successful responses retain the JSON parsing error.""" + database = CloudDatabase() + failure_response = CloudQueryFailureResponse( + status_code=HTTPStatus.OK, + headers={"Content-Type": "application/json"}, + body="Not JSON", + ) + cloud_reco_client = AsyncCloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + with MockVWS(cloud_query_failure_response=failure_response) as mock: + mock.add_cloud_database(cloud_database=database) + with pytest.raises(expected_exception=json.JSONDecodeError): + await cloud_reco_client.query(image=high_quality_image) diff --git a/tests/test_cloud_reco_exceptions.py b/tests/test_cloud_reco_exceptions.py index 562247757..29632000c 100644 --- a/tests/test_cloud_reco_exceptions.py +++ b/tests/test_cloud_reco_exceptions.py @@ -1,6 +1,7 @@ """Tests for exceptions raised when using the CloudRecoService.""" import io # noqa: TC003 +import json import uuid from http import HTTPStatus @@ -174,3 +175,25 @@ def test_non_json_client_error( } assert response_headers["x-query-failure"] == headers["X-Query-Failure"] assert response.request_body + + +def test_non_json_success_response( + *, + high_quality_image: io.BytesIO, +) -> None: + """Malformed successful responses retain the JSON parsing error.""" + database = CloudDatabase() + failure_response = CloudQueryFailureResponse( + status_code=HTTPStatus.OK, + headers={"Content-Type": "application/json"}, + body="Not JSON", + ) + cloud_reco_client = CloudRecoService( + client_access_key=database.client_access_key, + client_secret_key=database.client_secret_key, + ) + + with MockVWS(cloud_query_failure_response=failure_response) as mock: + mock.add_cloud_database(cloud_database=database) + with pytest.raises(expected_exception=json.JSONDecodeError): + cloud_reco_client.query(image=high_quality_image) From 58c543130af8fa3f438b609835d9683e3bcff467 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 4 Aug 2026 17:30:57 +0100 Subject: [PATCH 1604/1638] Handle documented VuMark generation failures --- newsfragments/3090.change.rst | 1 + pyproject.toml | 2 +- spelling_private_dict.txt | 3 ++ src/vws/async_vumark_service.py | 6 ++++ src/vws/exceptions/vws_exceptions.py | 24 +++++++++++++ src/vws/vumark_service.py | 6 ++++ tests/test_async_vws_exceptions.py | 49 +++++++++++++++++++++++++- tests/test_vws_exceptions.py | 52 +++++++++++++++++++++++++++- 8 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 newsfragments/3090.change.rst diff --git a/newsfragments/3090.change.rst b/newsfragments/3090.change.rst new file mode 100644 index 000000000..226d9665f --- /dev/null +++ b/newsfragments/3090.change.rst @@ -0,0 +1 @@ +Add ``QuotaExceededError``, ``LicenseCheckFailedError``, and ``AuthorizationFailedError`` for documented VuMark Generation API result codes. diff --git a/pyproject.toml b/pyproject.toml index eabcc8401..43b3771a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ optional-dependencies.dev = [ "ty==0.0.65", "types-requests==2.33.0.20260712", "vulture==2.16", - "vws-python-mock==2026.8.4.1", + "vws-python-mock==2026.8.4.2", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.28.0", diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 382e8ccd3..45ed889ed 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -1,4 +1,5 @@ AuthenticationFailure +AuthorizationFailed BadImage ConnectionErrorPossiblyImageTooLarge DateRangeError @@ -6,6 +7,7 @@ Falsy ImageTooLarge InactiveProject JSONDecodeError +LicenseCheckFailed MatchProcessing MaxNumResultsOutOfRange MetadataTooLarge @@ -14,6 +16,7 @@ OopsAnErrorOccurredPossiblyBadNameError ProjectHasNoAPIAccess ProjectInactive ProjectSuspended +QuotaExceeded RequestQuotaReached RequestTimeTooSkewed TargetNameExist diff --git a/src/vws/async_vumark_service.py b/src/vws/async_vumark_service.py index 9a050afdd..6575f7716 100644 --- a/src/vws/async_vumark_service.py +++ b/src/vws/async_vumark_service.py @@ -87,6 +87,8 @@ async def generate_vumark_instance( Raises: ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The secret key is not correct. + ~vws.exceptions.vws_exceptions.AuthorizationFailedError: There was + a general authentication problem. ~vws.exceptions.vws_exceptions.FailError: There was an error with the request. For example, the given access key does not match a known database. @@ -96,6 +98,10 @@ async def generate_vumark_instance( instance ID is invalid. For example, it may be empty. ~vws.exceptions.vws_exceptions.InvalidTargetTypeError: The target is not a VuMark template target. + ~vws.exceptions.vws_exceptions.LicenseCheckFailedError: The + license state and/or type does not allow this request. + ~vws.exceptions.vws_exceptions.QuotaExceededError: No more + instances can be created for the associated license. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is an error with the time sent to Vuforia. ~vws.exceptions.vws_exceptions.TargetStatusNotSuccessError: The diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 3749b5619..a93dd6004 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -206,9 +206,31 @@ class InvalidTargetTypeError(VWSError): """ +@beartype +class QuotaExceededError(VWSError): + """Exception raised when Vuforia returns a response with a result code + ``QuotaExceeded``. + """ + + +@beartype +class LicenseCheckFailedError(VWSError): + """Exception raised when Vuforia returns a response with a result code + ``LicenseCheckFailed``. + """ + + +@beartype +class AuthorizationFailedError(VWSError): + """Exception raised when Vuforia returns a response with a result code + ``AuthorizationFailed``. + """ + + VWSError.register_exceptions_by_result_code( exceptions_by_result_code={ "AuthenticationFailure": AuthenticationFailureError, + "AuthorizationFailed": AuthorizationFailedError, "BadImage": BadImageError, "BadRequest": BadRequestError, "DateRangeError": DateRangeError, @@ -217,10 +239,12 @@ class InvalidTargetTypeError(VWSError): "InvalidAcceptHeader": InvalidAcceptHeaderError, "InvalidInstanceId": InvalidInstanceIdError, "InvalidTargetType": InvalidTargetTypeError, + "LicenseCheckFailed": LicenseCheckFailedError, "MetadataTooLarge": MetadataTooLargeError, "ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError, "ProjectInactive": ProjectInactiveError, "ProjectSuspended": ProjectSuspendedError, + "QuotaExceeded": QuotaExceededError, "RequestQuotaReached": RequestQuotaReachedError, "RequestTimeTooSkewed": RequestTimeTooSkewedError, "TargetNameExist": TargetNameExistError, diff --git a/src/vws/vumark_service.py b/src/vws/vumark_service.py index 0a5eb98a1..168e8b6f8 100644 --- a/src/vws/vumark_service.py +++ b/src/vws/vumark_service.py @@ -71,6 +71,8 @@ def generate_vumark_instance( Raises: ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The secret key is not correct. + ~vws.exceptions.vws_exceptions.AuthorizationFailedError: There was + a general authentication problem. ~vws.exceptions.vws_exceptions.FailError: There was an error with the request. For example, the given access key does not match a known database. @@ -80,6 +82,10 @@ def generate_vumark_instance( instance ID is invalid. For example, it may be empty. ~vws.exceptions.vws_exceptions.InvalidTargetTypeError: The target is not a VuMark template target. + ~vws.exceptions.vws_exceptions.LicenseCheckFailedError: The + license state and/or type does not allow this request. + ~vws.exceptions.vws_exceptions.QuotaExceededError: No more + instances can be created for the associated license. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is an error with the time sent to Vuforia. ~vws.exceptions.vws_exceptions.TargetStatusNotSuccessError: The diff --git a/tests/test_async_vws_exceptions.py b/tests/test_async_vws_exceptions.py index daa57423a..cc661c9f4 100644 --- a/tests/test_async_vws_exceptions.py +++ b/tests/test_async_vws_exceptions.py @@ -5,7 +5,7 @@ from http import HTTPStatus import pytest -from mock_vws import MockVWS +from mock_vws import MockVWS, VuMarkGenerationFailure from mock_vws.database import CloudDatabase from mock_vws.states import States @@ -16,14 +16,17 @@ ) from vws.exceptions.vws_exceptions import ( AuthenticationFailureError, + AuthorizationFailedError, BadImageError, FailError, ImageTooLargeError, InvalidInstanceIdError, + LicenseCheckFailedError, MetadataTooLargeError, ProjectHasNoAPIAccessError, ProjectInactiveError, ProjectSuspendedError, + QuotaExceededError, RequestQuotaReachedError, TargetNameExistError, TargetQuotaReachedError, @@ -377,3 +380,47 @@ async def test_invalid_instance_id( ) assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + argnames=("failure", "exception_type", "status_code"), + argvalues=[ + ( + VuMarkGenerationFailure.QUOTA_EXCEEDED, + QuotaExceededError, + HTTPStatus.FORBIDDEN, + ), + ( + VuMarkGenerationFailure.LICENSE_CHECK_FAILED, + LicenseCheckFailedError, + HTTPStatus.FORBIDDEN, + ), + ( + VuMarkGenerationFailure.AUTHORIZATION_FAILED, + AuthorizationFailedError, + HTTPStatus.UNAUTHORIZED, + ), + ], +) +async def test_documented_vumark_error_codes( + *, + failure: VuMarkGenerationFailure, + exception_type: type[VWSError], + status_code: HTTPStatus, +) -> None: + """Documented VuMark failures raise matching exceptions.""" + with MockVWS(vumark_generation_failure=failure): + async with AsyncVuMarkService( + server_access_key=uuid.uuid4().hex, + server_secret_key=uuid.uuid4().hex, + ) as vumark_service: + with pytest.raises(expected_exception=exception_type) as exc: + await vumark_service.generate_vumark_instance( + target_id="exampletargetid", + instance_id="example_instance_id", + accept=VuMarkAccept.PNG, + ) + + assert exc.value.response.status_code == status_code + assert failure.value in exc.value.response.text diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index f05436e5c..73ab9f849 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -6,7 +6,7 @@ import pytest from freezegun import freeze_time -from mock_vws import MockVWS +from mock_vws import MockVWS, VuMarkGenerationFailure from mock_vws.database import CloudDatabase from mock_vws.states import States @@ -17,6 +17,7 @@ ) from vws.exceptions.vws_exceptions import ( AuthenticationFailureError, + AuthorizationFailedError, BadImageError, BadRequestError, DateRangeError, @@ -25,10 +26,12 @@ InvalidAcceptHeaderError, InvalidInstanceIdError, InvalidTargetTypeError, + LicenseCheckFailedError, MetadataTooLargeError, ProjectHasNoAPIAccessError, ProjectInactiveError, ProjectSuspendedError, + QuotaExceededError, RequestQuotaReachedError, RequestTimeTooSkewedError, TargetNameExistError, @@ -412,6 +415,7 @@ def test_vwsexception_inheritance() -> None: """VWS-related exceptions should inherit from VWSException.""" subclasses = [ AuthenticationFailureError, + AuthorizationFailedError, BadImageError, BadRequestError, DateRangeError, @@ -420,10 +424,12 @@ def test_vwsexception_inheritance() -> None: InvalidAcceptHeaderError, InvalidInstanceIdError, InvalidTargetTypeError, + LicenseCheckFailedError, MetadataTooLargeError, ProjectInactiveError, ProjectHasNoAPIAccessError, ProjectSuspendedError, + QuotaExceededError, RequestQuotaReachedError, RequestTimeTooSkewedError, TargetNameExistError, @@ -492,6 +498,50 @@ def test_invalid_target_type( assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY +@pytest.mark.parametrize( + argnames=("failure", "exception_type", "status_code"), + argvalues=[ + ( + VuMarkGenerationFailure.QUOTA_EXCEEDED, + QuotaExceededError, + HTTPStatus.FORBIDDEN, + ), + ( + VuMarkGenerationFailure.LICENSE_CHECK_FAILED, + LicenseCheckFailedError, + HTTPStatus.FORBIDDEN, + ), + ( + VuMarkGenerationFailure.AUTHORIZATION_FAILED, + AuthorizationFailedError, + HTTPStatus.UNAUTHORIZED, + ), + ], +) +def test_documented_vumark_error_codes( + *, + failure: VuMarkGenerationFailure, + exception_type: type[VWSError], + status_code: HTTPStatus, +) -> None: + """Documented VuMark failures raise matching exceptions.""" + with MockVWS(vumark_generation_failure=failure): + vumark_service = VuMarkService( + server_access_key=uuid.uuid4().hex, + server_secret_key=uuid.uuid4().hex, + ) + + with pytest.raises(expected_exception=exception_type) as exc: + vumark_service.generate_vumark_instance( + target_id="exampletargetid", + instance_id="example_instance_id", + accept=VuMarkAccept.PNG, + ) + + assert exc.value.response.status_code == status_code + assert failure.value in exc.value.response.text + + def test_base_exception( *, vws_client: VWS, From 91a5138fb007ce0cc93e2be3e99478d6e29a95e3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 5 Aug 2026 11:00:50 +0100 Subject: [PATCH 1605/1638] Fix async VuMark test coverage --- tests/test_async_vws_exceptions.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/test_async_vws_exceptions.py b/tests/test_async_vws_exceptions.py index cc661c9f4..efc3c05ae 100644 --- a/tests/test_async_vws_exceptions.py +++ b/tests/test_async_vws_exceptions.py @@ -411,16 +411,17 @@ async def test_documented_vumark_error_codes( ) -> None: """Documented VuMark failures raise matching exceptions.""" with MockVWS(vumark_generation_failure=failure): - async with AsyncVuMarkService( + vumark_service = AsyncVuMarkService( server_access_key=uuid.uuid4().hex, server_secret_key=uuid.uuid4().hex, - ) as vumark_service: - with pytest.raises(expected_exception=exception_type) as exc: - await vumark_service.generate_vumark_instance( - target_id="exampletargetid", - instance_id="example_instance_id", - accept=VuMarkAccept.PNG, - ) + ) + with pytest.raises(expected_exception=exception_type) as exc: + await vumark_service.generate_vumark_instance( + target_id="exampletargetid", + instance_id="example_instance_id", + accept=VuMarkAccept.PNG, + ) + await vumark_service.aclose() assert exc.value.response.status_code == status_code assert failure.value in exc.value.response.text From 9b8ab82f5ed2b1fe173783557d36e75ba120243a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 10:32:48 +0000 Subject: [PATCH 1606/1638] chore(deps-dev): Bump sphinx-substitution-extensions Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2026.6.17 to 2026.8.2. - [Release notes](https://github.com/adamtheturtle/sphinx-substitution-extensions/releases) - [Changelog](https://github.com/adamtheturtle/sphinx-substitution-extensions/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamtheturtle/sphinx-substitution-extensions/compare/2026.06.17...2026.08.02) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2026.8.2 dependency-type: direct:development 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 43b3771a4..cde5e41f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2026.6.17", + "sphinx-substitution-extensions==2026.8.2", "sphinxcontrib-spelling==8.0.2", # ``sphinxcontrib-towncrier`` renders unreleased news fragments # into docs/source/unreleased.rst during Sphinx builds. From 47e95957018d08a09180f83d2441e04dd38d52ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 10:33:07 +0000 Subject: [PATCH 1607/1638] chore(deps-dev): Bump zizmor from 1.28.0 to 1.29.0 Bumps [zizmor](https://github.com/zizmorcore/zizmor) from 1.28.0 to 1.29.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](https://github.com/zizmorcore/zizmor/compare/v1.28.0...v1.29.0) --- updated-dependencies: - dependency-name: zizmor dependency-version: 1.29.0 dependency-type: direct:development 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 43b3771a4..43a565d2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ optional-dependencies.dev = [ "vws-python-mock==2026.8.4.2", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", - "zizmor==1.28.0", + "zizmor==1.29.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3", "towncrier==25.8.0" ] urls.Documentation = "https://vws-python.github.io/vws-python/" From 947fbefa310e84508cf826b1b45758e2d2ef7c52 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 5 Aug 2026 17:11:33 +0100 Subject: [PATCH 1608/1638] Use prek action with autofix.ci --- .github/dependabot.yml | 5 +++++ .github/workflows/autofix.yml | 37 +++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 14 +++++------- .pre-commit-config.yaml | 41 ----------------------------------- 4 files changed, 48 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/autofix.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 610da79f8..13b3964d1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,3 +12,8 @@ updates: schedule: interval: daily open-pull-requests-limit: 10 + + - package-ecosystem: pre-commit + directory: / + schedule: + interval: daily diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 000000000..3e5ceda64 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,37 @@ +--- +name: autofix.ci + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + autofix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + fetch-tags: true + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@v9.0.0 + + - name: Run fixers + uses: j178/prek-action@v3.0.0 + with: + prek-version: 0.4.11 + extra-args: >- + --all-files --hook-stage pre-commit --no-fail-fast --verbose + env: + UV_NO_CACHE: '1' + UV_PYTHON: 3.14 + + - uses: autofix-ci/action@v1.3.4 + if: always() diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a0e1e1d9..a1c124821 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,17 +35,15 @@ jobs: cache-dependency-glob: '**/pyproject.toml' - name: Lint - # Use bash to ensure the step fails if any command fails. - # PowerShell does not fail on intermediate command failures by default. - shell: bash - run: uv run --extra=dev prek run --all-files --hook-stage ${{ matrix.hook-stage }} - --verbose + uses: j178/prek-action@v3.0.0 + with: + prek-version: 0.4.11 + extra-args: >- + --all-files --hook-stage ${{ matrix.hook-stage }} --verbose env: + UV_NO_CACHE: '1' UV_PYTHON: ${{ matrix.python-version }} - - uses: pre-commit-ci/lite-action@v1.1.0 - if: always() - completion-lint: needs: build runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 863357160..b2441e7b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,47 +6,6 @@ fail_fast: true # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -ci: - # We use system Python, with required dependencies specified in pyproject.toml. - # We therefore cannot use those dependencies in pre-commit CI. - skip: - - actionlint - - sphinx-lint - - strict-kwargs-fix - - check-manifest - - deptry - - doc8 - - pydocstringformatter - - docs - - interrogate - - interrogate-docs - - linkcheck - - mypy - - mypy-docs - - pylint - - pyproject-fmt-fix - - pyright - - pyright-docs - - pyright-verifytypes - - ty - - ty-docs - - pyroma - - ruff-check-fix - - ruff-check-fix-docs - - ruff-format-fix - - ruff-format-fix-docs - - shellcheck - - shellcheck-docs - - shfmt - - shfmt-docs - - spelling - - vulture - - vulture-docs - - yamlfix - - zizmor - - pyrefly - - pyrefly-docs - default_install_hook_types: [pre-commit, pre-push] repos: From 0444aa6b5f27fe6379513b9af268d6181cee1399 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 5 Aug 2026 18:34:19 +0100 Subject: [PATCH 1609/1638] Retrigger checks after retiring pre-commit.ci From 1eb74003b22288756f264dbaf02e665c44ab55bd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 5 Aug 2026 18:18:37 +0100 Subject: [PATCH 1610/1638] Add no-defaults linting --- .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 b2441e7b9..662d831d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -415,3 +415,9 @@ repos: types_or: [markdown, rst] additional_dependencies: - *uv_version + + - repo: https://github.com/adamtheturtle/no-defaults + rev: v1.0.0 + hooks: + - id: no-defaults + stages: [pre-commit] diff --git a/pyproject.toml b/pyproject.toml index 14a1192f5..79716d3a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -151,6 +151,7 @@ lint.per-file-ignores."tests/*.py" = [ lint.unfixable = [ "ERA001", ] +lint.external = [ "NOD" ] lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: use explicit type narrowing or a typed variable instead." lint.pydocstyle.convention = "google" @@ -438,3 +439,7 @@ ignore_path = [ [tool.yamlfix] section_whitelines = 1 whitelines = 1 + +[tool.no_defaults] +private_only = true +per_file_enforcement."tests/**" = "all" From 01af8b4f038dd835cd430a47ab6cc2e9ebfdfd14 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 5 Aug 2026 23:14:43 +0100 Subject: [PATCH 1611/1638] Bump no-defaults to v1.0.1 Picks up the fix for annotated locals in dataclass methods being misreported as fields (adamtheturtle/no-defaults#6). Co-Authored-By: Claude Opus 5 (1M context) --- .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 662d831d7..e2837cfe1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -417,7 +417,7 @@ repos: - *uv_version - repo: https://github.com/adamtheturtle/no-defaults - rev: v1.0.0 + rev: v1.0.1 hooks: - id: no-defaults stages: [pre-commit] From 4c3d1eb67e19e3d92bab2841ac9b0066b8994f63 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 6 Aug 2026 05:31:58 +0100 Subject: [PATCH 1612/1638] Run no-defaults as a local uv hook Run no-defaults as a local uv hook instead of the upstream pre-commit hook, matching the other locally-defined hooks. The pin moves to the dev extra in pyproject.toml, and the hook joins the pre-commit.ci skip list alongside the other hooks that need project dependencies. Co-Authored-By: Claude Opus 5 (1M context) --- .pre-commit-config.yaml | 16 ++++++++++------ pyproject.toml | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2837cfe1..0cd0ac391 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -269,6 +269,16 @@ repos: stages: [pre-commit] require_serial: true + - id: no-defaults + name: no-defaults + entry: uv run --extra=dev no-defaults + language: python + types_or: [python] + additional_dependencies: + - *uv_version + stages: [pre-commit] + require_serial: true + - id: doc8 name: doc8 entry: uv run --extra=dev -m doc8 @@ -415,9 +425,3 @@ repos: types_or: [markdown, rst] additional_dependencies: - *uv_version - - - repo: https://github.com/adamtheturtle/no-defaults - rev: v1.0.1 - hooks: - - id: no-defaults - stages: [pre-commit] diff --git a/pyproject.toml b/pyproject.toml index 79716d3a3..0410a5095 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.7.19.1", + "no-defaults==1.0.1", "prek==0.4.11", "pydocstringformatter==1.0.0", "pydocstyle==6.3", From f4216a95931936a72dde8a8c340a5251ff89f74f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 6 Aug 2026 10:52:09 +0100 Subject: [PATCH 1613/1638] Lint reStructuredText prose with Vale Ban em dashes in reStructuredText using the pinned ClearProse Vale style package. Co-Authored-By: Claude Opus 5 (1M context) --- .gitignore | 3 +++ .pre-commit-config.yaml | 27 +++++++++++++++++++++++++++ .vale.ini | 12 ++++++++++++ pyproject.toml | 2 ++ 4 files changed, 44 insertions(+) create mode 100644 .vale.ini diff --git a/.gitignore b/.gitignore index 556e31308..1b5882e5e 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,6 @@ secrets.tar src/*/_setuptools_scm_version.txt uv.lock + +# Vale styles downloaded by ``vale sync`` +styles/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0cd0ac391..4171919ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -288,6 +288,33 @@ repos: - *uv_version stages: [pre-commit] + # Vale enforces prose style rules, such as banning em dashes, in + # reStructuredText files. + # The rules come from the ``ClearProse`` package pinned in ``.vale.ini``, + # which ``vale sync`` downloads into the (gitignored) ``styles`` + # directory. + # Vale needs ``rst2html`` from Docutils on the ``PATH`` to parse + # reStructuredText. + - id: vale-sync + name: vale sync + entry: uv run --extra=dev vale sync + language: python + pass_filenames: false + types_or: [rst] + additional_dependencies: + - *uv_version + stages: [pre-commit] + + - id: vale + name: vale + entry: uv run --extra=dev vale + language: python + types_or: [rst] + require_serial: true + additional_dependencies: + - *uv_version + stages: [pre-commit] + - id: interrogate name: interrogate entry: uv run --extra=dev -m interrogate diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 000000000..2b57be049 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,12 @@ +StylesPath = styles +MinAlertLevel = error + +Packages = https://github.com/adamtheturtle/vale-style-clear-prose/releases/download/v1.0.1/ClearProse.zip + +[*.rst] +BasedOnStyles = ClearProse + +# Docutils does not know Sphinx roles such as `:ref:`, and renders their +# argument as ordinary prose. Ignoring role syntax keeps target names, which +# are not prose, out of the linter. +TokenIgnores = (:\w+:`[^`]*`) diff --git a/pyproject.toml b/pyproject.toml index 0410a5095..0d6cf82ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,7 @@ optional-dependencies.dev = [ "towncrier==25.8.0", "ty==0.0.65", "types-requests==2.33.0.20260712", + "vale==3.13.0.0", "vulture==2.16", "vws-python-mock==2026.8.4.2", "vws-test-fixtures==2023.3.5", @@ -286,6 +287,7 @@ ignore = [ ".git_archival.txt", ".pre-commit-config.yaml", ".prettierrc", + ".vale.ini", ".yamlfmt", "CHANGELOG.rst", "ci", From 5a23cdda16902ee1179f15dc4f0dec37e543d149 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 6 Aug 2026 11:17:37 +0100 Subject: [PATCH 1614/1638] Use the ClearProse config package ClearProse 1.1.0 ships the ``TokenIgnores`` pattern for Sphinx roles in the package itself, so this repository no longer sets it. Co-Authored-By: Claude Opus 5 (1M context) --- .vale.ini | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.vale.ini b/.vale.ini index 2b57be049..8e3f9f747 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,12 +1,7 @@ StylesPath = styles MinAlertLevel = error -Packages = https://github.com/adamtheturtle/vale-style-clear-prose/releases/download/v1.0.1/ClearProse.zip +Packages = https://github.com/adamtheturtle/vale-style-clear-prose/releases/download/v1.1.0/ClearProse.zip [*.rst] BasedOnStyles = ClearProse - -# Docutils does not know Sphinx roles such as `:ref:`, and renders their -# argument as ordinary prose. Ignoring role syntax keeps target names, which -# are not prose, out of the linter. -TokenIgnores = (:\w+:`[^`]*`) From 489724bff1f384fc3525b5a04e41afd6ba285e8e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 6 Aug 2026 18:27:30 +0100 Subject: [PATCH 1615/1638] Sync Vale styles when ``.vale.ini`` changes Gating ``vale sync`` on reStructuredText files alone meant a commit that only bumped the pinned ClearProse package left the gitignored ``styles`` directory on the old rules until the next reStructuredText change. Co-Authored-By: Claude Opus 5 (1M context) --- .pre-commit-config.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4171919ae..13c902150 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -295,12 +295,15 @@ repos: # directory. # Vale needs ``rst2html`` from Docutils on the ``PATH`` to parse # reStructuredText. + # ``vale sync`` also runs when ``.vale.ini`` changes, so a package + # bump takes effect without waiting for the next reStructuredText + # change. - id: vale-sync name: vale sync entry: uv run --extra=dev vale sync language: python pass_filenames: false - types_or: [rst] + files: (\.rst$|^\.vale\.ini$) additional_dependencies: - *uv_version stages: [pre-commit] From 6e698d44473c832fb3081becce84eeee15b815b1 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 7 Aug 2026 07:04:05 +0100 Subject: [PATCH 1616/1638] Lint Markdown prose with Vale Extend the ClearProse em dash ban from reStructuredText to Markdown, so the rule covers all our prose rather than only Sphinx documentation. Co-Authored-By: Claude Opus 5 (1M context) --- .pre-commit-config.yaml | 6 +++--- .vale.ini | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 13c902150..ec38ba1b4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -289,7 +289,7 @@ repos: stages: [pre-commit] # Vale enforces prose style rules, such as banning em dashes, in - # reStructuredText files. + # reStructuredText and Markdown files. # The rules come from the ``ClearProse`` package pinned in ``.vale.ini``, # which ``vale sync`` downloads into the (gitignored) ``styles`` # directory. @@ -303,7 +303,7 @@ repos: entry: uv run --extra=dev vale sync language: python pass_filenames: false - files: (\.rst$|^\.vale\.ini$) + files: (\.(rst|md)$|^\.vale\.ini$) additional_dependencies: - *uv_version stages: [pre-commit] @@ -312,7 +312,7 @@ repos: name: vale entry: uv run --extra=dev vale language: python - types_or: [rst] + types_or: [rst, markdown] require_serial: true additional_dependencies: - *uv_version diff --git a/.vale.ini b/.vale.ini index 8e3f9f747..e111c0462 100644 --- a/.vale.ini +++ b/.vale.ini @@ -3,5 +3,5 @@ MinAlertLevel = error Packages = https://github.com/adamtheturtle/vale-style-clear-prose/releases/download/v1.1.0/ClearProse.zip -[*.rst] +[*.{rst,md}] BasedOnStyles = ClearProse From c747904ec96281aa81e4ea846ba6cf3873a558c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 10:33:04 +0000 Subject: [PATCH 1617/1638] chore(deps-dev): Bump prek from 0.4.11 to 0.4.12 Bumps [prek](https://github.com/j178/prek) from 0.4.11 to 0.4.12. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.11...v0.4.12) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.12 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0d6cf82ba..a1c922b71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.7.19.1", "no-defaults==1.0.1", - "prek==0.4.11", + "prek==0.4.12", "pydocstringformatter==1.0.0", "pydocstyle==6.3", "pygments==2.20.0", From 841524608dc6a617c2aaccd991f32ab967c663ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 10:33:15 +0000 Subject: [PATCH 1618/1638] chore(deps-dev): Bump ty from 0.0.65 to 0.0.66 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.65 to 0.0.66. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.65...0.0.66) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.66 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0d6cf82ba..0558d10b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "strict-kwargs==2026.7.24", "sybil==10.1.0", "towncrier==25.8.0", - "ty==0.0.65", + "ty==0.0.66", "types-requests==2.33.0.20260712", "vale==3.13.0.0", "vulture==2.16", From 708b72674d3bbce86e80fea6d4927e337d1df679 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 10:33:22 +0000 Subject: [PATCH 1619/1638] chore(deps-dev): Bump pyproject-fmt from 2.26.0 to 2.27.0 Bumps [pyproject-fmt](https://github.com/tox-dev/toml-fmt) from 2.26.0 to 2.27.0. - [Release notes](https://github.com/tox-dev/toml-fmt/releases) - [Commits](https://github.com/tox-dev/toml-fmt/compare/pyproject-fmt/2.26.0...pyproject-fmt/2.27.0) --- updated-dependencies: - dependency-name: pyproject-fmt dependency-version: 2.27.0 dependency-type: direct:development 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 0d6cf82ba..160f004bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ optional-dependencies.dev = [ "pygments==2.20.0", "pylint[spelling]==4.0.6", "pylint-per-file-ignores==3.2.1", - "pyproject-fmt==2.26.0", + "pyproject-fmt==2.27.0", "pyrefly==1.2.0", "pyright==1.1.411", "pyroma==5.0.1", From 19fc78efad96f080a9ac4162dce93506a3a17d1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 10:33:02 +0000 Subject: [PATCH 1620/1638] chore(deps-dev): Bump ty from 0.0.66 to 0.0.69 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.66 to 0.0.69. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.66...0.0.69) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.69 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 783df569f..3b62c5374 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "strict-kwargs==2026.7.24", "sybil==10.1.0", "towncrier==25.8.0", - "ty==0.0.66", + "ty==0.0.69", "types-requests==2.33.0.20260712", "vale==3.13.0.0", "vulture==2.16", From b210cdb586c9a82db94caf6f1627dd739bb7a03b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 10:33:09 +0000 Subject: [PATCH 1621/1638] chore(deps-dev): Bump no-defaults from 1.0.1 to 2.0.0 Bumps [no-defaults](https://github.com/adamtheturtle/no-defaults) from 1.0.1 to 2.0.0. - [Release notes](https://github.com/adamtheturtle/no-defaults/releases) - [Changelog](https://github.com/adamtheturtle/no-defaults/blob/main/CHANGELOG.md) - [Commits](https://github.com/adamtheturtle/no-defaults/compare/v1.0.1...v2.0.0) --- updated-dependencies: - dependency-name: no-defaults dependency-version: 2.0.0 dependency-type: direct:development 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 783df569f..6a854f656 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.7.19.1", - "no-defaults==1.0.1", + "no-defaults==2.0.0", "prek==0.4.12", "pydocstringformatter==1.0.0", "pydocstyle==6.3", From 528854624aa0d02289cf7ad24d080b8a933cc1a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 10:33:36 +0000 Subject: [PATCH 1622/1638] chore(deps-dev): Bump sphinx-substitution-extensions Bumps [sphinx-substitution-extensions](https://github.com/adamtheturtle/sphinx-substitution-extensions) from 2026.8.2 to 2026.8.5. - [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/2026.08.02...2026.08.05) --- updated-dependencies: - dependency-name: sphinx-substitution-extensions dependency-version: 2026.8.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 783df569f..0a3a397bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ optional-dependencies.dev = [ "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", "sphinx-pyproject==0.3.0", - "sphinx-substitution-extensions==2026.8.2", + "sphinx-substitution-extensions==2026.8.5", "sphinxcontrib-spelling==8.0.2", # ``sphinxcontrib-towncrier`` renders unreleased news fragments # into docs/source/unreleased.rst during Sphinx builds. From cf25b9100480eb5ba552931d219977de7ef99bbb Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 11 Aug 2026 11:15:47 +0100 Subject: [PATCH 1623/1638] Switch Vale to the upstream ai-tells package --- .pre-commit-config.yaml | 2 +- .vale.ini | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ec38ba1b4..0bca59790 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -290,7 +290,7 @@ repos: # Vale enforces prose style rules, such as banning em dashes, in # reStructuredText and Markdown files. - # The rules come from the ``ClearProse`` package pinned in ``.vale.ini``, + # The rules come from the ``ai-tells`` package pinned in ``.vale.ini``, # which ``vale sync`` downloads into the (gitignored) ``styles`` # directory. # Vale needs ``rst2html`` from Docutils on the ``PATH`` to parse diff --git a/.vale.ini b/.vale.ini index e111c0462..250e9b2dd 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,7 +1,15 @@ StylesPath = styles MinAlertLevel = error -Packages = https://github.com/adamtheturtle/vale-style-clear-prose/releases/download/v1.1.0/ClearProse.zip +Packages = https://github.com/tbhb/vale-ai-tells/releases/download/v1.29.0/ai-tells.zip [*.{rst,md}] -BasedOnStyles = ClearProse +BasedOnStyles = ai-tells + +# These rules misclassify established technical, example, or release-note prose +# in this repository. All other ai-tells rules remain enforced. +ai-tells.ColonUsage = NO +ai-tells.FigurativeLands = NO +ai-tells.FormalTransitions = NO +ai-tells.OverusedVocabularyVerbs = NO +ai-tells.VerbTricolon = NO From e7b8b097d061f3d37a37097e503ac576d6cd6ad6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2026 10:33:07 +0000 Subject: [PATCH 1624/1638] chore(deps-dev): Bump no-defaults from 2.0.0 to 2.1.0 Bumps [no-defaults](https://github.com/adamtheturtle/no-defaults) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/adamtheturtle/no-defaults/releases) - [Changelog](https://github.com/adamtheturtle/no-defaults/blob/main/CHANGELOG.md) - [Commits](https://github.com/adamtheturtle/no-defaults/compare/v2.0.0...v2.1.0) --- updated-dependencies: - dependency-name: no-defaults dependency-version: 2.1.0 dependency-type: direct:development 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 b9066196c..cd044416f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.7.19.1", - "no-defaults==2.0.0", + "no-defaults==2.1.0", "prek==0.4.12", "pydocstringformatter==1.0.0", "pydocstyle==6.3", From 2de5b0af0c77bfc4518a755ce47edeae95602d1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2026 10:33:19 +0000 Subject: [PATCH 1625/1638] chore(deps-dev): Bump ruff from 0.16.1 to 0.16.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.1 to 0.16.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.16.1...0.16.2) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b9066196c..054d9f9fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ optional-dependencies.dev = [ "pytest-beartype-tests==2026.4.26", "pytest-cov==7.1.0", "pyyaml==6.0.3", - "ruff==0.16.1", + "ruff==0.16.2", # We add shellcheck-py not only for shell scripts and shell code blocks, # but also because having it installed means that ``actionlint-py`` will # use it to lint shell commands in GitHub workflow files. From a9a03f9e84ac344980f46f7fa91e7344027ff794 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 12 Aug 2026 08:12:53 +0100 Subject: [PATCH 1626/1638] Configure mypy to respect gitignore --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index befcd7c64..083f2c0ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -370,6 +370,7 @@ max_supported_python = "3.14" [tool.mypy] files = [ "." ] exclude = [ "build" ] +exclude_gitignore = true follow_untyped_imports = true strict = true plugins = [ From 211a31069a972390d793c7eb867a5cb1b1f5f598 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:33:16 +0000 Subject: [PATCH 1627/1638] chore(deps-dev): Bump prek from 0.4.12 to 0.4.13 Bumps [prek](https://github.com/j178/prek) from 0.4.12 to 0.4.13. - [Release notes](https://github.com/j178/prek/releases) - [Changelog](https://github.com/j178/prek/blob/master/CHANGELOG.md) - [Commits](https://github.com/j178/prek/compare/v0.4.12...v0.4.13) --- updated-dependencies: - dependency-name: prek dependency-version: 0.4.13 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 083f2c0ad..f3180f751 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ optional-dependencies.dev = [ "mypy[faster-cache]==2.3.0", "mypy-strict-kwargs==2026.7.19.1", "no-defaults==2.1.0", - "prek==0.4.12", + "prek==0.4.13", "pydocstringformatter==1.0.0", "pydocstyle==6.3", "pygments==2.20.0", From bf17b130d5c7bd9dcd2aa0c5fb9c27d30d7472f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:33:22 +0000 Subject: [PATCH 1628/1638] chore(deps-dev): Bump pylint from 4.0.6 to 4.0.7 Bumps [pylint](https://github.com/pylint-dev/pylint) from 4.0.6 to 4.0.7. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v4.0.6...v4.0.7) --- updated-dependencies: - dependency-name: pylint dependency-version: 4.0.7 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 083f2c0ad..c2d7f1daa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ optional-dependencies.dev = [ "pydocstringformatter==1.0.0", "pydocstyle==6.3", "pygments==2.20.0", - "pylint[spelling]==4.0.6", + "pylint[spelling]==4.0.7", "pylint-per-file-ignores==3.2.1", "pyproject-fmt==2.27.0", "pyrefly==1.2.0", From 964cb5a82f76c8d6f98b2b5c2b2039857c5e693d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Aug 2026 10:33:11 +0000 Subject: [PATCH 1629/1638] chore(deps-dev): Bump ty from 0.0.69 to 0.0.70 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.69 to 0.0.70. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.69...0.0.70) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.70 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b8f3e48a8..efcf3a13a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ optional-dependencies.dev = [ "strict-kwargs==2026.7.24", "sybil==10.1.0", "towncrier==25.8.0", - "ty==0.0.69", + "ty==0.0.70", "types-requests==2.33.0.20260712", "vale==3.13.0.0", "vulture==2.16", From 3e7cf019aa2d1b951821247609b49cdd9378a1b5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 14 Aug 2026 12:07:55 +0100 Subject: [PATCH 1630/1638] Map the ProjectHasNoApiAccess result code Vuforia's result codes table spells this ``ProjectHasNoApiAccess``, while this package mapped only ``ProjectHasNoAPIAccess``, a spelling which came from a hand-written list in ``vws-python-mock`` rather than an observed response. No real response with either casing has been found, so both casings now map to ``ProjectHasNoAPIAccessError`` and the ambiguity is recorded in the code. ``vws-python-mock`` 2026.8.14 changes the mock to the documented spelling, so the pin is bumped to it. Co-Authored-By: Claude Opus 5 (1M context) --- newsfragments/3128.change.rst | 1 + pyproject.toml | 2 +- src/vws/exceptions/vws_exceptions.py | 11 ++++++++++- tests/test_vws_exceptions.py | 29 ++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 newsfragments/3128.change.rst diff --git a/newsfragments/3128.change.rst b/newsfragments/3128.change.rst new file mode 100644 index 000000000..fc07be19c --- /dev/null +++ b/newsfragments/3128.change.rst @@ -0,0 +1 @@ +Map the ``ProjectHasNoApiAccess`` result code, as spelled in Vuforia's result codes table, to ``ProjectHasNoAPIAccessError``. The previously mapped ``ProjectHasNoAPIAccess`` casing still raises the same exception. diff --git a/pyproject.toml b/pyproject.toml index efcf3a13a..7c7d50d69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ optional-dependencies.dev = [ "types-requests==2.33.0.20260712", "vale==3.13.0.0", "vulture==2.16", - "vws-python-mock==2026.8.4.2", + "vws-python-mock==2026.8.14", "vws-test-fixtures==2023.3.5", "yamlfix==1.19.1", "zizmor==1.29.0", diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index a93dd6004..5c6be8e12 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -109,7 +109,11 @@ class ProjectSuspendedError(VWSError): @beartype class ProjectHasNoAPIAccessError(VWSError): """Exception raised when Vuforia returns a response with a result code - 'ProjectHasNoAPIAccess'. + 'ProjectHasNoApiAccess'. + + Vuforia's result codes table spells this result code + 'ProjectHasNoApiAccess', but no real response with either casing has + been observed, so 'ProjectHasNoAPIAccess' raises this exception too. """ @@ -241,7 +245,12 @@ class AuthorizationFailedError(VWSError): "InvalidTargetType": InvalidTargetTypeError, "LicenseCheckFailed": LicenseCheckFailedError, "MetadataTooLarge": MetadataTooLargeError, + # Vuforia's result codes table spells this ``ProjectHasNoApiAccess``. + # ``ProjectHasNoAPIAccess`` was mapped first, from a hand-written list + # rather than an observed response. No real response with either + # casing has been observed, so both are mapped. "ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError, + "ProjectHasNoApiAccess": ProjectHasNoAPIAccessError, "ProjectInactive": ProjectInactiveError, "ProjectSuspended": ProjectSuspendedError, "QuotaExceeded": QuotaExceededError, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 73ab9f849..8fd894931 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -583,6 +583,35 @@ def test_vwserror_from_result_code() -> None: assert exception.response is response +@pytest.mark.parametrize( + argnames="result_code", + argvalues=["ProjectHasNoApiAccess", "ProjectHasNoAPIAccess"], +) +def test_project_has_no_api_access_casings(result_code: str) -> None: + """Both casings of the ``ProjectHasNoApiAccess`` result code map to + ``ProjectHasNoAPIAccessError``. + + Vuforia's result codes table uses ``ProjectHasNoApiAccess``, but no + real response with either casing has been observed. + """ + response = Response( + text=f'{{"result_code":"{result_code}"}}', + url="https://example.com/targets", + status_code=HTTPStatus.FORBIDDEN, + headers={}, + request_body=None, + tell_position=0, + content=b"", + ) + + exception = VWSError.from_result_code( + result_code=result_code, + response=response, + ) + + assert isinstance(exception, ProjectHasNoAPIAccessError) + + @pytest.mark.parametrize( argnames=("exception_type", "url"), argvalues=[ From 43680f54fbd0401358547b6c587d7b98e06d71a0 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 14 Aug 2026 12:12:42 +0100 Subject: [PATCH 1631/1638] Add ProjectHasNoApiAccess to the spelling dictionary Co-Authored-By: Claude Opus 5 (1M context) --- spelling_private_dict.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 45ed889ed..36a335a88 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -14,6 +14,7 @@ MetadataTooLarge OopsAnErrorOccurredPossiblyBadName OopsAnErrorOccurredPossiblyBadNameError ProjectHasNoAPIAccess +ProjectHasNoApiAccess ProjectInactive ProjectSuspended QuotaExceeded From 337ee04f571b61122fb808713df707fda832f08d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 14 Aug 2026 12:19:48 +0100 Subject: [PATCH 1632/1638] Map only the documented ProjectHasNoApiAccess casing Vuforia does not document the ProjectHasNoAPIAccess casing, so drop it from the result code map rather than keeping it as an alias. Co-Authored-By: Claude Opus 5 (1M context) --- newsfragments/3128.change.rst | 2 +- spelling_private_dict.txt | 1 - src/vws/exceptions/vws_exceptions.py | 12 +++--------- tests/test_vws_exceptions.py | 14 ++++---------- 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/newsfragments/3128.change.rst b/newsfragments/3128.change.rst index fc07be19c..2a0cc5a51 100644 --- a/newsfragments/3128.change.rst +++ b/newsfragments/3128.change.rst @@ -1 +1 @@ -Map the ``ProjectHasNoApiAccess`` result code, as spelled in Vuforia's result codes table, to ``ProjectHasNoAPIAccessError``. The previously mapped ``ProjectHasNoAPIAccess`` casing still raises the same exception. +Map the ``ProjectHasNoApiAccess`` result code, as spelled in Vuforia's result codes table, to ``ProjectHasNoAPIAccessError``. The previously mapped ``ProjectHasNoAPIAccess`` casing, which Vuforia does not document, is no longer mapped. diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 36a335a88..608572ce0 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -13,7 +13,6 @@ MaxNumResultsOutOfRange MetadataTooLarge OopsAnErrorOccurredPossiblyBadName OopsAnErrorOccurredPossiblyBadNameError -ProjectHasNoAPIAccess ProjectHasNoApiAccess ProjectInactive ProjectSuspended diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index 5c6be8e12..c9f2fea4b 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -110,10 +110,6 @@ class ProjectSuspendedError(VWSError): class ProjectHasNoAPIAccessError(VWSError): """Exception raised when Vuforia returns a response with a result code 'ProjectHasNoApiAccess'. - - Vuforia's result codes table spells this result code - 'ProjectHasNoApiAccess', but no real response with either casing has - been observed, so 'ProjectHasNoAPIAccess' raises this exception too. """ @@ -245,11 +241,9 @@ class AuthorizationFailedError(VWSError): "InvalidTargetType": InvalidTargetTypeError, "LicenseCheckFailed": LicenseCheckFailedError, "MetadataTooLarge": MetadataTooLargeError, - # Vuforia's result codes table spells this ``ProjectHasNoApiAccess``. - # ``ProjectHasNoAPIAccess`` was mapped first, from a hand-written list - # rather than an observed response. No real response with either - # casing has been observed, so both are mapped. - "ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError, + # This casing comes from Vuforia's result codes table. No real + # response with this result code has been observed, with this or any + # other casing. "ProjectHasNoApiAccess": ProjectHasNoAPIAccessError, "ProjectInactive": ProjectInactiveError, "ProjectSuspended": ProjectSuspendedError, diff --git a/tests/test_vws_exceptions.py b/tests/test_vws_exceptions.py index 8fd894931..5afb6639e 100644 --- a/tests/test_vws_exceptions.py +++ b/tests/test_vws_exceptions.py @@ -583,17 +583,11 @@ def test_vwserror_from_result_code() -> None: assert exception.response is response -@pytest.mark.parametrize( - argnames="result_code", - argvalues=["ProjectHasNoApiAccess", "ProjectHasNoAPIAccess"], -) -def test_project_has_no_api_access_casings(result_code: str) -> None: - """Both casings of the ``ProjectHasNoApiAccess`` result code map to - ``ProjectHasNoAPIAccessError``. - - Vuforia's result codes table uses ``ProjectHasNoApiAccess``, but no - real response with either casing has been observed. +def test_project_has_no_api_access_casing() -> None: + """The ``ProjectHasNoApiAccess`` result code, as spelled in Vuforia's + result codes table, maps to ``ProjectHasNoAPIAccessError``. """ + result_code = "ProjectHasNoApiAccess" response = Response( text=f'{{"result_code":"{result_code}"}}', url="https://example.com/targets", From 7bea124cd917ce0b7d03ab12d044d2f073533fe3 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 14 Aug 2026 12:31:46 +0100 Subject: [PATCH 1633/1638] Drop the result code casing comment Co-Authored-By: Claude Opus 5 (1M context) --- src/vws/exceptions/vws_exceptions.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/vws/exceptions/vws_exceptions.py b/src/vws/exceptions/vws_exceptions.py index c9f2fea4b..216677f15 100644 --- a/src/vws/exceptions/vws_exceptions.py +++ b/src/vws/exceptions/vws_exceptions.py @@ -241,9 +241,6 @@ class AuthorizationFailedError(VWSError): "InvalidTargetType": InvalidTargetTypeError, "LicenseCheckFailed": LicenseCheckFailedError, "MetadataTooLarge": MetadataTooLargeError, - # This casing comes from Vuforia's result codes table. No real - # response with this result code has been observed, with this or any - # other casing. "ProjectHasNoApiAccess": ProjectHasNoAPIAccessError, "ProjectInactive": ProjectInactiveError, "ProjectSuspended": ProjectSuspendedError, From b1c34db705d7bb24229766d89bba760aec090ed4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 14 Aug 2026 13:37:18 +0100 Subject: [PATCH 1634/1638] Add Database Reco Counts report client support Add ``request_database_reco_counts_report``, ``download_reco_counts_report`` and ``wait_for_reco_counts_report`` to ``VWS`` and ``AsyncVWS``, along with an optional ``database_id`` constructor argument which the report endpoint needs. The download is not signed, is not against ``base_vws_url``, and 404s until the report is generated, so it does not go through ``make_request``. Closes #3133 Co-Authored-By: Claude Opus 5 (1M context) --- conftest.py | 3 + docs/source/index.rst | 49 +++++ newsfragments/3133.change.rst | 2 + spelling_private_dict.txt | 2 + src/vws/_reco_counts.py | 77 ++++++++ src/vws/async_vws.py | 143 +++++++++++++++ src/vws/exceptions/custom_exceptions.py | 55 ++++++ src/vws/reports.py | 71 ++++++++ src/vws/vws.py | 142 +++++++++++++++ tests/conftest.py | 24 +++ tests/test_async_vws.py | 215 ++++++++++++++++++++++ tests/test_vws.py | 233 +++++++++++++++++++++++- 12 files changed, 1015 insertions(+), 1 deletion(-) create mode 100644 newsfragments/3133.change.rst create mode 100644 src/vws/_reco_counts.py diff --git a/conftest.py b/conftest.py index f82cefc93..1a2445a7c 100644 --- a/conftest.py +++ b/conftest.py @@ -46,18 +46,21 @@ def fixture_mock_vws( server_secret_key = uuid.uuid4().hex client_access_key = uuid.uuid4().hex client_secret_key = uuid.uuid4().hex + database_id = uuid.uuid4().hex database = CloudDatabase( server_access_key=server_access_key, server_secret_key=server_secret_key, client_access_key=client_access_key, client_secret_key=client_secret_key, + database_id=database_id, ) monkeypatch.setenv(name="VWS_SERVER_ACCESS_KEY", value=server_access_key) monkeypatch.setenv(name="VWS_SERVER_SECRET_KEY", value=server_secret_key) monkeypatch.setenv(name="VWS_CLIENT_ACCESS_KEY", value=client_access_key) monkeypatch.setenv(name="VWS_CLIENT_SECRET_KEY", value=client_secret_key) + monkeypatch.setenv(name="VWS_DATABASE_ID", value=database_id) # We use a low processing time so that tests run quickly. with MockVWS(processing_time_seconds=0.2) as mock: mock.add_cloud_database(cloud_database=database) diff --git a/docs/source/index.rst b/docs/source/index.rst index ae5712825..7b82155c8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -60,6 +60,55 @@ See the :doc:`api-reference` for full usage details. assert matching_targets[0].target_id == target_id +Recognition counts +------------------ + +Vuforia can generate a report of the number of recognitions of each target in a database in a month. +Only the current month and the previous month can be requested. + +This needs the ID of the database, which is shown in the Vuforia target manager. + +The report is generated in the background, and the URL it is served from expires just under seven days after it is requested. + +.. clear-namespace + +.. code-block:: python + + """Get the number of recognitions of each target this month.""" + + import datetime + import os + + from vws import VWS + + server_access_key = os.environ["VWS_SERVER_ACCESS_KEY"] + server_secret_key = os.environ["VWS_SERVER_SECRET_KEY"] + database_id = os.environ["VWS_DATABASE_ID"] + + vws_client = VWS( + server_access_key=server_access_key, + server_secret_key=server_secret_key, + database_id=database_id, + ) + + now = datetime.datetime.now(tz=datetime.UTC) + this_month = now.strftime(format="%Y-%m") + + report_request = vws_client.request_database_reco_counts_report( + month=this_month, + ) + + report = vws_client.wait_for_reco_counts_report( + presigned_url=report_request.presigned_url, + ) + + reco_counts_by_target_id = { + item.target_id: item.reco_count for item in report.reco_counts + } + + # This database has no targets, so nothing has been recognized. + assert not reco_counts_by_target_id + Testing ------- diff --git a/newsfragments/3133.change.rst b/newsfragments/3133.change.rst new file mode 100644 index 000000000..edab9049a --- /dev/null +++ b/newsfragments/3133.change.rst @@ -0,0 +1,2 @@ +Add support for the Database Reco Counts report. +``VWS`` and ``AsyncVWS`` take an optional ``database_id``, and have new ``request_database_reco_counts_report``, ``download_reco_counts_report`` and ``wait_for_reco_counts_report`` methods. diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 608572ce0..74e7d3856 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -41,6 +41,7 @@ changelog chunked cmyk connectionerror +csv customizable dataclasses datetime @@ -88,6 +89,7 @@ pyright pytest readme readthedocs +reco recognitions refactoring regex diff --git a/src/vws/_reco_counts.py b/src/vws/_reco_counts.py new file mode 100644 index 000000000..7a95c59f9 --- /dev/null +++ b/src/vws/_reco_counts.py @@ -0,0 +1,77 @@ +"""Internal helpers for the database reco counts report endpoints.""" + +import json +from http import HTTPStatus + +from beartype import BeartypeConf, beartype + +from vws.exceptions.custom_exceptions import ( + DatabaseIdNotSetError, + RecoCountsReportDownloadError, + RecoCountsReportNotReadyError, +) +from vws.reports import RecoCountsReport +from vws.response import Response # noqa: TC001 + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def reco_counts_report_path(*, database_id: str | None) -> str: + """Get the path of the reco counts report endpoint for a database. + + Args: + database_id: The ID of the database to get the path for. + + Returns: + The path of the reco counts report endpoint. + + Raises: + ~vws.exceptions.custom_exceptions.DatabaseIdNotSetError: No + ``database_id`` was given to the client. + """ + if database_id is None: + msg = ( + "A database ID is needed to request a reco counts report. Give " + "``database_id`` when creating the client." + ) + raise DatabaseIdNotSetError(msg) + + return f"/imagetargets/databases/{database_id}/reports/recoCounts" + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def reco_counts_report_body(*, month: str) -> bytes: + """Get the request body for requesting a reco counts report. + + Args: + month: The month to request the report for, in ``YYYY-mm`` form. + + Returns: + The body of the request. + """ + return json.dumps(obj={"month": month}).encode(encoding="utf-8") + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def report_from_download_response(*, response: Response) -> RecoCountsReport: + """Get a reco counts report from a response from a report's URL. + + Args: + response: The response from a report's download URL. + + Returns: + The downloaded report. + + Raises: + ~vws.exceptions.custom_exceptions.RecoCountsReportNotReadyError: + Vuforia has not finished generating the report. + ~vws.exceptions.custom_exceptions.RecoCountsReportDownloadError: The + report could not be downloaded. For example, the report's URL may + have expired. + """ + if response.status_code == HTTPStatus.NOT_FOUND: + raise RecoCountsReportNotReadyError(response=response) + + if response.status_code != HTTPStatus.OK: + raise RecoCountsReportDownloadError(response=response) + + return RecoCountsReport.from_csv(csv_bytes=response.content) diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index aad205768..bdefa8222 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -3,6 +3,7 @@ import asyncio import base64 import json +import time from http import HTTPMethod, HTTPStatus from typing import Self @@ -11,14 +12,23 @@ from vws._async_vws_request import async_target_api_request from vws._image_utils import ImageType as _ImageType from vws._image_utils import get_image_data as _get_image_data +from vws._reco_counts import ( + reco_counts_report_body, + reco_counts_report_path, + report_from_download_response, +) from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ( + RecoCountsReportNotReadyError, + RecoCountsReportTimeoutError, ServerError, TargetProcessingTimeoutError, ) from vws.exceptions.vws_exceptions import TooManyRequestsError from vws.reports import ( DatabaseSummaryReport, + RecoCountsReport, + RecoCountsReportRequest, TargetStatusAndRecord, TargetStatuses, TargetSummaryReport, @@ -37,6 +47,7 @@ def __init__( server_access_key: str, server_secret_key: str, base_vws_url: str = "https://vws.vuforia.com", + database_id: str | None = None, request_timeout_seconds: float | tuple[float, float] = 30.0, transport: AsyncTransport | None = None, ) -> None: @@ -45,6 +56,10 @@ def __init__( server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. base_vws_url: The base URL for the VWS API. + database_id: The ID of the database which the + given keys belong to. This is shown in the + target manager. It is needed only by + :meth:`request_database_reco_counts_report`. request_timeout_seconds: The timeout for each HTTP request. This can be a float to set both the connect and read timeouts, or a @@ -56,6 +71,7 @@ def __init__( self._server_access_key = server_access_key self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url + self._database_id = database_id self._request_timeout_seconds = request_timeout_seconds self._transport = ( transport if transport is not None else AsyncHTTPXTransport() @@ -439,6 +455,133 @@ async def get_database_summary_report( response_dict=response_data, ) + async def request_database_reco_counts_report( + self, + *, + month: str, + ) -> RecoCountsReportRequest: + """Request a per-target recognition count report for the database. + + Vuforia generates the report in the background, so the report is not + available to download immediately. Use + :meth:`wait_for_reco_counts_report` to wait for it. + + Args: + month: The month to get recognition counts for, in ``YYYY-mm`` + form. Vuforia accepts only the current month and the previous + month. + + Returns: + The URL to download the report from, and the transaction ID of + the request. + + Raises: + ~vws.exceptions.custom_exceptions.DatabaseIdNotSetError: No + ``database_id`` was given to the client. + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct, or the client's ``database_id`` is + not the ID of the database which the client's keys belong to. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given month is not the current + month or the previous month. + ~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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + response = await self.make_request( + method=HTTPMethod.POST, + data=reco_counts_report_body(month=month), + request_path=reco_counts_report_path( + database_id=self._database_id, + ), + expected_result_code="Success", + content_type="application/json", + ) + + response_data = dict(json.loads(s=response.text)) + return RecoCountsReportRequest.from_response_dict( + response_dict=response_data, + ) + + async def download_reco_counts_report( + self, + *, + presigned_url: str, + ) -> RecoCountsReport: + """Download a requested reco counts report. + + The report's URL is not part of the VWS API, so this request is not + authorized with the client's keys. + + Args: + presigned_url: The URL of the report, as given by + :meth:`request_database_reco_counts_report`. + + Returns: + The downloaded report. + + Raises: + ~vws.exceptions.custom_exceptions.RecoCountsReportNotReadyError: + Vuforia has not finished generating the report. + ~vws.exceptions.custom_exceptions.RecoCountsReportDownloadError: + The report could not be downloaded. For example, the report's + URL may have expired. + """ + response = await self._transport( + method=HTTPMethod.GET, + url=presigned_url, + headers={}, + data=b"", + request_timeout=self._request_timeout_seconds, + ) + + return report_from_download_response(response=response) + + async def wait_for_reco_counts_report( + self, + *, + presigned_url: str, + seconds_between_requests: float = 0.2, + timeout_seconds: float = 60 * 5, + ) -> RecoCountsReport: + """Wait for a requested reco counts report to be generated, then + download it. + + Args: + presigned_url: The URL of the report, as given by + :meth:`request_database_reco_counts_report`. + seconds_between_requests: The number of seconds to wait between + requests made while polling the report's URL. + timeout_seconds: The maximum number of seconds to wait for the + report to be generated. + + Returns: + The downloaded report. + + Raises: + ~vws.exceptions.custom_exceptions.RecoCountsReportTimeoutError: + The report was not generated within ``timeout_seconds`` + seconds. + ~vws.exceptions.custom_exceptions.RecoCountsReportDownloadError: + The report could not be downloaded. For example, the report's + URL may have expired. + """ + start_time = time.monotonic() + while True: + try: + return await self.download_reco_counts_report( + presigned_url=presigned_url, + ) + except RecoCountsReportNotReadyError: + elapsed_time = time.monotonic() - start_time + if elapsed_time > timeout_seconds: + raise RecoCountsReportTimeoutError from None + + await asyncio.sleep(delay=seconds_between_requests) + async def delete_target(self, target_id: str) -> None: """Delete a given target. diff --git a/src/vws/exceptions/custom_exceptions.py b/src/vws/exceptions/custom_exceptions.py index c53f5db29..70ec81e36 100644 --- a/src/vws/exceptions/custom_exceptions.py +++ b/src/vws/exceptions/custom_exceptions.py @@ -34,6 +34,61 @@ class TargetProcessingTimeoutError(Exception): """ +@beartype +class DatabaseIdNotSetError(Exception): + """Exception raised when an operation which needs a database ID is used + on a client which was not given one. + """ + + +@beartype +class RecoCountsReportNotReadyError(Exception): + """Exception raised when a reco counts report is downloaded before + Vuforia has generated it. + """ + + def __init__(self, response: Response) -> None: + """ + Args: + response: The response returned by the report's download URL. + """ + super().__init__(response.text) + self._response = response + + @property + def response(self) -> Response: + """The response returned by the download URL.""" + return self._response + + +@beartype +class RecoCountsReportDownloadError(Exception): + """Exception raised when downloading a reco counts report fails. + + This is raised, for example, when the report's URL has expired. + """ + + def __init__(self, response: Response) -> None: + """ + Args: + response: The response returned by the report's download URL. + """ + super().__init__(response.text) + self._response = response + + @property + def response(self) -> Response: + """The response returned by the download URL.""" + return self._response + + +@beartype +class RecoCountsReportTimeoutError(Exception): + """Exception raised when waiting for a reco counts report to be + generated times out. + """ + + @beartype class ServerError(Exception): # pragma: no cover """Exception raised when VWS returns a server error.""" diff --git a/src/vws/reports.py b/src/vws/reports.py index 007a0d443..66a9685ed 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -1,6 +1,9 @@ """Classes for representing Vuforia reports.""" +import csv import datetime +import io +from collections.abc import Sequence # noqa: TC003 from dataclasses import dataclass from enum import Enum, unique from typing import Any, Self @@ -186,3 +189,71 @@ def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: reco_rating=target_record_dict["reco_rating"], ) return cls(status=status, target_record=target_record) + + +@beartype +@dataclass(frozen=True, kw_only=True) +class RecoCountsReportRequest: + """A requested database reco counts report. + + See + https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api. + """ + + transaction_id: str + presigned_url: str + """The URL to download the report from. + + Real Vuforia's URLs expire just under seven days after the report is + requested. + """ + + @classmethod + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + """Construct from a VWS API response dict.""" + return cls( + transaction_id=response_dict["transaction_id"], + presigned_url=response_dict["presigned_url"], + ) + + +@beartype +@dataclass(frozen=True, kw_only=True) +class RecoCount: + """The number of recognitions of one target in a reco counts + report. + """ + + target_id: str + reco_count: int + + +@beartype +@dataclass(frozen=True, kw_only=True) +class RecoCountsReport: + """A downloaded database reco counts report. + + A report for a month with no recognitions has no ``reco_counts``. + """ + + reco_counts: Sequence[RecoCount] + raw_csv: bytes + """The downloaded CSV, before it was parsed. + + Vuforia does not document the format of the report, so it may include + columns which ``reco_counts`` does not expose. + """ + + @classmethod + def from_csv(cls, csv_bytes: bytes) -> Self: + """Construct from the CSV content of a downloaded report.""" + text = csv_bytes.decode(encoding="utf-8") + reader = csv.DictReader(f=io.StringIO(initial_value=text, newline="")) + reco_counts = [ + RecoCount( + target_id=row["target_id"], + reco_count=int(row["reco_count"]), + ) + for row in reader + ] + return cls(reco_counts=reco_counts, raw_csv=csv_bytes) diff --git a/src/vws/vws.py b/src/vws/vws.py index fc54c30fd..a46b84fa0 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -9,15 +9,24 @@ from vws._image_utils import ImageType as _ImageType from vws._image_utils import get_image_data as _get_image_data +from vws._reco_counts import ( + reco_counts_report_body, + reco_counts_report_path, + report_from_download_response, +) from vws._vws_request import target_api_request from vws.exceptions.base_exceptions import VWSError from vws.exceptions.custom_exceptions import ( + RecoCountsReportNotReadyError, + RecoCountsReportTimeoutError, ServerError, TargetProcessingTimeoutError, ) from vws.exceptions.vws_exceptions import TooManyRequestsError from vws.reports import ( DatabaseSummaryReport, + RecoCountsReport, + RecoCountsReportRequest, TargetStatusAndRecord, TargetStatuses, TargetSummaryReport, @@ -36,6 +45,7 @@ def __init__( server_access_key: str, server_secret_key: str, base_vws_url: str = "https://vws.vuforia.com", + database_id: str | None = None, request_timeout_seconds: float | tuple[float, float] = 30.0, transport: Transport | None = None, ) -> None: @@ -44,6 +54,10 @@ def __init__( server_access_key: A VWS server access key. server_secret_key: A VWS server secret key. base_vws_url: The base URL for the VWS API. + database_id: The ID of the database which the + given keys belong to. This is shown in the + target manager. It is needed only by + :meth:`request_database_reco_counts_report`. request_timeout_seconds: The timeout for each HTTP request. This can be a float to set both the connect and read timeouts, or a @@ -55,6 +69,7 @@ def __init__( self._server_access_key = server_access_key self._server_secret_key = server_secret_key self._base_vws_url = base_vws_url + self._database_id = database_id self._request_timeout_seconds = request_timeout_seconds self._transport = ( transport if transport is not None else RequestsTransport() @@ -413,6 +428,133 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: response_dict=response_data, ) + def request_database_reco_counts_report( + self, + *, + month: str, + ) -> RecoCountsReportRequest: + """Request a per-target recognition count report for the database. + + Vuforia generates the report in the background, so the report is not + available to download immediately. Use + :meth:`wait_for_reco_counts_report` to wait for it. + + Args: + month: The month to get recognition counts for, in ``YYYY-mm`` + form. Vuforia accepts only the current month and the previous + month. + + Returns: + The URL to download the report from, and the transaction ID of + the request. + + Raises: + ~vws.exceptions.custom_exceptions.DatabaseIdNotSetError: No + ``database_id`` was given to the client. + ~vws.exceptions.vws_exceptions.AuthenticationFailureError: The + secret key is not correct, or the client's ``database_id`` is + not the ID of the database which the client's keys belong to. + ~vws.exceptions.vws_exceptions.FailError: There was an error with + the request. For example, the given month is not the current + month or the previous month. + ~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.TooManyRequestsError: Vuforia is + rate limiting access. + """ + response = self.make_request( + method=HTTPMethod.POST, + data=reco_counts_report_body(month=month), + request_path=reco_counts_report_path( + database_id=self._database_id, + ), + expected_result_code="Success", + content_type="application/json", + ) + + response_data = dict(json.loads(s=response.text)) + return RecoCountsReportRequest.from_response_dict( + response_dict=response_data, + ) + + def download_reco_counts_report( + self, + *, + presigned_url: str, + ) -> RecoCountsReport: + """Download a requested reco counts report. + + The report's URL is not part of the VWS API, so this request is not + authorized with the client's keys. + + Args: + presigned_url: The URL of the report, as given by + :meth:`request_database_reco_counts_report`. + + Returns: + The downloaded report. + + Raises: + ~vws.exceptions.custom_exceptions.RecoCountsReportNotReadyError: + Vuforia has not finished generating the report. + ~vws.exceptions.custom_exceptions.RecoCountsReportDownloadError: + The report could not be downloaded. For example, the report's + URL may have expired. + """ + response = self._transport( + method=HTTPMethod.GET, + url=presigned_url, + headers={}, + data=b"", + request_timeout=self._request_timeout_seconds, + ) + + return report_from_download_response(response=response) + + def wait_for_reco_counts_report( + self, + *, + presigned_url: str, + seconds_between_requests: float = 0.2, + timeout_seconds: float = 60 * 5, + ) -> RecoCountsReport: + """Wait for a requested reco counts report to be generated, then + download it. + + Args: + presigned_url: The URL of the report, as given by + :meth:`request_database_reco_counts_report`. + seconds_between_requests: The number of seconds to wait between + requests made while polling the report's URL. + timeout_seconds: The maximum number of seconds to wait for the + report to be generated. + + Returns: + The downloaded report. + + Raises: + ~vws.exceptions.custom_exceptions.RecoCountsReportTimeoutError: + The report was not generated within ``timeout_seconds`` + seconds. + ~vws.exceptions.custom_exceptions.RecoCountsReportDownloadError: + The report could not be downloaded. For example, the report's + URL may have expired. + """ + start_time = time.monotonic() + while True: + try: + return self.download_reco_counts_report( + presigned_url=presigned_url, + ) + except RecoCountsReportNotReadyError: + elapsed_time = time.monotonic() - start_time + if elapsed_time > timeout_seconds: + raise RecoCountsReportTimeoutError from None + + time.sleep(seconds_between_requests) + def delete_target(self, target_id: str) -> None: """Delete a given target. diff --git a/tests/conftest.py b/tests/conftest.py index 15ef17dab..fde4c7a00 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,6 @@ """Configuration, plugins and fixtures for `pytest`.""" +import datetime import io # noqa: TC003 from collections.abc import AsyncGenerator, Generator # noqa: TC003 from pathlib import Path # noqa: TC003 @@ -66,6 +67,7 @@ def vws_client(*, _mock_database: CloudDatabase) -> VWS: return VWS( server_access_key=_mock_database.server_access_key, server_secret_key=_mock_database.server_secret_key, + database_id=_mock_database.database_id, ) @@ -87,6 +89,7 @@ async def async_vws_client( async with AsyncVWS( server_access_key=_mock_database.server_access_key, server_secret_key=_mock_database.server_secret_key, + database_id=_mock_database.database_id, ) as client: yield client @@ -121,6 +124,27 @@ async def async_vumark_service_client( yield client +@pytest.fixture(name="current_month") +def fixture_current_month() -> str: + """The current month, in the form which reco counts reports use.""" + now = datetime.datetime.now(tz=datetime.UTC) + return now.strftime(format="%Y-%m") + + +@pytest.fixture(name="report_month", params=["current", "previous"]) +def fixture_report_month(*, request: pytest.FixtureRequest) -> str: + """A month which a reco counts report can be requested for. + + Vuforia accepts only the current month and the previous month. + """ + now = datetime.datetime.now(tz=datetime.UTC) + if request.param == "current": + return now.strftime(format="%Y-%m") + + last_of_previous_month = now.replace(day=1) - datetime.timedelta(days=1) + return last_of_previous_month.strftime(format="%Y-%m") + + @pytest.fixture(name="image_file", params=["r+b", "rb"]) def fixture_image_file( *, diff --git a/tests/test_async_vws.py b/tests/test_async_vws.py index f59c5f2e4..d319b5c69 100644 --- a/tests/test_async_vws.py +++ b/tests/test_async_vws.py @@ -2,7 +2,9 @@ import base64 import io # noqa: TC003 +import time import uuid +from http import HTTPStatus from typing import BinaryIO import pytest @@ -11,13 +13,22 @@ from vws import AsyncCloudRecoService, AsyncVuMarkService, AsyncVWS from vws.exceptions.custom_exceptions import ( + DatabaseIdNotSetError, + RecoCountsReportDownloadError, + RecoCountsReportNotReadyError, + RecoCountsReportTimeoutError, TargetProcessingTimeoutError, ) +from vws.exceptions.vws_exceptions import ( + AuthenticationFailureError, + FailError, +) from vws.reports import ( DatabaseSummaryReport, TargetRecord, TargetStatuses, ) +from vws.response import Response from vws.vumark_accept import VuMarkAccept @@ -459,6 +470,210 @@ async def test_no_fields_given( ) +class _ForbiddenDownloadTransport: + """An async transport which refuses to serve a report, as an expired + URL would. + """ + + async def aclose(self) -> None: + """Close the transport.""" + + async def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Response: + """Return a "forbidden" response.""" + del method, headers, request_timeout + body = "AccessDenied" + return Response( + text=body, + url=url, + status_code=HTTPStatus.FORBIDDEN, + headers={}, + request_body=data, + tell_position=0, + content=body.encode(encoding="utf-8"), + ) + + +class TestRecoCountsReport: + """Tests for database reco counts reports.""" + + @staticmethod + @pytest.mark.asyncio + async def test_reco_counts_report( + *, + async_vws_client: AsyncVWS, + report_month: str, + ) -> None: + """A report can be requested, waited for and downloaded.""" + client = async_vws_client + report_request = await client.request_database_reco_counts_report( + month=report_month, + ) + assert report_request.transaction_id + assert report_request.presigned_url + + report = await client.wait_for_reco_counts_report( + presigned_url=report_request.presigned_url, + ) + + # No targets have been recognized, so the report has no rows. + assert not report.reco_counts + assert report.raw_csv.startswith(b"target_id,reco_count") + + @staticmethod + @pytest.mark.asyncio + async def test_not_ready(*, current_month: str) -> None: + """Downloading a report before Vuforia has generated it raises an + error. + """ + with MockVWS(processing_time_seconds=60) as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + async with AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + database_id=database.database_id, + ) as client: + report_request = ( + await client.request_database_reco_counts_report( + month=current_month, + ) + ) + + with pytest.raises( + expected_exception=RecoCountsReportNotReadyError, + ) as exc: + await client.download_reco_counts_report( + presigned_url=report_request.presigned_url, + ) + + assert exc.value.response.status_code == HTTPStatus.NOT_FOUND + + @staticmethod + @pytest.mark.asyncio + async def test_wait_timeout(*, current_month: str) -> None: + """Waiting for a report which is not generated in time raises an + error. + """ + with MockVWS(processing_time_seconds=60) as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + async with AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + database_id=database.database_id, + ) as client: + report_request = ( + await client.request_database_reco_counts_report( + month=current_month, + ) + ) + + maximum_wait_seconds = 5 + start_time = time.monotonic() + + with pytest.raises( + expected_exception=RecoCountsReportTimeoutError, + ): + await client.wait_for_reco_counts_report( + presigned_url=report_request.presigned_url, + seconds_between_requests=0.01, + timeout_seconds=0.05, + ) + + elapsed_time = time.monotonic() - start_time + assert elapsed_time < maximum_wait_seconds + + @staticmethod + @pytest.mark.asyncio + @pytest.mark.parametrize( + argnames="month", + argvalues=["1999-01", "not-a-month"], + ) + async def test_month_not_accepted( + *, + async_vws_client: AsyncVWS, + month: str, + ) -> None: + """Months other than the current and previous month are + rejected. + """ + with pytest.raises(expected_exception=FailError) as exc: + await async_vws_client.request_database_reco_counts_report( + month=month, + ) + + assert exc.value.response.status_code == HTTPStatus.BAD_REQUEST + + @staticmethod + @pytest.mark.asyncio + async def test_database_id_does_not_match_keys( + *, + current_month: str, + ) -> None: + """A database ID which does not match the given keys is + rejected. + """ + with MockVWS() as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + async with AsyncVWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + database_id=uuid.uuid4().hex, + ) as client: + with pytest.raises( + expected_exception=AuthenticationFailureError, + ) as exc: + await client.request_database_reco_counts_report( + month=current_month, + ) + + assert ( + exc.value.response.status_code == HTTPStatus.UNAUTHORIZED + ) + + @staticmethod + @pytest.mark.asyncio + async def test_download_error() -> None: + """An error response from the report's URL raises an error.""" + async with AsyncVWS( + server_access_key=uuid.uuid4().hex, + server_secret_key=uuid.uuid4().hex, + transport=_ForbiddenDownloadTransport(), + ) as client: + with pytest.raises( + expected_exception=RecoCountsReportDownloadError, + ) as exc: + await client.download_reco_counts_report( + presigned_url="https://example.com/reports/recoCounts/x", + ) + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + + @staticmethod + @pytest.mark.asyncio + async def test_no_database_id(*, current_month: str) -> None: + """A client which was given no database ID cannot request a + report. + """ + async with AsyncVWS( + server_access_key=uuid.uuid4().hex, + server_secret_key=uuid.uuid4().hex, + ) as client: + with pytest.raises(expected_exception=DatabaseIdNotSetError): + await client.request_database_reco_counts_report( + month=current_month, + ) + + class TestGenerateVumarkInstance: """Tests for generating VuMark instances.""" diff --git a/tests/test_vws.py b/tests/test_vws.py index dff029c2f..223d2cd97 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -4,7 +4,9 @@ import datetime import io # noqa: TC003 import secrets +import time import uuid +from http import HTTPStatus from typing import BinaryIO import pytest @@ -14,13 +16,26 @@ from mock_vws.database import CloudDatabase from vws import VWS, CloudRecoService, VuMarkService -from vws.exceptions.custom_exceptions import TargetProcessingTimeoutError +from vws.exceptions.custom_exceptions import ( + DatabaseIdNotSetError, + RecoCountsReportDownloadError, + RecoCountsReportNotReadyError, + RecoCountsReportTimeoutError, + TargetProcessingTimeoutError, +) +from vws.exceptions.vws_exceptions import ( + AuthenticationFailureError, + FailError, +) from vws.reports import ( DatabaseSummaryReport, + RecoCount, + RecoCountsReport, TargetRecord, TargetStatuses, TargetSummaryReport, ) +from vws.response import Response from vws.vumark_accept import VuMarkAccept @@ -760,6 +775,222 @@ def test_no_fields_given( vws_client.update_target(target_id=target_id) +class _ForbiddenDownloadTransport: + """A transport which refuses to serve a report, as an expired URL + would. + """ + + def close(self) -> None: + """Close the transport.""" + + def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Response: + """Return a "forbidden" response.""" + del method, headers, request_timeout + body = "AccessDenied" + return Response( + text=body, + url=url, + status_code=HTTPStatus.FORBIDDEN, + headers={}, + request_body=data, + tell_position=0, + content=body.encode(encoding="utf-8"), + ) + + +class TestRecoCountsReport: + """Tests for database reco counts reports.""" + + @staticmethod + def test_reco_counts_report( + *, + vws_client: VWS, + report_month: str, + ) -> None: + """A report can be requested, waited for and downloaded.""" + report_request = vws_client.request_database_reco_counts_report( + month=report_month, + ) + assert report_request.transaction_id + assert report_request.presigned_url + + report = vws_client.wait_for_reco_counts_report( + presigned_url=report_request.presigned_url, + ) + + # No targets have been recognized, so the report has no rows. + assert not report.reco_counts + assert report.raw_csv.startswith(b"target_id,reco_count") + + @staticmethod + def test_not_ready(*, current_month: str) -> None: + """Downloading a report before Vuforia has generated it raises an + error. + """ + with MockVWS(processing_time_seconds=60) as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + database_id=database.database_id, + ) + report_request = vws_client.request_database_reco_counts_report( + month=current_month, + ) + + with pytest.raises( + expected_exception=RecoCountsReportNotReadyError, + ) as exc: + vws_client.download_reco_counts_report( + presigned_url=report_request.presigned_url, + ) + + assert exc.value.response.status_code == HTTPStatus.NOT_FOUND + + @staticmethod + def test_wait_timeout(*, current_month: str) -> None: + """Waiting for a report which is not generated in time raises an + error. + """ + with MockVWS(processing_time_seconds=60) as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + database_id=database.database_id, + ) + report_request = vws_client.request_database_reco_counts_report( + month=current_month, + ) + + maximum_wait_seconds = 5 + start_time = time.monotonic() + + with pytest.raises( + expected_exception=RecoCountsReportTimeoutError, + ): + vws_client.wait_for_reco_counts_report( + presigned_url=report_request.presigned_url, + seconds_between_requests=0.01, + timeout_seconds=0.05, + ) + + elapsed_time = time.monotonic() - start_time + assert elapsed_time < maximum_wait_seconds + + @staticmethod + @pytest.mark.parametrize( + argnames="month", + argvalues=["1999-01", "not-a-month"], + ) + def test_month_not_accepted(*, vws_client: VWS, month: str) -> None: + """Months other than the current and previous month are + rejected. + """ + with pytest.raises(expected_exception=FailError) as exc: + vws_client.request_database_reco_counts_report(month=month) + + assert exc.value.response.status_code == HTTPStatus.BAD_REQUEST + + @staticmethod + def test_database_id_does_not_match_keys(*, current_month: str) -> None: + """A database ID which does not match the given keys is + rejected. + """ + with MockVWS() as mock: + database = CloudDatabase() + mock.add_cloud_database(cloud_database=database) + vws_client = VWS( + server_access_key=database.server_access_key, + server_secret_key=database.server_secret_key, + database_id=uuid.uuid4().hex, + ) + + with pytest.raises( + expected_exception=AuthenticationFailureError, + ) as exc: + vws_client.request_database_reco_counts_report( + month=current_month, + ) + + assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED + + @staticmethod + def test_download_error() -> None: + """An error response from the report's URL raises an error.""" + vws_client = VWS( + server_access_key=uuid.uuid4().hex, + server_secret_key=uuid.uuid4().hex, + transport=_ForbiddenDownloadTransport(), + ) + + with pytest.raises( + expected_exception=RecoCountsReportDownloadError, + ) as exc: + vws_client.download_reco_counts_report( + presigned_url="https://example.com/reports/recoCounts/x", + ) + + assert exc.value.response.status_code == HTTPStatus.FORBIDDEN + + @staticmethod + def test_no_database_id(*, current_month: str) -> None: + """A client which was given no database ID cannot request a + report. + """ + vws_client = VWS( + server_access_key=uuid.uuid4().hex, + server_secret_key=uuid.uuid4().hex, + ) + + with pytest.raises(expected_exception=DatabaseIdNotSetError): + vws_client.request_database_reco_counts_report(month=current_month) + + +class TestRecoCountsReportParsing: + """Tests for parsing downloaded reco counts reports.""" + + @staticmethod + def test_rows() -> None: + """Each row of the CSV becomes a ``RecoCount``.""" + csv_bytes = b"target_id,reco_count\r\nabc,3\r\ndef,0\r\n" + + report = RecoCountsReport.from_csv(csv_bytes=csv_bytes) + + assert report.reco_counts == [ + RecoCount(target_id="abc", reco_count=3), + RecoCount(target_id="def", reco_count=0), + ] + assert report.raw_csv == csv_bytes + + @staticmethod + def test_unknown_columns_ignored() -> None: + """Columns which are not known are not exposed in + ``reco_counts``. + """ + expected_reco_count = 3 + header = "target_id,reco_count,new_column\r\n" + csv_text = f"{header}abc,{expected_reco_count},x\r\n" + + report = RecoCountsReport.from_csv( + csv_bytes=csv_text.encode(encoding="utf-8"), + ) + + (item,) = report.reco_counts + assert item.target_id == "abc" + assert item.reco_count == expected_reco_count + + class TestGenerateVumarkInstance: """Tests for generating VuMark instances.""" From e6c52dc90dfe59d55f805c45dc4f624da5ddbb77 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 14 Aug 2026 13:59:36 +0100 Subject: [PATCH 1635/1638] Take the reco counts report year and month as ints The month was a ``YYYY-mm`` string, which let callers pass a value that could not be a month at all. Taking two ints makes a malformed month unrepresentable, and reads better next to ``datetime`` attributes. Co-Authored-By: Claude Opus 5 (1M context) --- docs/source/index.rst | 4 ++-- src/vws/_reco_counts.py | 8 ++++--- src/vws/async_vws.py | 14 +++++++----- src/vws/vws.py | 14 +++++++----- tests/conftest.py | 14 ++++++------ tests/test_async_vws.py | 37 ++++++++++++++++++++----------- tests/test_vws.py | 49 +++++++++++++++++++++++++++++------------ 7 files changed, 89 insertions(+), 51 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 7b82155c8..7ce0fb3a9 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -92,10 +92,10 @@ The report is generated in the background, and the URL it is served from expires ) now = datetime.datetime.now(tz=datetime.UTC) - this_month = now.strftime(format="%Y-%m") report_request = vws_client.request_database_reco_counts_report( - month=this_month, + year=now.year, + month=now.month, ) report = vws_client.wait_for_reco_counts_report( diff --git a/src/vws/_reco_counts.py b/src/vws/_reco_counts.py index 7a95c59f9..68c3fd8ae 100644 --- a/src/vws/_reco_counts.py +++ b/src/vws/_reco_counts.py @@ -39,16 +39,18 @@ def reco_counts_report_path(*, database_id: str | None) -> str: @beartype(conf=BeartypeConf(is_pep484_tower=True)) -def reco_counts_report_body(*, month: str) -> bytes: +def reco_counts_report_body(*, year: int, month: int) -> bytes: """Get the request body for requesting a reco counts report. Args: - month: The month to request the report for, in ``YYYY-mm`` form. + year: The year to request the report for. + month: The month of the year to request the report for. Returns: The body of the request. """ - return json.dumps(obj={"month": month}).encode(encoding="utf-8") + month_string = f"{year:04d}-{month:02d}" + return json.dumps(obj={"month": month_string}).encode(encoding="utf-8") @beartype(conf=BeartypeConf(is_pep484_tower=True)) diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index bdefa8222..5863d5ef6 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -458,7 +458,8 @@ async def get_database_summary_report( async def request_database_reco_counts_report( self, *, - month: str, + year: int, + month: int, ) -> RecoCountsReportRequest: """Request a per-target recognition count report for the database. @@ -467,8 +468,9 @@ async def request_database_reco_counts_report( :meth:`wait_for_reco_counts_report` to wait for it. Args: - month: The month to get recognition counts for, in ``YYYY-mm`` - form. Vuforia accepts only the current month and the previous + year: The year to get recognition counts for. + month: The month of the year to get recognition counts for. + Vuforia accepts only the current month and the previous month. Returns: @@ -482,8 +484,8 @@ async def request_database_reco_counts_report( secret key is not correct, or the client's ``database_id`` is not the ID of the database which the client's keys belong to. ~vws.exceptions.vws_exceptions.FailError: There was an error with - the request. For example, the given month is not the current - month or the previous month. + the request. For example, the given year and month are not + the current month or the previous month. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error @@ -493,7 +495,7 @@ async def request_database_reco_counts_report( """ response = await self.make_request( method=HTTPMethod.POST, - data=reco_counts_report_body(month=month), + data=reco_counts_report_body(year=year, month=month), request_path=reco_counts_report_path( database_id=self._database_id, ), diff --git a/src/vws/vws.py b/src/vws/vws.py index a46b84fa0..85a24b5b1 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -431,7 +431,8 @@ def get_database_summary_report(self) -> DatabaseSummaryReport: def request_database_reco_counts_report( self, *, - month: str, + year: int, + month: int, ) -> RecoCountsReportRequest: """Request a per-target recognition count report for the database. @@ -440,8 +441,9 @@ def request_database_reco_counts_report( :meth:`wait_for_reco_counts_report` to wait for it. Args: - month: The month to get recognition counts for, in ``YYYY-mm`` - form. Vuforia accepts only the current month and the previous + year: The year to get recognition counts for. + month: The month of the year to get recognition counts for. + Vuforia accepts only the current month and the previous month. Returns: @@ -455,8 +457,8 @@ def request_database_reco_counts_report( secret key is not correct, or the client's ``database_id`` is not the ID of the database which the client's keys belong to. ~vws.exceptions.vws_exceptions.FailError: There was an error with - the request. For example, the given month is not the current - month or the previous month. + the request. For example, the given year and month are not + the current month or the previous month. ~vws.exceptions.vws_exceptions.RequestTimeTooSkewedError: There is an error with the time sent to Vuforia. ~vws.exceptions.custom_exceptions.ServerError: There is an error @@ -466,7 +468,7 @@ def request_database_reco_counts_report( """ response = self.make_request( method=HTTPMethod.POST, - data=reco_counts_report_body(month=month), + data=reco_counts_report_body(year=year, month=month), request_path=reco_counts_report_path( database_id=self._database_id, ), diff --git a/tests/conftest.py b/tests/conftest.py index fde4c7a00..d94099ff8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -125,24 +125,24 @@ async def async_vumark_service_client( @pytest.fixture(name="current_month") -def fixture_current_month() -> str: - """The current month, in the form which reco counts reports use.""" +def fixture_current_month() -> datetime.date: + """The current month, as the first day of that month.""" now = datetime.datetime.now(tz=datetime.UTC) - return now.strftime(format="%Y-%m") + return now.date().replace(day=1) @pytest.fixture(name="report_month", params=["current", "previous"]) -def fixture_report_month(*, request: pytest.FixtureRequest) -> str: +def fixture_report_month(*, request: pytest.FixtureRequest) -> datetime.date: """A month which a reco counts report can be requested for. Vuforia accepts only the current month and the previous month. """ now = datetime.datetime.now(tz=datetime.UTC) + first_of_month = now.date().replace(day=1) if request.param == "current": - return now.strftime(format="%Y-%m") + return first_of_month - last_of_previous_month = now.replace(day=1) - datetime.timedelta(days=1) - return last_of_previous_month.strftime(format="%Y-%m") + return first_of_month - datetime.timedelta(days=1) @pytest.fixture(name="image_file", params=["r+b", "rb"]) diff --git a/tests/test_async_vws.py b/tests/test_async_vws.py index d319b5c69..a8df14a63 100644 --- a/tests/test_async_vws.py +++ b/tests/test_async_vws.py @@ -1,6 +1,7 @@ """Tests for async helper functions for managing a Vuforia database.""" import base64 +import datetime # noqa: TC003 import io # noqa: TC003 import time import uuid @@ -509,12 +510,13 @@ class TestRecoCountsReport: async def test_reco_counts_report( *, async_vws_client: AsyncVWS, - report_month: str, + report_month: datetime.date, ) -> None: """A report can be requested, waited for and downloaded.""" client = async_vws_client report_request = await client.request_database_reco_counts_report( - month=report_month, + year=report_month.year, + month=report_month.month, ) assert report_request.transaction_id assert report_request.presigned_url @@ -529,7 +531,7 @@ async def test_reco_counts_report( @staticmethod @pytest.mark.asyncio - async def test_not_ready(*, current_month: str) -> None: + async def test_not_ready(*, current_month: datetime.date) -> None: """Downloading a report before Vuforia has generated it raises an error. """ @@ -543,7 +545,8 @@ async def test_not_ready(*, current_month: str) -> None: ) as client: report_request = ( await client.request_database_reco_counts_report( - month=current_month, + year=current_month.year, + month=current_month.month, ) ) @@ -558,7 +561,7 @@ async def test_not_ready(*, current_month: str) -> None: @staticmethod @pytest.mark.asyncio - async def test_wait_timeout(*, current_month: str) -> None: + async def test_wait_timeout(*, current_month: datetime.date) -> None: """Waiting for a report which is not generated in time raises an error. """ @@ -572,7 +575,8 @@ async def test_wait_timeout(*, current_month: str) -> None: ) as client: report_request = ( await client.request_database_reco_counts_report( - month=current_month, + year=current_month.year, + month=current_month.month, ) ) @@ -594,19 +598,24 @@ async def test_wait_timeout(*, current_month: str) -> None: @staticmethod @pytest.mark.asyncio @pytest.mark.parametrize( - argnames="month", - argvalues=["1999-01", "not-a-month"], + argnames=("year", "month"), + argvalues=[ + pytest.param(1999, 1, id="month-in-the-past"), + pytest.param(1999, 13, id="month-out-of-range"), + ], ) async def test_month_not_accepted( *, async_vws_client: AsyncVWS, - month: str, + year: int, + month: int, ) -> None: """Months other than the current and previous month are rejected. """ with pytest.raises(expected_exception=FailError) as exc: await async_vws_client.request_database_reco_counts_report( + year=year, month=month, ) @@ -616,7 +625,7 @@ async def test_month_not_accepted( @pytest.mark.asyncio async def test_database_id_does_not_match_keys( *, - current_month: str, + current_month: datetime.date, ) -> None: """A database ID which does not match the given keys is rejected. @@ -633,7 +642,8 @@ async def test_database_id_does_not_match_keys( expected_exception=AuthenticationFailureError, ) as exc: await client.request_database_reco_counts_report( - month=current_month, + year=current_month.year, + month=current_month.month, ) assert ( @@ -660,7 +670,7 @@ async def test_download_error() -> None: @staticmethod @pytest.mark.asyncio - async def test_no_database_id(*, current_month: str) -> None: + async def test_no_database_id(*, current_month: datetime.date) -> None: """A client which was given no database ID cannot request a report. """ @@ -670,7 +680,8 @@ async def test_no_database_id(*, current_month: str) -> None: ) as client: with pytest.raises(expected_exception=DatabaseIdNotSetError): await client.request_database_reco_counts_report( - month=current_month, + year=current_month.year, + month=current_month.month, ) diff --git a/tests/test_vws.py b/tests/test_vws.py index 223d2cd97..6cb8358bf 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -813,11 +813,12 @@ class TestRecoCountsReport: def test_reco_counts_report( *, vws_client: VWS, - report_month: str, + report_month: datetime.date, ) -> None: """A report can be requested, waited for and downloaded.""" report_request = vws_client.request_database_reco_counts_report( - month=report_month, + year=report_month.year, + month=report_month.month, ) assert report_request.transaction_id assert report_request.presigned_url @@ -831,7 +832,7 @@ def test_reco_counts_report( assert report.raw_csv.startswith(b"target_id,reco_count") @staticmethod - def test_not_ready(*, current_month: str) -> None: + def test_not_ready(*, current_month: datetime.date) -> None: """Downloading a report before Vuforia has generated it raises an error. """ @@ -844,7 +845,8 @@ def test_not_ready(*, current_month: str) -> None: database_id=database.database_id, ) report_request = vws_client.request_database_reco_counts_report( - month=current_month, + year=current_month.year, + month=current_month.month, ) with pytest.raises( @@ -857,7 +859,7 @@ def test_not_ready(*, current_month: str) -> None: assert exc.value.response.status_code == HTTPStatus.NOT_FOUND @staticmethod - def test_wait_timeout(*, current_month: str) -> None: + def test_wait_timeout(*, current_month: datetime.date) -> None: """Waiting for a report which is not generated in time raises an error. """ @@ -870,7 +872,8 @@ def test_wait_timeout(*, current_month: str) -> None: database_id=database.database_id, ) report_request = vws_client.request_database_reco_counts_report( - month=current_month, + year=current_month.year, + month=current_month.month, ) maximum_wait_seconds = 5 @@ -890,20 +893,34 @@ def test_wait_timeout(*, current_month: str) -> None: @staticmethod @pytest.mark.parametrize( - argnames="month", - argvalues=["1999-01", "not-a-month"], + argnames=("year", "month"), + argvalues=[ + pytest.param(1999, 1, id="month-in-the-past"), + pytest.param(1999, 13, id="month-out-of-range"), + ], ) - def test_month_not_accepted(*, vws_client: VWS, month: str) -> None: + def test_month_not_accepted( + *, + vws_client: VWS, + year: int, + month: int, + ) -> None: """Months other than the current and previous month are rejected. """ with pytest.raises(expected_exception=FailError) as exc: - vws_client.request_database_reco_counts_report(month=month) + vws_client.request_database_reco_counts_report( + year=year, + month=month, + ) assert exc.value.response.status_code == HTTPStatus.BAD_REQUEST @staticmethod - def test_database_id_does_not_match_keys(*, current_month: str) -> None: + def test_database_id_does_not_match_keys( + *, + current_month: datetime.date, + ) -> None: """A database ID which does not match the given keys is rejected. """ @@ -920,7 +937,8 @@ def test_database_id_does_not_match_keys(*, current_month: str) -> None: expected_exception=AuthenticationFailureError, ) as exc: vws_client.request_database_reco_counts_report( - month=current_month, + year=current_month.year, + month=current_month.month, ) assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED @@ -944,7 +962,7 @@ def test_download_error() -> None: assert exc.value.response.status_code == HTTPStatus.FORBIDDEN @staticmethod - def test_no_database_id(*, current_month: str) -> None: + def test_no_database_id(*, current_month: datetime.date) -> None: """A client which was given no database ID cannot request a report. """ @@ -954,7 +972,10 @@ def test_no_database_id(*, current_month: str) -> None: ) with pytest.raises(expected_exception=DatabaseIdNotSetError): - vws_client.request_database_reco_counts_report(month=current_month) + vws_client.request_database_reco_counts_report( + year=current_month.year, + month=current_month.month, + ) class TestRecoCountsReportParsing: From cb8a5fb24f1155706df52dfc00f40a300ed9ca37 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 14 Aug 2026 14:11:22 +0100 Subject: [PATCH 1636/1638] Take the reco counts report month as a calendar.Month Vuforia accepts only the current month and the previous month, so a month out of the 1-12 range is now rejected by the type rather than by the server. A month taken from a ``datetime`` needs wrapping in ``calendar.Month``, because ``datetime.month`` is a plain ``int`` and ``beartype`` rejects it otherwise. Co-Authored-By: Claude Opus 5 (1M context) --- docs/source/index.rst | 3 ++- src/vws/_reco_counts.py | 3 ++- src/vws/async_vws.py | 6 ++++-- src/vws/vws.py | 6 ++++-- tests/test_async_vws.py | 21 +++++++++++++-------- tests/test_vws.py | 21 +++++++++++++-------- 6 files changed, 38 insertions(+), 22 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 7ce0fb3a9..ab7bfb0a7 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -76,6 +76,7 @@ The report is generated in the background, and the URL it is served from expires """Get the number of recognitions of each target this month.""" + import calendar import datetime import os @@ -95,7 +96,7 @@ The report is generated in the background, and the URL it is served from expires report_request = vws_client.request_database_reco_counts_report( year=now.year, - month=now.month, + month=calendar.Month(value=now.month), ) report = vws_client.wait_for_reco_counts_report( diff --git a/src/vws/_reco_counts.py b/src/vws/_reco_counts.py index 68c3fd8ae..6ae8010ac 100644 --- a/src/vws/_reco_counts.py +++ b/src/vws/_reco_counts.py @@ -1,5 +1,6 @@ """Internal helpers for the database reco counts report endpoints.""" +import calendar # noqa: TC003 import json from http import HTTPStatus @@ -39,7 +40,7 @@ def reco_counts_report_path(*, database_id: str | None) -> str: @beartype(conf=BeartypeConf(is_pep484_tower=True)) -def reco_counts_report_body(*, year: int, month: int) -> bytes: +def reco_counts_report_body(*, year: int, month: calendar.Month) -> bytes: """Get the request body for requesting a reco counts report. Args: diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index 5863d5ef6..d2306a63b 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -2,6 +2,7 @@ import asyncio import base64 +import calendar # noqa: TC003 import json import time from http import HTTPMethod, HTTPStatus @@ -459,7 +460,7 @@ async def request_database_reco_counts_report( self, *, year: int, - month: int, + month: calendar.Month, ) -> RecoCountsReportRequest: """Request a per-target recognition count report for the database. @@ -471,7 +472,8 @@ async def request_database_reco_counts_report( year: The year to get recognition counts for. month: The month of the year to get recognition counts for. Vuforia accepts only the current month and the previous - month. + month. A month taken from a :class:`datetime.datetime` needs + wrapping, as in ``calendar.Month(value=now.month)``. Returns: The URL to download the report from, and the transaction ID of diff --git a/src/vws/vws.py b/src/vws/vws.py index 85a24b5b1..2b241ab1d 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -1,6 +1,7 @@ """Tools for interacting with Vuforia APIs.""" import base64 +import calendar # noqa: TC003 import json import time from http import HTTPMethod, HTTPStatus @@ -432,7 +433,7 @@ def request_database_reco_counts_report( self, *, year: int, - month: int, + month: calendar.Month, ) -> RecoCountsReportRequest: """Request a per-target recognition count report for the database. @@ -444,7 +445,8 @@ def request_database_reco_counts_report( year: The year to get recognition counts for. month: The month of the year to get recognition counts for. Vuforia accepts only the current month and the previous - month. + month. A month taken from a :class:`datetime.datetime` needs + wrapping, as in ``calendar.Month(value=now.month)``. Returns: The URL to download the report from, and the transaction ID of diff --git a/tests/test_async_vws.py b/tests/test_async_vws.py index a8df14a63..c99644bec 100644 --- a/tests/test_async_vws.py +++ b/tests/test_async_vws.py @@ -1,6 +1,7 @@ """Tests for async helper functions for managing a Vuforia database.""" import base64 +import calendar import datetime # noqa: TC003 import io # noqa: TC003 import time @@ -516,7 +517,7 @@ async def test_reco_counts_report( client = async_vws_client report_request = await client.request_database_reco_counts_report( year=report_month.year, - month=report_month.month, + month=calendar.Month(value=report_month.month), ) assert report_request.transaction_id assert report_request.presigned_url @@ -546,7 +547,7 @@ async def test_not_ready(*, current_month: datetime.date) -> None: report_request = ( await client.request_database_reco_counts_report( year=current_month.year, - month=current_month.month, + month=calendar.Month(value=current_month.month), ) ) @@ -576,7 +577,7 @@ async def test_wait_timeout(*, current_month: datetime.date) -> None: report_request = ( await client.request_database_reco_counts_report( year=current_month.year, - month=current_month.month, + month=calendar.Month(value=current_month.month), ) ) @@ -600,15 +601,19 @@ async def test_wait_timeout(*, current_month: datetime.date) -> None: @pytest.mark.parametrize( argnames=("year", "month"), argvalues=[ - pytest.param(1999, 1, id="month-in-the-past"), - pytest.param(1999, 13, id="month-out-of-range"), + pytest.param(1999, calendar.Month.JANUARY, id="year-in-the-past"), + pytest.param( + 1999, + calendar.Month.DECEMBER, + id="year-in-the-past-december", + ), ], ) async def test_month_not_accepted( *, async_vws_client: AsyncVWS, year: int, - month: int, + month: calendar.Month, ) -> None: """Months other than the current and previous month are rejected. @@ -643,7 +648,7 @@ async def test_database_id_does_not_match_keys( ) as exc: await client.request_database_reco_counts_report( year=current_month.year, - month=current_month.month, + month=calendar.Month(value=current_month.month), ) assert ( @@ -681,7 +686,7 @@ async def test_no_database_id(*, current_month: datetime.date) -> None: with pytest.raises(expected_exception=DatabaseIdNotSetError): await client.request_database_reco_counts_report( year=current_month.year, - month=current_month.month, + month=calendar.Month(value=current_month.month), ) diff --git a/tests/test_vws.py b/tests/test_vws.py index 6cb8358bf..db6d05fd8 100644 --- a/tests/test_vws.py +++ b/tests/test_vws.py @@ -1,6 +1,7 @@ """Tests for helper functions for managing a Vuforia database.""" import base64 +import calendar import datetime import io # noqa: TC003 import secrets @@ -818,7 +819,7 @@ def test_reco_counts_report( """A report can be requested, waited for and downloaded.""" report_request = vws_client.request_database_reco_counts_report( year=report_month.year, - month=report_month.month, + month=calendar.Month(value=report_month.month), ) assert report_request.transaction_id assert report_request.presigned_url @@ -846,7 +847,7 @@ def test_not_ready(*, current_month: datetime.date) -> None: ) report_request = vws_client.request_database_reco_counts_report( year=current_month.year, - month=current_month.month, + month=calendar.Month(value=current_month.month), ) with pytest.raises( @@ -873,7 +874,7 @@ def test_wait_timeout(*, current_month: datetime.date) -> None: ) report_request = vws_client.request_database_reco_counts_report( year=current_month.year, - month=current_month.month, + month=calendar.Month(value=current_month.month), ) maximum_wait_seconds = 5 @@ -895,15 +896,19 @@ def test_wait_timeout(*, current_month: datetime.date) -> None: @pytest.mark.parametrize( argnames=("year", "month"), argvalues=[ - pytest.param(1999, 1, id="month-in-the-past"), - pytest.param(1999, 13, id="month-out-of-range"), + pytest.param(1999, calendar.Month.JANUARY, id="year-in-the-past"), + pytest.param( + 1999, + calendar.Month.DECEMBER, + id="year-in-the-past-december", + ), ], ) def test_month_not_accepted( *, vws_client: VWS, year: int, - month: int, + month: calendar.Month, ) -> None: """Months other than the current and previous month are rejected. @@ -938,7 +943,7 @@ def test_database_id_does_not_match_keys( ) as exc: vws_client.request_database_reco_counts_report( year=current_month.year, - month=current_month.month, + month=calendar.Month(value=current_month.month), ) assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED @@ -974,7 +979,7 @@ def test_no_database_id(*, current_month: datetime.date) -> None: with pytest.raises(expected_exception=DatabaseIdNotSetError): vws_client.request_database_reco_counts_report( year=current_month.year, - month=current_month.month, + month=calendar.Month(value=current_month.month), ) From cf2f0498539090f53970380caa5291d4ad0b263b Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 14 Aug 2026 14:52:01 +0100 Subject: [PATCH 1637/1638] Add Model Target Web API client support Add ``ModelTargetService`` and ``AsyncModelTargetService``, which cover the create, poll, download and delete lifecycle for standard and advanced Model Target datasets. The clients authenticate with OAuth2 client credentials and reuse the returned bearer token until it expires. Typed request structures describe the models, guide views and State-Based Model Target configuration which Vuforia accepts, and the Model Target error envelope is parsed into public exceptions. Closes #3119. Co-Authored-By: Claude Opus 5 (1M context) --- conftest.py | 10 + docs/source/api-reference.rst | 12 + docs/source/exceptions.rst | 9 + docs/source/index.rst | 76 ++ newsfragments/3119.change.rst | 2 + pyproject.toml | 21 + spelling_private_dict.txt | 3 + src/vws/__init__.py | 4 + src/vws/_model_targets.py | 323 +++++++ src/vws/async_model_target_service.py | 381 +++++++++ src/vws/exceptions/model_target_exceptions.py | 210 +++++ src/vws/model_target_datasets.py | 152 ++++ src/vws/model_target_service.py | 366 ++++++++ src/vws/reports.py | 132 +++ tests/conftest.py | 69 ++ tests/test_async_model_targets.py | 409 +++++++++ tests/test_model_targets.py | 802 ++++++++++++++++++ 17 files changed, 2981 insertions(+) create mode 100644 newsfragments/3119.change.rst create mode 100644 src/vws/_model_targets.py create mode 100644 src/vws/async_model_target_service.py create mode 100644 src/vws/exceptions/model_target_exceptions.py create mode 100644 src/vws/model_target_datasets.py create mode 100644 src/vws/model_target_service.py create mode 100644 tests/test_async_model_targets.py create mode 100644 tests/test_model_targets.py diff --git a/conftest.py b/conftest.py index 1a2445a7c..e4c927947 100644 --- a/conftest.py +++ b/conftest.py @@ -61,6 +61,16 @@ def fixture_mock_vws( monkeypatch.setenv(name="VWS_CLIENT_ACCESS_KEY", value=client_access_key) monkeypatch.setenv(name="VWS_CLIENT_SECRET_KEY", value=client_secret_key) monkeypatch.setenv(name="VWS_DATABASE_ID", value=database_id) + # The mock accepts one hard-coded pair of Model Target Web API OAuth2 + # credentials, which it does not expose. + monkeypatch.setenv( + name="VWS_MODEL_TARGET_CLIENT_ID", + value="client-id", + ) + monkeypatch.setenv( + name="VWS_MODEL_TARGET_CLIENT_SECRET", + value="client-secret", + ) # We use a low processing time so that tests run quickly. with MockVWS(processing_time_seconds=0.2) as mock: mock.add_cloud_database(cloud_database=database) diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index c2765245d..f43793ce0 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -17,6 +17,18 @@ API Reference :undoc-members: :members: +.. automodule:: vws.model_target_service + :undoc-members: + :members: + +.. automodule:: vws.async_model_target_service + :undoc-members: + :members: + +.. automodule:: vws.model_target_datasets + :undoc-members: + :members: + .. automodule:: vws.reports :undoc-members: :members: diff --git a/docs/source/exceptions.rst b/docs/source/exceptions.rst index f48730bfd..baea7b495 100644 --- a/docs/source/exceptions.rst +++ b/docs/source/exceptions.rst @@ -28,6 +28,15 @@ CloudRecoService exceptions :inherited-members: Exception :exclude-members: errno, filename, filename2, strerror +ModelTargetService exceptions +----------------------------- + +.. automodule:: vws.exceptions.model_target_exceptions + :members: + :show-inheritance: + :inherited-members: Exception + :exclude-members: errno, filename, filename2, strerror + Custom exceptions ----------------- diff --git a/docs/source/index.rst b/docs/source/index.rst index ab7bfb0a7..c8b5bdaf6 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -110,6 +110,82 @@ The report is generated in the background, and the URL it is served from expires # This database has no targets, so nothing has been recognized. assert not reco_counts_by_target_id +Model Targets +------------- + +Vuforia generates Model Target datasets from CAD models. +This uses OAuth2 client credentials, which are separate from the VWS server keys. + +Dataset generation happens in the background, and the generated dataset is downloaded as a zip file. + +.. clear-namespace + +.. code-block:: python + + """Generate a Model Target dataset and download it.""" + + import os + + from vws import ModelTargetService + from vws.model_target_datasets import ( + CadDataFormat, + GuideViewPosition, + ModelTargetDatasetType, + ModelTargetModel, + ModelTargetView, + ) + from vws.reports import ModelTargetDatasetStatuses + + client_id = os.environ["VWS_MODEL_TARGET_CLIENT_ID"] + client_secret = os.environ["VWS_MODEL_TARGET_CLIENT_SECRET"] + + model_target_client = ModelTargetService( + client_id=client_id, + client_secret=client_secret, + ) + + model = ModelTargetModel( + name="my_model", + cad_data_url="https://example.com/my_model.zip", + cad_data_format=CadDataFormat.ZIP, + views=[ + ModelTargetView( + name="front", + guide_view_position=GuideViewPosition( + rotation=[0.0, 0.0, 0.0, 1.0], + translation=[0.0, 0.0, 1.0], + ), + ), + ], + ) + + dataset_uuid = model_target_client.create_dataset( + name="my_dataset", + target_sdk="11.0", + models=[model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + report = model_target_client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.status == ModelTargetDatasetStatuses.DONE + + dataset = model_target_client.download_dataset( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + # The dataset is a zip file. + assert dataset.startswith(b"PK") + + model_target_client.delete_dataset( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + Testing ------- diff --git a/newsfragments/3119.change.rst b/newsfragments/3119.change.rst new file mode 100644 index 000000000..5660e237e --- /dev/null +++ b/newsfragments/3119.change.rst @@ -0,0 +1,2 @@ +Add support for the Model Target Web API. +``ModelTargetService`` and ``AsyncModelTargetService`` create standard and advanced Model Target datasets, wait for them to be generated, download them and delete them. diff --git a/pyproject.toml b/pyproject.toml index 7c7d50d69..da92a9be8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -322,14 +322,26 @@ exclude = [ ".venv" ] # Ideally we would limit the paths to the source code where we want to ignore names, # but Vulture does not enable this. ignore_names = [ + # Model Target model option values which this library does not use + # itself, from vws.model_target_datasets + "ADAPTIVE", + "ALWAYS", + "AR_CONTROLLER", # Public API classes imported by users from vws.transports "AsyncHTTPXTransport", + "AUTO", # Sphinx "autoclass_content", "autoclass_content", "autodoc_member_order", + "CAR", "copybutton_exclude", + "DAE", + "DEFAULT", + "DYNAMIC", "extensions", + "FALSE", + "FBX", # pytest fixtures - we name fixtures like this for this purpose "fixture_*", "html_show_copyright", @@ -340,25 +352,34 @@ ignore_names = [ "html_title", "htmlhelp_basename", "HTTPXTransport", + "IGES", "intersphinx_mapping", "language", "linkcheck_ignore", "linkcheck_retries", + "LOW_FEATURE_OBJECTS", "master_doc", + "NEVER", "nitpick_ignore", "nitpicky", + "OBJ", "project_copyright", + "PVZ", "pygments_style", # pytest configuration "pytest_collect_file", "pytest_plugins", "rst_prolog", + "SCAN", "source_suffix", "spelling_word_list_filename", + "STATIC", + "STL", "templates_path", "towncrier_draft_autoversion_mode", "towncrier_draft_include_empty", "towncrier_draft_working_directory", + "VRML", "warning_is_error", ] diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 74e7d3856..09386f1d4 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -11,6 +11,7 @@ LicenseCheckFailed MatchProcessing MaxNumResultsOutOfRange MetadataTooLarge +OAuth OopsAnErrorOccurredPossiblyBadName OopsAnErrorOccurredPossiblyBadNameError ProjectHasNoApiAccess @@ -33,6 +34,7 @@ args ascii async asyncio +balancer beartype bool boolean @@ -71,6 +73,7 @@ json keyring kib kwargs +lifecycle linters linting login diff --git a/src/vws/__init__.py b/src/vws/__init__.py index a181cb818..b4d39cc04 100644 --- a/src/vws/__init__.py +++ b/src/vws/__init__.py @@ -1,8 +1,10 @@ """A library for Vuforia Web Services.""" +from .async_model_target_service import AsyncModelTargetService from .async_query import AsyncCloudRecoService from .async_vumark_service import AsyncVuMarkService from .async_vws import AsyncVWS +from .model_target_service import ModelTargetService from .query import CloudRecoService from .vumark_service import VuMarkService from .vws import VWS @@ -10,8 +12,10 @@ __all__ = [ "VWS", "AsyncCloudRecoService", + "AsyncModelTargetService", "AsyncVWS", "AsyncVuMarkService", "CloudRecoService", + "ModelTargetService", "VuMarkService", ] diff --git a/src/vws/_model_targets.py b/src/vws/_model_targets.py new file mode 100644 index 000000000..c391342c2 --- /dev/null +++ b/src/vws/_model_targets.py @@ -0,0 +1,323 @@ +"""Internal helpers for the Vuforia Model Target Web API.""" + +import base64 +import json +from collections.abc import Sequence # noqa: TC003 +from http import HTTPStatus +from typing import Any + +from beartype import BeartypeConf, beartype + +from vws.exceptions.custom_exceptions import ServerError +from vws.exceptions.model_target_exceptions import ( + ModelTargetAuthenticationError, + ModelTargetDatasetNotDoneError, + ModelTargetError, + ModelTargetOAuth2Error, + ModelTargetValidationError, + UnknownModelTargetDatasetError, +) +from vws.exceptions.vws_exceptions import TooManyRequestsError +from vws.model_target_datasets import ( # noqa: TC001 + ModelTargetDatasetType, + ModelTargetModel, + ModelTargetView, +) +from vws.reports import ModelTargetDatasetStatusReport +from vws.response import Response # noqa: TC001 + +OAUTH2_TOKEN_PATH = "/oauth2/token" # noqa: S105 +OAUTH2_TOKEN_BODY = b"grant_type=client_credentials" +OAUTH2_TOKEN_CONTENT_TYPE = "application/x-www-form-urlencoded" # noqa: S105 +JSON_CONTENT_TYPE = "application/json" + +_DATASET_COLLECTION_PATHS = { + "standard": "/modeltargets/datasets", + "advanced": "/modeltargets/advancedDatasets", +} +_EXCEPTIONS_BY_STATUS_CODE: dict[int, type[ModelTargetError]] = { + HTTPStatus.BAD_REQUEST: ModelTargetValidationError, + HTTPStatus.UNAUTHORIZED: ModelTargetAuthenticationError, + HTTPStatus.NOT_FOUND: UnknownModelTargetDatasetError, + HTTPStatus.UNPROCESSABLE_ENTITY: ModelTargetDatasetNotDoneError, +} + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def oauth2_token_headers( + *, client_id: str, client_secret: str +) -> dict[str, str]: + """Get the headers for a request for an access token. + + Args: + client_id: A Model Target Web API client ID. + client_secret: A Model Target Web API client secret. + + Returns: + The headers to send with a token request. + """ + credentials = f"{client_id}:{client_secret}".encode() + encoded_credentials = base64.b64encode(s=credentials).decode( + encoding="ascii", + ) + return { + "Authorization": f"Basic {encoded_credentials}", + "Content-Type": OAUTH2_TOKEN_CONTENT_TYPE, + } + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def access_token_from_response(*, response: Response) -> tuple[str, float]: + """Get an access token and its lifetime from a token response. + + Args: + response: The response from Vuforia's token endpoint. + + Returns: + The access token, and the number of seconds until it expires. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + if response.status_code != HTTPStatus.OK: + raise ModelTargetOAuth2Error(response=response) + + response_data = dict(json.loads(s=response.text)) + return response_data["access_token"], float(response_data["expires_in"]) + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def dataset_collection_path(*, dataset_type: ModelTargetDatasetType) -> str: + """Get the path of the endpoint for datasets of a given type. + + Args: + dataset_type: The kind of dataset to get the path for. + + Returns: + The path of the dataset collection endpoint. + """ + return _DATASET_COLLECTION_PATHS[dataset_type.value] + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def dataset_path( + *, + dataset_type: ModelTargetDatasetType, + dataset_uuid: str, +) -> str: + """Get the path of the endpoint for one dataset. + + Args: + dataset_type: The kind of dataset to get the path for. + dataset_uuid: The UUID of the dataset. + + Returns: + The path of the dataset endpoint. + """ + collection_path = dataset_collection_path(dataset_type=dataset_type) + return f"{collection_path}/{dataset_uuid}" + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def dataset_status_path( + *, + dataset_type: ModelTargetDatasetType, + dataset_uuid: str, +) -> str: + """Get the path of the status endpoint for one dataset. + + Args: + dataset_type: The kind of dataset to get the path for. + dataset_uuid: The UUID of the dataset. + + Returns: + The path of the dataset status endpoint. + """ + return ( + dataset_path(dataset_type=dataset_type, dataset_uuid=dataset_uuid) + + "/status" + ) + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def dataset_download_path( + *, + dataset_type: ModelTargetDatasetType, + dataset_uuid: str, +) -> str: + """Get the path of the download endpoint for one dataset. + + Args: + dataset_type: The kind of dataset to get the path for. + dataset_uuid: The UUID of the dataset. + + Returns: + The path of the dataset download endpoint. + """ + return ( + dataset_path(dataset_type=dataset_type, dataset_uuid=dataset_uuid) + + "/dataset" + ) + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def _view_dict(*, view: ModelTargetView) -> dict[str, Any]: + """Get the request representation of a guide view. + + Args: + view: The guide view to represent. + + Returns: + The guide view, as it is sent to Vuforia. + """ + view_dict: dict[str, Any] = { + "name": view.name, + "guideViewPosition": { + "rotation": list(view.guide_view_position.rotation), + "translation": list(view.guide_view_position.translation), + }, + } + if view.states is not None: + view_dict["states"] = list(view.states) + + return view_dict + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def _model_dict(*, model: ModelTargetModel) -> dict[str, Any]: + """Get the request representation of a model. + + Args: + model: The model to represent. + + Returns: + The model, as it is sent to Vuforia. + """ + model_dict: dict[str, Any] = {"name": model.name} + optional_values: dict[str, str | None] = { + "automaticColoring": model.automatic_coloring, + "cadDataBlob": model.cad_data_blob, + "cadDataFormat": model.cad_data_format, + "cadDataUrl": model.cad_data_url, + "motionHint": model.motion_hint, + "optimizeTrackingFor": model.optimize_tracking_for, + "realisticAppearance": model.realistic_appearance, + "simplify": model.simplify, + "stateBasedConfigurationJsonString": ( + model.state_based_configuration_json_string + ), + "trackingMode": model.tracking_mode, + } + for field_name, value in optional_values.items(): + if value is not None: + model_dict[field_name] = str(object=value) + + if model.views is not None: + model_dict["views"] = [_view_dict(view=view) for view in model.views] + + return model_dict + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def dataset_request_body( + *, + name: str, + target_sdk: str, + models: Sequence[ModelTargetModel], +) -> bytes: + """Get the request body for creating a Model Target dataset. + + Args: + name: The name of the dataset. + target_sdk: The Vuforia Engine version to generate the dataset + for. + models: The models to generate the dataset from. + + Returns: + The body of the request. + """ + request_dict = { + "models": [_model_dict(model=model) for model in models], + "name": name, + "targetSdk": target_sdk, + } + return json.dumps(obj=request_dict).encode(encoding="utf-8") + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def raise_for_error(*, response: Response) -> None: + """Raise an exception for an unsuccessful Model Target Web API + response. + + Args: + response: A response from the Model Target Web API. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.ModelTargetValidationError: + Vuforia rejected the dataset creation request. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + ~vws.exceptions.model_target_exceptions.ModelTargetDatasetNotDoneError: + The dataset has not been generated. + ~vws.exceptions.model_target_exceptions.ModelTargetError: Vuforia + returned another error. + ~vws.exceptions.custom_exceptions.ServerError: There is an error + with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: Vuforia is + rate limiting access. + """ + if ( + response.status_code == HTTPStatus.TOO_MANY_REQUESTS + ): # pragma: no cover + # The Vuforia API returns a 429 response with no JSON body. + raise TooManyRequestsError(response=response) + + if ( + response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR + ): # pragma: no cover + raise ServerError(response=response) + + if response.status_code < HTTPStatus.BAD_REQUEST: + return + + exception_type = _EXCEPTIONS_BY_STATUS_CODE.get( + response.status_code, + ModelTargetError, + ) + raise exception_type(response=response) + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def dataset_uuid_from_response(*, response: Response) -> str: + """Get the UUID of a created dataset. + + Args: + response: A response to a dataset creation request. + + Returns: + The UUID of the created dataset. + """ + response_data = dict(json.loads(s=response.text)) + return str(object=response_data["uuid"]) + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +def status_report_from_response( + *, + response: Response, +) -> ModelTargetDatasetStatusReport: + """Get a dataset status report from a status response. + + Args: + response: A response to a dataset status request. + + Returns: + The status of the dataset. + """ + response_data = dict(json.loads(s=response.text)) + return ModelTargetDatasetStatusReport.from_response_dict( + response_dict=response_data, + ) diff --git a/src/vws/async_model_target_service.py b/src/vws/async_model_target_service.py new file mode 100644 index 000000000..67a5e901c --- /dev/null +++ b/src/vws/async_model_target_service.py @@ -0,0 +1,381 @@ +"""Async interface to the Vuforia Model Target Web API.""" + +import asyncio +import time +from collections.abc import Sequence # noqa: TC003 +from http import HTTPMethod +from typing import Self + +from beartype import BeartypeConf, beartype + +from vws._model_targets import ( + JSON_CONTENT_TYPE, + OAUTH2_TOKEN_BODY, + OAUTH2_TOKEN_PATH, + access_token_from_response, + dataset_collection_path, + dataset_download_path, + dataset_path, + dataset_request_body, + dataset_status_path, + dataset_uuid_from_response, + oauth2_token_headers, + raise_for_error, + status_report_from_response, +) +from vws.exceptions.model_target_exceptions import ( + ModelTargetDatasetTimeoutError, +) +from vws.model_target_datasets import ( # noqa: TC001 + ModelTargetDatasetType, + ModelTargetModel, +) +from vws.reports import ( + ModelTargetDatasetStatuses, + ModelTargetDatasetStatusReport, +) +from vws.response import Response # noqa: TC001 +from vws.transports import AsyncHTTPXTransport, AsyncTransport + +_TOKEN_EXPIRY_MARGIN_SECONDS = 60.0 + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class AsyncModelTargetService: + """An async interface to the Vuforia Model Target Web API.""" + + def __init__( + self, + *, + client_id: str, + client_secret: str, + base_vws_url: str = "https://vws.vuforia.com", + request_timeout_seconds: float | tuple[float, float] = 30.0, + transport: AsyncTransport | None = None, + ) -> None: + """ + Args: + client_id: A Model Target Web API OAuth2 client + ID. + client_secret: A Model Target Web API OAuth2 + client secret. + base_vws_url: The base URL for the VWS API, which + also serves the Model Target Web API. + request_timeout_seconds: The timeout for each + HTTP request. This can be a float to set both + the connect and read timeouts, or a + (connect, read) tuple. + transport: The async HTTP transport to use for + requests. Defaults to + ``AsyncHTTPXTransport()``. + """ + self._client_id = client_id + self._client_secret = client_secret + self._base_vws_url = base_vws_url + self._request_timeout_seconds = request_timeout_seconds + self._transport = ( + transport if transport is not None else AsyncHTTPXTransport() + ) + self._access_token: str | None = None + self._access_token_expiry_time = 0.0 + + async def aclose(self) -> None: + """Close the underlying transport if it supports closing.""" + await self._transport.aclose() + + async def __aenter__(self) -> Self: + """Enter the async context manager.""" + return self + + async def __aexit__(self, *_args: object) -> None: + """Exit the async context manager and close the transport.""" + await self.aclose() + + async def get_access_token(self) -> str: + """Get an OAuth2 access token for the Model Target Web API. + + A token is requested only when the client has no token which is + still valid, so this can be called before each request. + + Returns: + A bearer token. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. For example, the + given client ID and client secret may not match a set of + Model Target Web API credentials. + """ + request_time = time.monotonic() + if ( + self._access_token is not None + and request_time < self._access_token_expiry_time + ): + return self._access_token + + response = await self._transport( + method=HTTPMethod.POST, + url=self._base_vws_url.rstrip("/") + OAUTH2_TOKEN_PATH, + headers=oauth2_token_headers( + client_id=self._client_id, + client_secret=self._client_secret, + ), + data=OAUTH2_TOKEN_BODY, + request_timeout=self._request_timeout_seconds, + ) + + access_token, expires_in_seconds = access_token_from_response( + response=response, + ) + self._access_token = access_token + self._access_token_expiry_time = ( + request_time + expires_in_seconds - _TOKEN_EXPIRY_MARGIN_SECONDS + ) + return access_token + + async def make_request( + self, + *, + method: str, + data: bytes, + request_path: str, + extra_headers: dict[str, str] | None = None, + ) -> Response: + """Make an authenticated request to the Model Target Web API. + + Args: + method: The HTTP method 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. + extra_headers: Additional headers to include in + the request. + + Returns: + The response to the request. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetError: + Vuforia returned an error. + ~vws.exceptions.custom_exceptions.ServerError: + There is an error with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: + Vuforia is rate limiting access. + """ + access_token = await self.get_access_token() + headers = { + "Authorization": f"Bearer {access_token}", + **(extra_headers or {}), + } + + response = await self._transport( + method=method, + url=self._base_vws_url.rstrip("/") + request_path, + headers=headers, + data=data, + request_timeout=self._request_timeout_seconds, + ) + + raise_for_error(response=response) + return response + + async def create_dataset( + self, + *, + name: str, + target_sdk: str, + models: Sequence[ModelTargetModel], + dataset_type: ModelTargetDatasetType, + ) -> str: + """Start generating a Model Target dataset. + + Vuforia generates the dataset in the background, so it is not + available to download immediately. Use + :meth:`wait_for_dataset_generated` to wait for it. + + Args: + name: The name of the dataset. + target_sdk: The Vuforia Engine version to generate the dataset + for. + models: The models to generate the dataset from. A standard + dataset takes exactly one model. + dataset_type: Whether to create a standard or an advanced + dataset. + + Returns: + The UUID of the new dataset. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.ModelTargetValidationError: + Vuforia rejected the request. For example, a model may + give neither a CAD data URL nor a CAD data blob. + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + response = await self.make_request( + method=HTTPMethod.POST, + data=dataset_request_body( + name=name, + target_sdk=target_sdk, + models=models, + ), + request_path=dataset_collection_path(dataset_type=dataset_type), + extra_headers={"Content-Type": JSON_CONTENT_TYPE}, + ) + + return dataset_uuid_from_response(response=response) + + async def get_dataset_status( + self, + *, + dataset_uuid: str, + dataset_type: ModelTargetDatasetType, + ) -> ModelTargetDatasetStatusReport: + """Get the status of a Model Target dataset. + + Args: + dataset_uuid: The UUID of the dataset, as given by + :meth:`create_dataset`. + dataset_type: The kind of dataset to get the status of. + + Returns: + The status of the dataset. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + response = await self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path=dataset_status_path( + dataset_type=dataset_type, + dataset_uuid=dataset_uuid, + ), + ) + + return status_report_from_response(response=response) + + async def wait_for_dataset_generated( + self, + *, + dataset_uuid: str, + dataset_type: ModelTargetDatasetType, + seconds_between_requests: float = 0.2, + timeout_seconds: float = 60 * 5, + ) -> ModelTargetDatasetStatusReport: + """Wait for Vuforia to finish generating a Model Target dataset. + + A dataset which failed to generate is also finished, so the + returned report may have a + :attr:`~.ModelTargetDatasetStatusReport.status` of + ``FAILED``. + + Args: + dataset_uuid: The UUID of the dataset, as given by + :meth:`create_dataset`. + dataset_type: The kind of dataset to wait for. + seconds_between_requests: The number of seconds to wait between + requests made while polling the dataset's status. + timeout_seconds: The maximum number of seconds to wait for the + dataset to be generated. + + Returns: + The status of the dataset once it is no longer processing. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetDatasetTimeoutError: + The dataset was not generated within ``timeout_seconds`` + seconds. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + """ + start_time = time.monotonic() + while True: + report = await self.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + if report.status != ModelTargetDatasetStatuses.PROCESSING: + return report + + elapsed_time = time.monotonic() - start_time + if elapsed_time > timeout_seconds: + raise ModelTargetDatasetTimeoutError + + await asyncio.sleep(delay=seconds_between_requests) + + async def download_dataset( + self, + *, + dataset_uuid: str, + dataset_type: ModelTargetDatasetType, + ) -> bytes: + """Download a generated Model Target dataset. + + Args: + dataset_uuid: The UUID of the dataset, as given by + :meth:`create_dataset`. + dataset_type: The kind of dataset to download. + + Returns: + The dataset, as the bytes of a zip file. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + ~vws.exceptions.model_target_exceptions.ModelTargetDatasetNotDoneError: + Vuforia has not generated the dataset. + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + response = await self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path=dataset_download_path( + dataset_type=dataset_type, + dataset_uuid=dataset_uuid, + ), + ) + + return response.content + + async def delete_dataset( + self, + *, + dataset_uuid: str, + dataset_type: ModelTargetDatasetType, + ) -> None: + """Delete a Model Target dataset. + + Args: + dataset_uuid: The UUID of the dataset, as given by + :meth:`create_dataset`. + dataset_type: The kind of dataset to delete. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + await self.make_request( + method=HTTPMethod.DELETE, + data=b"", + request_path=dataset_path( + dataset_type=dataset_type, + dataset_uuid=dataset_uuid, + ), + ) diff --git a/src/vws/exceptions/model_target_exceptions.py b/src/vws/exceptions/model_target_exceptions.py new file mode 100644 index 000000000..8eaf09878 --- /dev/null +++ b/src/vws/exceptions/model_target_exceptions.py @@ -0,0 +1,210 @@ +"""Exceptions raised by the Vuforia Model Target Web API. + +See +https://developer.vuforia.com/library/vuforia-engine/web-api/model-target-web-api/. +""" + +import json +from typing import Any + +from beartype import beartype + +from vws.reports import ModelTargetGenerationDetail +from vws.response import Response # noqa: TC001 + + +@beartype +def _is_json_object(*, value: object) -> bool: + """Get whether a decoded JSON value is an object. + + Args: + value: A decoded JSON value. + + Returns: + Whether the value is a JSON object. + """ + return isinstance(value, dict) + + +@beartype +def _json_object(*, value: str) -> dict[str, Any]: + """Get a JSON object from a string. + + Args: + value: A string which may be a JSON object. + + Returns: + The JSON object, or an empty dictionary if the string is not a + JSON object. + """ + try: + loaded: Any = json.loads(s=value) + except json.JSONDecodeError: + return {} + + if not _is_json_object(value=loaded): + return {} + + json_object: dict[str, Any] = loaded + return json_object + + +@beartype +def _error_dict(*, response: Response) -> dict[str, Any]: + """Get the error object of a Model Target Web API error response. + + Args: + response: The response returned by Vuforia. + + Returns: + The error object, or an empty dictionary if the response has no + error object. Some errors, such as those given by the load + balancer in front of Vuforia, are not shaped like Model Target + Web API errors. + """ + body = _json_object(value=response.text) + if "error" not in body: + return {} + + error: Any = body["error"] + if not _is_json_object(value=error): + return {} + + error_dict: dict[str, Any] = error + return error_dict + + +@beartype +class ModelTargetError(Exception): + """Base class for Vuforia Model Target Web API exceptions.""" + + def __init__(self, response: Response) -> None: + """ + Args: + response: The response to a request to 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 + + @property + def code(self) -> str: + """The error code given by Vuforia, or an empty string.""" + error = _error_dict(response=self._response) + return str(object=error["code"]) if "code" in error else "" + + @property + def message(self) -> str: + """The error message given by Vuforia, or an empty string.""" + error = _error_dict(response=self._response) + return str(object=error["message"]) if "message" in error else "" + + @property + def target(self) -> str: + """The error target given by Vuforia, or an empty string.""" + error = _error_dict(response=self._response) + return str(object=error["target"]) if "target" in error else "" + + @property + def details(self) -> list[ModelTargetGenerationDetail]: + """The error details given by Vuforia. + + Vuforia gives one detail per validation problem it found with a + dataset creation request. + """ + error = _error_dict(response=self._response) + if "details" not in error: + return [] + + return [ + ModelTargetGenerationDetail( + code=detail["code"], + message=detail["message"], + ) + for detail in error["details"] + ] + + +@beartype +class ModelTargetAuthenticationError(ModelTargetError): + """Exception raised when a Model Target Web API request is not + authenticated. + + For example, the bearer token may be missing, malformed or expired. + """ + + +@beartype +class ModelTargetValidationError(ModelTargetError): + """Exception raised when Vuforia rejects a Model Target dataset + creation + request. + + See :attr:`~.ModelTargetError.details` for the problems which Vuforia + found. + """ + + +@beartype +class UnknownModelTargetDatasetError(ModelTargetError): + """Exception raised when no Model Target dataset matches a given UUID. + + Standard and advanced datasets are separate resources, so this is also + raised when the given UUID matches a dataset of the other type. + """ + + +@beartype +class ModelTargetDatasetNotDoneError(ModelTargetError): + """Exception raised when a Model Target dataset is downloaded before + Vuforia has generated it. + """ + + +@beartype +class ModelTargetOAuth2Error(Exception): + """Exception raised when Vuforia does not give an access token. + + For example, the given client ID and client secret may not match a set + of Model Target Web API credentials. + """ + + def __init__(self, response: Response) -> None: + """ + Args: + response: The response to a request to Vuforia's token + endpoint. + """ + super().__init__(response.text) + self._response = response + + @property + def response(self) -> Response: + """The response returned by Vuforia which included this error.""" + return self._response + + @property + def error(self) -> str: + """The OAuth2 error code, or an empty string.""" + body = _json_object(value=self._response.text) + return str(object=body["error"]) if "error" in body else "" + + @property + def error_description(self) -> str: + """The OAuth2 error description, or an empty string.""" + body = _json_object(value=self._response.text) + if "error_description" not in body: + return "" + + return str(object=body["error_description"]) + + +@beartype +class ModelTargetDatasetTimeoutError(Exception): + """Exception raised when waiting for a Model Target dataset to be + generated times out. + """ diff --git a/src/vws/model_target_datasets.py b/src/vws/model_target_datasets.py new file mode 100644 index 000000000..95a9eaa18 --- /dev/null +++ b/src/vws/model_target_datasets.py @@ -0,0 +1,152 @@ +"""Structures for describing Model Target datasets to create. + +See +https://developer.vuforia.com/library/vuforia-engine/web-api/model-target-web-api/. +""" + +from collections.abc import Sequence # noqa: TC003 +from dataclasses import dataclass +from enum import StrEnum, unique + +from beartype import BeartypeConf, beartype + + +@beartype +@unique +class ModelTargetDatasetType(StrEnum): + """The kinds of Model Target dataset which Vuforia generates. + + Standard and advanced datasets are separate resources, so a dataset + created as one type is not visible to requests for the other type. + """ + + STANDARD = "standard" + ADVANCED = "advanced" + + +@beartype +@unique +class AutomaticColoring(StrEnum): + """Options for a model's ``automaticColoring``.""" + + ALWAYS = "always" + AUTO = "auto" + NEVER = "never" + + +@beartype +@unique +class CadDataFormat(StrEnum): + """Options for a model's ``cadDataFormat``.""" + + DAE = "DAE" + FBX = "FBX" + GLB = "GLB" + IGES = "IGES" + OBJ = "OBJ" + PVZ = "PVZ" + STL = "STL" + VRML = "VRML" + ZIP = "ZIP" + + +@beartype +@unique +class MotionHint(StrEnum): + """Options for a model's ``motionHint``.""" + + ADAPTIVE = "adaptive" + DYNAMIC = "dynamic" + STATIC = "static" + + +@beartype +@unique +class OptimizeTrackingFor(StrEnum): + """Options for a model's ``optimizeTrackingFor``.""" + + AR_CONTROLLER = "ar_controller" + DEFAULT = "default" + LOW_FEATURE_OBJECTS = "low_feature_objects" + + +@beartype +@unique +class RealisticAppearance(StrEnum): + """Options for a model's ``realisticAppearance``. + + This is documented for advanced datasets only. + """ + + AUTO = "auto" + FALSE = "false" + TRUE = "true" + + +@beartype +@unique +class Simplify(StrEnum): + """Options for a model's ``simplify``.""" + + ALWAYS = "always" + AUTO = "auto" + NEVER = "never" + + +@beartype +@unique +class TrackingMode(StrEnum): + """Options for a model's ``trackingMode``.""" + + CAR = "car" + DEFAULT = "default" + SCAN = "scan" + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +@dataclass(frozen=True, kw_only=True) +class GuideViewPosition: + """The position of a guide view.""" + + rotation: Sequence[float] + translation: Sequence[float] + + +@beartype +@dataclass(frozen=True, kw_only=True) +class ModelTargetView: + """A guide view of a model.""" + + name: str + guide_view_position: GuideViewPosition + states: Sequence[str] | None = None + """The State-Based Model Target states which this view applies to. + + Every given state must be named by the model's + ``state_based_configuration_json_string``. + """ + + +@beartype +@dataclass(frozen=True, kw_only=True) +class ModelTargetModel: + """A model to generate a Model Target dataset from. + + One and only one of ``cad_data_url`` and ``cad_data_blob`` is + required. + """ + + name: str + cad_data_url: str | None = None + cad_data_blob: str | None = None + automatic_coloring: AutomaticColoring | None = None + cad_data_format: CadDataFormat | None = None + motion_hint: MotionHint | None = None + optimize_tracking_for: OptimizeTrackingFor | None = None + realistic_appearance: RealisticAppearance | None = None + """This is documented for advanced datasets only.""" + + simplify: Simplify | None = None + tracking_mode: TrackingMode | None = None + state_based_configuration_json_string: str | None = None + views: Sequence[ModelTargetView] | None = None diff --git a/src/vws/model_target_service.py b/src/vws/model_target_service.py new file mode 100644 index 000000000..70b116d0a --- /dev/null +++ b/src/vws/model_target_service.py @@ -0,0 +1,366 @@ +"""Interface to the Vuforia Model Target Web API.""" + +import time +from collections.abc import Sequence # noqa: TC003 +from http import HTTPMethod + +from beartype import BeartypeConf, beartype + +from vws._model_targets import ( + JSON_CONTENT_TYPE, + OAUTH2_TOKEN_BODY, + OAUTH2_TOKEN_PATH, + access_token_from_response, + dataset_collection_path, + dataset_download_path, + dataset_path, + dataset_request_body, + dataset_status_path, + dataset_uuid_from_response, + oauth2_token_headers, + raise_for_error, + status_report_from_response, +) +from vws.exceptions.model_target_exceptions import ( + ModelTargetDatasetTimeoutError, +) +from vws.model_target_datasets import ( # noqa: TC001 + ModelTargetDatasetType, + ModelTargetModel, +) +from vws.reports import ( + ModelTargetDatasetStatuses, + ModelTargetDatasetStatusReport, +) +from vws.response import Response # noqa: TC001 +from vws.transports import RequestsTransport, Transport + +_TOKEN_EXPIRY_MARGIN_SECONDS = 60.0 + + +@beartype(conf=BeartypeConf(is_pep484_tower=True)) +class ModelTargetService: + """An interface to the Vuforia Model Target Web API.""" + + def __init__( + self, + *, + client_id: str, + client_secret: str, + base_vws_url: str = "https://vws.vuforia.com", + request_timeout_seconds: float | tuple[float, float] = 30.0, + transport: Transport | None = None, + ) -> None: + """ + Args: + client_id: A Model Target Web API OAuth2 client + ID. + client_secret: A Model Target Web API OAuth2 + client secret. + base_vws_url: The base URL for the VWS API, which + also serves the Model Target Web API. + request_timeout_seconds: The timeout for each + HTTP request. This can be a float to set both + the connect and read timeouts, or a + (connect, read) tuple. + transport: The HTTP transport to use for + requests. Defaults to + ``RequestsTransport()``. + """ + self._client_id = client_id + self._client_secret = client_secret + self._base_vws_url = base_vws_url + self._request_timeout_seconds = request_timeout_seconds + self._transport = ( + transport if transport is not None else RequestsTransport() + ) + self._access_token: str | None = None + self._access_token_expiry_time = 0.0 + + def get_access_token(self) -> str: + """Get an OAuth2 access token for the Model Target Web API. + + A token is requested only when the client has no token which is + still valid, so this can be called before each request. + + Returns: + A bearer token. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. For example, the + given client ID and client secret may not match a set of + Model Target Web API credentials. + """ + request_time = time.monotonic() + if ( + self._access_token is not None + and request_time < self._access_token_expiry_time + ): + return self._access_token + + response = self._transport( + method=HTTPMethod.POST, + url=self._base_vws_url.rstrip("/") + OAUTH2_TOKEN_PATH, + headers=oauth2_token_headers( + client_id=self._client_id, + client_secret=self._client_secret, + ), + data=OAUTH2_TOKEN_BODY, + request_timeout=self._request_timeout_seconds, + ) + + access_token, expires_in_seconds = access_token_from_response( + response=response, + ) + self._access_token = access_token + self._access_token_expiry_time = ( + request_time + expires_in_seconds - _TOKEN_EXPIRY_MARGIN_SECONDS + ) + return access_token + + def make_request( + self, + *, + method: str, + data: bytes, + request_path: str, + extra_headers: dict[str, str] | None = None, + ) -> Response: + """Make an authenticated request to the Model Target Web API. + + Args: + method: The HTTP method 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. + extra_headers: Additional headers to include in + the request. + + Returns: + The response to the request. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetError: + Vuforia returned an error. + ~vws.exceptions.custom_exceptions.ServerError: + There is an error with Vuforia's servers. + ~vws.exceptions.vws_exceptions.TooManyRequestsError: + Vuforia is rate limiting access. + """ + headers = { + "Authorization": f"Bearer {self.get_access_token()}", + **(extra_headers or {}), + } + + response = self._transport( + method=method, + url=self._base_vws_url.rstrip("/") + request_path, + headers=headers, + data=data, + request_timeout=self._request_timeout_seconds, + ) + + raise_for_error(response=response) + return response + + def create_dataset( + self, + *, + name: str, + target_sdk: str, + models: Sequence[ModelTargetModel], + dataset_type: ModelTargetDatasetType, + ) -> str: + """Start generating a Model Target dataset. + + Vuforia generates the dataset in the background, so it is not + available to download immediately. Use + :meth:`wait_for_dataset_generated` to wait for it. + + Args: + name: The name of the dataset. + target_sdk: The Vuforia Engine version to generate the dataset + for. + models: The models to generate the dataset from. A standard + dataset takes exactly one model. + dataset_type: Whether to create a standard or an advanced + dataset. + + Returns: + The UUID of the new dataset. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.ModelTargetValidationError: + Vuforia rejected the request. For example, a model may + give neither a CAD data URL nor a CAD data blob. + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + response = self.make_request( + method=HTTPMethod.POST, + data=dataset_request_body( + name=name, + target_sdk=target_sdk, + models=models, + ), + request_path=dataset_collection_path(dataset_type=dataset_type), + extra_headers={"Content-Type": JSON_CONTENT_TYPE}, + ) + + return dataset_uuid_from_response(response=response) + + def get_dataset_status( + self, + *, + dataset_uuid: str, + dataset_type: ModelTargetDatasetType, + ) -> ModelTargetDatasetStatusReport: + """Get the status of a Model Target dataset. + + Args: + dataset_uuid: The UUID of the dataset, as given by + :meth:`create_dataset`. + dataset_type: The kind of dataset to get the status of. + + Returns: + The status of the dataset. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + response = self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path=dataset_status_path( + dataset_type=dataset_type, + dataset_uuid=dataset_uuid, + ), + ) + + return status_report_from_response(response=response) + + def wait_for_dataset_generated( + self, + *, + dataset_uuid: str, + dataset_type: ModelTargetDatasetType, + seconds_between_requests: float = 0.2, + timeout_seconds: float = 60 * 5, + ) -> ModelTargetDatasetStatusReport: + """Wait for Vuforia to finish generating a Model Target dataset. + + A dataset which failed to generate is also finished, so the + returned report may have a + :attr:`~.ModelTargetDatasetStatusReport.status` of + ``FAILED``. + + Args: + dataset_uuid: The UUID of the dataset, as given by + :meth:`create_dataset`. + dataset_type: The kind of dataset to wait for. + seconds_between_requests: The number of seconds to wait between + requests made while polling the dataset's status. + timeout_seconds: The maximum number of seconds to wait for the + dataset to be generated. + + Returns: + The status of the dataset once it is no longer processing. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetDatasetTimeoutError: + The dataset was not generated within ``timeout_seconds`` + seconds. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + """ + start_time = time.monotonic() + while True: + report = self.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + if report.status != ModelTargetDatasetStatuses.PROCESSING: + return report + + elapsed_time = time.monotonic() - start_time + if elapsed_time > timeout_seconds: + raise ModelTargetDatasetTimeoutError + + time.sleep(seconds_between_requests) + + def download_dataset( + self, + *, + dataset_uuid: str, + dataset_type: ModelTargetDatasetType, + ) -> bytes: + """Download a generated Model Target dataset. + + Args: + dataset_uuid: The UUID of the dataset, as given by + :meth:`create_dataset`. + dataset_type: The kind of dataset to download. + + Returns: + The dataset, as the bytes of a zip file. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + ~vws.exceptions.model_target_exceptions.ModelTargetDatasetNotDoneError: + Vuforia has not generated the dataset. + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + response = self.make_request( + method=HTTPMethod.GET, + data=b"", + request_path=dataset_download_path( + dataset_type=dataset_type, + dataset_uuid=dataset_uuid, + ), + ) + + return response.content + + def delete_dataset( + self, + *, + dataset_uuid: str, + dataset_type: ModelTargetDatasetType, + ) -> None: + """Delete a Model Target dataset. + + Args: + dataset_uuid: The UUID of the dataset, as given by + :meth:`create_dataset`. + dataset_type: The kind of dataset to delete. + + Raises: + ~vws.exceptions.model_target_exceptions.ModelTargetAuthenticationError: + The request was not authenticated. + ~vws.exceptions.model_target_exceptions.UnknownModelTargetDatasetError: + No dataset of the given type matches the given UUID. + ~vws.exceptions.model_target_exceptions.ModelTargetOAuth2Error: + Vuforia did not give an access token. + """ + self.make_request( + method=HTTPMethod.DELETE, + data=b"", + request_path=dataset_path( + dataset_type=dataset_type, + dataset_uuid=dataset_uuid, + ), + ) diff --git a/src/vws/reports.py b/src/vws/reports.py index 66a9685ed..2be447b03 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -217,6 +217,138 @@ def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: ) +@beartype +@unique +class ModelTargetDatasetStatuses(Enum): + """Constants representing Model Target dataset generation statuses. + + See the 'status' field of the dataset status response at + https://developer.vuforia.com/library/vuforia-engine/web-api/model-target-web-api/. + """ + + PROCESSING = "processing" + DONE = "done" + FAILED = "failed" + + +@beartype +@dataclass(frozen=True, kw_only=True) +class ModelTargetGenerationDetail: + """One detail of a Model Target dataset generation warning.""" + + code: str + message: str + + +@beartype +@dataclass(frozen=True, kw_only=True) +class ModelTargetGenerationError: + """The reason a Model Target dataset failed to generate.""" + + code: str + message: str + + +@beartype +@dataclass(frozen=True, kw_only=True) +class ModelTargetGenerationWarning: + """A warning about a generated Model Target dataset. + + A dataset with a warning is generated, and can be downloaded. + """ + + code: str + message: str + target: str + details: Sequence[ModelTargetGenerationDetail] + + +@beartype +@dataclass(frozen=True, kw_only=True) +class ModelTargetDatasetStatusReport: + """The status of a Model Target dataset. + + See + https://developer.vuforia.com/library/vuforia-engine/web-api/model-target-web-api/. + """ + + status: ModelTargetDatasetStatuses + dataset_uuid: str + created_at: datetime.datetime + eta: datetime.datetime | None + """When Vuforia expects to finish generating the dataset. + + This is given only while the dataset is processing. + """ + + completed_at: datetime.datetime | None + """When Vuforia finished generating the dataset. + + This is given only once the dataset is no longer processing. + """ + + error: ModelTargetGenerationError | None + """Why the dataset failed to generate. + + This is given only for a failed dataset. + """ + + warning: ModelTargetGenerationWarning | None + """A warning about the generated dataset. + + This is given only for a generated dataset which has a warning. + """ + + @classmethod + def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: + """Construct from a Model Target Web API response dict.""" + error: ModelTargetGenerationError | None = None + if "error" in response_dict: + error_dict = dict(response_dict["error"]) + error = ModelTargetGenerationError( + code=error_dict["code"], + message=error_dict["message"], + ) + + warning: ModelTargetGenerationWarning | None = None + if "warning" in response_dict: + warning_dict = dict(response_dict["warning"]) + warning = ModelTargetGenerationWarning( + code=warning_dict["code"], + message=warning_dict["message"], + target=warning_dict["target"], + details=[ + ModelTargetGenerationDetail( + code=detail["code"], + message=detail["message"], + ) + for detail in warning_dict["details"] + ], + ) + + eta: datetime.datetime | None = None + if "eta" in response_dict: + eta = datetime.datetime.fromisoformat(response_dict["eta"]) + + completed_at: datetime.datetime | None = None + if "completedAt" in response_dict: + completed_at = datetime.datetime.fromisoformat( + response_dict["completedAt"], + ) + + return cls( + status=ModelTargetDatasetStatuses(value=response_dict["status"]), + dataset_uuid=response_dict["uuid"], + created_at=datetime.datetime.fromisoformat( + response_dict["createdAt"], + ), + eta=eta, + completed_at=completed_at, + error=error, + warning=warning, + ) + + @beartype @dataclass(frozen=True, kw_only=True) class RecoCount: diff --git a/tests/conftest.py b/tests/conftest.py index d94099ff8..74d4137be 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,11 +15,24 @@ from vws import ( VWS, AsyncCloudRecoService, + AsyncModelTargetService, AsyncVuMarkService, AsyncVWS, CloudRecoService, + ModelTargetService, VuMarkService, ) +from vws.model_target_datasets import ( + CadDataFormat, + GuideViewPosition, + ModelTargetModel, + ModelTargetView, +) + +# The mock accepts one hard-coded pair of Model Target Web API OAuth2 +# credentials, which it does not expose. +_MODEL_TARGET_CLIENT_ID = "client-id" +_MODEL_TARGET_CLIENT_SECRET = "client-secret" # noqa: S105 @pytest.fixture(name="_mock_database") @@ -124,6 +137,62 @@ async def async_vumark_service_client( yield client +@pytest.fixture(name="_mock_model_targets") +def fixture_mock_model_targets() -> Generator[None]: + """Yield a mock which serves the Model Target Web API. + + The Model Target Web API is not tied to a VWS database, so no + database is added. + """ + # We use a low processing time so that tests run quickly. + with MockVWS(processing_time_seconds=0.2): + yield + + +@pytest.fixture +def model_target_client( + *, + _mock_model_targets: None, +) -> ModelTargetService: + """A ``ModelTargetService`` client which connects to a mock.""" + return ModelTargetService( + client_id=_MODEL_TARGET_CLIENT_ID, + client_secret=_MODEL_TARGET_CLIENT_SECRET, + ) + + +@pytest_asyncio.fixture +async def async_model_target_client( + *, + _mock_model_targets: None, +) -> AsyncGenerator[AsyncModelTargetService]: + """An async ``ModelTargetService`` client which connects to a mock.""" + async with AsyncModelTargetService( + client_id=_MODEL_TARGET_CLIENT_ID, + client_secret=_MODEL_TARGET_CLIENT_SECRET, + ) as client: + yield client + + +@pytest.fixture(name="model_target_model") +def fixture_model_target_model() -> ModelTargetModel: + """A model which Vuforia accepts for dataset creation.""" + return ModelTargetModel( + name="model", + cad_data_url="https://example.com/model.zip", + cad_data_format=CadDataFormat.ZIP, + views=[ + ModelTargetView( + name="front", + guide_view_position=GuideViewPosition( + rotation=[0.0, 0.0, 0.0, 1.0], + translation=[0.0, 0.0, 1.0], + ), + ), + ], + ) + + @pytest.fixture(name="current_month") def fixture_current_month() -> datetime.date: """The current month, as the first day of that month.""" diff --git a/tests/test_async_model_targets.py b/tests/test_async_model_targets.py new file mode 100644 index 000000000..4bcd6a2f3 --- /dev/null +++ b/tests/test_async_model_targets.py @@ -0,0 +1,409 @@ +"""Tests for the async Model Target Web API client.""" + +import io +import json +import uuid +import zipfile +from http import HTTPStatus + +import pytest +from mock_vws import ( + MockVWS, + ModelTargetGenerationFailure, + ModelTargetGenerationWarning, +) + +from vws import AsyncModelTargetService +from vws.exceptions.model_target_exceptions import ( + ModelTargetDatasetNotDoneError, + ModelTargetDatasetTimeoutError, + ModelTargetOAuth2Error, + ModelTargetValidationError, + UnknownModelTargetDatasetError, +) +from vws.model_target_datasets import ( + CadDataFormat, + ModelTargetDatasetType, + ModelTargetModel, + RealisticAppearance, +) +from vws.reports import ModelTargetDatasetStatuses + +# The mock accepts one hard-coded pair of Model Target Web API OAuth2 +# credentials, which it does not expose. +_CLIENT_ID = "client-id" +_CLIENT_SECRET = "client-secret" # noqa: S105 + +_DATASET_TYPES = [ + ModelTargetDatasetType.STANDARD, + ModelTargetDatasetType.ADVANCED, +] + + +class TestAccessToken: + """Tests for getting an access token.""" + + @staticmethod + @pytest.mark.asyncio + async def test_token_is_a_bearer_token( + *, + async_model_target_client: AsyncModelTargetService, + ) -> None: + """An access token is given for valid credentials.""" + assert await async_model_target_client.get_access_token() + + @staticmethod + @pytest.mark.asyncio + @pytest.mark.usefixtures("_mock_model_targets") + async def test_invalid_credentials() -> None: + """An exception is raised when the credentials are not known.""" + async with AsyncModelTargetService( + client_id="not-a-client-id", + client_secret="not-a-client-secret", # noqa: S106 + ) as client: + with pytest.raises( + expected_exception=ModelTargetOAuth2Error, + ) as exc: + await client.get_access_token() + + assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED + assert exc.value.error == "invalid_client" + + +class TestDatasetLifecycle: + """Tests for the dataset lifecycle.""" + + @staticmethod + @pytest.mark.asyncio + @pytest.mark.parametrize( + argnames="dataset_type", + argvalues=_DATASET_TYPES, + ) + async def test_create_wait_download_delete( + *, + async_model_target_client: AsyncModelTargetService, + model_target_model: ModelTargetModel, + dataset_type: ModelTargetDatasetType, + ) -> None: + """A dataset can be created, downloaded and then deleted.""" + dataset_uuid = await async_model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=dataset_type, + ) + + report = await async_model_target_client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + + assert report.status == ModelTargetDatasetStatuses.DONE + assert report.dataset_uuid == dataset_uuid + assert report.completed_at is not None + assert report.eta is None + assert report.error is None + assert report.warning is None + + dataset = await async_model_target_client.download_dataset( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + + with zipfile.ZipFile( + file=io.BytesIO(initial_bytes=dataset) + ) as archive: + dataset_json = json.loads(s=archive.read(name="dataset.json")) + + assert dataset_json["uuid"] == dataset_uuid + assert dataset_json["type"] == dataset_type.value + + await async_model_target_client.delete_dataset( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + + with pytest.raises(expected_exception=UnknownModelTargetDatasetError): + await async_model_target_client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + + @staticmethod + @pytest.mark.asyncio + async def test_status_while_processing( + *, + async_model_target_client: AsyncModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """A processing dataset has an estimated completion time.""" + dataset_uuid = await async_model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + report = await async_model_target_client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.status == ModelTargetDatasetStatuses.PROCESSING + assert report.eta is not None + assert report.completed_at is None + + @staticmethod + @pytest.mark.asyncio + async def test_download_while_processing( + *, + async_model_target_client: AsyncModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """A dataset cannot be downloaded before it is generated.""" + dataset_uuid = await async_model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + with pytest.raises( + expected_exception=ModelTargetDatasetNotDoneError, + ) as exc: + await async_model_target_client.download_dataset( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert ( + exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + ) + assert exc.value.code == "UNSUPPORTED_STATE" + + @staticmethod + @pytest.mark.asyncio + async def test_dataset_types_are_separate( + *, + async_model_target_client: AsyncModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """A dataset is not visible to requests for the other type.""" + dataset_uuid = await async_model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.ADVANCED, + ) + + with pytest.raises(expected_exception=UnknownModelTargetDatasetError): + await async_model_target_client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + @staticmethod + @pytest.mark.asyncio + async def test_advanced_dataset_takes_multiple_models( + *, + async_model_target_client: AsyncModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """An advanced dataset can be generated from multiple models.""" + other_model = ModelTargetModel( + name="other-model", + cad_data_blob="ZmFrZS1jYWQtZGF0YQ==", + cad_data_format=CadDataFormat.GLB, + realistic_appearance=RealisticAppearance.TRUE, + ) + + assert await async_model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model, other_model], + dataset_type=ModelTargetDatasetType.ADVANCED, + ) + + +class TestUnknownDataset: + """Tests for requests for datasets which do not exist.""" + + @staticmethod + @pytest.mark.asyncio + async def test_get_status( + *, + async_model_target_client: AsyncModelTargetService, + ) -> None: + """An exception is raised for an unknown dataset.""" + dataset_uuid = uuid.uuid4().hex + with pytest.raises( + expected_exception=UnknownModelTargetDatasetError, + ) as exc: + await async_model_target_client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert exc.value.response.status_code == HTTPStatus.NOT_FOUND + assert dataset_uuid in exc.value.message + + @staticmethod + @pytest.mark.asyncio + async def test_download( + *, + async_model_target_client: AsyncModelTargetService, + ) -> None: + """An exception is raised for an unknown dataset.""" + with pytest.raises(expected_exception=UnknownModelTargetDatasetError): + await async_model_target_client.download_dataset( + dataset_uuid=uuid.uuid4().hex, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + @staticmethod + @pytest.mark.asyncio + async def test_delete( + *, + async_model_target_client: AsyncModelTargetService, + ) -> None: + """An exception is raised for an unknown dataset.""" + with pytest.raises(expected_exception=UnknownModelTargetDatasetError): + await async_model_target_client.delete_dataset( + dataset_uuid=uuid.uuid4().hex, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + +class TestValidation: + """Tests for requests which Vuforia rejects.""" + + @staticmethod + @pytest.mark.asyncio + async def test_no_cad_data( + *, + async_model_target_client: AsyncModelTargetService, + ) -> None: + """A model needs exactly one CAD data source.""" + with pytest.raises( + expected_exception=ModelTargetValidationError, + ) as exc: + await async_model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[ModelTargetModel(name="model")], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert exc.value.response.status_code == HTTPStatus.BAD_REQUEST + (detail,) = exc.value.details + assert detail.code == "VALIDATION_ERROR" + + +class TestGenerationResult: + """Tests for datasets which Vuforia does not generate cleanly.""" + + @staticmethod + @pytest.mark.asyncio + async def test_generation_failure( + *, + model_target_model: ModelTargetModel, + ) -> None: + """A dataset which fails to generate reports the failure.""" + message = "Model Target dataset generation failed" + failure = ModelTargetGenerationFailure(message=message) + with MockVWS( + processing_time_seconds=0.2, + model_target_generation_failure=failure, + ): + async with AsyncModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + ) as client: + dataset_uuid = await client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + report = await client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.status == ModelTargetDatasetStatuses.FAILED + assert report.error is not None + assert report.error.message == message + + @staticmethod + @pytest.mark.asyncio + async def test_generation_warning( + *, + model_target_model: ModelTargetModel, + ) -> None: + """A dataset which generates with a warning reports the + warning. + """ + warning = ModelTargetGenerationWarning() + with MockVWS( + processing_time_seconds=0.2, + model_target_generation_warning=warning, + ): + async with AsyncModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + ) as client: + dataset_uuid = await client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + report = await client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.status == ModelTargetDatasetStatuses.DONE + assert report.warning is not None + assert report.warning.target == dataset_uuid + (detail,) = report.warning.details + assert detail.code == "LOW_RECOGNITION_QUALITY" + + +class TestWaitForDatasetGenerated: + """Tests for waiting for a dataset to be generated.""" + + @staticmethod + @pytest.mark.asyncio + async def test_timeout(*, model_target_model: ModelTargetModel) -> None: + """An exception is raised when the wait times out.""" + with MockVWS(processing_time_seconds=60): + async with AsyncModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + ) as client: + dataset_uuid = await client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + with pytest.raises( + expected_exception=ModelTargetDatasetTimeoutError, + ): + await client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + seconds_between_requests=0.01, + timeout_seconds=0.05, + ) + + report = await client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.status == ModelTargetDatasetStatuses.PROCESSING diff --git a/tests/test_model_targets.py b/tests/test_model_targets.py new file mode 100644 index 000000000..4ee13db6e --- /dev/null +++ b/tests/test_model_targets.py @@ -0,0 +1,802 @@ +"""Tests for the Model Target Web API client.""" + +import io +import json +import uuid +import zipfile +from http import HTTPStatus + +import pytest +from beartype import beartype +from freezegun import freeze_time +from mock_vws import ( + MockVWS, + ModelTargetGenerationFailure, + ModelTargetGenerationWarning, +) + +from vws import ModelTargetService +from vws.exceptions.model_target_exceptions import ( + ModelTargetAuthenticationError, + ModelTargetDatasetNotDoneError, + ModelTargetDatasetTimeoutError, + ModelTargetError, + ModelTargetOAuth2Error, + ModelTargetValidationError, + UnknownModelTargetDatasetError, +) +from vws.model_target_datasets import ( + CadDataFormat, + GuideViewPosition, + ModelTargetDatasetType, + ModelTargetModel, + ModelTargetView, + RealisticAppearance, +) +from vws.reports import ModelTargetDatasetStatuses +from vws.response import Response +from vws.transports import RequestsTransport, Transport + +# The mock accepts one hard-coded pair of Model Target Web API OAuth2 +# credentials, which it does not expose. +_CLIENT_ID = "client-id" +_CLIENT_SECRET = "client-secret" # noqa: S105 + +_DATASET_TYPES = [ + ModelTargetDatasetType.STANDARD, + ModelTargetDatasetType.ADVANCED, +] + + +@beartype +def _response(*, text: str) -> Response: + """Get a response with a given body. + + Args: + text: The body of the response. + + Returns: + A response with the given body. + """ + content = text.encode(encoding="utf-8") + return Response( + text=text, + url="https://vws.vuforia.com/modeltargets/datasets", + status_code=HTTPStatus.BAD_REQUEST, + headers={}, + request_body=None, + tell_position=len(content), + content=content, + ) + + +@beartype +class _CountingTransport: + """A transport which counts the requests made to each path.""" + + def __init__(self, *, transport: Transport) -> None: + """ + Args: + transport: The transport to make requests with. + """ + self._transport = transport + self.urls: list[str] = [] + + def close(self) -> None: + """Close the wrapped transport.""" + self._transport.close() + + def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Response: + """Make a request, recording the URL. + + Args: + method: The HTTP method. + url: The full URL. + headers: Request headers. + data: The request body. + request_timeout: The request timeout. + + Returns: + A Response populated from the HTTP response. + """ + self.urls.append(url) + return self._transport( + method=method, + url=url, + headers=headers, + data=data, + request_timeout=request_timeout, + ) + + +@beartype +class _BadTokenTransport: + """A transport which replaces each bearer token with an invalid + one. + """ + + def __init__(self, *, transport: Transport) -> None: + """ + Args: + transport: The transport to make requests with. + """ + self._transport = transport + + def close(self) -> None: + """Close the wrapped transport.""" + self._transport.close() + + def __call__( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes, + request_timeout: float | tuple[float, float], + ) -> Response: + """Make a request with an invalid bearer token. + + Args: + method: The HTTP method. + url: The full URL. + headers: Request headers. + data: The request body. + request_timeout: The request timeout. + + Returns: + A Response populated from the HTTP response. + """ + given_headers = dict(headers) + authorization = given_headers.get("Authorization", "") + if authorization.startswith("Bearer "): + given_headers["Authorization"] = "Bearer not-a-json-web-token" + + return self._transport( + method=method, + url=url, + headers=given_headers, + data=data, + request_timeout=request_timeout, + ) + + +class TestAccessToken: + """Tests for getting an access token.""" + + @staticmethod + @pytest.mark.usefixtures("_mock_model_targets") + def test_token_is_a_bearer_token() -> None: + """An access token is given for valid credentials.""" + client = ModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + ) + + assert client.get_access_token() + + @staticmethod + @pytest.mark.usefixtures("_mock_model_targets") + def test_token_is_reused( + *, + model_target_model: ModelTargetModel, + ) -> None: + """One access token is used for multiple requests.""" + transport = _CountingTransport(transport=RequestsTransport()) + client = ModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + transport=transport, + ) + + for _ in range(2): + client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + token_urls = [url for url in transport.urls if "oauth2" in url] + assert len(token_urls) == 1 + transport.close() + + @staticmethod + @pytest.mark.usefixtures("_mock_model_targets") + def test_expired_token_is_replaced( + *, + model_target_model: ModelTargetModel, + ) -> None: + """A new access token is requested once the old one expires.""" + transport = _CountingTransport(transport=RequestsTransport()) + client = ModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + transport=transport, + ) + + with freeze_time(time_to_freeze="2026-01-01") as frozen_time: + client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + # Mock tokens last an hour. + frozen_time.tick(delta=60 * 60 + 1) + client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + token_urls = [url for url in transport.urls if "oauth2" in url] + expected_token_request_count = 2 + assert len(token_urls) == expected_token_request_count + + @staticmethod + @pytest.mark.usefixtures("_mock_model_targets") + def test_invalid_credentials() -> None: + """An exception is raised when the credentials are not known.""" + client = ModelTargetService( + client_id="not-a-client-id", + client_secret="not-a-client-secret", # noqa: S106 + ) + + with pytest.raises( + expected_exception=ModelTargetOAuth2Error, + ) as exc: + client.get_access_token() + + assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED + assert exc.value.error == "invalid_client" + assert not exc.value.error_description + + @staticmethod + @pytest.mark.usefixtures("_mock_model_targets") + def test_invalid_bearer_token( + *, + model_target_model: ModelTargetModel, + ) -> None: + """An exception is raised when the bearer token is not + accepted. + """ + transport = _BadTokenTransport(transport=RequestsTransport()) + client = ModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + transport=transport, + ) + + with pytest.raises( + expected_exception=ModelTargetAuthenticationError, + ) as exc: + client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert exc.value.response.status_code == HTTPStatus.UNAUTHORIZED + assert exc.value.target == "jwt" + assert exc.value.message + transport.close() + + +class TestDatasetLifecycle: + """Tests for the dataset lifecycle.""" + + @staticmethod + @pytest.mark.parametrize( + argnames="dataset_type", + argvalues=_DATASET_TYPES, + ) + def test_create_wait_download_delete( + *, + model_target_client: ModelTargetService, + model_target_model: ModelTargetModel, + dataset_type: ModelTargetDatasetType, + ) -> None: + """A dataset can be created, downloaded and then deleted.""" + dataset_uuid = model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=dataset_type, + ) + + report = model_target_client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + + assert report.status == ModelTargetDatasetStatuses.DONE + assert report.dataset_uuid == dataset_uuid + assert report.completed_at is not None + assert report.completed_at >= report.created_at + assert report.eta is None + assert report.error is None + assert report.warning is None + + dataset = model_target_client.download_dataset( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + + with zipfile.ZipFile( + file=io.BytesIO(initial_bytes=dataset) + ) as archive: + dataset_json = json.loads(s=archive.read(name="dataset.json")) + + assert dataset_json["uuid"] == dataset_uuid + assert dataset_json["type"] == dataset_type.value + + model_target_client.delete_dataset( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + + with pytest.raises(expected_exception=UnknownModelTargetDatasetError): + model_target_client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=dataset_type, + ) + + @staticmethod + def test_status_while_processing( + *, + model_target_client: ModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """A processing dataset has an estimated completion time.""" + dataset_uuid = model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + report = model_target_client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.status == ModelTargetDatasetStatuses.PROCESSING + assert report.eta is not None + assert report.eta >= report.created_at + assert report.completed_at is None + + @staticmethod + def test_download_while_processing( + *, + model_target_client: ModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """A dataset cannot be downloaded before it is generated.""" + dataset_uuid = model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + with pytest.raises( + expected_exception=ModelTargetDatasetNotDoneError, + ) as exc: + model_target_client.download_dataset( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert ( + exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY + ) + assert exc.value.code == "UNSUPPORTED_STATE" + assert exc.value.target == dataset_uuid + + @staticmethod + def test_dataset_types_are_separate( + *, + model_target_client: ModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """A dataset is not visible to requests for the other type.""" + dataset_uuid = model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + with pytest.raises(expected_exception=UnknownModelTargetDatasetError): + model_target_client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.ADVANCED, + ) + + @staticmethod + def test_advanced_dataset_takes_multiple_models( + *, + model_target_client: ModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """An advanced dataset can be generated from multiple models.""" + other_model = ModelTargetModel( + name="other-model", + cad_data_blob="ZmFrZS1jYWQtZGF0YQ==", + cad_data_format=CadDataFormat.GLB, + realistic_appearance=RealisticAppearance.TRUE, + ) + + dataset_uuid = model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model, other_model], + dataset_type=ModelTargetDatasetType.ADVANCED, + ) + + assert dataset_uuid + + @staticmethod + def test_state_based_model( + *, + model_target_client: ModelTargetService, + ) -> None: + """A State-Based Model Target dataset can be created.""" + configuration = json.dumps(obj={"states": {"open": {}, "closed": {}}}) + model = ModelTargetModel( + name="model", + cad_data_url="https://example.com/model.zip", + cad_data_format=CadDataFormat.ZIP, + state_based_configuration_json_string=configuration, + views=[ + ModelTargetView( + name="front", + guide_view_position=GuideViewPosition( + rotation=[0.0, 0.0, 0.0, 1.0], + translation=[0.0, 0.0, 1.0], + ), + states=["open"], + ), + ], + ) + + assert model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + +class TestUnknownDataset: + """Tests for requests for datasets which do not exist.""" + + @staticmethod + def test_get_status(*, model_target_client: ModelTargetService) -> None: + """An exception is raised for an unknown dataset.""" + dataset_uuid = uuid.uuid4().hex + with pytest.raises( + expected_exception=UnknownModelTargetDatasetError, + ) as exc: + model_target_client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert exc.value.response.status_code == HTTPStatus.NOT_FOUND + assert exc.value.code == "NOT_FOUND" + assert dataset_uuid in exc.value.message + + @staticmethod + def test_download(*, model_target_client: ModelTargetService) -> None: + """An exception is raised for an unknown dataset.""" + with pytest.raises(expected_exception=UnknownModelTargetDatasetError): + model_target_client.download_dataset( + dataset_uuid=uuid.uuid4().hex, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + @staticmethod + def test_delete(*, model_target_client: ModelTargetService) -> None: + """An exception is raised for an unknown dataset.""" + with pytest.raises(expected_exception=UnknownModelTargetDatasetError): + model_target_client.delete_dataset( + dataset_uuid=uuid.uuid4().hex, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + +class TestValidation: + """Tests for requests which Vuforia rejects.""" + + @staticmethod + def test_no_cad_data( + *, + model_target_client: ModelTargetService, + ) -> None: + """A model needs exactly one CAD data source.""" + with pytest.raises( + expected_exception=ModelTargetValidationError, + ) as exc: + model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[ModelTargetModel(name="model")], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert exc.value.response.status_code == HTTPStatus.BAD_REQUEST + assert exc.value.code == "BAD_REQUEST" + (detail,) = exc.value.details + assert detail.code == "VALIDATION_ERROR" + assert "cadDataUrl" in detail.message + + @staticmethod + def test_two_cad_data_sources( + *, + model_target_client: ModelTargetService, + ) -> None: + """A model cannot give two CAD data sources.""" + model = ModelTargetModel( + name="model", + cad_data_url="https://example.com/model.zip", + cad_data_blob="ZmFrZS1jYWQtZGF0YQ==", + ) + + with pytest.raises(expected_exception=ModelTargetValidationError): + model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + @staticmethod + def test_two_models_in_a_standard_dataset( + *, + model_target_client: ModelTargetService, + model_target_model: ModelTargetModel, + ) -> None: + """A standard dataset takes exactly one model.""" + with pytest.raises( + expected_exception=ModelTargetValidationError, + ) as exc: + model_target_client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model, model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + (detail,) = exc.value.details + assert detail.message == "exactly one model should be provided" + + +class TestGenerationResult: + """Tests for datasets which Vuforia does not generate cleanly.""" + + @staticmethod + def test_generation_failure( + *, + model_target_model: ModelTargetModel, + ) -> None: + """A dataset which fails to generate reports the failure.""" + message = "Model Target dataset generation failed" + failure = ModelTargetGenerationFailure(message=message) + with MockVWS( + processing_time_seconds=0.2, + model_target_generation_failure=failure, + ): + client = ModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + ) + dataset_uuid = client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + report = client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.status == ModelTargetDatasetStatuses.FAILED + assert report.error is not None + assert report.error.message == message + assert report.warning is None + + with pytest.raises( + expected_exception=ModelTargetDatasetNotDoneError, + ): + client.download_dataset( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + @staticmethod + def test_generation_warning( + *, + model_target_model: ModelTargetModel, + ) -> None: + """A dataset which generates with a warning reports the + warning. + """ + warning = ModelTargetGenerationWarning() + with MockVWS( + processing_time_seconds=0.2, + model_target_generation_warning=warning, + ): + client = ModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + ) + dataset_uuid = client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + report = client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.status == ModelTargetDatasetStatuses.DONE + assert report.error is None + assert report.warning is not None + assert report.warning.message == warning.message + assert report.warning.target == dataset_uuid + (detail,) = report.warning.details + assert detail.code == "LOW_RECOGNITION_QUALITY" + + assert client.download_dataset( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + +class TestWaitForDatasetGenerated: + """Tests for waiting for a dataset to be generated.""" + + @staticmethod + def test_timeout(*, model_target_model: ModelTargetModel) -> None: + """An exception is raised when the wait times out.""" + with MockVWS(processing_time_seconds=60): + client = ModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + ) + dataset_uuid = client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + with pytest.raises( + expected_exception=ModelTargetDatasetTimeoutError, + ): + client.wait_for_dataset_generated( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + seconds_between_requests=0.01, + timeout_seconds=0.05, + ) + + +class TestErrorEnvelope: + """Tests for reading responses which are not shaped like Model Target + Web API errors. + """ + + @staticmethod + @pytest.mark.parametrize( + argnames="text", + argvalues=[ + "", + "Not JSON", + "[]", + "{}", + '{"error": "not-an-object"}', + '{"transaction_id": "abc", "result_code": "Fail"}', + ], + ) + def test_unknown_error_shape(*, text: str) -> None: + """An error without a Model Target error object gives empty + values. + """ + error = ModelTargetError(response=_response(text=text)) + + assert not error.code + assert not error.message + assert not error.target + assert not error.details + + @staticmethod + def test_error_without_details() -> None: + """An error which gives no details has no details.""" + text = json.dumps(obj={"error": {"code": "ERROR", "message": "No"}}) + error = ModelTargetError(response=_response(text=text)) + + assert error.code == "ERROR" + assert error.message == "No" + assert not error.target + assert not error.details + + @staticmethod + @pytest.mark.parametrize( + argnames="text", + argvalues=["Not JSON", "[]", "{}"], + ) + def test_unknown_oauth2_error_shape(*, text: str) -> None: + """An OAuth2 error without an error code gives empty values.""" + error = ModelTargetOAuth2Error(response=_response(text=text)) + + assert not error.error + assert not error.error_description + + @staticmethod + def test_oauth2_error_description() -> None: + """An OAuth2 error description is given when Vuforia gives one.""" + description = "Missing or invalid authorization header" + text = json.dumps( + obj={ + "error": "invalid_request", + "error_description": description, + }, + ) + error = ModelTargetOAuth2Error(response=_response(text=text)) + + assert error.error == "invalid_request" + assert error.error_description == description + + +class TestBaseVWSURL: + """Tests for using a custom base URL.""" + + @staticmethod + def test_custom_base_url( + *, + model_target_model: ModelTargetModel, + ) -> None: + """The Model Target Web API can be served from a URL with a + path. + """ + base_vws_url = "https://example.com/vws" + with MockVWS( + base_vws_url=base_vws_url, + processing_time_seconds=0.2, + ): + client = ModelTargetService( + client_id=_CLIENT_ID, + client_secret=_CLIENT_SECRET, + base_vws_url=base_vws_url, + ) + dataset_uuid = client.create_dataset( + name="dataset", + target_sdk="11.0", + models=[model_target_model], + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + report = client.get_dataset_status( + dataset_uuid=dataset_uuid, + dataset_type=ModelTargetDatasetType.STANDARD, + ) + + assert report.dataset_uuid == dataset_uuid From 264631fa55d8e2488f33d025220fc7a6b193627e Mon Sep 17 00:00:00 2001 From: adamtheturtle <797801+adamtheturtle@users.noreply.github.com> Date: Fri, 14 Aug 2026 14:23:12 +0000 Subject: [PATCH 1638/1638] Bump CHANGELOG --- CHANGELOG.rst | 21 +++++++++++++++++++++ newsfragments/3090.change.rst | 1 - newsfragments/3091.change.rst | 1 - newsfragments/3092.change.rst | 1 - newsfragments/3093.change.rst | 1 - newsfragments/3119.change.rst | 2 -- newsfragments/3128.change.rst | 1 - newsfragments/3133.change.rst | 2 -- newsfragments/822.change.rst | 1 - 9 files changed, 21 insertions(+), 10 deletions(-) delete mode 100644 newsfragments/3090.change.rst delete mode 100644 newsfragments/3091.change.rst delete mode 100644 newsfragments/3092.change.rst delete mode 100644 newsfragments/3093.change.rst delete mode 100644 newsfragments/3119.change.rst delete mode 100644 newsfragments/3128.change.rst delete mode 100644 newsfragments/3133.change.rst delete mode 100644 newsfragments/822.change.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b6688933c..7c995c79a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,27 @@ Changelog .. towncrier release notes start +2026.08.14 +---------- + +- Drop Python 3.13 support, update VWS Python Mock, and test quota and project-state error responses against the mock. + +- Add ``QuotaExceededError``, ``LicenseCheckFailedError``, and ``AuthorizationFailedError`` for documented VuMark Generation API result codes. + +- Fix ``target_id`` on target exceptions when ``base_vws_url`` includes a path prefix. + +- Retain explicitly provided falsy custom transports instead of replacing them with defaults. + +- Raise a response-carrying ``CloudRecoError`` when Cloud Query returns a documented empty or non-JSON 4xx response instead of leaking ``JSONDecodeError``. + +- Add support for the Model Target Web API. + ``ModelTargetService`` and ``AsyncModelTargetService`` create standard and advanced Model Target datasets, wait for them to be generated, download them and delete them. + +- Map the ``ProjectHasNoApiAccess`` result code, as spelled in Vuforia's result codes table, to ``ProjectHasNoAPIAccessError``. The previously mapped ``ProjectHasNoAPIAccess`` casing, which Vuforia does not document, is no longer mapped. + +- Add support for the Database Reco Counts report. + ``VWS`` and ``AsyncVWS`` take an optional ``database_id``, and have new ``request_database_reco_counts_report``, ``download_reco_counts_report`` and ``wait_for_reco_counts_report`` methods. + 2026.02.25.1 ------------ diff --git a/newsfragments/3090.change.rst b/newsfragments/3090.change.rst deleted file mode 100644 index 226d9665f..000000000 --- a/newsfragments/3090.change.rst +++ /dev/null @@ -1 +0,0 @@ -Add ``QuotaExceededError``, ``LicenseCheckFailedError``, and ``AuthorizationFailedError`` for documented VuMark Generation API result codes. diff --git a/newsfragments/3091.change.rst b/newsfragments/3091.change.rst deleted file mode 100644 index b2696ec2a..000000000 --- a/newsfragments/3091.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix ``target_id`` on target exceptions when ``base_vws_url`` includes a path prefix. diff --git a/newsfragments/3092.change.rst b/newsfragments/3092.change.rst deleted file mode 100644 index a15105df8..000000000 --- a/newsfragments/3092.change.rst +++ /dev/null @@ -1 +0,0 @@ -Retain explicitly provided falsy custom transports instead of replacing them with defaults. diff --git a/newsfragments/3093.change.rst b/newsfragments/3093.change.rst deleted file mode 100644 index 7a603b777..000000000 --- a/newsfragments/3093.change.rst +++ /dev/null @@ -1 +0,0 @@ -Raise a response-carrying ``CloudRecoError`` when Cloud Query returns a documented empty or non-JSON 4xx response instead of leaking ``JSONDecodeError``. diff --git a/newsfragments/3119.change.rst b/newsfragments/3119.change.rst deleted file mode 100644 index 5660e237e..000000000 --- a/newsfragments/3119.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add support for the Model Target Web API. -``ModelTargetService`` and ``AsyncModelTargetService`` create standard and advanced Model Target datasets, wait for them to be generated, download them and delete them. diff --git a/newsfragments/3128.change.rst b/newsfragments/3128.change.rst deleted file mode 100644 index 2a0cc5a51..000000000 --- a/newsfragments/3128.change.rst +++ /dev/null @@ -1 +0,0 @@ -Map the ``ProjectHasNoApiAccess`` result code, as spelled in Vuforia's result codes table, to ``ProjectHasNoAPIAccessError``. The previously mapped ``ProjectHasNoAPIAccess`` casing, which Vuforia does not document, is no longer mapped. diff --git a/newsfragments/3133.change.rst b/newsfragments/3133.change.rst deleted file mode 100644 index edab9049a..000000000 --- a/newsfragments/3133.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add support for the Database Reco Counts report. -``VWS`` and ``AsyncVWS`` take an optional ``database_id``, and have new ``request_database_reco_counts_report``, ``download_reco_counts_report`` and ``wait_for_reco_counts_report`` methods. diff --git a/newsfragments/822.change.rst b/newsfragments/822.change.rst deleted file mode 100644 index 18195db79..000000000 --- a/newsfragments/822.change.rst +++ /dev/null @@ -1 +0,0 @@ -Drop Python 3.13 support, update VWS Python Mock, and test quota and project-state error responses against the mock.