Install uv and sync the project environment:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv syncInstall repocert separately if you want
the certification workflow and local Git hook enforcement:
cargo install --locked --force repocertThe repo contract in .repocert/config.toml mirrors the normal development
checks:
uv run --locked ruff format --check .uv run --locked ruff check .uv run --locked pyright -p .uv run --locked python tools/check_test_layout.pyuv run --locked pytest -q
You can run them through repocert:
repocert validate
repocert check
repocert fix
repocert status --assert-certifiedThis repo uses a repo-scoped ssh-signed repocert key. To certify a commit,
pass the matching private SSH key whose public key is listed in
.repocert/config.toml, or set REPOCERT_SIGNING_KEY to that key path:
repocert certify --signing-key /path/to/private/keyuv sync creates a repo-local .venv next to pyproject.toml, so run it once
per worktree or fresh checkout.
Prefer behavior-based test names in the form
MethodUnderTest_BehaviorBeingTested_ExpectedResult.
Mirror source modules in tests/:
src/miniject/_container.py->tests/test_container.pysrc/miniject/_introspection.py->tests/test_introspection.py
In pytest terms, that means names like:
test_resolve_unbound_service_raises_resolution_errortest_scope_child_override_keeps_parent_binding_unchanged
Use judgment, but keep test names explicit about:
- the method or API surface under test
- the specific behavior or scenario being exercised
- the expected outcome
Prefer an explicit Arrange, Act, Assert structure inside tests when it
improves readability. When a test naturally combines the last two steps, use
Act + Assert.
This repo uses repocert generated hooks:
pre-commitandpre-merge-commitenforce local policypre-pushandupdateenforce certification for protected refs
To activate them in your local checkout:
repocert install-hooksHook installation is checkout-local, so run it once per checkout or worktree where you want enforcement.
The current repocert generated pre-commit hook enforces local policy but
does not automatically run the repo's full repocert check profile. Run
repocert check explicitly before certification and push.