rea-ci-tests-audit
MOmorluto/rea486k近 7 天新增 8,943 个 star
Run and fix the 3W repository quality checks (pytest via bin/test, mypy + ruff via bin/lint, notebook execution via bin/nb_test) the same way CI does. Use before finishing any code change, or when tests, lint, type checks or notebooks fail.
All commands run from the repository root inside the uv environment
(uv sync --locked --extra dev, then source .venv/bin/activate or prefix
commands with uv run).
./bin/testpytest tests/<submodule>/test_<module>.py -v # fast loop on what you changed
./bin/test # full suite + coverage, as CI
RUN_SLOW_TESTS=1 ./bin/test # also tests marked `slow`
bin/test adds -m "not slow" unless RUN_SLOW_TESTS=1. Tests marked
slow read the real Parquet dataset.pytest.ini sets pythonpath = toolkit, so tests import ThreeWToolkit
from the working tree.*.parquet. A test that passes locally but touches dataset/ will fail
in CI: replace it with mock_dataset_factory or mark it slow.coverage.xml; do not commit it../bin/lintCI=false ./bin/lint # local: mypy, ruff check --fix, lychee (if installed)
./bin/lint # CI mode (default): mypy, ruff check without fixes
mypy_path = toolkit/). Use X | None, avoid
syntax newer than 3.10, and prefer precise types over Any or
# type: ignore.ruff format toolkit tests is optional but keeps
diffs consistent with the codebase.*.ipynb) are excluded from mypy and ruff../bin/nb_test (manual, slow)Not run by CI. Use it when you change code that demos rely on or edit a notebook.
./bin/nb_test # BASIC: toolkit/demos, dataset/demos/_basic
INCLUDE_NOT_BASIC=True ./bin/nb_test # also other dataset demos and resources/
./bin/nb_test toolkit/demos # any path, reported as warnings
python -m nbconvert --to notebook --execute --output-dir /tmp <file>
(nbconvert runs the kernel in the notebook's folder, so relative paths
resolve as in bin/nb_test).If pyproject.toml dependencies changed, run uv lock and include the
updated uv.lock. CI installs with uv sync --locked and fails when the
lock file is stale.
Report which checks you ran and their results. If something fails for reasons unrelated to your change (e.g. network access for downloads), say so explicitly instead of skipping silently.
MOmorluto/rea486k近 7 天新增 8,943 个 star
MOmorluto/rea486k近 7 天新增 8,943 个 star
MAmattpocock/skills337k近 7 天新增 4,978 个 star
MAmattpocock/skills337k近 7 天新增 4,978 个 star
MAmattpocock/skills337k近 7 天新增 4,978 个 star