generated from bazel-contrib/rules-template
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from betaboon/fix-uv-pep735
fix(uv): lockfile translation of pep735 dependency groups with uv 0.4.27
- Loading branch information
Showing
9 changed files
with
1,440 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
33 changes: 33 additions & 0 deletions
33
pycross/tests/uv/lock_0_4_27_legacy_dev_dependencies/BUILD.bazel
This file contains 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,33 @@ | ||
""" | ||
uv has introduced backwards compatible support for pep735. | ||
This change was introduced in the following PR: | ||
https://github.com/astral-sh/uv/pull/8272 | ||
This PR was contained in the following release: | ||
https://github.com/astral-sh/uv/releases/tag/0.4.27 | ||
""" | ||
|
||
load("@aspect_bazel_lib//lib:testing.bzl", "assert_json_matches") | ||
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file") | ||
load("//pycross:defs.bzl", "pycross_uv_lock_model") | ||
|
||
pycross_uv_lock_model( | ||
name = "lock", | ||
all_development_groups = True, | ||
lock_file = "uv.lock", | ||
project_file = "pyproject.toml", | ||
) | ||
|
||
write_source_file( | ||
name = "update_expected", | ||
diff_test = False, | ||
in_file = ":lock", | ||
out_file = "expected.json", | ||
) | ||
|
||
assert_json_matches( | ||
name = "test", | ||
file1 = ":lock", | ||
file2 = "expected.json", | ||
) |
581 changes: 581 additions & 0 deletions
581
pycross/tests/uv/lock_0_4_27_legacy_dev_dependencies/expected.json
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
pycross/tests/uv/lock_0_4_27_legacy_dev_dependencies/pyproject.toml
This file contains 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,15 @@ | ||
[project] | ||
name = "rules-pycross-test" | ||
version = "0.1.0" | ||
description = "" | ||
requires-python = ">=3.9, <3.13" | ||
dependencies = [] | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.uv] | ||
dev-dependencies = [ | ||
"regex>=2024.11.6", | ||
] |
87 changes: 87 additions & 0 deletions
87
pycross/tests/uv/lock_0_4_27_legacy_dev_dependencies/uv.lock
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,33 @@ | ||
""" | ||
uv has introduced backwards compatible support for pep735. | ||
This change was introduced in the following PR: | ||
https://github.com/astral-sh/uv/pull/8272 | ||
This PR was contained in the following release: | ||
https://github.com/astral-sh/uv/releases/tag/0.4.27 | ||
""" | ||
|
||
load("@aspect_bazel_lib//lib:testing.bzl", "assert_json_matches") | ||
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file") | ||
load("//pycross:defs.bzl", "pycross_uv_lock_model") | ||
|
||
pycross_uv_lock_model( | ||
name = "lock", | ||
all_development_groups = True, | ||
lock_file = "uv.lock", | ||
project_file = "pyproject.toml", | ||
) | ||
|
||
write_source_file( | ||
name = "update_expected", | ||
diff_test = False, | ||
in_file = ":lock", | ||
out_file = "expected.json", | ||
) | ||
|
||
assert_json_matches( | ||
name = "test", | ||
file1 = ":lock", | ||
file2 = "expected.json", | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,15 @@ | ||
[project] | ||
name = "rules-pycross-test" | ||
version = "0.1.0" | ||
description = "" | ||
requires-python = ">=3.9, <3.13" | ||
dependencies = [] | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[dependency-groups] | ||
dev = [ | ||
"regex>=2024.11.6", | ||
] |
Large diffs are not rendered by default.
Oops, something went wrong.