Repository navigation
chore: 🔧 type-check tests and bump ty monthly - #55
Merged
Merged
Conversation
Finishes #28 on top of #37: ty now checks tests/ as well as src/, and a scheduled update-ty.yml bumps the ty pin in pyproject.toml and prek.toml together, opening the PR as a draft when the new version reports diagnostics. The one finding in tests/ was real: chi_out was annotated as int although NumPy integers are accepted on purpose. The public signatures now take int | np.integer, and validate_chi_out returns a plain int. Closes #28 Assisted-by: pi:claude-opus-5.5
Contributor
Signed-off-by: Ramón L. Panadés-Barrueta <rpana92@gmail.com>
Panadestein
added a commit
that referenced
this pull request
Oct 7, 2026
Resolve the conflicts with stdlib logging (#52), input-precision sketches (#36), validation (#38), ty enforcement (#37, #55) and the Fumadocs site (#56): - the sweep draws its sketches with gaussian_sketch and logs its plan, pass times and stalls at DEBUG with %-style arguments; - the working dtype is promoted over every site, not just the first; - docs/large-problems.md moves to features/large-problems.mdx and the out-of-core testing notes to contributing/testing.mdx; - bench_large.py logs through the stdlib and gains --debug. Type lazily read sites: the entry points accept any array-like with shape, dtype, ndim and np.asarray support but were typed Sequence[NDArray]. Add the SiteLike protocol and the Site alias, use them from src/apply/compress down to the site source, and export SiteLike. Also fix the other ty findings: the Tier list in the planner, known_kind() for validated trains, padded_shape without a type: ignore, cupyx as an allowed unresolved import, and typed fakes in the tests. Assisted-by: pi:claude-opus-5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Closes #28.
Scope after #37
#37 already did most of #28:
tyis in thedevgroup and configured inpyproject.toml.lint.ymlgates PRs on it.src/is clean.Two items were left, and this PR adds them:
tests/.[tool.ty.src] includenow coverstests/. That turned up one real finding:chi_outwas annotatedint, but NumPy integers are accepted on purpose (seetest_numpy_integer_chi_out_accepted).apply,compressandsrcnow takechi_out: int | np.integer.validate_chi_outreturns a plainint, sosweepand the exact fallback still get anint.numpyis imported only underTYPE_CHECKING, so the backend-agnostic rule holds.update-ty.ymlhas the same shape asupdate-ruff.yml. It bumps thetypin inpyproject.tomland thety-pre-commitrev inprek.tomltogether, and regeneratesuv.lock. ty is pre-1.0, so ifty checkfails on the new version the PR opens as a draft.CONTRIBUTING.mdandAGENTS.mdnow sayuv run ty check, without thesrc/argument, because the include list decides what gets checked.Checks
uv run prek run --all-filesis clean, ty included.uv run pytest -m "not slow": 123 passed, 1 skipped (no CuPy).update-ty.ymlyet; after merge it can be triggered withworkflow_dispatch.