Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 3.27 KB

development.md

File metadata and controls

33 lines (20 loc) · 3.27 KB

Organization Python development baseline

This document is the entry point for cross-repository Python standards maintained in python-project-standards. Consumer repositories (libraries, APIs, services) should link here for shared policy; framework-specific or product-specific guides (for example Django patterns in an API repo) stay in each project’s own DEVELOPMENT.md or CONTRIBUTING.md.

Table of Contents

What lives in python-project-standards

  • Repository overview — purpose, adoption tiers (library vs service/API), quick start: README.
  • Adopting the baseline in an existing repo — the Copier template, copier copy / copier update, version migrations: migration-guide.md.
  • Versioning and releases — SemVer tags, pinning @v… vs SHA, consumer bumps: versioning.md.
  • CI contract — scripts/check.sh, the managed ci.yml and the reusable workflows it calls: reusable-workflows.md.

Python style (shared)

Further style rules may be added under docs/ over time; this page will link them.

Tooling and layout

Baseline pre-commit, pyproject.toml tooling sections and baselines/ruff.toml ship as a Copier template (template/, copier.yml), described in the README (Repository layout, What Is Standardized, Quick Start) and migration-guide.md.

Validation contract: every repo validates with bash scripts/check.sh (managed by Copier, so copier update keeps it current). It needs uv, runs uv sync --frozen from uv.lock (failing instead of re-locking if the lock is missing or stale), then pre-commit and pytest; lint or test as argument runs one of the two, and CI runs the same script. Run uv lock and commit uv.lock once on a new repo; the script stops with that hint when it is missing. Set the Copier uv_sync_args answer (for example --extra processing) for extras the checks need; it is interpolated verbatim into the shell command, so keep it to simple, unquoted arguments. Dev tools live in [dependency-groups] dev. A repo adopting the template for the first time follows the first-adoption checklist.

Portable agent guidance

Projects may opt in to the Copier agent_guidance question to bootstrap AGENTS.md, its Claude import, and a drift-check workflow pinned to github-workflows v4.8.0. These are project-owned bootstrap files: existing files are preserved, and teams maintain them after creation. If existing instructions are present, reconcile them with the agent-config project contract before enabling the check. Shared Python style stays in these standards; architecture and operational commands stay in the consuming repository.