Skip to content

chore: use dependency-groups for dev #2287

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 1 commit into from
May 27, 2025

Conversation

leseb
Copy link
Collaborator

@leseb leseb commented May 27, 2025

What does this PR do?

The previous [project.optional-dependencies] was misrepresenting what the packages were. They were NOT optional dependencies to the project but development dependencies. Unlike optional dependencies, development dependencies are local-only and will not be included in the project requirements when published to PyPI or other indexes. As such, development dependencies are not included in the [project] table. Additionally, the dev group is synced by default.

Source:
https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 27, 2025
@leseb leseb force-pushed the use-dependency-groups branch 3 times, most recently from d0e328b to 5135b09 Compare May 27, 2025 20:29
@ashwinb
Copy link
Contributor

ashwinb commented May 27, 2025

wow, TIL

@leseb leseb force-pushed the use-dependency-groups branch from 5135b09 to fc37ca7 Compare May 27, 2025 20:41
@leseb
Copy link
Collaborator Author

leseb commented May 27, 2025

Need #2289 for pre-commit to be happy!

The previous `[project.optional-dependencies]` was misrepresenting what
the packages were. They were NOT optional dependencies to the project
but development dependencies. Unlike optional dependencies, development
dependencies are local-only and will not be included in the project
requirements when published to PyPI or other indexes. As such,
development dependencies are not included in the [project]
table.  Additionally, the dev group is synced by default.

Source:
https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies

Signed-off-by: Sébastien Han <[email protected]>
@leseb leseb force-pushed the use-dependency-groups branch from fc37ca7 to 49f5d33 Compare May 27, 2025 20:46
@@ -61,6 +61,7 @@ repos:
"--frozen",
"--no-hashes",
"--no-emit-project",
"--no-default-groups",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is right, not that I care too much about requirements.txt :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, this will actually not sync the dev group which is synced by default.

@leseb leseb merged commit 4f3f28f into meta-llama:main May 27, 2025
26 checks passed
@leseb leseb deleted the use-dependency-groups branch May 27, 2025 21:03
leseb added a commit to leseb/llama-stack that referenced this pull request May 28, 2025
Followup of meta-llama#2287. We
must use `--group` when running commands with uv.

Signed-off-by: Sébastien Han <[email protected]>
ashwinb pushed a commit that referenced this pull request May 28, 2025
# What does this PR do?

Followup of #2287. We must
use `--group` when running commands with uv.

<!-- Provide a short summary of what this PR does and why. Link to
relevant issues if applicable. -->

<!-- If resolving an issue, uncomment and update the line below -->
<!-- Closes #[issue-number] -->

Signed-off-by: Sébastien Han <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants