pymplate
My opinionated Python project template.
The template is meant to be small, current, and practical. It uses modern Python packaging via
pyproject.toml, keeps tests close to source modules, and relies on the same local toolchain as CI.
What It Includes
src/layout with an implicit namespace package.- Packaging via
hatchlingandhatch-vcs. - Dependency management and isolated tool runs via
uv,tox, andtox-uv. - Test discovery through
pytest --pyargs, including doctests and source files that do not follow the usualtest_*.pynaming convention. - Linting and formatting with
ruff. - Type checking with
mypyandty. - GitHub Actions CI across Linux, macOS, Windows, and supported Python versions.
- PyPI/TestPyPI publishing through
uv publishand GitHub Trusted Publishing.
Local Checks
Run the narrowest tox environment that validates your change:
tox -e ruff
tox -e format
tox -e tests
tox -e mypy
tox -e ty
For ruff preview checks:
tox -e ruff -- --preview
For a targeted test run:
tox -e tests -- -k <pattern>
tox is the supported task runner.
The noxfile.py configuration is experimental and is not part of the normal workflow.
The .ci/run entrypoint is for GitHub Actions only.
It runs tox through uv tool run --with tox-uv; use direct tox -e ... commands for local development.
The configured tox-uv lock runner creates or updates an ignored uv.lock.
The lockfile is deliberately not tracked so CI resolves current dependency versions; do not commit it.
Test Layout
pyproject.toml intentionally configures pytest to collect all *.py files and doctests.
Ordinary project tests should live next to implementation modules rather than under tests/.
tests/test_pytest.py is a self-check for pytest namespace-package discovery. It runs without pytest
as the outer test runner first, then invokes pytest in a temporary package tree to verify collection
behavior.
Releases
The release script is .ci/release.
To preview commit-level release notes and open a prefilled GitHub release form without creating a tag or release:
.ci/prepare-github-release
This fetches the remote default branch and the latest remote release tag, then runs git-cliff
through an ad-hoc Nix invocation.
Both the generated notes and the GitHub release target are based on the fetched default branch
rather than the currently checked-out branch.
By default, the proposed tag increments the minor version and uses today's date in YYYYMMDD form
for the final component. A repository without release tags starts at v0.1.YYYYMMDD. If an existing
tag does not have vMAJOR.MINOR.SUFFIX form, pass --tag explicitly. The generated release title is
<tag>: rolling release.
Override these defaults with:
.ci/prepare-github-release --tag v0.3.20260812 --title 'v0.3.20260812: summary'
To print the preview and URL without opening a browser:
.ci/prepare-github-release --no-open
Manual publishing requires:
UV_PUBLISH_TOKEN=... .ci/release
For TestPyPI:
UV_PUBLISH_TOKEN=... .ci/release --use-test-pypi
In GitHub Actions, publishing uses Trusted Publishing instead of an API token:
- commits to the repository default branch publish to TestPyPI;
v*release tags publish to PyPI.
The workflow lives in .github/workflows/main.yml.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file karlicoss_pymplate-0.3.20260812.tar.gz.
File metadata
- Download URL: karlicoss_pymplate-0.3.20260812.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7624c203643bfe0edfd82dc8acc9b05855108cc26a2237f9e4265f0ac3340e7a
|
|
| MD5 |
9bf256a6cd3c10a389d946c54bfcaf45
|
|
| BLAKE2b-256 |
517ae205d9e175ed27ea813e70287ce19c6fdea7c1ca6a32531171de93fbe9b6
|
File details
Details for the file karlicoss_pymplate-0.3.20260812-py3-none-any.whl.
File metadata
- Download URL: karlicoss_pymplate-0.3.20260812-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
773c96b76bb36738b4919ccc45a42049c2ebec1099ad6143c9983ed9acdf39ef
|
|
| MD5 |
f997e42fad797fa32d50db5449de58b8
|
|
| BLAKE2b-256 |
99cfca6629687c19481554869d0d20357a1e17aaac9bbfe666894492d262fc04
|