Skip to content

Commit 50f1af0

Browse files
committed
Merge remote-tracking branch 'origin/main' into dependabot/pip/numpy-lt-3.0.0
2 parents c953138 + b30f32e commit 50f1af0

File tree

106 files changed

+2675
-1909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2675
-1909
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.git_archival.txt export-subst
2+
* text=auto eol=lf

.github/dependabot.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
---
12
version: 2
3+
24
updates:
3-
- package-ecosystem: pip
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
8-
- package-ecosystem: "github-actions"
9-
directory: "/"
10-
schedule:
11-
interval: daily
5+
- package-ecosystem: pip
6+
directory: /
7+
schedule:
8+
interval: daily
9+
open-pull-requests-limit: 10
10+
- package-ecosystem: github-actions
11+
directory: /
12+
schedule:
13+
interval: daily

.github/workflows/ci.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
schedule:
1111
# * is a special character in YAML so you have to quote this string
1212
# Run at 1:00 every day
13-
- cron: '0 1 * * *'
13+
- cron: 0 1 * * *
1414
workflow_dispatch: {}
1515

1616
# We share Vuforia credentials and therefore Vuforia databases across
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
python-version: ["3.12"]
29+
python-version: ['3.12']
3030
ci_pattern:
3131
- tests/mock_vws/test_query.py::TestContentType
3232
- tests/mock_vws/test_query.py::TestSuccess
@@ -124,12 +124,10 @@ jobs:
124124
# See https://github.com/codecov/codecov-action/issues/190.
125125
fetch-depth: 2
126126

127-
- name: "Set up Python"
128-
uses: actions/setup-python@v5
129-
with:
130-
python-version: ${{ matrix.python-version }}
127+
- name: Install uv
128+
uses: astral-sh/setup-uv@v3
131129

132-
- name: "Set secrets file"
130+
- name: Set secrets file
133131
run: |
134132
# See the "CI Setup" document for details of how this was set up.
135133
ci/decrypt_secret.sh
@@ -140,12 +138,6 @@ jobs:
140138
ENCRYPTED_FILE: secrets.tar.gpg
141139
LARGE_SECRET_PASSPHRASE: ${{ secrets.PASSPHRASE_FOR_VUFORIA_SECRETS }}
142140

143-
# We do not use the cache action as uv is faster than the cache action.
144-
- name: "Install dependencies"
145-
run: |
146-
curl -LsSf https://astral.sh/uv/install.sh | sh
147-
uv pip install --system --upgrade --editable .[dev]
148-
149141
# We have seen issues with running out of disk space on test_docker
150142
- name: Free Disk Space (Ubuntu)
151143
uses: jlumbroso/free-disk-space@main
@@ -161,9 +153,9 @@ jobs:
161153
dotnet: true
162154
haskell: true
163155

164-
- name: "Run tests"
156+
- name: Run tests
165157
run: |
166-
pytest \
158+
uv run --extra=dev pytest \
167159
-s \
168160
-vvv \
169161
--showlocals \
@@ -172,8 +164,10 @@ jobs:
172164
--cov=tests/ \
173165
--cov-report=xml \
174166
${{ matrix.ci_pattern }}
167+
env:
168+
UV_PYTHON: ${{ matrix.python-version }}
175169

176-
- name: "Show coverage file"
170+
- name: Show coverage file
177171
run: |
178172
# Sometimes we have been sure that we have 100% coverage, but codecov
179173
# says otherwise.
@@ -190,12 +184,12 @@ jobs:
190184
#
191185
# To work around this, we do not upload coverage data on scheduled runs.
192186
# We print the event name here to help with debugging.
193-
- name: "Show event name"
187+
- name: Show event name
194188
run: |
195189
echo ${{ github.event_name }}
196190
197-
- name: "Upload coverage to Codecov"
198-
uses: "codecov/codecov-action@v4"
191+
- name: Upload coverage to Codecov
192+
uses: codecov/codecov-action@v4
199193
with:
200194
fail_ci_if_error: true
201195
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/docker-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
schedule:
1515
# * is a special character in YAML so you have to quote this string
1616
# Run at 1:00 every day
17-
- cron: '0 1 * * *'
17+
- cron: 0 1 * * *
1818
workflow_dispatch: {}
1919

2020
jobs:
@@ -39,11 +39,11 @@ jobs:
3939
uses: docker/setup-buildx-action@v3
4040

