vws-python-mock 2026.2.15.4__tar.gz → 2026.2.18__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.github/workflows/docker-build.yml +7 -26
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.github/workflows/release.yml +5 -19
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.github/workflows/test.yml +1 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.pre-commit-config.yaml +8 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/CHANGELOG.rst +8 -0
- {vws_python_mock-2026.2.15.4/src/vws_python_mock.egg-info → vws_python_mock-2026.2.18}/PKG-INFO +11 -10
- vws_python_mock-2026.2.18/admin/create_secrets_files.py +240 -0
- vws_python_mock-2026.2.18/admin/vumark_template.svg +1 -0
- vws_python_mock-2026.2.18/docker-bake.hcl +39 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/contributing.rst +7 -1
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/pyproject.toml +23 -9
- vws_python_mock-2026.2.18/secrets.tar.gpg +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_constants.py +7 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_flask_server/Dockerfile +4 -3
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_flask_server/vws.py +32 -1
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_requests_mock_server/decorators.py +7 -6
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_requests_mock_server/mock_web_services_api.py +35 -2
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/key_validators.py +8 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/target_validators.py +7 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18/src/vws_python_mock.egg-info}/PKG-INFO +11 -10
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/vws_python_mock.egg-info/SOURCES.txt +4 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/vws_python_mock.egg-info/requires.txt +10 -9
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/fixtures/credentials.py +39 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/fixtures/vuforia_backends.py +59 -0
- vws_python_mock-2026.2.18/tests/mock_vws/test_target_validators.py +86 -0
- vws_python_mock-2026.2.18/tests/mock_vws/test_vumark_generation_api.py +55 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/vuforia_secrets.env.example +6 -0
- vws_python_mock-2026.2.15.4/admin/create_secrets_files.py +0 -112
- vws_python_mock-2026.2.15.4/secrets.tar.gpg +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.git_archival.txt +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.gitattributes +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.github/dependabot.yml +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.github/workflows/dependabot-merge.yml +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.github/workflows/lint.yml +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.github/workflows/publish-site.yml +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.gitignore +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.prettierrc +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.vscode/extensions.json +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.vscode/settings.json +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/CODE_OF_CONDUCT.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/LICENSE +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/MANIFEST.in +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/README.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/admin/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/ci/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/ci/decrypt_secret.sh +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/ci/test_custom_linters.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/conftest.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/basic-example.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/changelog.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/ci-setup.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/conf.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/differences-to-vws.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/docker.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/getting-started.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/index.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/installation.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/mock-api-reference.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/release-process.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/docs/source/versioning-and-api-stability.rst +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/setup.cfg +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/spelling_private_dict.txt +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_base64_decoding.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_database_matchers.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_flask_server/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_flask_server/healthcheck.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_flask_server/target_manager.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_flask_server/vwq.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_mock_common.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_tools.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/accept_header_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/auth_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/content_length_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/content_type_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/date_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/exceptions.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/fields_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/image_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/include_target_data_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/num_results_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_query_validators/project_state_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_requests_mock_server/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_requests_mock_server/mock_web_query_api.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/active_flag_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/auth_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/content_length_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/content_type_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/date_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/exceptions.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/image_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/json_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/metadata_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/name_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/project_state_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/_services_validators/width_validators.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/database.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/image_matchers.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/py.typed +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/states.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/target.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/target_manager.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/mock_vws/target_raters.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/vws_python_mock.egg-info/dependency_links.txt +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/vws_python_mock.egg-info/not-zip-safe +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/src/vws_python_mock.egg-info/top_level.txt +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/conftest.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/fixtures/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/fixtures/prepared_requests.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_add_target.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_authorization_header.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_content_length.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_database_summary.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_date_header.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_delete_target.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_docker.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_flask_app_usage.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_get_duplicates.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_get_target.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_invalid_given_id.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_invalid_json.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_query.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_requests_mock_usage.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_target_list.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_target_raters.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_target_summary.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_unexpected_json.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/test_update_target.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/utils/__init__.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/utils/assertions.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/utils/retries.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/utils/too_many_requests.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/tests/mock_vws/utils/usage_test_helpers.py +0 -0
- {vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/zizmor.yml +0 -0
{vws_python_mock-2026.2.15.4 → vws_python_mock-2026.2.18}/.github/workflows/docker-build.yml
RENAMED
|
@@ -23,13 +23,6 @@ jobs:
|
|
|
23
23
|
name: Build Docker images
|
|
24
24
|
runs-on: ubuntu-latest
|
|
25
25
|
|
|
26
|
-
strategy:
|
|
27
|
-
matrix:
|
|
28
|
-
image:
|
|
29
|
-
- name: target-manager
|
|
30
|
-
- name: vws
|
|
31
|
-
- name: vwq
|
|
32
|
-
|
|
33
26
|
steps:
|
|
34
27
|
- uses: actions/checkout@v6
|
|
35
28
|
with:
|
|
@@ -41,24 +34,12 @@ jobs:
|
|
|
41
34
|
- name: Set up Docker Buildx
|
|
42
35
|
uses: docker/setup-buildx-action@v3
|
|
43
36
|
|
|
44
|
-
- name:
|
|
45
|
-
uses: docker/
|
|
37
|
+
- name: Check Docker bake definition
|
|
38
|
+
uses: docker/bake-action@v6.10.0
|
|
46
39
|
with:
|
|
47
|
-
|
|
48
|
-
file: src/mock_vws/_flask_server/Dockerfile
|
|
49
|
-
push: false
|
|
50
|
-
target: ${{ matrix.image.name }}
|
|
51
|
-
tags: |-
|
|
52
|
-
adamtheturtle/vuforia-${{ matrix.image.name }}-mock:latest
|
|
40
|
+
call: check
|
|
53
41
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
steps:
|
|
59
|
-
- name: Check matrix job status
|
|
60
|
-
run: |-
|
|
61
|
-
if ! ${{ needs.build.result == 'success' }}; then
|
|
62
|
-
echo "One or more matrix jobs failed"
|
|
63
|
-
exit 1
|
|
64
|
-
fi
|
|
42
|
+
- name: Build Docker images
|
|
43
|
+
uses: docker/bake-action@v6.10.0
|
|
44
|
+
with:
|
|
45
|
+
push: false
|
|
@@ -135,20 +135,10 @@ jobs:
|
|
|
135
135
|
verbose: true
|
|
136
136
|
|
|
137
137
|
docker:
|
|
138
|
-
name: Publish Docker
|
|
138
|
+
name: Publish Docker images
|
|
139
139
|
needs: release
|
|
140
140
|
runs-on: ubuntu-latest
|
|
141
141
|
|
|
142
|
-
strategy:
|
|
143
|
-
matrix:
|
|
144
|
-
image:
|
|
145
|
-
- target: target-manager
|
|
146
|
-
repo: adamtheturtle/vuforia-target-manager-mock
|
|
147
|
-
- target: vws
|
|
148
|
-
repo: adamtheturtle/vuforia-vws-mock
|
|
149
|
-
- target: vwq
|
|
150
|
-
repo: adamtheturtle/vuforia-vwq-mock
|
|
151
|
-
|
|
152
142
|
permissions: {}
|
|
153
143
|
|
|
154
144
|
steps:
|
|
@@ -169,13 +159,9 @@ jobs:
|
|
|
169
159
|
- name: Set up QEMU
|
|
170
160
|
uses: docker/setup-qemu-action@v3
|
|
171
161
|
|
|
172
|
-
- name: Build and push Docker
|
|
173
|
-
uses: docker/
|
|
162
|
+
- name: Build and push Docker images
|
|
163
|
+
uses: docker/bake-action@v6.10.0
|
|
174
164
|
with:
|
|
175
|
-
file: src/mock_vws/_flask_server/Dockerfile
|
|
176
|
-
platforms: linux/amd64,linux/arm64
|
|
177
165
|
push: true
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
${{ matrix.image.repo }}:latest
|
|
181
|
-
${{ matrix.image.repo }}:${{ needs.release.outputs.version }}
|
|
166
|
+
env:
|
|
167
|
+
VERSION: ${{ needs.release.outputs.version }}
|
|
@@ -113,6 +113,7 @@ jobs:
|
|
|
113
113
|
- tests/mock_vws/test_update_target.py::TestInactiveProject
|
|
114
114
|
- tests/mock_vws/test_requests_mock_usage.py
|
|
115
115
|
- tests/mock_vws/test_flask_app_usage.py
|
|
116
|
+
- tests/mock_vws/test_vumark_generation_api.py
|
|
116
117
|
- tests/mock_vws/test_docker.py
|
|
117
118
|
- README.rst
|
|
118
119
|
- docs/source/basic-example.rst
|
|
@@ -415,3 +415,11 @@ repos:
|
|
|
415
415
|
language: python
|
|
416
416
|
types_or: [markdown, rst]
|
|
417
417
|
additional_dependencies: [uv==0.9.5]
|
|
418
|
+
|
|
419
|
+
- id: hclfmt
|
|
420
|
+
name: hclfmt
|
|
421
|
+
entry: hclfmt -w
|
|
422
|
+
language: golang
|
|
423
|
+
types: [hcl]
|
|
424
|
+
additional_dependencies: [github.com/hashicorp/hcl/v2/cmd/hclfmt@v2.24.0]
|
|
425
|
+
stages: [pre-commit]
|
{vws_python_mock-2026.2.15.4/src/vws_python_mock.egg-info → vws_python_mock-2026.2.18}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vws-python-mock
|
|
3
|
-
Version: 2026.2.
|
|
3
|
+
Version: 2026.2.18
|
|
4
4
|
Summary: A mock for the Vuforia Web Services (VWS) API.
|
|
5
5
|
Author-email: Adam Dangoor <adamdangoor@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -27,18 +27,19 @@ Requires-Dist: requests>=2.32.3
|
|
|
27
27
|
Requires-Dist: responses>=0.25.3
|
|
28
28
|
Requires-Dist: torch>=2.5.1
|
|
29
29
|
Requires-Dist: torchmetrics>=1.5.1
|
|
30
|
+
Requires-Dist: torchvision>=0.20.1
|
|
30
31
|
Requires-Dist: tzdata; sys_platform == "win32"
|
|
31
32
|
Requires-Dist: vws-auth-tools>=2024.7.12
|
|
32
33
|
Requires-Dist: werkzeug>=3.1.2
|
|
33
34
|
Provides-Extra: dev
|
|
34
|
-
Requires-Dist: actionlint-py==1.7.
|
|
35
|
+
Requires-Dist: actionlint-py==1.7.11.24; extra == "dev"
|
|
35
36
|
Requires-Dist: check-manifest==0.51; extra == "dev"
|
|
36
37
|
Requires-Dist: check-wheel-contents==0.6.3; extra == "dev"
|
|
37
38
|
Requires-Dist: coverage==7.13.4; extra == "dev"
|
|
38
39
|
Requires-Dist: deptry==0.24.0; extra == "dev"
|
|
39
40
|
Requires-Dist: dirty-equals==0.11; extra == "dev"
|
|
40
41
|
Requires-Dist: doc8==2.0.0; extra == "dev"
|
|
41
|
-
Requires-Dist: doccmd==2026.
|
|
42
|
+
Requires-Dist: doccmd==2026.2.15; extra == "dev"
|
|
42
43
|
Requires-Dist: docker==7.1.0; extra == "dev"
|
|
43
44
|
Requires-Dist: enum-tools[sphinx]==0.13.0; extra == "dev"
|
|
44
45
|
Requires-Dist: freezegun==1.5.5; extra == "dev"
|
|
@@ -46,13 +47,13 @@ Requires-Dist: furo==2025.12.19; extra == "dev"
|
|
|
46
47
|
Requires-Dist: interrogate==1.7.0; extra == "dev"
|
|
47
48
|
Requires-Dist: mypy[faster-cache]==1.19.1; extra == "dev"
|
|
48
49
|
Requires-Dist: mypy-strict-kwargs==2026.1.12; extra == "dev"
|
|
49
|
-
Requires-Dist: prek==0.3.
|
|
50
|
+
Requires-Dist: prek==0.3.3; extra == "dev"
|
|
50
51
|
Requires-Dist: pydocstringformatter==0.7.5; extra == "dev"
|
|
51
52
|
Requires-Dist: pydocstyle==6.3; extra == "dev"
|
|
52
53
|
Requires-Dist: pylint[spelling]==4.0.4; extra == "dev"
|
|
53
54
|
Requires-Dist: pylint-per-file-ignores==3.2.0; extra == "dev"
|
|
54
|
-
Requires-Dist: pyproject-fmt==2.16.
|
|
55
|
-
Requires-Dist: pyrefly==0.
|
|
55
|
+
Requires-Dist: pyproject-fmt==2.16.1; extra == "dev"
|
|
56
|
+
Requires-Dist: pyrefly==0.53.0; extra == "dev"
|
|
56
57
|
Requires-Dist: pyright==1.1.408; extra == "dev"
|
|
57
58
|
Requires-Dist: pyroma==5.0.1; extra == "dev"
|
|
58
59
|
Requires-Dist: pytest==9.0.2; extra == "dev"
|
|
@@ -60,7 +61,7 @@ Requires-Dist: pytest-retry==1.7.0; extra == "dev"
|
|
|
60
61
|
Requires-Dist: pytest-xdist==3.8.0; extra == "dev"
|
|
61
62
|
Requires-Dist: python-dotenv==1.2.1; extra == "dev"
|
|
62
63
|
Requires-Dist: pyyaml==6.0.3; extra == "dev"
|
|
63
|
-
Requires-Dist: requests-mock-flask==2026.
|
|
64
|
+
Requires-Dist: requests-mock-flask==2026.2.16; extra == "dev"
|
|
64
65
|
Requires-Dist: ruff==0.15.1; extra == "dev"
|
|
65
66
|
Requires-Dist: shellcheck-py==0.11.0.1; extra == "dev"
|
|
66
67
|
Requires-Dist: shfmt-py==3.12.0.2; extra == "dev"
|
|
@@ -75,15 +76,15 @@ Requires-Dist: sphinxcontrib-httpdomain==2.0.0; extra == "dev"
|
|
|
75
76
|
Requires-Dist: sphinxcontrib-spelling==8.0.2; extra == "dev"
|
|
76
77
|
Requires-Dist: sybil==9.3.0; extra == "dev"
|
|
77
78
|
Requires-Dist: tenacity==9.1.4; extra == "dev"
|
|
78
|
-
Requires-Dist: ty==0.0.
|
|
79
|
+
Requires-Dist: ty==0.0.17; extra == "dev"
|
|
79
80
|
Requires-Dist: types-docker==7.1.0.20260109; extra == "dev"
|
|
80
81
|
Requires-Dist: types-pyyaml==6.0.12.20250915; extra == "dev"
|
|
81
82
|
Requires-Dist: types-requests==2.32.4.20260107; extra == "dev"
|
|
82
83
|
Requires-Dist: urllib3==2.6.3; extra == "dev"
|
|
83
84
|
Requires-Dist: vulture==2.14; extra == "dev"
|
|
84
|
-
Requires-Dist: vws-python==
|
|
85
|
+
Requires-Dist: vws-python==2026.2.15; extra == "dev"
|
|
85
86
|
Requires-Dist: vws-test-fixtures==2023.3.5; extra == "dev"
|
|
86
|
-
Requires-Dist: vws-web-tools==
|
|
87
|
+
Requires-Dist: vws-web-tools==2026.2.17.1; extra == "dev"
|
|
87
88
|
Requires-Dist: yamlfix==1.19.1; extra == "dev"
|
|
88
89
|
Requires-Dist: zizmor==1.22.0; extra == "dev"
|
|
89
90
|
Provides-Extra: release
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"""Create licenses and target databases for the tests to run against.
|
|
2
|
+
|
|
3
|
+
See the instructions in the contributing guide in the documentation.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import datetime
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
import textwrap
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from typing import TYPE_CHECKING
|
|
12
|
+
|
|
13
|
+
import vws_web_tools
|
|
14
|
+
from dotenv import load_dotenv
|
|
15
|
+
from selenium.common.exceptions import TimeoutException
|
|
16
|
+
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from selenium.webdriver.remote.webdriver import WebDriver
|
|
19
|
+
from vws_web_tools import DatabaseDict, VuMarkDatabaseDict
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
VUMARK_TEMPLATE_SVG_FILE_PATH = Path(__file__).with_name(
|
|
23
|
+
name="vumark_template.svg",
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _create_and_get_database_details(
|
|
28
|
+
driver: "WebDriver",
|
|
29
|
+
email_address: str,
|
|
30
|
+
password: str,
|
|
31
|
+
license_name: str,
|
|
32
|
+
database_name: str,
|
|
33
|
+
) -> "DatabaseDict":
|
|
34
|
+
"""Create a cloud database and get its details.
|
|
35
|
+
|
|
36
|
+
Returns database details.
|
|
37
|
+
"""
|
|
38
|
+
vws_web_tools.log_in(
|
|
39
|
+
driver=driver,
|
|
40
|
+
email_address=email_address,
|
|
41
|
+
password=password,
|
|
42
|
+
)
|
|
43
|
+
vws_web_tools.wait_for_logged_in(driver=driver)
|
|
44
|
+
vws_web_tools.create_license(driver=driver, license_name=license_name)
|
|
45
|
+
|
|
46
|
+
vws_web_tools.create_cloud_database(
|
|
47
|
+
driver=driver,
|
|
48
|
+
database_name=database_name,
|
|
49
|
+
license_name=license_name,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
return vws_web_tools.get_database_details(
|
|
53
|
+
driver=driver,
|
|
54
|
+
database_name=database_name,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _create_and_get_vumark_details(
|
|
59
|
+
driver: "WebDriver",
|
|
60
|
+
vumark_database_name: str,
|
|
61
|
+
) -> "VuMarkDatabaseDict":
|
|
62
|
+
"""Create a VuMark database and get its details.
|
|
63
|
+
|
|
64
|
+
Returns VuMark database details.
|
|
65
|
+
"""
|
|
66
|
+
vws_web_tools.create_vumark_database(
|
|
67
|
+
driver=driver,
|
|
68
|
+
database_name=vumark_database_name,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return vws_web_tools.get_vumark_database_details(
|
|
72
|
+
driver=driver,
|
|
73
|
+
database_name=vumark_database_name,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _generate_secrets_file_content(
|
|
78
|
+
database_details: "DatabaseDict",
|
|
79
|
+
vumark_details: "VuMarkDatabaseDict",
|
|
80
|
+
inactive_database_details: "DatabaseDict",
|
|
81
|
+
vumark_target_id: str,
|
|
82
|
+
) -> str:
|
|
83
|
+
"""Generate the content of a secrets file."""
|
|
84
|
+
return textwrap.dedent(
|
|
85
|
+
text=f"""\
|
|
86
|
+
VUFORIA_TARGET_MANAGER_DATABASE_NAME={database_details["database_name"]}
|
|
87
|
+
VUFORIA_SERVER_ACCESS_KEY={database_details["server_access_key"]}
|
|
88
|
+
VUFORIA_SERVER_SECRET_KEY={database_details["server_secret_key"]}
|
|
89
|
+
VUFORIA_CLIENT_ACCESS_KEY={database_details["client_access_key"]}
|
|
90
|
+
VUFORIA_CLIENT_SECRET_KEY={database_details["client_secret_key"]}
|
|
91
|
+
|
|
92
|
+
INACTIVE_VUFORIA_TARGET_MANAGER_DATABASE_NAME={inactive_database_details["database_name"]}
|
|
93
|
+
INACTIVE_VUFORIA_SERVER_ACCESS_KEY={inactive_database_details["server_access_key"]}
|
|
94
|
+
INACTIVE_VUFORIA_SERVER_SECRET_KEY={inactive_database_details["server_secret_key"]}
|
|
95
|
+
INACTIVE_VUFORIA_CLIENT_ACCESS_KEY={inactive_database_details["client_access_key"]}
|
|
96
|
+
INACTIVE_VUFORIA_CLIENT_SECRET_KEY={inactive_database_details["client_secret_key"]}
|
|
97
|
+
|
|
98
|
+
VUMARK_VUFORIA_TARGET_MANAGER_DATABASE_NAME={vumark_details["database_name"]}
|
|
99
|
+
VUMARK_VUFORIA_TARGET_ID={vumark_target_id}
|
|
100
|
+
VUMARK_VUFORIA_SERVER_ACCESS_KEY={vumark_details["server_access_key"]}
|
|
101
|
+
VUMARK_VUFORIA_SERVER_SECRET_KEY={vumark_details["server_secret_key"]}
|
|
102
|
+
""",
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def _create_and_get_vumark_target_id(
|
|
107
|
+
driver: "WebDriver",
|
|
108
|
+
vumark_database_name: str,
|
|
109
|
+
vumark_template_name: str,
|
|
110
|
+
) -> str:
|
|
111
|
+
"""Upload a VuMark template and get its target ID."""
|
|
112
|
+
vws_web_tools.upload_vumark_template(
|
|
113
|
+
driver=driver,
|
|
114
|
+
database_name=vumark_database_name,
|
|
115
|
+
svg_file_path=VUMARK_TEMPLATE_SVG_FILE_PATH,
|
|
116
|
+
template_name=vumark_template_name,
|
|
117
|
+
width=100.0,
|
|
118
|
+
)
|
|
119
|
+
return vws_web_tools.get_vumark_target_id(
|
|
120
|
+
driver=driver,
|
|
121
|
+
database_name=vumark_database_name,
|
|
122
|
+
target_name=vumark_template_name,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _create_vuforia_resource_names() -> tuple[str, str, str, str]:
|
|
127
|
+
"""Create names for Vuforia resources."""
|
|
128
|
+
time = datetime.datetime.now(tz=datetime.UTC).strftime(
|
|
129
|
+
format="%Y-%m-%d-%H-%M-%S",
|
|
130
|
+
)
|
|
131
|
+
return (
|
|
132
|
+
f"my-license-{time}",
|
|
133
|
+
f"my-database-{time}",
|
|
134
|
+
f"my-vumark-database-{time}",
|
|
135
|
+
f"my-vumark-template-{time}",
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def main() -> None:
|
|
140
|
+
"""Create secrets files."""
|
|
141
|
+
email_address = os.environ["VWS_EMAIL_ADDRESS"]
|
|
142
|
+
password = os.environ["VWS_PASSWORD"]
|
|
143
|
+
new_secrets_dir = Path(os.environ["NEW_SECRETS_DIR"]).expanduser()
|
|
144
|
+
existing_secrets_file = Path(
|
|
145
|
+
os.environ["EXISTING_SECRETS_FILE"]
|
|
146
|
+
).expanduser()
|
|
147
|
+
if not existing_secrets_file.exists():
|
|
148
|
+
msg = f"Existing secrets file does not exist: {existing_secrets_file}"
|
|
149
|
+
raise FileNotFoundError(msg)
|
|
150
|
+
load_dotenv(dotenv_path=existing_secrets_file)
|
|
151
|
+
inactive_database_details: DatabaseDict = {
|
|
152
|
+
"database_name": os.environ[
|
|
153
|
+
"INACTIVE_VUFORIA_TARGET_MANAGER_DATABASE_NAME"
|
|
154
|
+
],
|
|
155
|
+
"server_access_key": os.environ["INACTIVE_VUFORIA_SERVER_ACCESS_KEY"],
|
|
156
|
+
"server_secret_key": os.environ["INACTIVE_VUFORIA_SERVER_SECRET_KEY"],
|
|
157
|
+
"client_access_key": os.environ["INACTIVE_VUFORIA_CLIENT_ACCESS_KEY"],
|
|
158
|
+
"client_secret_key": os.environ["INACTIVE_VUFORIA_CLIENT_SECRET_KEY"],
|
|
159
|
+
}
|
|
160
|
+
new_secrets_dir.mkdir(exist_ok=True)
|
|
161
|
+
|
|
162
|
+
num_databases = 100
|
|
163
|
+
required_files = [
|
|
164
|
+
(new_secrets_dir / f"vuforia_secrets_{i}.env")
|
|
165
|
+
for i in range(num_databases)
|
|
166
|
+
]
|
|
167
|
+
files_to_create = [file for file in required_files if not file.exists()]
|
|
168
|
+
driver: WebDriver | None = None
|
|
169
|
+
|
|
170
|
+
while files_to_create:
|
|
171
|
+
if driver is None:
|
|
172
|
+
driver = vws_web_tools.create_chrome_driver()
|
|
173
|
+
file = files_to_create[-1]
|
|
174
|
+
sys.stdout.write(f"Creating database {file.name}\n")
|
|
175
|
+
(
|
|
176
|
+
license_name,
|
|
177
|
+
database_name,
|
|
178
|
+
vumark_database_name,
|
|
179
|
+
vumark_template_name,
|
|
180
|
+
) = _create_vuforia_resource_names()
|
|
181
|
+
|
|
182
|
+
try:
|
|
183
|
+
database_details = _create_and_get_database_details(
|
|
184
|
+
driver=driver,
|
|
185
|
+
email_address=email_address,
|
|
186
|
+
password=password,
|
|
187
|
+
license_name=license_name,
|
|
188
|
+
database_name=database_name,
|
|
189
|
+
)
|
|
190
|
+
except TimeoutException:
|
|
191
|
+
sys.stderr.write(
|
|
192
|
+
"Timed out waiting for database setup/details after retries\n"
|
|
193
|
+
)
|
|
194
|
+
driver.quit()
|
|
195
|
+
driver = None
|
|
196
|
+
continue
|
|
197
|
+
|
|
198
|
+
try:
|
|
199
|
+
vumark_details = _create_and_get_vumark_details(
|
|
200
|
+
driver=driver,
|
|
201
|
+
vumark_database_name=vumark_database_name,
|
|
202
|
+
)
|
|
203
|
+
except TimeoutException:
|
|
204
|
+
sys.stderr.write(
|
|
205
|
+
"Timed out waiting for VuMark setup/details after retries\n"
|
|
206
|
+
)
|
|
207
|
+
driver.quit()
|
|
208
|
+
driver = None
|
|
209
|
+
continue
|
|
210
|
+
|
|
211
|
+
try:
|
|
212
|
+
vumark_target_id = _create_and_get_vumark_target_id(
|
|
213
|
+
driver=driver,
|
|
214
|
+
vumark_database_name=vumark_database_name,
|
|
215
|
+
vumark_template_name=vumark_template_name,
|
|
216
|
+
)
|
|
217
|
+
except TimeoutException:
|
|
218
|
+
sys.stderr.write(
|
|
219
|
+
"Timed out waiting for VuMark template upload after retries\n"
|
|
220
|
+
)
|
|
221
|
+
driver.quit()
|
|
222
|
+
driver = None
|
|
223
|
+
continue
|
|
224
|
+
|
|
225
|
+
driver.quit()
|
|
226
|
+
driver = None
|
|
227
|
+
|
|
228
|
+
file_contents = _generate_secrets_file_content(
|
|
229
|
+
database_details=database_details,
|
|
230
|
+
vumark_details=vumark_details,
|
|
231
|
+
inactive_database_details=inactive_database_details,
|
|
232
|
+
vumark_target_id=vumark_target_id,
|
|
233
|
+
)
|
|
234
|
+
file.write_text(data=file_contents)
|
|
235
|
+
sys.stdout.write(f"Created database {file.name}\n")
|
|
236
|
+
files_to_create.pop()
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
if __name__ == "__main__":
|
|
240
|
+
main()
|