These instructions apply to the entire repository.
pyproject.tomldefines the package version, supported Python versions, dependencies, and verification configuration.src/hubuum_client/_constants.pydefines the target Hubuum server version and immutable test image. Keep those values synchronized withREADME.md,CHANGELOG.md,docs/compatibility.md, the e2e script, and CI.- Hubuum server
v0.0.9and its committeddocs/openapi.jsonare the authoritative API contract. Do not infer wire fields from Python naming preferences when the contract says otherwise. - Maintain sync/async capability parity unless a runtime constraint is documented explicitly.
- Put response and request types in
models.py, small ID and secret values intypes.py, and immutable list controls inquery.py. - Keep shared URL validation, decoding, and error mapping in
_transport.py. - Synchronous HTTP behavior belongs in
client.pyandservices.py; matching asynchronous behavior belongs inasync_client.pyandasync_services.py. - Typed resource services are the preferred public API. Keep
request()as a constrained extension point for authenticated relative routes. - Never retain or expose bearer tokens, passwords, authorization headers, or secret-bearing request bodies in exceptions, representations, or logs.
Run all non-container checks before considering a change complete:
uv sync --extra dev
uv run ruff format --check .
uv run ruff check .
uv run mypy
uv run bandit -q -r src scripts
uv run zizmor .
uv run pytest --cov
uv run mkdocs build --strict
uv buildFocused tests are useful while iterating but do not replace the full unit suite. Every behavior change needs regression coverage for both sync and async paths when they could diverge.
- Never prepare or push a release tag while a Dependabot pull request is open.
- Before release version changes, inspect every open Dependabot pull request,
merge or explicitly supersede each update, run
uv lock --upgrade, and review the resulting application, development, documentation, and workflow dependency changes. - Wait for dependency changes to pass
mainCI, then confirm the Dependabot queue is empty withgh pr list --state open --author app/dependabot --json number,title,url. Repeat that check immediately before creating the release tag. - The release workflow must retain its tag-time Dependabot gate. Do not bypass or remove the gate to publish a release.
Run the complete live-server suite with:
./scripts/run-e2e-tests.shThe wrapper starts PostgreSQL and the immutable Hubuum v0.0.9 server image,
waits for readiness, obtains the generated administrator password, runs the
tests under tests/e2e, and removes its containers and network. Docker and
Podman are both supported.
Useful environment variables:
HUBUUM_E2E_SERVER_IMAGE: server image override; compatibility evidence must use the pinned default.HUBUUM_E2E_POSTGRES_IMAGE: PostgreSQL image override.HUBUUM_E2E_BASE_URLandHUBUUM_E2E_ADMIN_PASSWORD: run against a caller-managed server instead of provisioning containers.HUBUUM_E2E_CONTAINER_RUNTIME: selectdockerorpodman.HUBUUM_E2E_KEEP=1: retain resources for diagnosis.HUBUUM_E2E_TIMEOUT: stack startup timeout in seconds.
Live tests must use unique resource names, avoid assumptions about global IDs, and clean up resources when doing so does not hide the primary failure. Do not describe unit tests or an unpinned live run as v0.0.9 compatibility evidence.
- Preserve unrelated user changes and keep the worktree scoped.
- Add user-visible changes to
[Unreleased]inCHANGELOG.md. - Update documentation when public behavior, requirements, compatibility, or the e2e workflow changes.
- Prefer clear, idiomatic Python and explicit types over clever abstractions.
- Do not suppress Ruff or mypy broadly; fix the type or isolate a justified, narrow exception.