Skip to content

Commit

Permalink
Merge branch 'main' into dh/function-after-input
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle authored Nov 21, 2024
2 parents ad8a8eb + 1e5e899 commit dc9007a
Show file tree
Hide file tree
Showing 163 changed files with 7,535 additions and 1,926 deletions.
295 changes: 159 additions & 136 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

40 changes: 18 additions & 22 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,32 @@ on:
# performance analysis in order to generate initial data.
workflow_dispatch:

env:
UV_FROZEN: true
UV_PYTHON: 3.13

jobs:
benchmarks:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

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

- uses: actions/cache@v4
id: cache-py
name: cache python
- name: install uv
uses: astral-sh/setup-uv@v3
with:
path: ${{ env.pythonLocation }}
key: >
py-v2
${{ env.pythonLocation }}
${{ hashFiles('tests/requirements.txt') }}
${{ hashFiles('pyproject.toml') }}
- run: pip install -r tests/requirements.txt
if: steps.cache-py.outputs.cache-hit != 'true'

- run: pip uninstall pytest-speed -y
if: steps.cache-py.outputs.cache-hit != 'true'
enable-cache: true

- run: pip install pytest-benchmark==4.0.0
if: steps.cache-py.outputs.cache-hit != 'true'
- name: install deps
run: |
uv sync --group testing
uv pip uninstall pytest-speed
uv pip install pytest-benchmark==4.0.0 pytest-codspeed
- name: install rust stable
id: rust-toolchain
Expand All @@ -56,7 +52,7 @@ jobs:
RUSTFLAGS: "-Cprofile-generate=${{ github.workspace }}/profdata"

- name: Gather pgo data
run: pytest tests/benchmarks
run: uv run pytest tests/benchmarks

- name: Prepare merged pgo data
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'
Expand All @@ -68,6 +64,6 @@ jobs:
RUSTFLAGS: "-Cprofile-use=${{ github.workspace }}/merged.profdata"

- name: Run CodSpeed benchmarks
uses: CodSpeedHQ/action@v2
uses: CodSpeedHQ/action@v3
with:
run: pytest tests/benchmarks/ --codspeed
run: uv run pytest tests/benchmarks/ --codspeed
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ node_modules/
/worktree/

/.editorconfig
/.pdm-python
/*.lcov
/*.profdata
/*.profraw
Expand Down
5 changes: 4 additions & 1 deletion .mypy-stubtest-allowlist
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# TODO: don't want to expose this staticmethod, requires https://github.com/PyO3/pyo3/issues/2384
pydantic_core._pydantic_core.PydanticUndefinedType.new
# As per #1240, from_json has custom logic to coverage the `cache_strings` kwarg
# See #1540 for discussion
pydantic_core._pydantic_core.from_json
pydantic_core._pydantic_core.SchemaValidator.validate_python
pydantic_core._pydantic_core.SchemaValidator.validate_json
pydantic_core._pydantic_core.SchemaValidator.validate_strings
# the `warnings` kwarg for SchemaSerializer functions has custom logic
pydantic_core._pydantic_core.SchemaSerializer.to_python
pydantic_core._pydantic_core.SchemaSerializer.to_json
Loading

0 comments on commit dc9007a

Please sign in to comment.