pytest-boorst 0.1.0a6__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.
Files changed (40) hide show
  1. pytest_boorst-0.1.0a6/.github/workflows/ci.yml +356 -0
  2. pytest_boorst-0.1.0a6/.github/workflows/publish.yml +81 -0
  3. pytest_boorst-0.1.0a6/.gitignore +13 -0
  4. pytest_boorst-0.1.0a6/.python-version +1 -0
  5. pytest_boorst-0.1.0a6/CONTRIBUTING.md +59 -0
  6. pytest_boorst-0.1.0a6/Cargo.lock +132 -0
  7. pytest_boorst-0.1.0a6/Cargo.toml +21 -0
  8. pytest_boorst-0.1.0a6/LICENSE +70 -0
  9. pytest_boorst-0.1.0a6/PKG-INFO +192 -0
  10. pytest_boorst-0.1.0a6/README.md +175 -0
  11. pytest_boorst-0.1.0a6/benchmarks/README.md +145 -0
  12. pytest_boorst-0.1.0a6/benchmarks/discovery.py +151 -0
  13. pytest_boorst-0.1.0a6/benchmarks/memory.py +116 -0
  14. pytest_boorst-0.1.0a6/benchmarks/results/alpha2-discovery-ci.json +72 -0
  15. pytest_boorst-0.1.0a6/benchmarks/results/alpha2-ids-ci.json +409 -0
  16. pytest_boorst-0.1.0a6/benchmarks/results/alpha2-python314-discovery-ci.json +72 -0
  17. pytest_boorst-0.1.0a6/benchmarks/results/alpha2-python314-ids-ci.json +409 -0
  18. pytest_boorst-0.1.0a6/benchmarks/results/alpha4-multiple-directories-local.json +73 -0
  19. pytest_boorst-0.1.0a6/benchmarks/results/async-unzip.json +152 -0
  20. pytest_boorst-0.1.0a6/benchmarks/results/initial-alpha.json +404 -0
  21. pytest_boorst-0.1.0a6/benchmarks/run.py +254 -0
  22. pytest_boorst-0.1.0a6/pyproject.toml +52 -0
  23. pytest_boorst-0.1.0a6/python/pytest_boorst/__init__.py +4 -0
  24. pytest_boorst-0.1.0a6/python/pytest_boorst/__main__.py +15 -0
  25. pytest_boorst-0.1.0a6/python/pytest_boorst/_discovery.py +207 -0
  26. pytest_boorst-0.1.0a6/python/pytest_boorst/_ids.py +29 -0
  27. pytest_boorst-0.1.0a6/python/pytest_boorst/plugin.py +161 -0
  28. pytest_boorst-0.1.0a6/scripts/build_pure.py +50 -0
  29. pytest_boorst-0.1.0a6/scripts/prepare_release.py +123 -0
  30. pytest_boorst-0.1.0a6/scripts/smoke.py +82 -0
  31. pytest_boorst-0.1.0a6/scripts/try.py +54 -0
  32. pytest_boorst-0.1.0a6/scripts/verify_trial.py +127 -0
  33. pytest_boorst-0.1.0a6/src/lib.rs +86 -0
  34. pytest_boorst-0.1.0a6/tests/conftest.py +1 -0
  35. pytest_boorst-0.1.0a6/tests/test_discovery.py +369 -0
  36. pytest_boorst-0.1.0a6/tests/test_ids.py +43 -0
  37. pytest_boorst-0.1.0a6/tests/test_plugin.py +389 -0
  38. pytest_boorst-0.1.0a6/tests/test_release.py +119 -0
  39. pytest_boorst-0.1.0a6/tests/test_trial.py +109 -0
  40. pytest_boorst-0.1.0a6/uv.lock +431 -0
