Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
6 changes: 6 additions & 0 deletions .github/workflows/downstream_compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ jobs:
with:
egress-policy: audit

- name: Install Graphviz
uses: eclipse-score/apt-install@main
with:
packages: graphviz
cache: false

- name: Checkout PR
uses: actions/checkout@v6.0.2

Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
with:
egress-policy: audit

- name: Install Graphviz
uses: eclipse-score/apt-install@main
with:
packages: graphviz
cache: false

- name: Checkout repository (Handle all events)
uses: actions/checkout@v4.2.2
with:
Expand All @@ -43,8 +49,11 @@ jobs:
- name: Setup venv
run: bazel run --lockfile_mode=error //:ide_support

- name: Run docs_bzl tests
run: .venv_docs/bin/python -m pytest -vv src/tests/docs_bzl
- name: Prepare test report directory
run: mkdir -p tests-report

- name: Run public docs.bzl integration tests
run: .venv_docs/bin/python -m pytest -vv src/tests/docs_bzl --junitxml=tests-report/docs_bzl.xml

- name: Run bazel test targets
run: bazel test --lockfile_mode=error //... --build_tests_only
Expand All @@ -55,12 +64,8 @@ jobs:

- name: Prepare bundled test report
if: ${{ !cancelled() }}
# Creating tests-report directory
# Follow Symlinks via '-L' to copy correctly
# Copy everything inside the 'test-reports' folder
run: |
mkdir -p tests-report
rsync -amL --include='*/' --include='test.xml' --include='test.log' --exclude='*' bazel-testlogs/ tests-report/
run: rsync -amL --include='*/' --include='test.xml' --include='test.log' --exclude='*' bazel-testlogs/ tests-report/

- name: Upload bundled test report
# No need to upload something that doesn't exist.
Expand Down
14 changes: 14 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ docs(
data = [
"@score_process//:needs_json",
],
bundles = [
{
"bundle": "//src/extensions/score_mounts/docs:concept",
"mount_at": "concepts/mounts",
},
{
"bundle": "//src/extensions/score_mounts/docs:howto",
"mount_at": "how-to/mounts",
},
{
"bundle": "//src/extensions/score_mounts/docs:internals",
"mount_at": "internals/extensions/mounts",
},
],
scan_code = [
"//scripts_bazel:sources",
"//src:all_sources",
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module(name = "score_docs_as_code")
# Python version
#
###############################################################################
bazel_dep(name = "rules_python", version = "2.2.0")
bazel_dep(name = "sphinxdocs", version = "2.2.0") # separate module since rules_python 2.0.0
bazel_dep(name = "rules_python", version = "1.8.5")
bazel_dep(name = "sphinxdocs", version = "2.2.0")

PYTHON_VERSION = "3.12"

Expand Down
2,129 changes: 240 additions & 1,889 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions bzl/basics.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
def join_path(prefix, rest):
"""Compose two docname segments with `/`.

Args:
prefix: Leading docname segment, possibly empty.
rest: Trailing docname segment, possibly empty.

Returns:
The combined docname.
"""
if not prefix or prefix == ".":
return rest
if not rest:
return prefix
return prefix + "/" + rest

def dirname(path):
idx = path.rfind("/")
return "" if idx < 0 else path[:idx]

def glob_doc_sources(prefix):
"""Return glob patterns for documentation sources below ``prefix``."""
extensions = [
"png", "svg", "md", "rst", "html", "css",
"puml", "need", "yaml", "json", "csv", "inc",
]
if prefix == ".":
prefix = ""
elif prefix and not prefix.endswith("/"):
prefix += "/"
param = [prefix + "**/*." + ext for ext in extensions]
srcs = native.glob(param, allow_empty = True)
return srcs
Loading
Loading