Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //src:license-checkStatus: Click to expand output |
There was a problem hiding this comment.
Pull request overview
This PR bundles a set of small fixes extracted from #411, primarily to improve non-Bazel Python execution (via bazel-runfiles), clean up some Bazel BUILD loads, and adjust dev tooling/scripts.
Changes:
- Add
bazel-runfilesto Python requirements and switch runfiles import path inhelper_lib. - Simplify/clean up Bazel BUILD files (remove unused loads; add
java_binaryload where needed). - Minor maintenance updates to the link-check action script and devcontainer image tag.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/requirements.txt |
Adds pinned bazel-runfiles with hash to the lockfile. |
src/requirements.in |
Adds bazel-runfiles as a top-level input dependency (with a new comment). |
src/helper_lib/__init__.py |
Switches runfiles import to from runfiles import Runfiles. |
src/extensions/BUILD |
Removes unused Bazel load() statements. |
src/BUILD |
Adds java_binary load (used for the PlantUML target). |
.github/actions/link-check/link_parser.py |
Small string/formatting simplifications and avoids shadowing argparse. |
.devcontainer/devcontainer.json |
Updates devcontainer image tag. |
Comments suppressed due to low confidence (2)
src/requirements.in:35
- Typo in comment: "exectuion" -> "execution" (and consider "non-Bazel" for clarity).
# Need this to enable non bazel exectuion
bazel-runfiles
.github/actions/link-check/link_parser.py:91
- For consistency with other scripts (e.g.
src/incremental.py), consider naming theArgumentParservariableparserrather thanarg(it reads like a single CLI argument rather than the parser itself).
arg = argparse.ArgumentParser(
description="Parse broken links from Sphinx log and generate issue body."
)
arg.add_argument("logfile", type=str, help="Path to the Sphinx log file.")
args = arg.parse_args()
| from pathlib import Path | ||
|
|
||
| from python.runfiles import Runfiles | ||
| from runfiles import Runfiles |
There was a problem hiding this comment.
helper_lib's Bazel target depends on @rules_python//python/runfiles (which provides python.runfiles), so switching to from runfiles import Runfiles will break Bazel executions unless the pip bazel-runfiles requirement is also added as a Bazel dep. Consider a compatibility import (try python.runfiles first, fall back to runfiles) or update the Bazel deps to match this import path.
| from runfiles import Runfiles | |
| try: | |
| # Preferred in Bazel environments using @rules_python//python/runfiles | |
| from python.runfiles import Runfiles | |
| except ImportError: | |
| try: | |
| # Fallback for environments using the pip 'bazel-runfiles' package | |
| from runfiles import Runfiles | |
| except ImportError: | |
| Runfiles = None # type: ignore[assignment] |
|
The created documentation from the pull request is available at: docu-html |
extracted from #411
as these fixes can be merged without further discussion?