Contributing¶
All contributions are welcome.
Development Setup¶
This project uses `uv <https://docs.astral.sh/uv/>`_ as the primary
development tool with `hatchling <https://hatch.pypa.io/>`_ +
`hatch-vcs <https://github.com/ofek/hatch-vcs>`_ for building and
versioning.
# Clone and install in development mode
git clone https://github.com/HaoZeke/pytest-pep723
cd pytest-pep723
uv sync
Running Tests¶
uv run pytest -v
Linting¶
uv run ruff check .
uv run ruff format --check .
Or with prek (pre-commit alternative):
uvx prek run -a
Versioning¶
Versions are derived automatically from git tags via hatch-vcs.
There is no manual version field. Between tags, dev versions are
generated automatically (e.g. 0.1.1.dev3+gabcdef).
Release Process¶
# 1. Ensure tests pass
uv run pytest -v
# 2. Build changelog (uses towncrier fragments in docs/newsfragments/)
uvx towncrier build --version "v0.1.0"
# 3. Commit the changelog
git add CHANGELOG.rst && git commit -m "doc: release notes for v0.1.0"
# 4. Tag the release
git tag -a v0.1.0 -m "Version 0.1.0"
# 5. Build and publish
uv build
uvx twine upload dist/*
News Fragments¶
Every Pull Request should include a news fragment. Create one with:
uvx towncrier create -c "Description of change." +category.type
Categories: +added, +fixed, +changed, +dev, +security,
+removed, +deprecated, +misc.