4141
- name: Build Docker image
42-
uses: docker/build-push-action@v6.7.0
42+
uses: docker/build-push-action@v6.9.0
4343
with:
4444
platforms: linux/amd64,linux/arm64
4545
file: src/mock_vws/_flask_server/Dockerfile
4646
push: false
4747
target: ${{ matrix.image.name }}
48-
tags: |
48+
tags: |-
4949
adamtheturtle/vuforia-${{ matrix.image.name }}-mock:latest

.github/workflows/lint.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,32 @@ on:
1010
schedule:
1111
# * is a special character in YAML so you have to quote this string
1212
# Run at 1:00 every day
13-
- cron: '0 1 * * *'
13+
- cron: 0 1 * * *
1414
workflow_dispatch: {}
1515

1616
jobs:
1717
build:
1818

19-
runs-on: ubuntu-latest
20-
2119
strategy:
2220
matrix:
23-
python-version: ["3.12"]
21+
python-version: ['3.12']
22+
platform: [ubuntu-latest, windows-latest]
23+
24+
runs-on: ${{ matrix.platform }}
25+
2426
steps:
2527
- uses: actions/checkout@v4
26-
- name: "Set up Python"
27-
uses: actions/setup-python@v5
28-
with:
29-
python-version: ${{ matrix.python-version }}
3028

31-
# We do not use the cache action as uv is faster than the cache action.
32-
- name: "Install dependencies"
33-
run: |
34-
curl -LsSf https://astral.sh/uv/install.sh | sh
35-
uv pip install --system --upgrade --editable .[dev]
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v3
3631

37-
- name: "Lint"
32+
- name: Lint
3833
run: |
39-
pre-commit run --all-files --hook-stage commit --verbose
40-
pre-commit run --all-files --hook-stage push --verbose
41-
pre-commit run --all-files --hook-stage manual --verbose
34+
uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose
35+
uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose
36+
uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose
37+
env:
38+
UV_PYTHON: ${{ matrix.python-version }}
4239

43-
- uses: pre-commit-ci/lite-action@v1.0.2
40+
- uses: pre-commit-ci/lite-action@v1.1.0
4441
if: always()

.github/workflows/release.yml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,47 +22,51 @@ jobs:
2222

2323
strategy:
2424
matrix:
25-
python-version: ["3.12"]
25+
python-version: ['3.12']
2626

2727
steps:
2828
- uses: actions/checkout@v4
2929

30-
- name: "Set up Python"
31-
uses: actions/setup-python@v5
32-
with:
33-
python-version: ${{ matrix.python-version }}
30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v3
3432

35-
- name: "Calver calculate version"
33+
- name: Calver calculate version
3634
uses: StephaneBour/actions-calver@master
3735
id: calver
3836
with:
39-
date_format: "%Y.%m.%d"
37+
date_format: '%Y.%m.%d'
4038
release: false
4139
env:
4240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4341

44-
- name: "Update changelog"
42+
- name: Get the changelog underline
43+
id: changelog_underline
44+
run: |
45+
underline="$(echo "${{ steps.calver.outputs.release }}" | tr -c '\n' '-')"
46+
echo "underline=${underline}" >> "$GITHUB_OUTPUT"
47+
48+
- name: Update changelog
4549
uses: jacobtomlinson/gha-find-replace@v3
46-
env:
47-
NEXT_VERSION: ${{ steps.calver.outputs.release }}
4850
with:
4951
find: "Next\n----"
50-
replace: "Next\n----\n\n${{ env.NEXT_VERSION }}\n------------"
51-
include: "CHANGELOG.rst"
52+
replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\
53+
\ }}"
54+
include: CHANGELOG.rst
5255
regex: false
5356

5457
- uses: stefanzweifel/git-auto-commit-action@v5
5558
id: commit
5659
with:
5760
commit_message: Bump CHANGELOG
61+
file_pattern: CHANGELOG.rst
5862

5963
- name: Bump version and push tag
6064
id: tag_version
6165
uses: mathieudutour/github-tag-action@v6.2
6266
with:
6367
github_token: ${{ secrets.GITHUB_TOKEN }}
6468
custom_tag: ${{ steps.calver.outputs.release }}
65-
tag_prefix: ""
69+
tag_prefix: ''
6670
commit_sha: ${{ steps.commit.outputs.commit_hash }}
6771

6872
- name: Create a GitHub release
@@ -74,12 +78,10 @@ jobs:
7478

