Development and deployment¶
This page covers repository setup, quality checks, local documentation builds, and the GitHub Pages deployment path.
Prerequisites¶
- Python 3.11+
uvfor the repository bootstrap command- GNU Make or a compatible
make - Docker only for the optional multi-version local matrix
Set up a checkout¶
make init-dev creates .venv and installs package, test, lint, and documentation dependencies. make install refreshes the editable package and core development tools in an existing environment.
Common commands¶
| Command | Purpose |
|---|---|
make run |
Print the installed Kliamka version |
make test |
Run unit tests excluding packaging smoke tests |
make test-package |
Build and smoke-install wheel and sdist artifacts |
make test-all |
Run the complete pytest suite |
make lint |
Run mypy, Ruff lint, and Ruff format checks |
make format |
Format Python source and tests |
make docs |
Build documentation strictly into site/ |
make docs-serve |
Serve documentation locally with live reload |
make test-docker VERSION=3.12 |
Test one supported Python in Docker |
make test-docker-all |
Test Python 3.11–3.14 in Docker |
make clean |
Remove generated Python and documentation artifacts |
Build documentation locally¶
Install the optional documentation dependency group and run the same strict build used by CI:
The generated site is written to site/, which is ignored by Git. --strict turns MkDocs warnings into failures so broken internal links and invalid configuration cannot deploy silently.
Preview with live reload:
Open the URL printed by MkDocs, normally http://127.0.0.1:8000/. Stop the server with Ctrl+C.
Documentation conventions¶
- Write documentation in Markdown under
docs/. - Topical files use a date prefix and lowercase snake case.
- Keep
mkdocs.ymlnavigation synchronized with public pages. - Use relative links between documentation pages.
- Use repository URLs for source files outside
docs/; MkDocs cannot validate links outside its documentation tree. - Run
make docsbefore opening or merging a pull request. - Update
docs/TODO.mdwhen documentation architecture or deployment behavior changes.
GitHub Pages workflow¶
.github/workflows/pages.yml builds and deploys the site on pushes to main or master, including merge commits, and supports manual dispatch.
The workflow:
- checks out the exact commit without persisting credentials;
- installs Python and the
docsoptional dependency group; - configures GitHub Pages;
- runs the strict MkDocs build;
- uploads
site/as a Pages artifact; - deploys from a separate job with environment protection and only the required Pages/OIDC permissions.
All third-party workflow actions are pinned to immutable commit SHAs. The build job has read-only repository permission; only the deployment job receives pages: write and id-token: write.
Repository setting
In Settings → Pages → Build and deployment, select GitHub Actions as the source. The workflow does not write generated files to a gh-pages branch.
Branch behavior¶
The repository's current default branch is main, while some integrations may still refer to master. The workflow listens to both names so merges to either protected primary branch deploy documentation. Remove the unused name after all repository settings and integrations agree on one branch.
Release and CI relationship¶
The Pages workflow is independent of package publication. A documentation deployment does not create a tag, GitHub Release, or PyPI distribution. Existing CI remains responsible for supported Python tests, linting, packaging smoke tests, benchmarks, and workflow security analysis.
Pre-merge checklist¶
For packaging or release-related changes, also run:
Confirm git status contains only intentional source documentation and configuration changes; do not commit the generated site/ directory.