This directory provides developer tooling used across the repository (for example formatting, docs helpers, and repository checks).
devtool uses uv for dependency management and command execution.
The Flower framework project remains Poetry-based.
- Install
uv - Use Python 3.10+ (as defined in
pyproject.toml)
From the repository root:
cd dev
uv sync --frozenThis creates/updates dev/.venv from uv.lock).
Run modules through uv run:
cd dev
uv run python -m devtool.check_pr_title "feat(framework): Add test"
uv run python -m devtool.init_py_check ../framework/py/flwr
uv run python -m devtool.init_py_fix ../framework/py/flwr
uv run python -m devtool.check_copyright ../framework/py/flwr
uv run python -m devtool.fix_copyright ../framework/py/flwr
uv run python -m devtool.update_html_themes
uv run python -m devtool.build_example_docsMost scripts in this directory call Python tools directly (python -m ...), so run
them via uv run to ensure they use the devtool environment:
cd dev
uv run ./test.sh
uv run ./format.sh- Edit
pyproject.toml. - Re-lock dependencies:
cd dev
uv lock- Validate with:
uv sync --frozen- Commit both:
pyproject.tomluv.lock
- CI jobs that use
devtoolshould runuv sync --frozenand execute commands withuv run. - CI jobs that install
frameworkstill use Poetry.