7579
- name: Build a binary wheel and a source tarball
7680
run: |
77-
# Checkout the latest tag - the one we just created.
7881
git fetch --tags
79-
git checkout "$(git describe --tags "$(git rev-list --tags --max-count=1)")"
80-
python -m pip install build check-wheel-contents
81-
python -m build --sdist --wheel --outdir dist/ .
82-
check-wheel-contents dist/*.whl
82+
git checkout ${{ steps.tag_version.outputs.new_tag }}
83+
uv build --sdist --wheel --out-dir dist/
84+
uv run --extra=release check-wheel-contents dist/*.whl
8385
8486
# We use PyPI trusted publishing rather than a PyPI API token.
8587
# See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing.
@@ -101,7 +103,7 @@ jobs:
101103
uses: docker/setup-qemu-action@v3
102104

103105
- name: Build and push target manager Docker image
104-
uses: docker/build-push-action@v6.7.0
106+
uses: docker/build-push-action@v6.9.0
105107
with:
106108
file: src/mock_vws/_flask_server/Dockerfile
107109
platforms: linux/amd64,linux/arm64
@@ -112,7 +114,7 @@ jobs:
112114
adamtheturtle/vuforia-target-manager-mock:${{ steps.calver.outputs.release }}
113115
114116
- name: Build and push VWS Docker image
115-
uses: docker/build-push-action@v6.7.0
117+
uses: docker/build-push-action@v6.9.0
116118
with:
117119
file: src/mock_vws/_flask_server/Dockerfile
118120
platforms: linux/amd64,linux/arm64
@@ -123,12 +125,12 @@ jobs:
123125
adamtheturtle/vuforia-vws-mock:${{ steps.calver.outputs.release }}
124126
125127
- name: Build and push VWQ Docker image
126-
uses: docker/build-push-action@v6.7.0
128+
uses: docker/build-push-action@v6.9.0
127129
with:
128130
file: src/mock_vws/_flask_server/Dockerfile
129131
platforms: linux/amd64,linux/arm64
130132
push: true
131133
target: vwq
132-
tags: |
134+
tags: |-
133135
adamtheturtle/vuforia-vwq-mock:latest
134136
adamtheturtle/vuforia-vwq-mock:${{ steps.calver.outputs.release }}

.github/workflows/skip-tests.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ on:
1212
schedule:
1313
# * is a special character in YAML so you have to quote this string
1414
# Run at 1:00 every day
15-
- cron: '0 1 * * *'
15+
- cron: 0 1 * * *
1616
workflow_dispatch: {}
1717

1818
jobs:
1919
build:
2020

2121
strategy:
2222
matrix:
23-
python-version: ["3.12"]
23+
python-version: ['3.12']
2424
platform: [ubuntu-latest]
2525

2626
runs-on: ${{ matrix.platform }}
@@ -31,24 +31,16 @@ jobs:
3131
# See https://github.com/codecov/codecov-action/issues/190.
3232
fetch-depth: 2
3333

34-
- name: "Set up Python"
35-
uses: actions/setup-python@v5
36-
with:
37-
python-version: ${{ matrix.python-version }}
38-
39-
# We do not use the cache action as uv is faster than the cache action.
40-
- name: "Install dependencies"
41-
run: |
42-
curl -LsSf https://astral.sh/uv/install.sh | sh
43-
uv pip install --system --upgrade --editable .[dev]
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@v3
4436

45-
- name: "Set secrets file"
37+
- name: Set secrets file
4638
run: |
4739
cp ./vuforia_secrets.env.example ./vuforia_secrets.env
4840
49-
- name: "Run tests"
41+
- name: Run tests
5042
run: |
51-
pytest \
43+
uv run --extra=dev pytest \
5244
--skip-docker_build_tests \
5345
--skip-docker_in_memory \
5446
--skip-mock \
@@ -59,9 +51,11 @@ jobs:
5951
--cov=src/ \
6052
--cov=tests/ \
6153
--cov-report=xml \
62-
tests/mock_vws/
54+
.
55+
env:
56+
UV_PYTHON: ${{ matrix.python-version }}
6357

64-
- name: "Show coverage file"
58+
- name: Show coverage file
6559
run: |
6660
# Sometimes we have been sure that we have 100% coverage, but codecov
6761
# says otherwise.
@@ -78,12 +72,12 @@ jobs:
7872
#
7973
# To work around this, we do not upload coverage data on scheduled runs.
8074
# We print the event name here to help with debugging.
81-
- name: "Show event name"
75+
- name: Show event name
8276
run: |
8377
echo ${{ github.event_name }}
8478
85-
- name: "Upload coverage to Codecov"
86-
uses: "codecov/codecov-action@v4"
79+
- name: Upload coverage to Codecov
80+
uses: codecov/codecov-action@v4
8781
with:
8882
fail_ci_if_error: true
8983
# See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954

0 commit comments

Comments
 (0)