From 0e119e6a8ca25cd948dec749b947a5dbf7170355 Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Tue, 18 Aug 2026 14:07:23 +0100 Subject: [PATCH 1/5] docs: add docs_as_code docs bundles --- docs/index.rst | 1 + docs/module/index.rst | 45 +++++++++++++++++++++++++++++++++++++++++ score/BUILD | 8 ++++++++ score/time/BUILD | 7 +++++++ score/time_daemon/BUILD | 7 +++++++ score/time_slave/BUILD | 7 +++++++ 6 files changed, 75 insertions(+) create mode 100644 docs/module/index.rst diff --git a/docs/index.rst b/docs/index.rst index d7d50f3d..bf37b218 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -43,6 +43,7 @@ For a detailed concept and architectural design, please refer to the :doc:`time_ :caption: Contents: features/index + module/index Project Layout -------------- diff --git a/docs/module/index.rst b/docs/module/index.rst new file mode 100644 index 00000000..e2e437bc --- /dev/null +++ b/docs/module/index.rst @@ -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 + # ******************************************************************************* + +Module +====== + +The S-CORE ``time`` module provides a unified API for accessing system, steady, high-resolution steady, and PTP-synchronized vehicle time. The module contains four components: a client library for application-facing access, Time Slave for PTP clock synchronization, ``ts_client`` for shared-memory IPC between Time Slave and Time Daemon, and Time Daemon for synchronization quality validation before serving Vehicle Time. + +.. code-block:: rst + + .. mod:: Time + :id: mod__time + :includes: comp__component_name_template + +Module View +----------- + +.. code-block:: rst + + .. mod_view_sta:: Time Module Static View + :id: mod_view_sta__time__time + :includes: comp__component_name_template + + .. needarch:: + :scale: 50 + :align: center + + {{ draw_module(need(), needs) }} + +Module Documents +---------------- + +.. toctree:: + :maxdepth: 1 diff --git a/score/BUILD b/score/BUILD index ca5de742..44cf6513 100644 --- a/score/BUILD +++ b/score/BUILD @@ -10,3 +10,11 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* + +load("@score_docs_as_code//:docs.bzl", "docs_bundle") + +docs_bundle( + name = "docs_bundle", + source_dir = "docs", + visibility = ["//visibility:public"], +) diff --git a/score/time/BUILD b/score/time/BUILD index 1048941a..7f707a4b 100644 --- a/score/time/BUILD +++ b/score/time/BUILD @@ -13,6 +13,13 @@ load("@score_baselibs//:bazel/unit_tests.bzl", "cc_unit_test_suites_for_host_and_qnx") load("@score_baselibs//third_party/itf:py_unittest_qnx_test.bzl", "py_unittest_qnx_test") +load("@score_docs_as_code//:docs.bzl", "docs_bundle") + +docs_bundle( + name = "docs_bundle", + source_dir = "docs", + visibility = ["//visibility:public"], +) py_unittest_qnx_test( name = "qnx_unit_test_cases", diff --git a/score/time_daemon/BUILD b/score/time_daemon/BUILD index a1a29bac..c6430a3d 100644 --- a/score/time_daemon/BUILD +++ b/score/time_daemon/BUILD @@ -12,6 +12,13 @@ # ******************************************************************************* load("@score_baselibs//:bazel/unit_tests.bzl", "cc_unit_test_suites_for_host_and_qnx") +load("@score_docs_as_code//:docs.bzl", "docs_bundle") + +docs_bundle( + name = "docs_bundle", + source_dir = "docs", + visibility = ["//visibility:public"], +) cc_unit_test_suites_for_host_and_qnx( name = "unit_test_suite", diff --git a/score/time_slave/BUILD b/score/time_slave/BUILD index 4383af58..59c276e7 100644 --- a/score/time_slave/BUILD +++ b/score/time_slave/BUILD @@ -12,6 +12,13 @@ # ******************************************************************************* load("@score_baselibs//:bazel/unit_tests.bzl", "cc_unit_test_suites_for_host_and_qnx") +load("@score_docs_as_code//:docs.bzl", "docs_bundle") + +docs_bundle( + name = "docs_bundle", + source_dir = "docs", + visibility = ["//visibility:public"], +) cc_unit_test_suites_for_host_and_qnx( name = "unit_test_suite", From 99637b102ef9b8788407e37b236d102770197a0f Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Wed, 19 Aug 2026 09:38:08 +0100 Subject: [PATCH 2/5] update BUILD files --- BUILD | 23 +++++++++++++++++++++++ score/BUILD | 8 -------- score/ts_client/BUILD | 20 ++++++++++++++++++++ 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 score/ts_client/BUILD diff --git a/BUILD b/BUILD index 74d09995..94fd033c 100644 --- a/BUILD +++ b/BUILD @@ -21,6 +21,29 @@ setup_starpls( ) docs( + bundles = [ + { + "bundle": "//score/time_slave:docs_bundle", + "mount_at": "time_slave", + "attach_to": "module/index", + }, + { + "bundle": "//score/time_daemon:docs_bundle", + "mount_at": "time_daemon", + "attach_to": "module/index", + }, + + { + "bundle": "//score/ts_client:docs_bundle", + "mount_at": "ts_client", + "attach_to": "module/index", + }, + { + "bundle": "//score/time:docs_bundle", + "mount_at": "time", + "attach_to": "module/index", + }, + ], external_needs = [ "@score_process//:needs_json_file", ], diff --git a/score/BUILD b/score/BUILD index 44cf6513..ca5de742 100644 --- a/score/BUILD +++ b/score/BUILD @@ -10,11 +10,3 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* - -load("@score_docs_as_code//:docs.bzl", "docs_bundle") - -docs_bundle( - name = "docs_bundle", - source_dir = "docs", - visibility = ["//visibility:public"], -) diff --git a/score/ts_client/BUILD b/score/ts_client/BUILD new file mode 100644 index 00000000..44cf6513 --- /dev/null +++ b/score/ts_client/BUILD @@ -0,0 +1,20 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +load("@score_docs_as_code//:docs.bzl", "docs_bundle") + +docs_bundle( + name = "docs_bundle", + source_dir = "docs", + visibility = ["//visibility:public"], +) From f2000d707e70770a3d9710cc58c3e15e5529b29c Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Wed, 19 Aug 2026 09:46:33 +0100 Subject: [PATCH 3/5] fix build --- BUILD | 1 + MODULE.bazel | 1 + MODULE.bazel.lock | 3 +++ .../docs/detailed_design/detailed_design.rst | 4 ++-- score/time/docs/detailed_design/index.rst | 2 +- score/time/docs/index.rst | 2 +- score/time/docs/requirements/requirements.rst | 24 ++++++++++--------- .../docs/detailed_design/detailed_design.rst | 4 ++-- .../docs/detailed_design/index.rst | 2 +- .../docs/requirements/requirements.rst | 24 ++++++++++--------- score/time_slave/docs/index.rst | 6 ----- 11 files changed, 38 insertions(+), 35 deletions(-) diff --git a/BUILD b/BUILD index 94fd033c..c69d8759 100644 --- a/BUILD +++ b/BUILD @@ -46,6 +46,7 @@ docs( ], external_needs = [ "@score_process//:needs_json_file", + "@score_platform//:needs_json_file", ], project = "S-CORE Time", project_url = "https://eclipse-score.github.io/time", diff --git a/MODULE.bazel b/MODULE.bazel index db4d9edc..5c2c0f23 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -77,6 +77,7 @@ git_override( remote = "https://github.com/eclipse-score/score_cpp_policies.git", ) +bazel_dep(name = "score_platform", version = "0.6.4", dev_dependency = True) bazel_dep(name = "score_process", version = "2.0.3", dev_dependency = True) bazel_dep(name = "score_tooling", version = "1.2.0", dev_dependency = True) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 9f375b4d..7b7d9cc2 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1042,6 +1042,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.5.0/MODULE.bazel": "4cfe52fe8b8dbeaf7e87500036391da278f72f1c2b41b689ffdd4337196dd8fe", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.6.0/MODULE.bazel": "d5fbfed7b9bd65f10830e2290045dea639a8cfcaf9f9f0f7a1b12888c14e7d2b", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/6.0.0/MODULE.bazel": "ab2af2d8fab73e4512d2e2bd399a64d10c5c5463388322f7025637b13ec7585c", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/7.0.1/MODULE.bazel": "8ca16bc1143f4834e1ad061ddebb3b57dac966d46f890a07829f055dbb3a3d15", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/7.1.0/MODULE.bazel": "7d89729cc6a1cb7a13b9cfbf4bd84ace437451f5eb0873202586ac7cb288eff5", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/7.1.0/source.json": "2aebac074ccaef8aad11822d04a98e97d9aded5d851812075969618da8cf1996", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_format_checker/0.1.1/MODULE.bazel": "1acc254faa90e9f97b79ac69af25b6c21c561f8d6079914f6352b9b20d26bd37", @@ -1051,6 +1052,8 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_logging/0.2.1/source.json": "4742b24f2c7f3e504effd08edfa02df86e71745b345e601c7500008c7fb28c82", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_platform/0.1.0/MODULE.bazel": "cc9eae86e76f2a930510ed6e50ec991bb5661687e24881685b39c322087adf6f", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_platform/0.1.1/MODULE.bazel": "eb086ba99f9319371fbbd0a9252dfd27b0817039b88bd4d691602974b1ada005", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_platform/0.6.4/MODULE.bazel": "dac9bdb1dd0934bd54549587d0d6d2db93c8298fa190fccd417fff4e0f4a7519", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_platform/0.6.4/source.json": "a77419136e32cd79a51557dbbf67a73203d67b1b92102a3970720959f31b00fd", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.0.4/MODULE.bazel": "f74302cb90a7c4878db302276afae82966878099861dcfca3ef43256131dab52", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.0.5/MODULE.bazel": "ed17c232ebd65e9d50fd5c1832f90f95ffe95b2a1113d63a176295a2af64d111", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.1.0/MODULE.bazel": "97dd927309f87ecb73629725683028a5dbb37a49b1159c771292e6993569055b", diff --git a/score/time/docs/detailed_design/detailed_design.rst b/score/time/docs/detailed_design/detailed_design.rst index 43469beb..d6719667 100644 --- a/score/time/docs/detailed_design/detailed_design.rst +++ b/score/time/docs/detailed_design/detailed_design.rst @@ -64,7 +64,7 @@ A static view provides an overview of the units and their relationships using UML 2.0 notations (e.g. class diagrams, component diagrams). Use ``.. uml::`` or ``.. image::`` directives to include the diagram. -.. uml:: dd_example_ex_sta.puml +.. .. uml:: dd_example_ex_sta.puml Dynamic Diagrams for Unit Interactions (optional) -------------------------------------------------- @@ -77,7 +77,7 @@ and interface documentation alone. Use standard UML behavioural diagrams (sequence diagrams, state machine diagrams) with ``.. uml::`` or ``.. image::`` directives. -.. uml:: dd_example_ex_dyn.puml +.. .. uml:: dd_example_ex_dyn.puml Units within the Component -------------------------- diff --git a/score/time/docs/detailed_design/index.rst b/score/time/docs/detailed_design/index.rst index e6e47f11..5bd6b448 100644 --- a/score/time/docs/detailed_design/index.rst +++ b/score/time/docs/detailed_design/index.rst @@ -33,7 +33,7 @@ An example of documenting detailed design can be found in: .. toctree:: - detailed_design_example + detailed_design Inspection Checklist -------------------- diff --git a/score/time/docs/index.rst b/score/time/docs/index.rst index 31184c6f..cc4456f1 100644 --- a/score/time/docs/index.rst +++ b/score/time/docs/index.rst @@ -18,7 +18,7 @@ Time #### .. document:: Time - :id: doc__time + :id: doc__time_time :status: draft :version: 1 :safety: ASIL_B diff --git a/score/time/docs/requirements/requirements.rst b/score/time/docs/requirements/requirements.rst index 307d3863..6589d6db 100644 --- a/score/time/docs/requirements/requirements.rst +++ b/score/time/docs/requirements/requirements.rst @@ -39,19 +39,21 @@ Component Time Requirements Functional Requirements ----------------------- -.. comp_req:: Some Title - :id: comp_req__time__some_title - :reqtype: Functional - :security: NO - :safety: ASIL_B - :derived_from: feat_req__time__example_req - :status: invalid - :version: 1 - :satisfied_by: comp__time +.. code-block:: rst + + .. comp_req:: Some Title + :id: comp_req__time__some_title + :reqtype: Functional + :security: NO + :safety: ASIL_B + :derived_from: feat_req__time__example_req + :status: invalid + :version: 1 + :satisfied_by: comp__time - The Component shall do xyz to another component to bring it to this condition at this time + The Component shall do xyz to another component to bring it to this condition at this time - Note: (optional, not to be verified) + Note: (optional, not to be verified) .. attention:: The above directive must be updated according to your component requirements. diff --git a/score/time_daemon/docs/detailed_design/detailed_design.rst b/score/time_daemon/docs/detailed_design/detailed_design.rst index e5507dab..baa3787d 100644 --- a/score/time_daemon/docs/detailed_design/detailed_design.rst +++ b/score/time_daemon/docs/detailed_design/detailed_design.rst @@ -64,7 +64,7 @@ A static view provides an overview of the units and their relationships using UML 2.0 notations (e.g. class diagrams, component diagrams). Use ``.. uml::`` or ``.. image::`` directives to include the diagram. -.. uml:: dd_example_ex_sta.puml +.. .. uml:: dd_example_ex_sta.puml Dynamic Diagrams for Unit Interactions (optional) -------------------------------------------------- @@ -77,7 +77,7 @@ and interface documentation alone. Use standard UML behavioural diagrams (sequence diagrams, state machine diagrams) with ``.. uml::`` or ``.. image::`` directives. -.. uml:: dd_example_ex_dyn.puml +.. .. uml:: dd_example_ex_dyn.puml Units within the Component -------------------------- diff --git a/score/time_daemon/docs/detailed_design/index.rst b/score/time_daemon/docs/detailed_design/index.rst index c695047f..d049f08f 100644 --- a/score/time_daemon/docs/detailed_design/index.rst +++ b/score/time_daemon/docs/detailed_design/index.rst @@ -33,7 +33,7 @@ An example of documenting detailed design can be found in: .. toctree:: - detailed_design_example + detailed_design Inspection Checklist -------------------- diff --git a/score/time_daemon/docs/requirements/requirements.rst b/score/time_daemon/docs/requirements/requirements.rst index dfadfd33..f94781be 100644 --- a/score/time_daemon/docs/requirements/requirements.rst +++ b/score/time_daemon/docs/requirements/requirements.rst @@ -39,19 +39,21 @@ Component Time Daemon Requirements Functional Requirements ----------------------- -.. comp_req:: Some Title - :id: comp_req__time_daemon__some_title - :reqtype: Process - :security: YES - :safety: ASIL_B - :derived_from: feat_req__example_feature__example_req - :status: invalid - :version: 1 - :satisfied_by: comp__time_daemon +.. code-block:: rst + + .. comp_req:: Some Title + :id: comp_req__time_daemon__some_title + :reqtype: Process + :security: YES + :safety: ASIL_B + :derived_from: feat_req__example_feature__example_req + :status: invalid + :version: 1 + :satisfied_by: comp__time_daemon - The Component shall do xyz to another component to bring it to this condition at this time + The Component shall do xyz to another component to bring it to this condition at this time - Note: (optional, not to be verified) + Note: (optional, not to be verified) .. attention:: The above directive must be updated according to your component requirements. diff --git a/score/time_slave/docs/index.rst b/score/time_slave/docs/index.rst index 6e07edcd..27df135f 100644 --- a/score/time_slave/docs/index.rst +++ b/score/time_slave/docs/index.rst @@ -19,9 +19,3 @@ time_slave Component :maxdepth: 1 component_classification - architecture/index - detailed_design/index - requirements/index - manuals/index - safety_analysis/index - security_analysis/index From f9ae3a07dbdc3fd013ee60834fbc6be3b2d22913 Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Wed, 19 Aug 2026 10:00:12 +0100 Subject: [PATCH 4/5] fix build --- score/time_slave/docs/detailed_design/detailed_design.rst | 4 ++-- score/time_slave/docs/detailed_design/index.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/score/time_slave/docs/detailed_design/detailed_design.rst b/score/time_slave/docs/detailed_design/detailed_design.rst index cbed4127..0c8cfb1f 100644 --- a/score/time_slave/docs/detailed_design/detailed_design.rst +++ b/score/time_slave/docs/detailed_design/detailed_design.rst @@ -64,7 +64,7 @@ A static view provides an overview of the units and their relationships using UML 2.0 notations (e.g. class diagrams, component diagrams). Use ``.. uml::`` or ``.. image::`` directives to include the diagram. -.. uml:: dd_example_ex_sta.puml +.. .. uml:: dd_example_ex_sta.puml Dynamic Diagrams for Unit Interactions (optional) -------------------------------------------------- @@ -77,7 +77,7 @@ and interface documentation alone. Use standard UML behavioural diagrams (sequence diagrams, state machine diagrams) with ``.. uml::`` or ``.. image::`` directives. -.. uml:: dd_example_ex_dyn.puml +.. .. uml:: dd_example_ex_dyn.puml Units within the Component -------------------------- diff --git a/score/time_slave/docs/detailed_design/index.rst b/score/time_slave/docs/detailed_design/index.rst index fc9872af..71f2534d 100644 --- a/score/time_slave/docs/detailed_design/index.rst +++ b/score/time_slave/docs/detailed_design/index.rst @@ -33,7 +33,7 @@ An example of documenting detailed design can be found in: .. toctree:: - detailed_design_example + detailed_design Inspection Checklist -------------------- From 64ffde40c75d1e771065aa6d2e6d1a67b491c694 Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Wed, 19 Aug 2026 10:14:31 +0100 Subject: [PATCH 5/5] fix formatting --- BUILD | 1 - 1 file changed, 1 deletion(-) diff --git a/BUILD b/BUILD index c69d8759..b5f6ba4c 100644 --- a/BUILD +++ b/BUILD @@ -32,7 +32,6 @@ docs( "mount_at": "time_daemon", "attach_to": "module/index", }, - { "bundle": "//score/ts_client:docs_bundle", "mount_at": "ts_client",