This project is a Python package that uses uv
to manage the project.
This project requires the following two tools to be installed:
- git Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
- uv An extremely fast Python package and project manager, written in Rust.
In addition to that, you also need to use uv tool install
to install some auxiliary tools:
- Ruff An extremely fast Python linter and code formatter, written in Rust.
- pre-commit A framework for managing and maintaining multi-language pre-commit hooks.
- Flexible test automation with Python.
- typos Finds and corrects spelling mistakes among source code.
uv sync
Update the project's environment.pre-commit install
Install the pre-commit script.
In addition to the regular development process, you can also use the following auxiliary tools to help with inspection and modification.
Note that `uvx` is an alias for `uv tool run`.
uvx ruff check
run the Ruff linter.uvx ruff format
run the Ruff formatter
or do it by nox: nox -s lint
.
uvx typos
to find spelling mistakesuvx typos -w
to fix spelling mistakes
uv run pytest
run the pytest
or do it by nox: nox -s test
lint and test can both do by `nox`
nox -s docs
build the document by sphinx.nox -s docs-live
rebuild Sphinx documentation on changes, with hot reloading in the browser.
Run nox to format code style and check test.
nox
Modify package version value, then commit.
Add tag
git tag -a v0.1.0
Build this tag distribution package.
uv build
Upload to pypi server, or pass --repository https://pypi.org/simple
to specify index server.
uv publish