Contribute to Rizemind#
Rizemind#
Prerequisites#
First, install the uv package manager:
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Installation#
Use uv sync to install dependencies. Choose your configuration based on your needs:
Base installation (only essential dependencies):
uv sync --no-group
Full standard installation (base + testing + linting):
uv sync
ML-specific installation (includes ML libraries and above):
uv sync --group ml
Documentation generation installation (includes ML and documentation libraries):
uv sync --group ml --group docs
All packages (complete environment including tests, development tools, and documentation):
uv sync --all-groups
Usage#
Run project commands via uv run --:
uv run -- <command>
Examples:
Run Ruff formatter:
uv run -- ruff check .
uv run -- ruff check --fix .
Run Flower:
uv run -- flwr run
Running Tests#
Automated tests use pytest. Execute the full test suite with:
Unit Tests#
uv run pytest tests/unit
Integration Tests#
Requires Anvil installed.
uv run pytest tests/integration
Run specific tests with:
uv run -- pytest path/to/test_example
Linting and Formatting#
Project linting and formatting are handled by Ruff:
uv run -- ruff check --fix .
uv run -- ruff format
VSCode Integration#
For smoother workflow in VSCode:
Install the Ruff extension.
Enable “formatting on save” by navigating to Settings (Ctrl+,), search for
ruff save, and toggle it on.
Examples#
Check the examples directory for detailed instructions on running specific examples.
Documentation#
Documentation is generated using Sphinx and written in reStructuredText (reST). To build and preview documentation locally:
cd sphinx
uv run -- sphinx-autobuild source build/html
Access the generated documentation via http://localhost:8000 in your browser.