-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ci(*:skip): Migrate devtool to uv #6659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d5e31f0
ci(*:skip): Migrate devtool to uv
danieljanes fe8e51c
Merge branch 'main' into migrate-devtool-to-uv
danieljanes e70fdb3
Format
danieljanes 8eb0aa8
Merge remote-tracking branch 'refs/remotes/origin/migrate-devtool-to-…
danieljanes a7acc5b
Update .github/workflows/intelligence-docs.yml
danieljanes bb81ac7
Update dev/README.md
danieljanes cb73081
Update description
danieljanes 862cbdf
Merge remote-tracking branch 'refs/remotes/origin/migrate-devtool-to-…
danieljanes 3a22e7c
Update .github/workflows/intelligence-docs.yml
danieljanes 36de835
Merge branch 'main' into migrate-devtool-to-uv
danieljanes 88b9476
Merge branch 'main' into migrate-devtool-to-uv
flwrmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # 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. | ||
|
|
||
danieljanes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## Prerequisites | ||
|
|
||
| - Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) | ||
| - Use Python 3.10+ (as defined in `pyproject.toml`) | ||
|
|
||
| ## Quick Start | ||
|
|
||
| From the repository root: | ||
|
|
||
| ```bash | ||
| cd dev | ||
| uv sync --frozen | ||
| ``` | ||
|
|
||
| This creates/updates `dev/.venv` from `uv.lock`. | ||
|
|
||
| ## Run `devtool` Commands | ||
|
|
||
| Run modules through `uv run`: | ||
|
|
||
| ```bash | ||
| 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: | ||
|
|
||
| ```bash | ||
| cd dev | ||
| uv run ./test.sh | ||
| uv run ./format.sh | ||
| ``` | ||
|
|
||
| ## Updating Dependencies | ||
|
|
||
| 1. Edit `pyproject.toml`. | ||
| 2. Re-lock dependencies: | ||
|
|
||
| ```bash | ||
| cd dev | ||
| uv lock | ||
| ``` | ||
|
|
||
| 3. Validate with: | ||
|
|
||
| ```bash | ||
| uv sync --frozen | ||
| ``` | ||
|
|
||
| 4. 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.