This project now uses uv for fast Python packaging and dependency management.
-
Install uv (if not already installed):
# Using the official installer curl -LsSf https://astral.sh/uv/install.sh | sh # Or using pip pip install uv
-
Install dependencies:
uv sync --group dev
-
Activate the virtual environment (optional):
source .venv/bin/activate
| Action | Command |
|---|---|
| Install dependencies | make install-deps or uv sync --group dev |
| Run tests | make test or uv run python -m pytest tests/ |
| Lint code | make lint or uv run flake8 raft tests |
| Run the application | make run or uv run python main.py |
| Build the package | make dist or uv build |
| Check code coverage | make coverage or uv run coverage run --source raft -m pytest tests/ |
This project provides convenient Make commands:
make help- Show all available commandsmake test- Run testsmake lint- Lint the codemake clean- Remove build artifactsmake install-deps- Install dependenciesmake dev- Set up development environmentmake run- Run the applicationmake dist- Build source and wheel packages
- Dependencies are defined in
pyproject.toml - Development dependencies are in the
[dependency-groups].devsection - The lock file
uv.lockensures reproducible builds - To add a dependency: edit
pyproject.tomland runuv sync - To update dependencies: run
uv sync --upgrade
- uv automatically creates and manages a virtual environment in
.venv - To run commands in the environment:
uv run <command> - To enter the environment:
source .venv/bin/activate
Tests can be run in several ways:
# Using make
make test
# Using uv directly
uv run python -m pytest tests/
# Using pytest directly after activating environment
source .venv/bin/activate
pytest tests/