We recommend using uv for development tasks.
We use mypy in strict mode for type checking, pytest for testing,
and ruff for linting and formatting.
From the root directory of the repository:
- Run
uv run mypyto check types. - Run
uv run pytestto execute the test suite. - Run
uv run coverage runto execute the test suite under coverage. - Run
uvx ruff checkfor linting checks. - Run
uvx ruff formatto format the code.
There's a GitHub Actions workflow that will automatically publish a release to PyPI when a GitHub release is created.
Steps to make a release:
- Bump the version number in the
pyproject.tomlfile if necessary, for example usinguv version --bump minorfor a minor release. (Note: this also updates the lockfile.) Make a PR for the version bump. - Ensure that the lockfile has been updated. (Not necessary if you used
uv version.) - Prepare release notes in a (temporary) markdown file.
- Tag the release commit with an annotated tag matching the version (e.g.
git tag -a 2.3.4); include the prepared release notes in the commit message body. - Go to the GitHub releases page: https://github.com/mdickinson/simplefractions/releases
- Create a new release, using the previously prepared release notes.
- Double-check that the release workflow succeeded and that the new release is present on PyPI at https://pypi.org/project/simplefractions.