Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
1909697
test(coverage): check the coverage collection with the bundled covera…
aignas Nov 7, 2026
e0351f6
fix: register the coverage dev toolchain with a full python version
aignas Nov 7, 2026
088bce4
test(coverage): check the covered and not covered lines in separate t…
aignas Nov 7, 2026
62be724
feat(toolchain): allow using a py_library as the coverage_tool
aignas Nov 8, 2026
18e6ef7
fix: use the extracted wheel files instead of a py_library
aignas Nov 8, 2026
6b8bbf1
Merge remote-tracking branch 'origin/aignas.test.coverage-collection'…
aignas Nov 8, 2026
08d2743
build(dev): add coverage to the dev dependencies
aignas Nov 8, 2026
0e78f1d
test(coverage): check the coverage collection with coverage from a pi…
aignas Nov 8, 2026
2f48dcb
test(coverage): simplify the coverage collection test setup
aignas Nov 8, 2026
3304042
test(coverage): make collect_code_coverage a bool py_reconfig attr
aignas Nov 8, 2026
4c7e034
Merge remote-tracking branch 'origin/aignas.test.coverage-collection'…
aignas Nov 8, 2026
924c4a8
test(coverage): use the bool collect_code_coverage for instrumented_pypi
aignas Nov 8, 2026
e388a75
docs: link the coverage_tool doc to the coverage docs
aignas Nov 8, 2026
35e08ea
test(coverage): use pytest_test for the coverage collection test
aignas Nov 8, 2026
cb1632f
Merge branch 'aignas.test.coverage-collection' into aignas.feat.cover…
aignas Nov 8, 2026
c9b66df
test(coverage): use pytest_test for the coverage from PyPI test
aignas Nov 8, 2026
a7894e2
Merge branch 'main' into aignas.feat.coverage-tool-py-library
aignas Nov 9, 2026
79d9d12
Merge branch 'main' into aignas.feat.coverage-tool-py-library
aignas Nov 9, 2026
197fcce
fix(toolchain): build the coverage_tool without the toolchain coverag…
aignas Nov 9, 2026
6f653a3
feat(toolchain): import the coverage package using the PyInfo imports
aignas Nov 9, 2026
1f8e9a8
feat(pypi): support target_platforms = ["*"] in pip.parse
aignas Nov 9, 2026
db5f8f9
Merge branch 'aignas.feat.pip-target-platforms-all' into aignas.feat.…
aignas Nov 9, 2026
a26b77c
feat(toolchain): use the rules_python_coverage hub as the bzlmod cove…
aignas Nov 9, 2026
c5cd90d
docs(coverage): prefer passing a py_library as the coverage_tool
aignas Nov 9, 2026
5149b91
feat(pypi): use the none-any wheel as a fallback with target_platform…
aignas Nov 9, 2026
059c494
feat(pypi): define default pip platforms for all toolchain platforms
aignas Nov 9, 2026
dbcb20e
Merge branch 'aignas.feat.pip-target-platforms-all' into aignas.feat.…
aignas Nov 9, 2026
914ef45
Merge branch 'aignas.feat.pip-default-platforms' into aignas.feat.cov…
aignas Nov 9, 2026
6073cd0
Revert "feat(pypi): use the none-any wheel as a fallback with target_…
aignas Nov 9, 2026
b36ae25
Merge branch 'aignas.feat.pip-target-platforms-all' into aignas.feat.…
aignas Nov 9, 2026
d499b58
chore: rename the news entry to use the PR number
aignas Nov 9, 2026
ce9caee
chore: rename the news entry to use the PR number
aignas Nov 9, 2026
008dbdc
Merge branch 'aignas.feat.pip-target-platforms-all' into aignas.feat.…
aignas Nov 9, 2026
ed8f876
Merge branch 'aignas.feat.pip-default-platforms' into aignas.feat.cov…
aignas Nov 9, 2026
f61d790
test(pypi): select platform specific wheels with target_platforms = […
aignas Nov 9, 2026
63fef3f
Merge branch 'aignas.feat.pip-target-platforms-all' into aignas.feat.…
aignas Nov 9, 2026
02d2e12
feat(toolchain): generate the coverage wheels for WORKSPACE from the …
aignas Nov 9, 2026
5bbeb8f
feat(toolchain): use the uv.lock based coverage hub for the WORKSPACE…
aignas Nov 9, 2026
714a7e3
chore: rename the news entry to use the PR number
aignas Nov 9, 2026
29cdabd
chore: update the vendored requirements for the new default platforms
aignas Nov 9, 2026
5fa06ff
Merge branch 'aignas.feat.pip-default-platforms' into aignas.feat.cov…
aignas Nov 9, 2026
e2933ce
Merge branch 'aignas.feat.coverage-platform-whls' into aignas.feat.co…
aignas Nov 9, 2026
787f938
fix: use CreateOrRaise for the runfiles in the coverage update script
aignas Nov 9, 2026
472bde0
fix(toolchain): do not load whl_library when registering WORKSPACE to…
aignas Nov 9, 2026
d5ca45b
fix: handle a missing runfile in the coverage update script
aignas Nov 9, 2026
84d0f4c
feat(uv): add the vendor_uv_lock macro
aignas Nov 9, 2026
9b0c9c8
refactor(toolchain): select the WORKSPACE coverage wheels from the ve…
aignas Nov 9, 2026
5a6c48c
fix: use LF in the vendored uv.lock and fix the vendor_uv_lock docstring
aignas Nov 9, 2026
0eaf950
refactor(pypi): compute the whl extraction features without rules_pyt…
aignas Nov 9, 2026
2266ce5
Merge branch 'aignas.refactor.whl-extract-features' into aignas.feat.…
aignas Nov 9, 2026
4a55555
refactor(pypi): do not load bazel_skylib from the whl_library load chain
aignas Nov 9, 2026
98aa184
refactor: add bazel_features to //python:features.bzl
aignas Nov 9, 2026
0bb36ad
chore: explain why the skylib types helpers are not used
aignas Nov 9, 2026
fbfe443
Merge branch 'aignas.refactor.whl-extract-features' into aignas.feat.…
aignas Nov 9, 2026
b29e48e
refactor(toolchain): use whl_library for the WORKSPACE coverage wheels
aignas Nov 9, 2026
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
python/features.bzl export-subst
tests/uv/lock/testdata/requirements.txt text eol=lf
python/private/runtimes_manifest.bzl text eol=lf
python/private/coverage/uv_lock.bzl text eol=lf

*.bat text eol=crlf
45 changes: 44 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,30 @@ pip.dep(name = "pytest")
pip.dep(name = "pytest-bazel")
pip.dep(name = "pytest-randomly")
pip.dep(name = "pytest-shard")
use_repo(pip, "pypi", "rules_python_publish_deps")

# The default coverage tool for the hermetic toolchains, see
# `python.toolchain.configure_coverage_tool`. The versions that do not have a
# registered toolchain are ignored.
[
pip.parse(
download_only = True,
hub_name = "rules_python_coverage",
python_version = python_version,
target_platforms = ["*"],
uv_lock = "//python/private/coverage:uv.lock",
)
for python_version in [
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
"3.15",
]
]

use_repo(pip, "pypi", "rules_python_coverage", "rules_python_publish_deps")

bazel_dep(
name = "rules_rust",
Expand Down Expand Up @@ -416,6 +439,26 @@ dev_python.toolchain(
python_version = "3.12.16",
)

# For testing the coverage collection with the coverage tool from a PyPI hub.
# See //tests/coverage:coverage_from_pypi_test
dev_python.toolchain(
python_version = "3.13.13",
)

[
dev_python.single_version_platform_override(
coverage_tool = "@dev_pip//coverage",
platform = platform,
python_version = "3.13.13",
)
for platform in [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
]
]

# For testing an arbitrary runtime triggered by a custom flag.
# See //tests/toolchains:custom_platform_toolchain_test
dev_python.single_version_platform_override(
Expand Down
2 changes: 2 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ python_register_multi_toolchains(
default_version = "3.14",
# Integration tests verify each version, so register all of them.
python_versions = PYTHON_VERSIONS,
# See //tests/coverage:coverage_collection_test
register_coverage_tool = True,
)

load("//python/uv:repositories.bzl", "uv_toolchains_manifest")
Expand Down
2 changes: 2 additions & 0 deletions dev/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ multirun(
"//examples:bzlmod_other_module_uv_lock.update",
"//examples:bzlmod_uv_lock.update",
"//examples/wheel:requirements_server.update",
# Updates the uv.lock and then the vendored uv_lock.bzl.
"//python/private/coverage:uv_lock_bzl.update",
"//tests/multi_pypi/alpha:requirements.update",
"//tests/multi_pypi/beta:requirements.update",
"//tests/multiple_inputs:multiple_inputs.update",
Expand Down
2 changes: 2 additions & 0 deletions dev/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ dependencies = [
"sphinx_rtd_theme >=2.0", # uv insists on downgrading for some reason
"readthedocs-sphinx-ext",
"absl-py",
# Used to test the coverage collection with coverage from a PyPI hub.
"coverage",
"typing-extensions",
"sphinx-reredirects",
"pefile",
Expand Down
16 changes: 0 additions & 16 deletions dev/update_deps/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,6 @@ py_library(
imports = ["../.."],
)

py_binary(
name = "update_coverage_deps",
srcs = ["update_coverage_deps.py"],
data = [
"//python/private:coverage_deps_filegroup",
],
env = {
"UPDATE_FILE": "$(rlocationpath //python/private:coverage_deps_filegroup)",
},
imports = ["../.."],
deps = [
":args",
":update_file",
],
)

py_binary(
name = "update_pip_deps",
srcs = ["update_pip_deps.py"],
Expand Down
158 changes: 0 additions & 158 deletions dev/update_deps/update_coverage_deps.py

This file was deleted.

Loading
Loading