Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 4 additions & 14 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ jobs:

# Prevent Jekyll from ignoring _static directories
touch docs_output/.nojekyll

# Inject version flyout CSS and JS into all HTML files
REPO_NAME="${{ github.event.repository.name }}"
find docs_output -name '*.html' -exec sed -i \
-e "s|</head>|<link rel=\"stylesheet\" type=\"text/css\" href=\"/${REPO_NAME}/_shared/css/version_flyout.css\" />\n</head>|" \
-e "s|</body>|<script src=\"/${REPO_NAME}/_shared/js/version_flyout.js\"></script>\n</body>|" \
{} +
- name: Verify build output
run: |
if [[ ! -f docs_output/index.html ]]; then
Expand Down Expand Up @@ -192,16 +185,13 @@ jobs:
fi
fi

# --- shared assets ---
mkdir -p publish/_shared/css publish/_shared/js
cp docs/_static/css/version_flyout.css publish/_shared/css/
cp docs/_static/js/version_flyout.js publish/_shared/js/

# --- root index & Jekyll bypass ---
cp docs/_gh_pages/index.html publish/index.html
touch publish/.nojekyll

# --- generate switcher.json ---
# --- generate versions.json (consumed by the score_layout built-in
# navbar version switcher via json_url =
# https://<owner>.github.io/<repo>/versions.json) ---
{
echo '['
echo " {\"name\": \"latest\", \"version\": \"latest\", \"url\": \"${REPO_URL}/latest/\"}"
Expand All @@ -216,7 +206,7 @@ jobs:
done

echo ']'
} > publish/switcher.json
} > publish/versions.json
- name: Upload Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
Expand Down
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ bazel_dep(name = "flatbuffers", version = "25.9.23")
bazel_dep(name = "download_utils", version = "1.2.2")
bazel_dep(name = "trlc", version = "3.0.0")
bazel_dep(name = "lobster", version = "1.0.4")

bazel_dep(name = "score_docs_as_code", version = "4.6.1", dev_dependency = True)

bazel_dep(name = "rules_distroless", version = "0.8.0")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")

Expand Down Expand Up @@ -322,6 +325,11 @@ apt.install(
)
use_repo(apt, "docs_runtime")

register_toolchains(
"//bazel/rules/rules_score:sphinx_score_layout_toolchain",
dev_dependency = True,
)

register_toolchains(
"//bazel/rules/rules_score:sphinx_default_toolchain",
)
Expand Down
30 changes: 29 additions & 1 deletion bazel/rules/rules_score/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ load(
"//bazel/rules/rules_score:rules_score.bzl",
"sphinx_module",
)
load("//bazel/rules/rules_score:sphinx_toolchain.bzl", "sphinx_toolchain")
load(
"//bazel/rules/rules_score:sphinx_toolchain.bzl",
"score_sphinx_toolchain",
"sphinx_toolchain",
)
load("//lobster_bazel:lobster_bazel.bzl", "lobster_linker")

