oaknational-python-repo-template is a reusable Oak Python starter with:
- a canonical
src/package layout - strict quality gates driven by
uv - cross-platform agent infrastructure in
.agent/,.cursor/,.claude/,.gemini/,.github/,.agents/, and.codex/ - a small demo CLI,
activity-report, that exercises validation, file I/O, reporting, plotting, YAML sidecars, bounded HTTPS retrieval, and repo audits
Install the distribution as oaknational-python-repo-template and import it as
oaknational.python_repo_template. That is the baseline convention this repo
uses to define "Pythonic within Oak".
The package ships py.typed, and the repo type-checks src/, tests/, and
tools/ under explicit strict pyright settings.
The canonical repo-local build and check-ci flow also smoke-tests the built
wheel in a temporary virtual environment outside the source tree, running the
installed package import plus the activity-report and
python -m oaknational.python_repo_template entry surfaces.
Dependency hygiene runs through uv run deptry . and is included as a blocking
step inside both aggregate gate commands. It is dependency hygiene, not vulnerability scanning.
This repo is optimised for agentic engineering. Its Practice surfaces, guardrails, and quality gates are designed so agents can plan, execute, review, and close out work predictably and safely.
That does not make it agent-only. The same structure works well for conventional human-led development, pair programming, and mixed human-agent workflows.
The rules are intentionally strict because that strictness is part of the safety model for agentic engineering. They are not convenience defaults and should not be relaxed simply to make unsafe workflows easier.
The seeded example works with a simple activity log contract:
date— ISO date (YYYY-MM-DD)category— non-empty labelminutes— positive integernotes— optional text
The richer activity-pack demo also supports an optional same-stem YAML sidecar,
for example activity_log.metadata.yaml, for descriptive metadata, category
display labels, and simple per-category target minutes.
Prepare validated Parquet output:
uv run activity-report prepare \
--input data/fixtures/activity_log.csv \
--output data/fixtures/activity_log.parquetPrint a report:
uv run activity-report report --input data/fixtures/activity_log.csvOverride the auto-discovered metadata sidecar:
uv run activity-report report \
--input data/fixtures/activity_log.csv \
--metadata data/fixtures/activity_log.metadata.yamlRun the same report via the package module entry point:
uv run python -m oaknational.python_repo_template report --input data/fixtures/activity_log.csvPrint a report and render a chart:
uv run activity-report report \
--input data/fixtures/activity_log.parquet \
--chart activity-summary.pngReport directly from a bounded HTTPS input:
uv run activity-report report --input https://example.test/activity_log.csvuv sync
uv run python -m oaknational.python_repo_template.devtools clean
uv run python -m oaknational.python_repo_template.devtools build
uv run python -m oaknational.python_repo_template.devtools dev
uv run deptry .
uv run python -m oaknational.python_repo_template.devtools check
uv run python -m oaknational.python_repo_template.devtools check-ci
uv run python -m oaknational.python_repo_template.devtools fix
uv run python -m oaknational.python_repo_template.devtools test
uv run python -m oaknational.python_repo_template.devtools coverageThose developer commands are source-checkout workflows. The installed wheel
publishes only activity-report and python -m oaknational.python_repo_template.
Install the repo hooks after cloning:
uv run pre-commit installThat installs the repo's pre-commit, pre-push, and commit-msg hooks from
.pre-commit-config.yaml.
Create a conventional commit with Commitizen:
uv run cz commitCheck a commit message manually:
uv run cz check --message "feat: add truthful commit-msg enforcement"- Agent entry point:
.agent/directives/AGENT.md - Practice index:
.agent/practice-index.md - Capability roadmap:
.agent/plans/roadmap.md
src/oaknational/python_repo_template/— the canonical Oak namespace package rootsrc/oaknational/python_repo_template/data/— validation and storage boundariessrc/oaknational/python_repo_template/demo/— the example CLI surfacetests/— behaviour-first teststools/repo_audit.py— tracked-file audit for repo identity and adapter integrity