Surfaced while running the canonical gates for #198.
Corrected scope: these do not fail in CI. CI installs --extra aws --extra dev --extra penzai --extra pytorch, whereas CLAUDE.md and CONTRIBUTING.md document --extra dev --extra pytorch. So the real defect is that the documented local commands do not match the ones CI runs, and a contributor following the docs sees failures that are not real.
today, in files that change does not touch, so they were left alone rather than folded into an
unrelated diff.
CONTRIBUTING.md requires all static checks to pass for PRs targeting main, so a PR author
currently cannot distinguish "my change is clean" from "the baseline is red". Worth either fixing or
explicitly accepting.
1. Three ruff findings
tests/generative_processes/test_data_prefetcher.py:68:5: SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements
tests/generative_processes/test_data_prefetcher.py:99:5: PT012 `pytest.raises()` block should contain a single simple statement
tests/generative_processes/test_data_prefetcher.py:99:5: SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements
Two are autofixable (ruff check --fix). PT012 needs a small restructure — narrowing the
pytest.raises block to the single statement expected to raise, which is also the more diagnostic
test.
Reproduce: uv run --extra dev ruff check . at main (4075750).
2. Pyright unresolved imports from uninstalled optional extras
20 reportMissingImports errors, all from penzai and boto3/botocore, in:
simplexity/utils/penzai_utils.py, simplexity/persistence/local_penzai_persister.py
simplexity/persistence/s3_persister.py
tests/utils/test_penzai.py, tests/persistence/test_local_penzai_persister.py,
tests/persistence/test_s3_persister.py
The penzai and aws extras are both marked deprecated in pyproject.toml, and the documented
type-check command (uv run --extra dev --extra pytorch pyright) does not install either, so these
are unavoidable with the documented invocation. The same three test modules also fail collection
under the documented pytest command, so a full pytest run currently aborts with 3 collection errors
unless they are explicitly ignored.
Options: add the extras to the documented commands, exclude these paths in the pyright config and
add collection-level skips, or remove the deprecated code paths.
The second option seems most consistent with them already being deprecated — a # pragma-style
exclusion documents that these are optional-dependency paths rather than real type errors.
Surfaced while running the canonical gates for #198.
Corrected scope: these do not fail in CI. CI installs
--extra aws --extra dev --extra penzai --extra pytorch, whereasCLAUDE.mdandCONTRIBUTING.mddocument--extra dev --extra pytorch. So the real defect is that the documented local commands do not match the ones CI runs, and a contributor following the docs sees failures that are not real.today, in files that change does not touch, so they were left alone rather than folded into an
unrelated diff.
CONTRIBUTING.mdrequires all static checks to pass for PRs targetingmain, so a PR authorcurrently cannot distinguish "my change is clean" from "the baseline is red". Worth either fixing or
explicitly accepting.
1. Three ruff findings
Two are autofixable (
ruff check --fix).PT012needs a small restructure — narrowing thepytest.raisesblock to the single statement expected to raise, which is also the more diagnostictest.
Reproduce:
uv run --extra dev ruff check .atmain(4075750).2. Pyright unresolved imports from uninstalled optional extras
20
reportMissingImportserrors, all frompenzaiandboto3/botocore, in:simplexity/utils/penzai_utils.py,simplexity/persistence/local_penzai_persister.pysimplexity/persistence/s3_persister.pytests/utils/test_penzai.py,tests/persistence/test_local_penzai_persister.py,tests/persistence/test_s3_persister.pyThe
penzaiandawsextras are both marked deprecated inpyproject.toml, and the documentedtype-check command (
uv run --extra dev --extra pytorch pyright) does not install either, so theseare unavoidable with the documented invocation. The same three test modules also fail collection
under the documented pytest command, so a full
pytestrun currently aborts with 3 collection errorsunless they are explicitly ignored.
Options: add the extras to the documented commands, exclude these paths in the pyright config and
add collection-level skips, or remove the deprecated code paths.
The second option seems most consistent with them already being deprecated — a
# pragma-styleexclusion documents that these are optional-dependency paths rather than real type errors.