Skip to content

Commit dc9007a

Browse files
Merge branch 'main' into dh/function-after-input
2 parents ad8a8eb + 1e5e899 commit dc9007a

File tree

163 files changed

+7535
-1926
lines changed

Some content is hidden

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

163 files changed

+7535
-1926
lines changed

.github/workflows/ci.yml

Lines changed: 159 additions & 136 deletions
Large diffs are not rendered by default.

.github/workflows/codspeed.yml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,32 @@ on:
99
# performance analysis in order to generate initial data.
1010
workflow_dispatch:
1111

12+
env:
13+
UV_FROZEN: true
14+
UV_PYTHON: 3.13
15+
1216
jobs:
1317
benchmarks:
14-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-22.04
1519

1620
steps:
1721
- uses: actions/checkout@v4
1822

23+
# Using this action is still necessary for CodSpeed to work:
1924
- uses: actions/setup-python@v5
2025
with:
21-
python-version: '3.12'
26+
python-version: ${{ env.UV_PYTHON}}
2227

23-
- uses: actions/cache@v4
24-
id: cache-py
25-
name: cache python
28+
- name: install uv
29+
uses: astral-sh/setup-uv@v3
2630
with:
27-
path: ${{ env.pythonLocation }}
28-
key: >
29-
py-v2
30-
${{ env.pythonLocation }}
31-
${{ hashFiles('tests/requirements.txt') }}
32-
${{ hashFiles('pyproject.toml') }}
33-
34-
- run: pip install -r tests/requirements.txt
35-
if: steps.cache-py.outputs.cache-hit != 'true'
36-
37-
- run: pip uninstall pytest-speed -y
38-
if: steps.cache-py.outputs.cache-hit != 'true'
31+
enable-cache: true
3932

40-
- run: pip install pytest-benchmark==4.0.0
41-
if: steps.cache-py.outputs.cache-hit != 'true'
33+
- name: install deps
34+
run: |
35+
uv sync --group testing
36+
uv pip uninstall pytest-speed
37+
uv pip install pytest-benchmark==4.0.0 pytest-codspeed
4238
4339
- name: install rust stable
4440
id: rust-toolchain
@@ -56,7 +52,7 @@ jobs:
5652
RUSTFLAGS: "-Cprofile-generate=${{ github.workspace }}/profdata"
5753

5854
- name: Gather pgo data
59-
run: pytest tests/benchmarks
55+
run: uv run pytest tests/benchmarks
6056

6157
- name: Prepare merged pgo data
6258
run: rustup run stable bash -c '$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata'
@@ -68,6 +64,6 @@ jobs:
6864
RUSTFLAGS: "-Cprofile-use=${{ github.workspace }}/merged.profdata"
6965

7066
- name: Run CodSpeed benchmarks
71-
uses: CodSpeedHQ/action@v2
67+
uses: CodSpeedHQ/action@v3
7268
with:
73-
run: pytest tests/benchmarks/ --codspeed
69+
run: uv run pytest tests/benchmarks/ --codspeed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ node_modules/
2929
/worktree/
3030

3131
/.editorconfig
32-
/.pdm-python
3332
/*.lcov
3433
/*.profdata
3534
/*.profraw

.mypy-stubtest-allowlist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# TODO: don't want to expose this staticmethod, requires https://github.com/PyO3/pyo3/issues/2384
22
pydantic_core._pydantic_core.PydanticUndefinedType.new
3-
# As per #1240, from_json has custom logic to coverage the `cache_strings` kwarg
3+
# See #1540 for discussion
44
pydantic_core._pydantic_core.from_json
5+
pydantic_core._pydantic_core.SchemaValidator.validate_python
6+
pydantic_core._pydantic_core.SchemaValidator.validate_json
7+
pydantic_core._pydantic_core.SchemaValidator.validate_strings
58
# the `warnings` kwarg for SchemaSerializer functions has custom logic
69
pydantic_core._pydantic_core.SchemaSerializer.to_python
710
pydantic_core._pydantic_core.SchemaSerializer.to_json

0 commit comments

Comments
 (0)