Skip to content

Commit ecd1caf

Browse files
committed
readd genai headers
1 parent a364257 commit ecd1caf

12 files changed

Lines changed: 72 additions & 5 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Commonly used for local settings and secrets
2+
# ╓ ╖
3+
# ║ Some portions generated by Github Copilot ║
4+
# ╙ ╜
25
.env
36

47
# Bazel

docs/how-to/test_to_doc_links.rst

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# SPDX-License-Identifier: Apache-2.0
1313
# *******************************************************************************
1414
15+
# ╓ ╖
16+
# ║ Some portions generated by Github Copilot ║
17+
# ╙ ╜
18+
1519
Reference Docs in Tests
1620
=======================
1721

@@ -58,38 +62,56 @@ Limitations
5862
CI/CD Gate for Linkage Percentage
5963
---------------------------------
6064

61-
To enforce traceability in CI:
65+
The traceability checker can be used as a low-level CI gate over exported
66+
``needs.json`` data.
67+
68+
Current workflow:
6269

6370
1. Run tests.
6471
2. Generate ``needs.json``.
6572
3. Execute the traceability checker.
6673

74+
In repository CI, the preferred setup is to wire the coverage check target
75+
to depend on the test-report and ``//:needs_json`` targets, so Bazel handles
76+
the build order automatically.
77+
78+
You can run the checker as a standalone command, and you can also run it as
79+
part of documentation creation if your repository wiring does so.
80+
6781
.. code-block:: bash
6882
6983
bazel test //...
7084
bazel build //:needs_json
7185
bazel run //scripts_bazel:traceability_coverage -- \
72-
--needs-json bazel-bin/needs_json/_build/needs/needs.json \
7386
--min-req-code 100 \
7487
--min-req-test 100 \
7588
--min-req-fully-linked 100 \
7689
--min-tests-linked 100 \
7790
--fail-on-broken-test-refs
7891
92+
If ``//:needs_json`` was built beforehand, the checker locates the default
93+
``needs.json`` output automatically. Use ``--needs-json`` only when you want
94+
to point to a non-standard location.
95+
7996
The checker reports:
8097

8198
- Percentage of implemented requirements with ``source_code_link``
8299
- Percentage of implemented requirements with ``testlink``
83100
- Percentage of implemented requirements with both links (fully linked)
84-
- Percentage of test cases linked to at least one requirement
85-
- Broken testcase references to unknown requirement IDs
101+
102+
.. note::
103+
104+
Testcase-based metrics depend on testcase needs being present in the
105+
exported ``needs.json``. Testcases are currently generated as external
106+
needs, so values such as testcase linkage percentage or broken testcase
107+
references are only meaningful if those external testcase needs are also
108+
included in the exported dataset.
86109

87110
To check only unit tests, filter testcase types:
88111

89112
.. code-block:: bash
90113
91114
bazel run //scripts_bazel:traceability_coverage -- \
92-
--needs-json bazel-bin/needs_json/_build/needs/needs.json \
93115
--test-types unit-test
94116
95117
Use lower thresholds during rollout and tighten towards 100% over time.

docs/internals/requirements/implementation_state.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
#
1212
# SPDX-License-Identifier: Apache-2.0
1313
# *******************************************************************************
14+
15+
# ╓ ╖
16+
# ║ Some portions generated by Github Copilot ║
17+
# ╙ ╜
1418
.. _docs_statistics:
1519

1620
Implementation State Statistics

docs/reference/commands.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
# ╓ ╖
3+
# ║ Some portions generated by Github Copilot ║
4+
# ╙ ╜
5+
-->
6+
17
# Commands
28

39
| Target | What it does |

scripts_bazel/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14+
# ╓ ╖
15+
# ║ Some portions generated by Github Copilot ║
16+
# ╙ ╜
17+
1418
load("@aspect_rules_py//py:defs.bzl", "py_binary")
1519
load("@docs_as_code_hub_env//:requirements.bzl", "all_requirements")
1620

scripts_bazel/tests/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14+
# ╓ ╖
15+
# ║ Some portions generated by Github Copilot ║
16+
# ╙ ╜
17+
1418
load("@docs_as_code_hub_env//:requirements.bzl", "all_requirements")
1519
load("//:score_pytest.bzl", "score_pytest")
1620

scripts_bazel/tests/traceability_coverage_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14+
# ╓ ╖
15+
# ║ Some portions generated by Github Copilot ║
16+
# ╙ ╜
17+
1418
"""Tests for traceability_coverage.py."""
1519

1620
import json

scripts_bazel/traceability_coverage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14+
# ╓ ╖
15+
# ║ Some portions generated by Github Copilot ║
16+
# ╙ ╜
17+
1418
"""Compute requirement and test traceability coverage from sphinx-needs output."""
1519

1620
from __future__ import annotations

src/extensions/score_metamodel/checks/standards.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
13+
14+
# ╓ ╖
15+
# ║ Some portions generated by Github Copilot ║
16+
# ╙ ╜
1317
# from sphinx.application import Sphinx
1418

1519
from sphinx_needs.need_item import NeedItem

src/extensions/score_metamodel/checks/traceability_dashboard.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14+
# ╓ ╖
15+
# ║ Some portions generated by Github Copilot ║
16+
# ╙ ╜
17+
1418
"""Needpie filter functions backed by shared traceability metric calculations."""
1519

1620
from __future__ import annotations

0 commit comments

Comments
 (0)