Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions dev/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_multirun//:defs.bzl", "multirun")
load("//python/uv:lock.bzl", "lock") # buildifier: disable=bzl-visibility

licenses(["notice"])
Expand Down Expand Up @@ -27,3 +28,51 @@ lock(
python_version = "3.10",
visibility = ["//:__subpackages__"],
)

# This target runs all dev-only dependency updaters across the repo.
# Run: bazel run //dev:all_requirements.update
multirun(
name = "all_requirements.update",
commands = [
"//tools/publish:{}.update".format(r)
for r in [
"requirements_universal",
"requirements_darwin",
"requirements_windows",
"requirements_linux",
]
] + [
":requirements.update",
":uv_lock.update",
"//examples:bzlmod_requirements_3_12.update",
"//examples:bzlmod_requirements_3_12_windows.update",
"//examples:bzlmod_requirements_3_13.update",
"//examples:bzlmod_requirements_3_13_windows.update",
"//examples:bzlmod_requirements_3_14.update",
"//examples:bzlmod_requirements_3_14_windows.update",
"//tests/multi_pypi/alpha:requirements.update",
"//tests/multi_pypi/beta:requirements.update",
"//tests/uv/lock/pyproject_toml:requirements.update",
"//tests/uv/lock/workspaces:requirements.update",
],
tags = ["manual"],
visibility = ["//:__subpackages__"],
)

alias(
name = "requirements_all.update",
actual = ":all_requirements.update",
tags = ["manual"],
visibility = ["//:__subpackages__"],
)

# NOTE: The requirements for the pip dependencies may sometimes break the build
# process due to how `pip-compile` works (i.e. it sometimes needs to build
# wheels to resolve the `pyproject.toml` file. Hence we do not lump the
# target with the other targets above.
alias(
name = "whl_library_requirements.update",
actual = "//tools/private/update_deps:update_pip_deps",
tags = ["manual"],
visibility = ["//:__subpackages__"],
)
14 changes: 7 additions & 7 deletions docs/devguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ integration test.

1. Modify the `./python/private/pypi/requirements.txt` file and run:
```
bazel run //private:whl_library_requirements.update
bazel run //dev:whl_library_requirements.update
```
1. Run the following target to update `twine` dependencies:
```
bazel run //private:requirements.update
bazel run //dev:all_requirements.update
```
1. Bump the coverage dependencies using the script using:
```
Expand All @@ -111,11 +111,11 @@ integration test.
## Updating tool dependencies

It's suggested to routinely update the tool versions within our repo. Some of the
tools are using requirement files compiled by `uv`, and others use other means. In order
to have everything self-documented, we have a special target,
`//private:requirements.update`, which uses `rules_multirun` to run all
of the requirement-updating scripts in sequence in one go. This can be done once per release as
we prepare for releases.
tools are using requirement files compiled by `uv`, and others use other means.
In order to have everything self-documented, we have a special target,
`//dev:all_requirements.update`, which uses `rules_multirun` to run all of the
requirement-updating scripts in sequence in one go. This can be done once per
release as we prepare for releases.

(creating-backport-prs)=
## Creating Backport PRs
Expand Down
40 changes: 0 additions & 40 deletions private/BUILD.bazel

This file was deleted.

2 changes: 1 addition & 1 deletion tools/private/update_deps/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ py_binary(
"REQUIREMENTS_TXT": "$(rlocationpath //python/private/pypi:requirements_txt)",
},
imports = ["../../.."],
visibility = ["//private:__pkg__"],
visibility = ["//:__subpackages__"],
deps = [
":args",
":update_file",
Expand Down
2 changes: 1 addition & 1 deletion tools/publish/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ publish_deps(
"--emit-index-url",
"--upgrade", # always upgrade
],
visibility = ["//private:__pkg__"],
visibility = ["//:__subpackages__"],
)