This document collects the repo-level development commands and workflows that do not need to stay in the root README.
uv run pytest -q
uv run ruff check .
uv run ruff format .
uv run ty check s2andRun the full local CI wrapper:
uv run python scripts/run_ci_locally.pyscripts/run_ci_locally.py mirrors .github/workflows/main.yaml by running:
- lint (
scripts/sync_version.py --check,ruff check, andruff format --check) typecheck-and-testmatrix lanes (py-only, thenrust-enabled)- Rust parity guardrail tests in the
rust-enabledlane
The local runner passes -ra to pytest so skip reasons are printed under each lane. Rust-only tests may skip in the
py-only lane because that lane intentionally syncs without the rust extra and forces S2AND_BACKEND=python; the
same tests must run in the later rust-enabled lane after maturin develop builds the extension.
By default, local ty checks use --python-version 3.11 --python-platform linux to match GitHub Linux runners.
To override the local platform emulation:
- set
S2AND_CI_TY_PLATFORM, for examplewindows
If you want to skip Rust extension compilation while iterating:
uv sync --active --extra dev --frozen
uv run --active --no-project ruff format --check s2and scripts/*.py
uv run --active --no-project ty check s2and --ignore unresolved-import --ignore unused-type-ignore-comment --ignore possibly-missing-attribute --ignore unresolved-global
uv run --active --no-project ty check scripts/*.py --ignore unresolved-import --ignore unused-type-ignore-comment --ignore possibly-missing-attribute --ignore unresolved-global --ignore unresolved-reference --ignore unresolved-attributePytest with coverage:
uv run --active --no-project pytest tests/ --cov=s2and --cov-report=term-missing --cov-fail-under=40Do not set PYTHONPATH for normal repo scripts; it can shadow the installed package or compiled Rust extension. Test
and CI commands may set it only when they are intentionally exercising the checkout source tree.
Versioning is centralized in VERSION.
Recommended one-time hook setup:
git config core.hooksPath .githooksVersion bump workflow:
# 1) edit VERSION
echo 0.51.1 > VERSION
# 2) sync manifests
uv run python scripts/sync_version.py
# 3) regenerate lockfiles
uv sync --extra dev
uv run --active --no-project cargo generate-lockfile --manifest-path s2and_rust/Cargo.tomlNotes:
- The pre-commit hook only runs when
VERSIONis staged. - The hook auto-syncs manifests and regenerates lockfiles when needed.
uv.lockands2and_rust/Cargo.lockare generated files.
- Docs index: docs/README.md
- Rust runtime contract: rust/runtime.md
- Rust promotion baselines: rust/baselines.md