Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 1.61 KB

File metadata and controls

75 lines (53 loc) · 1.61 KB

Dev Tooling (devtool) with uv

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.

Prerequisites

  • Install uv
  • Use Python 3.10+ (as defined in pyproject.toml)

Quick Start

From the repository root:

cd dev
uv sync --frozen

This creates/updates dev/.venv from uv.lock.

Run devtool Commands

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_docs

Run Existing Dev Scripts with uv

Most 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

Updating Dependencies

  1. Edit pyproject.toml.
  2. Re-lock dependencies:
cd dev
uv lock
  1. Validate with:
uv sync --frozen
  1. Commit both:
  • pyproject.toml
  • uv.lock

CI Notes

  • CI jobs that use devtool should run uv sync --frozen and execute commands with uv run.
  • CI jobs that install framework still use Poetry.