Skip to content

Commit 0e95c5d

Browse files
Integration status dashboard (#176)
* Add dashabord * add bazel targets * cleanup scripts * remove uv and duplicated files * fix imports and deps * Align path handling * readme update and workflow * handle bazel sandbox in saving output * Extend logic to use generation time data too * Make entrypoint cleaner * Align formatting * Cleanup generation * Fix bazel * Replace manual github with pygithub --------- Co-authored-by: Piotr Korkus <piotr.korkus.ext@qorix.ai>
1 parent 5465090 commit 0e95c5d

25 files changed

Lines changed: 2254 additions & 8 deletions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
name: Internal Tooling Tests
14+
on:
15+
pull_request:
16+
types: [opened, reopened, synchronize]
17+
push:
18+
branches:
19+
- main
20+
jobs:
21+
internal_tests:
22+
uses: eclipse-score/cicd-workflows/.github/workflows/tests.yml@main
23+
with:
24+
bazel-target: "test //scripts/tooling:tooling_tests"

.github/workflows/test_and_docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ on:
3030
concurrency:
3131
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
3232
cancel-in-progress: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3335
jobs:
3436
test_and_docs:
3537
runs-on: ubuntu-22.04
@@ -111,6 +113,8 @@ jobs:
111113
--github_user=${{ github.repository_owner }} \
112114
--github_repo=${{ github.event.repository.name }}
113115
116+
CURRENT=$(realpath .)
117+
bazel run //scripts/tooling -- misc html_report --output ${CURRENT}/_build/status_dashboard.html
114118
tar -cf github-pages.tar _build
115119
- name: Upload documentation artifact
116120
uses: actions/upload-artifact@v4.4.0

BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ use_format_targets()
6767

6868
exports_files([
6969
"MODULE.bazel",
70+
"pyproject.toml",
7071
])

MODULE.bazel.lock

Lines changed: 14 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,8 @@ local_path_override(module_name = "score_tooling", path = "../tooling")
171171
### Rust
172172

173173
Use `scripts/generate_rust_analyzer_support.sh` to generate rust_analyzer settings that will let VS Code work.
174+
175+
## Internal tooling
176+
177+
Internal tooling scripts are currently under development to provide user single point of interaction with all
178+
created goods. More detailed readme can be found in scripts: [Tooling README](scripts/tooling/README.md)

bazel_common/score_python.MODULE.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313
bazel_dep(name = "rules_python", version = "1.8.3")
14+
bazel_dep(name = "aspect_rules_py", version = "1.5.2")
1415

1516
PYTHON_VERSION = "3.12"
1617

@@ -28,3 +29,12 @@ pip.parse(
2829
requirements_lock = "//feature_integration_tests/test_cases:requirements.txt.lock",
2930
)
3031
use_repo(pip, "pip_score_venv_test")
32+
33+
pip.parse(
34+
envsubst = ["PIP_INDEX_URL"],
35+
extra_pip_args = ["--index-url=${PIP_INDEX_URL:-https://pypi.org/simple/}"],
36+
hub_name = "ref_int_scripts_env",
37+
python_version = PYTHON_VERSION,
38+
requirements_lock = "//scripts/tooling:requirements.txt",
39+
)
40+
use_repo(pip, "ref_int_scripts_env")

docs/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ Newest Release Notes
3030
newest_release_note = max(all_release_notes, key=lambda s: int(re.search(r'v(\d+)', s["id"]).group(1)))
3131
results = [newest_release_note]
3232

33+
Current Integration Status Overview
34+
-----------------------------------
35+
36+
`View dashboard (points always to main for now) <https://eclipse-score.github.io/reference_integration/main/status_report.html>`_
37+
3338
Explore the documentation
3439
-------------------------
3540
.. toctree::

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
[tool.pytest]
2+
pythonpath = [
3+
".",
4+
"scripts/tooling",
5+
]
6+
testpaths = ["scripts/tooling/tests"]
7+
18
[tool.ruff]
29
# Exclude a variety of commonly ignored directories.
310
exclude = [
@@ -75,7 +82,7 @@ select = [
7582
# pyupgrade
7683
"UP",
7784
]
78-
ignore = ["F401", "PTH123", "ARG002", "T201"]
85+
ignore = ["F401", "PTH123", "ARG002", "T201", "TC003"]
7986

8087
# Allow fix for all enabled rules (when `--fix`) is provided.
8188
fixable = ["ALL"]

scripts/tooling/BUILD

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
load("@ref_int_scripts_env//:requirements.bzl", "all_requirements")
14+
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
15+
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
16+
load("@score_tooling//python_basics:defs.bzl", "score_py_pytest")
17+
18+
# In order to update the requirements, change the `requirements.in` file and run:
19+
# `bazel run //src:requirements.update`.
20+
# This will update the `requirements.txt` file.
21+
# To upgrade all dependencies to their latest versions, run:
22+
# `bazel run //src:requirements.update -- --upgrade`.
23+
compile_pip_requirements(
24+
name = "requirements",
25+
srcs = [
26+
"requirements.in",
27+
"@score_tooling//python_basics:requirements.txt",
28+
],
29+
requirements_txt = "requirements.txt",
30+
tags = [
31+
"manual",
32+
],
33+
)
34+
35+
# Library target
36+
py_library(
37+
name = "lib",
38+
srcs = glob(["lib/**/*.py"]),
39+
visibility = ["//visibility:public"],
40+
)
41+
42+
# CLI library target (shared between binary and tests)
43+
py_library(
44+
name = "cli",
45+
srcs = glob(["cli/**/*.py"]),
46+
data = [
47+
":cli/misc/assets/report_template.html",
48+
],
49+
deps = [":lib"] + all_requirements,
50+
)
51+
52+
# CLI binary target
53+
py_binary(
54+
name = "tooling",
55+
srcs = ["cli/main.py"],
56+
main = "cli/main.py",
57+
visibility = ["//visibility:public"],
58+
deps = [":cli"],
59+
)
60+
61+
# Tests target
62+
score_py_pytest(
63+
name = "tooling_tests",
64+
srcs = glob(["tests/**/*.py"]),
65+
data = [
66+
":cli/misc/assets/report_template.html",
67+
],
68+
pytest_config = "//:pyproject.toml",
69+
deps = [
70+
":cli",
71+
":lib",
72+
] + all_requirements,
73+
)

scripts/tooling/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Tooling scripts
2+
3+
## Running tooling CLI
4+
5+
```bash
6+
bazel run //scripts/tooling -- --help
7+
```
8+
9+
```bash
10+
bazel run //scripts/tooling -- misc --help
11+
```
12+
13+
## Creating HTML report
14+
15+
```bash
16+
bazel run //scripts/tooling -- misc html_report
17+
```
18+
19+
## Running tests
20+
21+
```bash
22+
bazel test //scripts/tooling_tests
23+
```
24+
25+
## Updating dependencies
26+
27+
Update a list of requirements in [requirements.in](requirements.in) file and then
28+
regenerate lockfile [requirements.txt](requirements.txt) with:
29+
30+
```bash
31+
bazel run //scripts/tooling:requirements.update
32+
```

0 commit comments

Comments
 (0)