@@ -0,0 +1,356 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ workflow_call:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ concurrency:
15
+ group: ci-${{ github.ref }}
16
+ cancel-in-progress: true
17
+
18
+ jobs:
19
+ quality:
20
+ runs-on: ubuntu-24.04
21
+ steps:
22
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
23
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
24
+ with:
25
+ version: "0.12.12"
26
+ python-version: "3.12"
27
+ enable-cache: true
28
+ - uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable
29
+ with:
30
+ components: rustfmt, clippy
31
+ - uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
32
+ - run: uv sync --locked --no-install-project
33
+ - run: uv run --no-sync ruff check .
34
+ - run: uv run --no-sync ruff format --check .
35
+ - run: cargo fmt --check
36
+ - run: cargo clippy --locked --all-targets -- -D warnings
37
+ - run: cargo test --locked --lib
38
+
39
+ wheels:
40
+ name: Wheel / ${{ matrix.os }} / Python ${{ matrix.python }}
41
+ runs-on: ${{ matrix.os }}
42
+ defaults:
43
+ run:
44
+ shell: bash
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ os: [ubuntu-24.04]
49
+ python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
50
+ include:
51
+ - os: macos-14
52
+ python: "3.12"
53
+ - os: windows-latest
54
+ python: "3.12"
55
+ steps:
56
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
57
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
58
+ with:
59
+ version: "0.12.12"
60
+ python-version: ${{ matrix.python }}
61
+ enable-cache: true
62
+ - uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable
63
+ - uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
64
+ - run: uv sync --locked --no-install-project
65
+ - run: uv run --no-sync maturin build --release --locked --out dist
66
+ - name: Install the wheel into the clean test environment
67
+ run: |
68
+ uv pip install --only-binary :all: dist/*.whl
69
+ - run: uv run --no-sync pytest -q
70
+ - run: uv run --no-sync python scripts/smoke.py --pytest-version 9.1.1
71
+ - name: Verify portable trial
72
+ if: matrix.os != 'windows-latest'
73
+ run: uv run --no-sync python scripts/verify_trial.py --wheels dist --expect-native
74
+ - name: Verify portable trial in PowerShell
75
+ if: matrix.os == 'windows-latest'
76
+ shell: pwsh
77
+ run: uv run --no-sync python scripts/verify_trial.py --wheels dist --expect-native
78
+ - name: Build the universal fallback wheel
79
+ if: matrix.python == '3.12' && (matrix.os == 'ubuntu-24.04' || matrix.os == 'windows-latest')
80
+ run: uv run --no-sync python scripts/build_pure.py
81
+ - name: Verify the universal fallback trial
82
+ if: matrix.os == 'ubuntu-24.04' && matrix.python == '3.12'
83
+ run: uv run --no-sync python scripts/verify_trial.py --wheels dist/pure
84
+ - name: Verify the universal fallback trial in PowerShell
85
+ if: matrix.os == 'windows-latest'
86
+ shell: pwsh
87
+ run: uv run --no-sync python scripts/verify_trial.py --wheels dist/pure
88
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
89
+ if: matrix.os == 'ubuntu-24.04' && matrix.python == '3.12'
90
+ with:
91
+ name: wheel-universal
92
+ path: dist/pure/*.whl
93
+ if-no-files-found: error
94
+ - name: Preserve legacy pytest versions during normal wheel installation
95
+ if: matrix.os == 'ubuntu-24.04' && matrix.python == '3.10'
96
+ run: |
97
+ for pytest_version in 6.2.5 7.4.4; do
98
+ legacy_env=".legacy-pytest-$pytest_version"
99
+ uv venv --python 3.10 "$legacy_env"
100
+ uv pip install --python "$legacy_env/bin/python" "pytest==$pytest_version"
101
+ uv pip install --python "$legacy_env/bin/python" --only-binary :all: dist/*.whl
102
+ "$legacy_env/bin/python" scripts/smoke.py --expect fallback --pytest-version "$pytest_version"
103
+ done
104
+ - name: Verify stable pytest versions with the installed wheel
105
+ if: matrix.os == 'ubuntu-24.04' && matrix.python == '3.12'
106
+ run: |
107
+ for pytest_version in 9.0.2 9.0.3; do
108
+ uv pip install "pytest==$pytest_version"
109
+ uv pip install --only-binary :all: dist/*.whl
110
+ uv run --no-sync pytest -q
111
+ uv run --no-sync python scripts/smoke.py --pytest-version "$pytest_version"
112
+ done
113
+ - name: Check unsupported pytest fallback
114
+ if: matrix.os == 'ubuntu-24.04' && matrix.python == '3.12'
115
+ run: |
116
+ uv pip install pytest==8.4.2
117
+ uv pip install --only-binary :all: dist/*.whl
118
+ uv run --no-sync python scripts/smoke.py --expect fallback --pytest-version 8.4.2
119
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
120
+ with:
121
+ name: wheel-${{ matrix.os }}-py${{ matrix.python }}
122
+ path: dist/*.whl
123
+ if-no-files-found: error
124
+
125
+ desktop-wheels:
126
+ name: Wheel / ${{ matrix.name }} / Python 3.12
127
+ runs-on: ${{ matrix.os }}
128
+ defaults:
129
+ run:
130
+ shell: bash
131
+ strategy:
132
+ fail-fast: false
133
+ matrix:
134
+ include:
135
+ - name: macos-x86_64
136
+ os: macos-15-intel
137
+ architecture: x64
138
+ target: x86_64-apple-darwin
139
+ bits: 64
140
+ - name: windows-x86
141
+ os: windows-2022
142
+ architecture: x86
143
+ target: i686-pc-windows-msvc
144
+ bits: 32
145
+ - name: windows-arm64
146
+ os: windows-11-arm
147
+ architecture: arm64
148
+ target: aarch64-pc-windows-msvc
149
+ bits: 64
150
+ steps:
151
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
152
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
153
+ with:
154
+ python-version: "3.12"
155
+ architecture: ${{ matrix.architecture }}
156
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
157
+ with:
158
+ version: "0.12.12"
159
+ enable-cache: true
160
+ - uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable
161
+ with:
162
+ targets: ${{ matrix.target }}
163
+ - uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
164
+ - name: Select the matching Python interpreter
165
+ env:
166
+ EXPECTED_BITS: ${{ matrix.bits }}
167
+ run: |
168
+ python -c 'import os, struct; assert struct.calcsize("P") * 8 == int(os.environ["EXPECTED_BITS"])'
169
+ uv sync --locked --no-install-project --python "$(python -c 'import sys; print(sys.executable)')"
170
+ - name: Build and install the native wheel
171
+ env:
172
+ RUST_TARGET: ${{ matrix.target }}
173
+ run: |
174
+ uv run --no-sync maturin build --release --locked --target "$RUST_TARGET" --interpreter "$(python -c 'import sys; print(sys.executable)')" --out dist
175
+ uv pip install --only-binary :all: dist/*.whl
176
+ - run: uv run --no-sync pytest -q
177
+ - run: uv run --no-sync python scripts/smoke.py --pytest-version 9.1.1
178
+ - name: Verify portable trial
179
+ if: runner.os != 'Windows'
180
+ run: uv run --no-sync python scripts/verify_trial.py --wheels dist --expect-native
181
+ - name: Verify portable trial in PowerShell
182
+ if: runner.os == 'Windows'
183
+ shell: pwsh
184
+ run: uv run --no-sync python scripts/verify_trial.py --wheels dist --expect-native
185
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
186
+ with:
187
+ name: wheel-${{ matrix.name }}
188
+ path: dist/*.whl
189
+ if-no-files-found: error
190
+
191
+ linux-wheels:
192
+ name: Wheel / ${{ matrix.name }} / Python 3.12
193
+ runs-on: ${{ matrix.os }}
194
+ strategy:
195
+ fail-fast: false
196
+ matrix:
197
+ include:
198
+ - name: manylinux-x86_64
199
+ os: ubuntu-24.04
200
+ target: x86_64-unknown-linux-gnu
201
+ compatibility: "2014"
202
+ bits: 64
203
+ image: quay.io/pypa/manylinux2014_x86_64@sha256:ffd6d1f11237599748657996b750db6b3a5b724fea5a81cd9ea65add4f45b6c9
204
+ - name: manylinux-aarch64
205
+ os: ubuntu-24.04-arm
206
+ target: aarch64-unknown-linux-gnu
207
+ compatibility: "2014"
208
+ bits: 64
209
+ image: quay.io/pypa/manylinux2014_aarch64@sha256:9026a55e05e76ad74d9a4e6be814a5abda26cde08b1baa659ea4f7ee16b246e3
210
+ - name: manylinux-i686
211
+ os: ubuntu-24.04
212
+ target: i686-unknown-linux-gnu
213
+ compatibility: "2014"
214
+ bits: 32
215
+ image: quay.io/pypa/manylinux2014_i686@sha256:b82fab2ed4674093372106a6d0c511039bbce3c69a6fc1a7d703d770bb348c2b
216
+ - name: musllinux-x86_64
217
+ os: ubuntu-24.04
218
+ target: x86_64-unknown-linux-musl
219
+ compatibility: musllinux_1_2
220
+ bits: 64
221
+ image: quay.io/pypa/musllinux_1_2_x86_64@sha256:ff786af69d772d7ac3e318c00a2b682428a352cc822d6175f6a0d4b431c0d44d
222
+ - name: musllinux-aarch64
223
+ os: ubuntu-24.04-arm
224
+ target: aarch64-unknown-linux-musl
225
+ compatibility: musllinux_1_2
226
+ bits: 64
227
+ image: quay.io/pypa/musllinux_1_2_aarch64@sha256:09c35642d008faa6d43a45809ff068e22f37bba801f7d75faf19431aefed579d
228
+ - name: musllinux-i686
229
+ os: ubuntu-24.04
230
+ target: i686-unknown-linux-musl
231
+ compatibility: musllinux_1_2
232
+ bits: 32
233
+ image: quay.io/pypa/musllinux_1_2_i686@sha256:1dd91376182cb65bd594fec2043ed7045a0482dee5b4c7685dcc743dc6259a9d
234
+ builder: ghcr.io/rust-cross/rust-musl-cross@sha256:e515546ceeb7fef8a70e7a59198981f5851cbcf16dd8d1adeb28736ea4751e05
235
+ steps:
236
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
237
+ - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
238
+ with:
239
+ maturin-version: v1.15.0
240
+ target: ${{ matrix.target }}
241
+ manylinux: ${{ matrix.compatibility }}
242
+ container: ${{ matrix.builder || matrix.image }}
243
+ args: --release --locked --out dist --interpreter python3.12
244
+ - name: Test the wheel in the matching Linux runtime
245
+ env:
246
+ RUNTIME_IMAGE: ${{ matrix.image }}
247
+ EXPECTED_BITS: ${{ matrix.bits }}
248
+ run: |
249
+ docker run --rm --volume "$GITHUB_WORKSPACE:/io" --workdir /io --env EXPECTED_BITS "$RUNTIME_IMAGE" bash -eu -c '
250
+ export PATH=/opt/python/cp312-cp312/bin:$PATH
251
+ python -c "import os, struct; assert struct.calcsize(\"P\") * 8 == int(os.environ[\"EXPECTED_BITS\"])"
252
+ python -m pip install uv==0.12.12
253
+ uv sync --locked --no-install-project --python /opt/python/cp312-cp312/bin/python
254
+ uv pip install --only-binary :all: dist/*.whl
255
+ uv run --no-sync pytest -q
256
+ uv run --no-sync python scripts/smoke.py --pytest-version 9.1.1
257
+ uv run --no-sync python scripts/verify_trial.py --wheels dist --expect-native
258
+ '
259
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
260
+ with:
261
+ name: wheel-${{ matrix.name }}
262
+ path: dist/*.whl
263
+ if-no-files-found: error
264
+
265
+ sdist:
266
+ runs-on: ubuntu-24.04
267
+ steps:
268
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
269
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
270
+ with:
271
+ version: "0.12.12"
272
+ python-version: "3.12"
273
+ enable-cache: true
274
+ - uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable
275
+ - run: uv sync --locked --no-install-project
276
+ - run: uv run --no-sync maturin sdist --out dist
277
+ - name: Build a wheel from the source distribution
278
+ run: uv build dist/*.tar.gz --wheel --out-dir rebuilt
279
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
280
+ with:
281
+ name: source-distribution
282
+ path: dist/*.tar.gz
283
+ if-no-files-found: error
284
+
285
+ distributions:
286
+ needs: [wheels, desktop-wheels, linux-wheels, sdist]
287
+ runs-on: ubuntu-24.04
288
+ steps:
289
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
290
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
291
+ with:
292
+ version: "0.12.12"
293
+ python-version: "3.12"
294
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
295
+ with:
296
+ path: artifacts
297
+ - name: Assemble the canonical tested distributions
298
+ run: |
299
+ release_tag=$(uv run --no-project python -c 'import tomllib; print("v" + tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')
300
+ uv run --no-project python scripts/prepare_release.py --artifacts artifacts --output dist --tag "$release_tag" --source-commit "$GITHUB_SHA"
301
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
302
+ with:
303
+ name: pypi-dist
304
+ path: dist/*
305
+ if-no-files-found: error
306
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
307
+ with:
308
+ name: release-evidence
309
+ path: release-evidence/*
310
+ if-no-files-found: error
311
+
312
+ benchmark:
313
+ needs: quality
314
+ runs-on: ubuntu-24.04
315
+ steps:
316
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
317
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
318
+ with:
319
+ version: "0.12.23"
320
+ python-version: "3.14.8"
321
+ enable-cache: true
322
+ - uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable
323
+ - uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
324
+ - run: uv sync --locked --no-install-project
325
+ - run: uv run --no-sync maturin develop --release --locked
326
+ - run: uv run --no-sync python benchmarks/run.py --size 10000 --repeats 3
327
+ - run: uv run --no-sync python benchmarks/memory.py --repeats 3
328
+ - run: uv run --no-sync python benchmarks/discovery.py --repeats 3
329
+ - run: uv run --no-sync python benchmarks/discovery.py --directories 4 --repeats 3 --output benchmark-results-multiple-directories.json
330
+ - name: Verify target and native helper timings
331
+ run: |
332
+ uv run --no-sync python - <<'PY'
333
+ import json
334
+ result = json.load(open("benchmark-results.json"))
335
+ target = result["scenarios"]["duplicate"]
336
+ times = target["full_run"]["median_seconds"]
337
+ if times["rust"] > times["stock"] * 0.9:
338
+ raise SystemExit(f"Duplicate target not met: {times}")
339
+ component = target["component_median_seconds"]
340
+ if component["rust"] >= component["python"]:
341
+ raise SystemExit(f"Native helper target not met: {component}")
342
+ for control in ("unique", "small"):
343
+ if result["scenarios"][control]["state"]["rust"]["native_calls"] != 0:
344
+ raise SystemExit(f"Native helper unexpectedly used by {control}")
345
+ for filename in ("benchmark-results-discovery.json", "benchmark-results-multiple-directories.json"):
346
+ discovery = json.load(open(filename))
347
+ times = discovery["median_seconds"]
348
+ if times["enabled"] > times["stock"] * 0.95:
349
+ raise SystemExit(f"Directory discovery target not met for {filename}: {times}")
350
+ PY
351
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
352
+ if: always()
353
+ with:
354
+ name: benchmark-evidence
355
+ path: benchmark-results*.json
356
+ if-no-files-found: warn
@@ -0,0 +1,81 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ concurrency:
11
+ group: publish-${{ github.event.release.tag_name }}
12
+ cancel-in-progress: false
13
+
14
+ jobs:
15
+ verify-source:
16
+ runs-on: ubuntu-24.04
17
+ steps:
18
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
19
+ with:
20
+ fetch-depth: 0
21
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
22
+ with:
23
+ version: "0.12.12"
24
+ python-version: "3.12"
25
+ - name: Verify the release tag and source
26
+ env:
27
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
28
+ run: |
29
+ git fetch origin main
30
+ git merge-base --is-ancestor "$GITHUB_SHA" origin/main
31
+ uv run --no-project python - <<'PY'
32
+ import os
33
+ import tomllib
34
+ from pathlib import Path
35
+ project = tomllib.loads(Path("pyproject.toml").read_text())
36
+ cargo = tomllib.loads(Path("Cargo.toml").read_text())
37
+ version = project["project"]["version"]
38
+ assert os.environ["RELEASE_TAG"] == f"v{version}"
39
+ assert cargo["package"]["version"].replace("-alpha.", "a") == version
40
+ PY
41
+
42
+ ci:
43
+ needs: verify-source
44
+ uses: ./.github/workflows/ci.yml
45
+
46
+ publish:
47
+ needs: ci
48
+ runs-on: ubuntu-24.04
49
+ environment:
50
+ name: pypi
51
+ url: https://pypi.org/p/pytest-boorst
52
+ permissions:
53
+ id-token: write
54
+ contents: read
55
+ steps:
56
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
57
+ with:
58
+ name: pypi-dist
59
+ path: dist
60
+ - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
61
+
62
+ release-assets:
63
+ needs: publish
64
+ runs-on: ubuntu-24.04
65
+ permissions:
66
+ contents: write
67
+ steps:
68
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
69
+ with:
70
+ name: pypi-dist
71
+ path: assets
72
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
73
+ with:
74
+ name: release-evidence
75
+ path: assets
76
+ - name: Attach the published distributions and checksums
77
+ env:
78
+ GH_TOKEN: ${{ github.token }}
79
+ GH_REPO: ${{ github.repository }}
80
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
81
+ run: gh release upload "$RELEASE_TAG" assets/*
@@ -0,0 +1,13 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.so
5
+ *.pyd
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ .coverage*
9
+ htmlcov/
10
+ target/
11
+ dist/
12
+ *.egg-info/
13
+ benchmark-results*.json
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,59 @@
1
+ # Contributing
2
+
3
+ Keep changes focused on measured pytest overhead while preserving observable
4
+ test behavior. Use uv for Python dependencies and Ruff for linting, import sorting,
5
+ and formatting. Keep Rust code formatted and checked with Cargo.
6
+
7
+ Use the development commands in the README. A change to an accelerated operation
8
+ needs differential coverage against stock pytest and a benchmark comparing the
9
+ stock implementation, an optimized Python implementation, and the native helper.
10
+ Confirm that native code was actually exercised and include control workloads.
11
+
12
+ Keep examples synthetic. Publish only sanitized, reproducible benchmark evidence;
13
+ keep project-specific source, configuration, paths, and results outside this repository.
14
+
15
+ Changes are reviewed through pull requests. GitHub CI verifies wheel installation,
16
+ compatibility tests, Rust checks, and source-distribution builds.
17
+ Installation checks use normal dependency resolution over existing pytest versions;
18
+ keep the installed version unchanged and compare fallback behavior with stock pytest.
19
+
20
+ ## Platform wheels
21
+
22
+ CI builds and tests these native wheels with CPython 3.12. The `abi3` wheels also
23
+ support newer GIL-enabled CPython versions; separate compatibility jobs cover
24
+ Python 3.10 through 3.14.
25
+
26
+ | System | Native architectures | Compatibility |
27
+ | --- | --- | --- |
28
+ | macOS | Intel x86-64, Apple ARM64 | Separate architecture wheels |
29
+ | Windows | x86-64, x86, ARM64 | MSVC wheels |
30
+ | Linux with glibc | x86-64, x86, ARM64 | manylinux2014 (glibc 2.17+) |
31
+ | Linux with musl | x86-64, x86, ARM64 | musllinux 1.2 (Alpine and similar) |
32
+
33
+ Every platform job installs its wheel, runs the compatibility suite, compares
34
+ native execution with stock pytest, and verifies the installed module command and
35
+ portable trial command.
36
+ Linux wheels are tested inside the matching pinned PyPA runtime, including musl.
37
+ ARM64 jobs use native ARM64 runners; x86 jobs run 32-bit Python on x86-64 hosts.
38
+ The universal Python wheel remains available as a fallback. This matrix describes
39
+ CI builds; released files are listed on each release page.
40
+
41
+ ## Publishing
42
+
43
+ Bump the Python version in `pyproject.toml`, `uv.lock` and `scripts/try.py`, the Rust
44
+ version in `Cargo.toml` and `Cargo.lock`, and the pinned README commands and links together.
45
+ After the version change passes PR CI and lands on `main`, publish a GitHub release
46
+ with the exact `v<Python version>` tag. Stable and prerelease publications both
47
+ trigger `.github/workflows/publish.yml`.
48
+
49
+ The workflow checks the tag/version and main-branch ancestry, runs the complete CI
50
+ matrix on the release commit, and selects one tested wheel per platform plus the
51
+ universal wheel and source distribution. Publishing runs in a separate job with
52
+ OIDC permission and the `pypi` environment; it does not check out or execute project
53
+ code. GitHub release assets receive the same distributions and checksum manifest.
54
+
55
+ The one-time PyPI Trusted Publisher configuration must use project `pytest-boorst`,
56
+ owner `dnikolayev`, repository `pytest-boorst`, workflow `publish.yml`, and environment
57
+ `pypi`. Use a pending publisher when creating the project. No API token is needed.
58
+ If a release upload partially fails, inspect the uploaded files before retrying;
59
+ existing distributions are not silently skipped or overwritten.
@@ -0,0 +1,132 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "heck"
7
+ version = "0.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
10
+
11
+ [[package]]
12
+ name = "libc"
13
+ version = "0.2.190"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
16
+
17
+ [[package]]
18
+ name = "once_cell"
19
+ version = "1.21.4"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
22
+
23
+ [[package]]
24
+ name = "portable-atomic"
25
+ version = "1.15.0"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
28
+
29
+ [[package]]
30
+ name = "proc-macro2"
31
+ version = "1.0.107"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
34
+ dependencies = [
35
+ "unicode-ident",
36
+ ]
37
+
38
+ [[package]]
39
+ name = "pyo3"
40
+ version = "0.29.3"
41
+ source = "registry+https://github.com/rust-lang/crates.io-index"
42
+ checksum = "700d18fa267b73b9b521fd7e13580e2f446916f176cacee1ab63fcc8191f1655"
43
+ dependencies = [
44
+ "libc",
45
+ "once_cell",
46
+ "portable-atomic",
47
+ "pyo3-build-config",
48
+ "pyo3-ffi",
49
+ "pyo3-macros",
50
+ ]
51
+
52
+ [[package]]
53
+ name = "pyo3-build-config"
54
+ version = "0.29.3"
55
+ source = "registry+https://github.com/rust-lang/crates.io-index"
56
+ checksum = "7b3fc0c4d08f6bb10e71fe39dfb9e2f59c6eb6854e22ec8092f50c69a4499adb"
57
+ dependencies = [
58
+ "target-lexicon",
59
+ ]
60
+
61
+ [[package]]
62
+ name = "pyo3-ffi"
63
+ version = "0.29.3"
64
+ source = "registry+https://github.com/rust-lang/crates.io-index"
65
+ checksum = "dfc0b8e19df29aad7086cf977bb0c2a2f143e30567eb113e9cf72b62ca698330"
66
+ dependencies = [
67
+ "libc",
68
+ "pyo3-build-config",
69
+ ]
70
+
71
+ [[package]]
72
+ name = "pyo3-macros"
73
+ version = "0.29.3"
74
+ source = "registry+https://github.com/rust-lang/crates.io-index"
75
+ checksum = "6100e8a4b5eba53afaa5ed078364851a0b2499c553a44c31026b929049b49dc6"
76
+ dependencies = [
77
+ "proc-macro2",
78
+ "pyo3-macros-backend",
79
+ "quote",
80
+ "syn",
81
+ ]
82
+
83
+ [[package]]
84
+ name = "pyo3-macros-backend"
85
+ version = "0.29.3"
86
+ source = "registry+https://github.com/rust-lang/crates.io-index"
87
+ checksum = "6143877a16e82b5a727b7127ff4cd86858a24a28d745d72f43e6f227c7b1bdb3"
88
+ dependencies = [
89
+ "heck",
90
+ "proc-macro2",
91
+ "quote",
92
+ "syn",
93
+ ]
94
+
95
+ [[package]]
96
+ name = "pytest-boorst"
97
+ version = "0.1.0-alpha.6"
98
+ dependencies = [
99
+ "pyo3",
100
+ ]
101
+
102
+ [[package]]
103
+ name = "quote"
104
+ version = "1.0.47"
105
+ source = "registry+https://github.com/rust-lang/crates.io-index"
106
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
107
+ dependencies = [
108
+ "proc-macro2",
109
+ ]
110
+
111
+ [[package]]
112
+ name = "syn"
113
+ version = "2.0.119"
114
+ source = "registry+https://github.com/rust-lang/crates.io-index"
115
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
116
+ dependencies = [
117
+ "proc-macro2",
118
+ "quote",
119
+ "unicode-ident",
120
+ ]
121
+
122
+ [[package]]
123
+ name = "target-lexicon"
124
+ version = "0.13.5"
125
+ source = "registry+https://github.com/rust-lang/crates.io-index"
126
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
127
+
128
+ [[package]]
129
+ name = "unicode-ident"
130
+ version = "1.0.26"
131
+ source = "registry+https://github.com/rust-lang/crates.io-index"
132
+ checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
@@ -0,0 +1,21 @@
1
+ [package]
2
+ name = "pytest-boorst"
3
+ version = "0.1.0-alpha.6"
4
+ edition = "2024"
5
+ rust-version = "1.85"
6
+ license = "MIT"
7
+ description = "Native helpers for pytest-boorst"
8
+ repository = "https://github.com/dnikolayev/pytest-boorst"
9
+ readme = "README.md"
10
+
11
+ [lib]
12
+ name = "_native"
13
+ crate-type = ["cdylib", "rlib"]
14
+
15
+ [dependencies]
16
+ pyo3 = { version = "0.29.3", features = ["abi3-py310"] }
17
+
18
+ [profile.release]
19
+ # Avoid misaligned Mach-O string tables from rustc's debuginfo stripping.
20
+ # https://github.com/rust-lang/rust/issues/157750
21
+ strip = "none"