Skip to content

Commit f0b14cd

Browse files
authored
Pin ty in CI and use renamed rule import-not-found (#11283)
- Changes the two ignore comments to use `import-not-found`. - Pins ty as `TY_VERSION: 0.0.98` in `.github/workflows/ci.yml` and `.github/workflows/cuda.yaml`, and runs `uvx ty@$TY_VERSION check`. A new ty release can then not break CI without a change in the repository. - Documents the pin in `AGENTS.md`. --------- Signed-off-by: Robert Kruszewski <[email protected]>
1 parent e8b53ca commit f0b14cd

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
CARGO_TERM_COLOR: always
2525
RUST_BACKTRACE: 1
2626
NIGHTLY_TOOLCHAIN: nightly-2026-09-10
27+
TY_VERSION: 0.0.98
2728

2829
jobs:
2930
duckdb-mirror:
@@ -92,7 +93,7 @@ jobs:
9293
if: "!cancelled()"
9394
run: |
9495
uv sync --all-packages --no-install-workspace
95-
uvx ty check vortex-python vortex-python-cuda vortex-ffi/cmake/tests scripts/tests
96+
uvx ty@$TY_VERSION check vortex-python vortex-python-cuda vortex-ffi/cmake/tests scripts/tests
9697
9798
# Pins the measurement_id hash that scripts/post-ingest.py uses as the primary key of every
9899
# benchmarks-database fact row. The golden vectors are a frozen artifact (see the note inside

‎.github/workflows/cuda.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ permissions:
2020
env:
2121
CARGO_TERM_COLOR: always
2222
RUST_BACKTRACE: 1
23+
TY_VERSION: 0.0.98
2324

2425
jobs:
2526
changes:
@@ -145,7 +146,7 @@ jobs:
145146
MATURIN_PEP517_ARGS: "--profile ci"
146147
run: |
147148
uv sync --all-packages --extra cuda
148-
uvx ty check vortex-python vortex-python-cuda
149+
uvx ty@$TY_VERSION check vortex-python vortex-python-cuda
149150
uv run --all-packages --extra cuda pytest --benchmark-disable vortex-python/test/test_cuda.py vortex-python-cuda/test
150151
151152
cuda-test-sanitizer:

‎AGENTS.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ uvx ruff check <changed-python-files>
107107
uvx ty check vortex-python vortex-python-cuda vortex-ffi/cmake/tests scripts/tests
108108
```
109109

110-
Use `uvx` for both Ruff and ty, matching CI. The command above covers both binding packages and the
111-
CMake and script tests. For a narrower check, pass the affected directory, such as
110+
Use `uvx` for both Ruff and ty, matching CI. CI pins ty as `TY_VERSION` in
111+
`.github/workflows/ci.yml` and `.github/workflows/cuda.yaml`. To match CI, run
112+
`uvx ty@<TY_VERSION> check ...`, and update both workflows when you change the version. The
113+
command above covers both binding packages and the CMake and script tests. For a narrower check, pass the affected directory, such as
112114
`uvx ty check vortex-python` or `uvx ty check vortex-ffi/cmake/tests`. Checking the whole binding
113115
package covers callers affected by stub or annotation changes.
114116

‎vortex-python/test/test_pyarray.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import pyarrow as pa
1010
import pytest
1111
from pcodec import (
12-
ChunkConfig, # ty: ignore[unresolved-import]
12+
ChunkConfig, # ty: ignore[import-not-found]
1313
)
1414
from pcodec import (
15-
wrapped as pco, # ty: ignore[unresolved-import]
15+
wrapped as pco, # ty: ignore[import-not-found]
1616
)
1717
from typing_extensions import override
1818

0 commit comments

Comments
 (0)