This document describes how to develop Dante. For the user documentation, see the README and API Reference documentation.
Goals:
- zero-setup
- sync and async
- easy to use
- simple API with no nasty surprises
Code guidelines:
- feature-parity across sync and async (with identical API where applicable)
- 100% test coverage
- 100% coverage with type hints
- explicit is better than implicit (and, really, everything from the Zen of Python)
We recommend using uv, but you can also use other tools to build and test Dante.
-
Clone the repository:
git clone git@github.com:senko/dante cd dante -
Set up the virtual environment and install the dependencies:
uv sync --dev source .venv/bin/activate -
Set up git pre-commit hooks:
pre-commit install
Run the tests with coverage plugin:
pytest --cov=danteThis will show the coverage summary. To build a detailed HTML report, then run:
coverage htmlThe report will be saved in the htmlcov directory.
We use ruff for formatting and linting, with the default rules. To run
the checks:
ruff check --fix
ruff formatTo publish the package, follow these steps:
- Run
pytest,ruff check, andruff formatto ensure everything is in order. - Bump the version in
pyproject.toml, commit the version bump, and create a tag for it. - Push the package to GitHub and wait for the tests to pass.
- Build the package:
uvx --from build pyproject-build --installer uv - Upload the package to PyPI:
uvx twine upload dist/* - Clear the dist directory:
rm -rf dist/ - Create a release on GitHub with the release notes, referencing the newly created tag.