From 490f148e96acfbdfa5b62bbb51191ac9e6b3f8d3 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 25 Feb 2026 17:45:15 +0100 Subject: [PATCH] various fixes --- .devcontainer/devcontainer.json | 2 +- .github/actions/link-check/link_parser.py | 15 +++++++-------- src/BUILD | 1 + src/extensions/BUILD | 4 +--- src/helper_lib/__init__.py | 2 +- src/requirements.in | 3 +++ src/requirements.txt | 3 +++ 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e6bd08c5..90cf9e67 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { "name": "eclipse-s-core", - "image": "ghcr.io/eclipse-score/devcontainer:1.0.0", + "image": "ghcr.io/eclipse-score/devcontainer:v1.2.0", "updateContentCommand": "bazel run //:ide_support" } diff --git a/.github/actions/link-check/link_parser.py b/.github/actions/link-check/link_parser.py index 66a22f1b..30c70e32 100644 --- a/.github/actions/link-check/link_parser.py +++ b/.github/actions/link-check/link_parser.py @@ -51,9 +51,7 @@ def generate_markdown_table(broken_links: list[BrokenLink]) -> str: table += "|----------|-------------|-----------|\n" for link in broken_links: - table += ( - f"| {link.location} | {link.line_nr} | {link.reasoning} |\n" - ) + table += f"| {link.location} | {link.line_nr} | {link.reasoning} |\n" return table @@ -62,7 +60,7 @@ def generate_issue_body(broken_links: list[BrokenLink]) -> str: markdown_table = generate_markdown_table(broken_links) return f""" # Broken Links Report. -**Last updated: {datetime.now().strftime('%d-%m-%Y %H:%M')}** +**Last updated: {datetime.now().strftime("%d-%m-%Y %H:%M")}** The following broken links were detected in the documentation: {markdown_table} @@ -73,7 +71,8 @@ def generate_issue_body(broken_links: list[BrokenLink]) -> str: --- This issue will be auto updated regularly if link issues are found. -You may close it if you wish, though a new one will be created if link issues are still present. +You may close it if you wish. +Though a new one will be created if link issues are still present. """ @@ -85,11 +84,11 @@ def strip_ansi_codes(text: str) -> str: if __name__ == "__main__": - argparse = argparse.ArgumentParser( + arg = argparse.ArgumentParser( description="Parse broken links from Sphinx log and generate issue body." ) - argparse.add_argument("logfile", type=str, help="Path to the Sphinx log file.") - args = argparse.parse_args() + arg.add_argument("logfile", type=str, help="Path to the Sphinx log file.") + args = arg.parse_args() with open(args.logfile) as f: log_content_raw = f.read() log_content = strip_ansi_codes(log_content_raw) diff --git a/src/BUILD b/src/BUILD index 476b03b4..d1b93a8c 100644 --- a/src/BUILD +++ b/src/BUILD @@ -13,6 +13,7 @@ load("@aspect_rules_lint//format:defs.bzl", "format_multirun", "format_test") load("@aspect_rules_py//py:defs.bzl", "py_library") +load("@rules_java//java:java_binary.bzl", "java_binary") load("@rules_python//python:pip.bzl", "compile_pip_requirements") load("@score_tooling//:defs.bzl", "dash_license_checker") diff --git a/src/extensions/BUILD b/src/extensions/BUILD index 471897b2..080f745f 100644 --- a/src/extensions/BUILD +++ b/src/extensions/BUILD @@ -11,9 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -load("@aspect_rules_py//py:defs.bzl", "py_binary", "py_library") -load("@docs_as_code_hub_env//:requirements.bzl", "all_requirements") -load("@score_tooling//:defs.bzl", "score_py_pytest", "score_virtualenv") +load("@aspect_rules_py//py:defs.bzl", "py_library") py_library( name = "score_plantuml", diff --git a/src/helper_lib/__init__.py b/src/helper_lib/__init__.py index fb43cff1..156a50fc 100644 --- a/src/helper_lib/__init__.py +++ b/src/helper_lib/__init__.py @@ -16,7 +16,7 @@ import sys from pathlib import Path -from python.runfiles import Runfiles +from runfiles import Runfiles from sphinx_needs.logging import get_logger LOGGER = get_logger(__name__) diff --git a/src/requirements.in b/src/requirements.in index 04192109..8623b48c 100644 --- a/src/requirements.in +++ b/src/requirements.in @@ -30,3 +30,6 @@ rich needs-config-writer == 0.2.4 # use this for a specific commit for fast development iterations # needs-config-writer @ https://github.com/useblocks/needs-config-writer/archive/032a5f8.zip + +# Need this to enable non bazel exectuion +bazel-runfiles diff --git a/src/requirements.txt b/src/requirements.txt index 251c28fb..555dcaf0 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -34,6 +34,9 @@ basedpyright==1.35.0 \ --hash=sha256:2a7e0bd476623d48499e2b18ff6ed19dc28c51909cf9e1152ad355b5809049ad \ --hash=sha256:4f4f84023df5a0cd4ee154916ba698596682ac98bacfa22c941ed6aaf07bba4e # via -r /external/score_tooling+/python_basics/requirements.txt +bazel-runfiles==1.8.5 \ + --hash=sha256:7c34df05e0115e5559cbc3069b580ef66e330e7f5dde29dba50f312dfad346d9 + # via -r src/requirements.in beautifulsoup4==4.14.3 \ --hash=sha256:0918bfe44902e6ad8d57732ba310582e98da931428d231a5ecb9e7c703a735bb \ --hash=sha256:6292b1c5186d356bba669ef9f7f051757099565ad9ada5dd630bd9de5fa7fb86