Contributing to rtflite¶
Developer workflow¶
Setup¶
First off, install uv. rtflite uses uv to manage the Python package development environment.
If you have trouble installing the exact Python version pinned in the project, run
to update your uv installation.
Branching¶
Clone the repository (if you have no direct access, replace the address with your forked repository address):
Create a dedicated branch:
Dependencies¶
Restore the environment using
uv sync.
This will restore the exact versions of Python and dependency packages
under the project's .venv/
directory:
Development¶
Open the project in VS Code:
Make changes to the codebase.
We use pytest for unit testing. To run tests and get an HTML preview of code coverage, open the VS Code terminal:
Virtual environment activation
If your terminal did not activate the virtual environment for some reason (with symptoms like not finding pytest commands), activate it manually:
Documentation¶
To preview the mkdocs website locally:
To build the mkdocs website locally into site/
, run:
rtflite renders vignette-like articles under docs/articles
using markdown-exec.
This allows mkdocs to render Python code chunks and their outputs when building the site.
Check the markdown-exec documentation
for possible code chunk options.
If you made changes to the .md
files in the root directory,
make sure to synchronize them to the mkdocs website:
Formatting¶
Use isort and ruff to sort imports and format Python code:
Pull request¶
Add, commit, and push to remote, then send a pull request:
Maintainer workflow¶
Updates¶
Update local uv version:
Update uv.lock
file regularly:
Python version¶
Pin a newer Python version in .python-version
when appropriate:
The latest Python release versions are often promptly supported by uv.
Publishing¶
Publish on PyPI (maintainer token required):