Skip to content
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

uv init should respect workspace.exclude #5254

Closed
j178 opened this issue Jul 21, 2024 · 1 comment · Fixed by #5318
Closed

uv init should respect workspace.exclude #5254

j178 opened this issue Jul 21, 2024 · 1 comment · Fixed by #5318
Assignees
Labels
bug Something isn't working good first issue Good for newcomers preview Experimental behavior

Comments

@j178
Copy link
Contributor

j178 commented Jul 21, 2024

Here is the root package:

[project]
name = "work"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
dependencies = []

[tool.uv]
dev-dependencies = []

[tool.uv.workspace]
exclude = ['pkg-*']

Within the root package, we create a sub-package pkg-a, it is added to the workspace members, despite it should be excluded:

$ uv init pkg-a
Adding pkg-a as member of workspace E:\tmp\work
Initialized project pkg-a in E:\tmp\work\pkg-a

$ cat pyproject.toml
[project]
name = "work"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
dependencies = []

[tool.uv]
dev-dependencies = []

[tool.uv.workspace]
exclude = ['pkg-*']
members = ["pkg-a"]
@charliermarsh charliermarsh added bug Something isn't working preview Experimental behavior labels Jul 21, 2024
@konstin konstin added the good first issue Good for newcomers label Jul 22, 2024
@charliermarsh charliermarsh self-assigned this Jul 22, 2024
@charliermarsh
Copy link
Member

I'm here anyway so will fix.

charliermarsh added a commit that referenced this issue Jul 23, 2024
## Summary

Avoid adding to the workspace.

Closes #5254.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers preview Experimental behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants