Skip to content

Commit

Permalink
create workspace supports uv==0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
carderne committed Aug 31, 2024
1 parent cdb7179 commit 8e8ae44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[project]
name = "una"
version = "0.0"
requires-python = ">= 3.11"

[tool.uv]
dev-dependencies = [
"pytest >= 8.3.1",
Expand All @@ -6,6 +11,7 @@ dev-dependencies = [
"ruff >= 0.6.2",
"mkdocs-typer>=0.0.3",
]
package = false

[tool.uv.workspace]
members = ["una", "plugins/hatch"]
Expand Down
1 change: 0 additions & 1 deletion una/una/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,3 @@ def create_workspace_command():
files.create_workspace(path)
console.print("Success!")
console.print("Set up workspace in current directory.")
console.print("Remember to delete the src/ directory")
3 changes: 1 addition & 2 deletions una/una/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ def _update_root_pyproj(path: Path, dependencies: str) -> str:

ns: str = toml["project"]["name"] # pyright:ignore[reportIndexIssue,reportAssignmentType]
requires_python: str = toml["project"]["requires-python"] # pyright:ignore[reportIndexIssue,reportAssignmentType]
toml.pop("project") # pyright:ignore[reportUnknownMemberType]
toml.pop("build-system") # pyright:ignore[reportUnknownMemberType]
toml["tool"]["uv"].add("package", False) # pyright:ignore[reportUnknownMemberType]
toml["tool"]["uv"]["workspace"] = {"members": _EXAMPLE_MEMBERS} # pyright:ignore[reportIndexIssue]
toml["tool"]["una"] = {"namespace": ns, "requires-python": requires_python} # pyright:ignore[reportIndexIssue]
with pyproj.open("w") as f:
Expand Down

0 comments on commit 8e8ae44

Please sign in to comment.