config_setting(
Expand All @@ -34,6 +38,7 @@ exports_files([
"src/bazel_sphinx_needs.py",
"src/sphinx_wrapper.py",
"templates/conf.template.py",
"templates/conf.score_layout.template.py",
"templates/dependable_element_index.template.rst",
"templates/section_page.template.rst",
"templates/unit.template.rst",
Expand Down Expand Up @@ -293,6 +298,29 @@ toolchain(
toolchain_type = ":toolchain_type",
)

# Scoped Sphinx toolchain that renders with the shared S-CORE layout
# (score_layout extension from score_docs_as_code) instead of the stock
# Read-the-Docs theme, so this repository's own documentation site matches the
# baselibs / lifecycle sites (top navigation bar instead of the RTD expandable
# left sidebar). Registered ahead of :sphinx_default_toolchain in the root
# MODULE.bazel so it wins toolchain resolution for this module's sphinx_module
# targets, while downstream consumers keep the default RTD toolchain.
score_sphinx_toolchain(
name = "sphinx_score_layout_toolchain",
conf_template = "//bazel/rules/rules_score:templates/conf.score_layout.template.py",
extra_deps = [
# score_layout provides the shared S-CORE theme (top navigation). We
# deliberately depend on it directly rather than on score_sphinx_bundle
# so score_metamodel is NOT importable: the shared sphinx_conf_helpers
# then stays on its ImportError fallback (empty needs schema, matching
# the current default RTD build) instead of hitting score_metamodel's
# 4.6.1 API which differs from the helper's expectations.
"@score_docs_as_code//src/extensions/score_layout",
"@score_docs_as_code//src/helper_lib",
],
visibility = ["//visibility:public"],
)

# ---------------------------------------------------------------------------
# Lobster traceability – rules_score Bazel implementation
# ---------------------------------------------------------------------------
Expand Down
23 changes: 23 additions & 0 deletions bazel/rules/rules_score/docs/development.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
..
# *******************************************************************************
# 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
# *******************************************************************************

Development
===========

.. toctree::
:maxdepth: 2

integration_guide
tooling_architecture
tool_reference/index
49 changes: 24 additions & 25 deletions bazel/rules/rules_score/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,42 @@ safety-critical software according to S-CORE process guidelines. It covers
the full artefact lifecycle — from requirements and architecture through
safety analysis to the top-level SEooC assembly.

Overview
--------

.. toctree::
:maxdepth: 2
:caption: Overview
:maxdepth: 3

overview

Usage
-----

.. toctree::
:maxdepth: 2
:caption: Usage
:maxdepth: 3

usage

skills_setup
user_guide/index
rule_reference
Validation
----------

.. toctree::
:maxdepth: 2
:caption: Validation
:maxdepth: 3

tool_reference/specs/bazel_component
tool_reference/specs/class_design_implementation
tool_reference/specs/component_internal_api
tool_reference/specs/component_public_api
tool_reference/specs/component_sequence
tool_reference/specs/sequence_internal_api
validation

Development
-----------

.. toctree::
:maxdepth: 2
:caption: Development
:maxdepth: 3

development

integration_guide
tooling_architecture
tool_reference/index
Tool Qualification
------------------

.. toctree::
:maxdepth: 2
:caption: Tool Qualification
:maxdepth: 3

Requirements <tool_qualification>
Traceability Report <requirements/traceability_rst/index>
quality_report
qualification
5 changes: 5 additions & 0 deletions bazel/rules/rules_score/docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
Overview
========

Overview
--------

``rules_score`` organises safety-critical software artefacts into four groups:

**Documentation Rules** — Sphinx builder and supporting helpers:
Expand Down Expand Up @@ -42,6 +45,8 @@ Overview

All rules support cross-module dependencies for sphinx-needs integration and HTML merging.

.. _overview-quick-reference:

Quick Reference
---------------

Expand Down
23 changes: 23 additions & 0 deletions bazel/rules/rules_score/docs/qualification.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
..
# *******************************************************************************
# 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
# *******************************************************************************

Tool Qualification
==================

.. toctree::
:maxdepth: 2

Requirements <tool_qualification>
Traceability Report <requirements/traceability_rst/index>
quality_report
23 changes: 23 additions & 0 deletions bazel/rules/rules_score/docs/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
..
# *******************************************************************************
# 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
# *******************************************************************************

Usage
=====

.. toctree::
:maxdepth: 2

skills_setup
user_guide/index
rule_reference
26 changes: 26 additions & 0 deletions bazel/rules/rules_score/docs/validation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
..
# *******************************************************************************
# 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
# *******************************************************************************

Validation
==========

.. toctree::
:maxdepth: 2

tool_reference/specs/bazel_component
tool_reference/specs/class_design_implementation
tool_reference/specs/component_internal_api
tool_reference/specs/component_public_api
tool_reference/specs/component_sequence
tool_reference/specs/sequence_internal_api
Loading
Loading