refactor(module-verification-report): split, tests, docs - #730
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
…cation_report Demonstrates the .. module-verification-report:: directive shipped by the ankr_mod_verf_report branch of score_docs_as_code (eclipse-score/docs-as-code#730): - Replace the hand-maintained ~2700-line docs/reporting/module_verification_report.rst with a two-line invocation of the new directive, driven by docs/reporting/module_report.yaml (module_id, feature_id, standard workproducts). - Bump score_docs_as_code git_override to a66bf953 (tip of ankr_mod_verf_report — refactor + tests + docs + testcase_annotations). - Drop the tracked bitmanipulation coverage HTML dump under coverage_reports/bitmanipulation and the derived docs/reporting/coverage_summary.json snapshot together with the tools/extract_coverage.py script that produced it. - Strip the legacy _load_coverage_substitutions() and testcase-badge setup() helpers from docs/conf.py — the former's input file is gone, the latter now lives in the shared extension as testcase_annotations.
…cation_report Demonstrates the ``.. module-verification-report::`` directive shipped by the ``ankr_mod_verf_report`` branch of ``score_docs_as_code`` (eclipse-score/docs-as-code#730): - Add a new page ``docs/reporting/module_verification_report.rst`` that only carries the ``.. document::`` need and the two-line invocation of the new directive, driven by ``docs/reporting/module_report.yaml`` (module_id, feature_id, five standard workproducts). - Hook the new page into ``docs/index.rst`` under a fresh "Reporting" section in the top-level toctree. - Pin ``score_docs_as_code`` via ``git_override`` to a66bf953 — tip of ankr_mod_verf_report (refactor + tests + docs + testcase_annotations). - Extend the existing gtest suites for ``bit_manipulation``, ``bitmask_operators`` and the ``flatbuffers/details`` unit tests with additional cases that fill in the coverage the module report is meant to visualise. - Keep ``docs/conf.py`` minimal — no coverage-substitution helper, no testcase-badge ``setup`` (that logic now lives in the shared extension as ``testcase_annotations``).
…cation_report Demonstrates the ``.. module-verification-report::`` directive shipped by the ``ankr_mod_verf_report`` branch of ``score_docs_as_code`` (eclipse-score/docs-as-code#730): - Add a new page ``docs/reporting/module_verification_report.rst`` that only carries the ``.. document::`` need and the two-line invocation of the new directive, driven by ``docs/reporting/module_report.yaml`` (module_id, feature_id, five standard workproducts). - Hook the new page into ``docs/index.rst`` under a fresh "Reporting" section in the top-level toctree. - Pin ``score_docs_as_code`` via ``git_override`` to a66bf953 — tip of ankr_mod_verf_report (refactor + tests + docs + testcase_annotations). - Extend the existing gtest suites for ``bit_manipulation``, ``bitmask_operators`` and the ``flatbuffers/details`` unit tests with additional cases that fill in the coverage the module report is meant to visualise. - Keep ``docs/conf.py`` minimal — no coverage-substitution helper, no testcase-badge ``setup`` (that logic now lives in the shared extension as ``testcase_annotations``).
a66bf95 to
9a95bd0
Compare
…cation_report Demonstrates the ``.. module-verification-report::`` directive shipped by the ``ankr_mod_verf_report`` branch of ``score_docs_as_code`` (eclipse-score/docs-as-code#730): - Add a new page ``docs/reporting/module_verification_report.rst`` that only carries the ``.. document::`` need and the two-line invocation of the new directive, driven by ``docs/reporting/module_report.yaml`` (module_id, feature_id, five standard workproducts). - Hook the new page into ``docs/index.rst`` under a fresh "Reporting" section in the top-level toctree. - Pin ``score_docs_as_code`` via ``git_override`` to a66bf953 — tip of ankr_mod_verf_report (refactor + tests + docs + testcase_annotations). - Extend the existing gtest suites for ``bit_manipulation``, ``bitmask_operators`` and the ``flatbuffers/details`` unit tests with additional cases that fill in the coverage the module report is meant to visualise. - Keep ``docs/conf.py`` minimal — no coverage-substitution helper, no testcase-badge ``setup`` (that logic now lives in the shared extension as ``testcase_annotations``).
…cation_report Demonstrates the ``.. module-verification-report::`` directive shipped by the ``ankr_mod_verf_report`` branch of ``score_docs_as_code`` (eclipse-score/docs-as-code#730): - Add a new page ``docs/reporting/module_verification_report.rst`` that only carries the ``.. document::`` need and the two-line invocation of the new directive, driven by ``docs/reporting/module_report.yaml`` (module_id, feature_id, five standard workproducts). - Hook the new page into ``docs/index.rst`` under a fresh "Reporting" section in the top-level toctree. - Pin ``score_docs_as_code`` via ``git_override`` to a66bf953 — tip of ankr_mod_verf_report (refactor + tests + docs + testcase_annotations). - Extend the existing gtest suites for ``bit_manipulation``, ``bitmask_operators`` and the ``flatbuffers/details`` unit tests with additional cases that fill in the coverage the module report is meant to visualise. - Keep ``docs/conf.py`` minimal — no coverage-substitution helper, no testcase-badge ``setup`` (that logic now lives in the shared extension as ``testcase_annotations``).
…cation_report Demonstrates the ``.. module-verification-report::`` directive shipped by the ``ankr_mod_verf_report`` branch of ``score_docs_as_code`` (eclipse-score/docs-as-code#730): - Add a new page ``docs/reporting/module_verification_report.rst`` that only carries the ``.. document::`` need and the two-line invocation of the new directive, driven by ``docs/reporting/module_report.yaml`` (module_id, feature_id, five standard workproducts). - Hook the new page into ``docs/index.rst`` under a fresh "Reporting" section in the top-level toctree. - Pin ``score_docs_as_code`` via ``git_override`` to a66bf953 — tip of ankr_mod_verf_report (refactor + tests + docs + testcase_annotations). - Extend the existing gtest suites for ``bit_manipulation``, ``bitmask_operators`` and the ``flatbuffers/details`` unit tests with additional cases that fill in the coverage the module report is meant to visualise. - Keep ``docs/conf.py`` minimal — no coverage-substitution helper, no testcase-badge ``setup`` (that logic now lives in the shared extension as ``testcase_annotations``).
…cation_report Demonstrates the ``.. module-verification-report::`` directive shipped by the ``ankr_mod_verf_report`` branch of ``score_docs_as_code`` (eclipse-score/docs-as-code#730): - Add a new page ``docs/reporting/module_verification_report.rst`` that only carries the ``.. document::`` need and the two-line invocation of the new directive, driven by ``docs/reporting/module_report.yaml`` (module_id, feature_id, five standard workproducts). - Hook the new page into ``docs/index.rst`` under a fresh "Reporting" section in the top-level toctree. - Pin ``score_docs_as_code`` via ``git_override`` to a66bf953 — tip of ankr_mod_verf_report (refactor + tests + docs + testcase_annotations). - Extend the existing gtest suites for ``bit_manipulation``, ``bitmask_operators`` and the ``flatbuffers/details`` unit tests with additional cases that fill in the coverage the module report is meant to visualise. - Keep ``docs/conf.py`` minimal — no coverage-substitution helper, no testcase-badge ``setup`` (that logic now lives in the shared extension as ``testcase_annotations``).
bab116b to
1cb9250
Compare
…cation_report Demonstrates the ``.. module-verification-report::`` directive shipped by the ``ankr_mod_verf_report`` branch of ``score_docs_as_code`` (eclipse-score/docs-as-code#730): - Add a new page ``docs/reporting/module_verification_report.rst`` that only carries the ``.. document::`` need and the two-line invocation of the new directive, driven by ``docs/reporting/module_report.yaml`` (module_id, feature_id, five standard workproducts). - Hook the new page into ``docs/index.rst`` under a fresh "Reporting" section in the top-level toctree. - Pin ``score_docs_as_code`` via ``git_override`` to a66bf953 — tip of ankr_mod_verf_report (refactor + tests + docs + testcase_annotations). - Extend the existing gtest suites for ``bit_manipulation``, ``bitmask_operators`` and the ``flatbuffers/details`` unit tests with additional cases that fill in the coverage the module report is meant to visualise. - Keep ``docs/conf.py`` minimal — no coverage-substitution helper, no testcase-badge ``setup`` (that logic now lives in the shared extension as ``testcase_annotations``).
d3f2719 to
0af2a93
Compare
|
Documentation preview for this pull request is available at: |
5c956f5 to
6fdb693
Compare
…cation_report Demonstrates the ``.. module-verification-report::`` directive shipped by the ``ankr_mod_verf_report`` branch of ``score_docs_as_code`` (eclipse-score/docs-as-code#730): - Add a new page ``docs/reporting/module_verification_report.rst`` that only carries the ``.. document::`` need and the two-line invocation of the new directive, driven by ``docs/reporting/module_report.yaml`` (module_id, feature_id, five standard workproducts). - Hook the new page into ``docs/index.rst`` under a fresh "Reporting" section in the top-level toctree. - Pin ``score_docs_as_code`` via ``git_override`` to a66bf953 — tip of ankr_mod_verf_report (refactor + tests + docs + testcase_annotations). - Extend the existing gtest suites for ``bit_manipulation``, ``bitmask_operators`` and the ``flatbuffers/details`` unit tests with additional cases that fill in the coverage the module report is meant to visualise. - Keep ``docs/conf.py`` minimal — no coverage-substitution helper, no testcase-badge ``setup`` (that logic now lives in the shared extension as ``testcase_annotations``).
b975ae4 to
778c2e3
Compare
| app.connect("env-before-read-docs", init_docnames) | ||
| app.connect("env-before-read-docs", init_registry) | ||
| app.connect("env-purge-doc", purge_docname) | ||
| app.connect("env-purge-doc", purge_registry) | ||
| app.connect("env-merge-info", merge_docnames) | ||
| app.connect("env-merge-info", merge_registry) | ||
| app.connect("doctree-resolved", annotate_testcase_results) | ||
| app.connect("build-finished", check_consistency) |
There was a problem hiding this comment.
I like the idea of this directive but all these connect calls are suspicious to me. Is this complexity really necessary?
There was a problem hiding this comment.
Hey, yes, unfortunately. I've reduced the number of app.connects a little bit, but most of them should stay for two reasons:
-
We execute check_consistency only after the whole build was done. For this we need notification. Additionally, in the check_consistency function we need information from the module_verification_report directive, which components were configured. After the build is finished, this information is not available anymore as all objects were destroyed. Therefore we need the registry.
-
We want to append the test result to the test names, and this can happen only after doctree was resolved, otherwise we can miss some of the tests. For this we need doctree-resolved notification.
| * :mod:`.consistency_checks` — ``build-finished`` validation that every | ||
| component is properly linked in the needs graph |
There was a problem hiding this comment.
There already is mod_ver_report in the metamodel. This should probably be added into the template here for process compliance.
Also, we can extend mod_ver_report and then leave the consistency checking to existing mechanisms in the score_metamodel extension.
There was a problem hiding this comment.
Right, I've extended code and configuration to generate the mod_verification_report, for now only with mandatory arguments.
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Thanks for the work, some comments & questions from my side here.
| An optional ``:config:`` YAML file can supply non-default workproducts or | ||
| per-component doc-id overrides for the rare case where component documents | ||
| do not follow the standard naming convention. |
There was a problem hiding this comment.
This is a user error.
This should be fixed upstream instead of adding unnecessary complexity in the code
There was a problem hiding this comment.
Right, that's legacy comment, removed it.
| @@ -0,0 +1,324 @@ | |||
| # ******************************************************************************* | |||
There was a problem hiding this comment.
This looks very close / similar t a manual jinja2 template that sphinx-needs natively already supports.
Is there any pros and cons to using this approach in comparison to jinja2.
Would using jinja2 remove some of this complexity, or just introduce different ones?
There was a problem hiding this comment.
Yes, for now the templates are very simple. I am not sure, if jinja wouldn't be an overkill here. We could think about this in the future.
| comp_need = needs.get(comp_id) | ||
|
|
||
| if comp_need is None: | ||
| logger.warning( | ||
| "[module-verification-report] %s: " | ||
| "%s (listed in :components:) not found in " | ||
| "sphinx-needs — check the id", | ||
| docname, | ||
| comp_id, | ||
| ) | ||
| continue |
There was a problem hiding this comment.
Components are already in the module therefore no need to re-iterate them in the mod_verification_report if you already link the module via :module-id:
There was a problem hiding this comment.
That's done for the following reason. Current implementation relies on the fact, that the component ids and some additional information is known before the sphinx-build is started, e.g. I can filter for the requirements of the component only if I know component id. Trying to resolve all component ids belonging to one module and building up the filters for these components in parallel as part of one sphinx-build can lead to raise conditions (may be there is a good way with sphinx how to do this, I did not manage to find it out). Therefore I specify a minimal amount information as config arguments of module_verification_report directive. Afterwards, as build has finished, I check for the consistency to ensure, that configuration attributes were correct.
There was a problem hiding this comment.
we need to figure out a way to move this PR to a needs based setup. The easiest way would be by splitting it up. not sure how yet.
| docname, | ||
| comp_id, | ||
| module_id, | ||
| ) |
There was a problem hiding this comment.
Same comment above.
There was a problem hiding this comment.
same comment as above
| def _parse_components(ids_str: str, component_prefix: str) -> list[dict]: | ||
| """Parse a comma-separated list of component ids into component dicts. | ||
|
|
||
| Each entry may carry an optional ``[version==N]`` qualifier which is | ||
| stripped silently — the rendered report does not filter by version. | ||
|
|
||
| The short slug is the component id with ``component_prefix`` removed | ||
| (or the full id if the prefix is absent). The human-readable title is | ||
| derived from the slug: underscores replaced with spaces, title-cased. | ||
| """ | ||
| result = [] | ||
| for raw in ids_str.split(","): | ||
| comp_id = _VERSION_QUALIFIER_RE.sub("", raw.strip()) | ||
| if not comp_id: | ||
| continue | ||
| slug = ( | ||
| comp_id[len(component_prefix) :] | ||
| if component_prefix and comp_id.startswith(component_prefix) | ||
| else comp_id | ||
| ) | ||
| title = slug.replace("_", " ").title() | ||
| result.append({"id": comp_id, "slug": slug, "title": title}) | ||
| return result |
There was a problem hiding this comment.
I do not understand why we remove the version here?
Is this because it's a sphinx directive instead of a sphinx-needs directive?
There was a problem hiding this comment.
yes, in the configuration file we just specify for which components we want to generate the module verification report, not in which version. As someone can accidentally provider version number, we want to ignore it for now.
| @@ -0,0 +1,107 @@ | |||
| # ******************************************************************************* | |||
There was a problem hiding this comment.
This is a great idea.
However I think we should pull this out of this extension and put it into the test-case linking so it is done for all testcaseneeds instead of just for the ones inside this verification report.
There was a problem hiding this comment.
I think Alexander has already did it.
| config.needs_external_needs.append( # pyright: ignore[reportUnknownMemberType] | ||
| { | ||
| "base_url": needs_json_data["project_url"] | ||
| "base_url": needs_json_data["project_url"].rstrip("/") |
There was a problem hiding this comment.
Not quiet sure why this was changed, any reason for it?
There was a problem hiding this comment.
by mistake, this change was abonden
f6fa1b7 to
13ec558
Compare
ea25d2d to
91120cb
Compare
Adds score_module_verification_report to the score_sphinx_bundle. Provides the .. module-verification-report:: directive that renders a per-module verification report body from a YAML config: - Component overview via sphinx-needs - Per-component Verification & Safety Analysis Documents table with Status column, delegated to sphinx-needs via .. needtable:: - Feature section (requirements / architecture / inspection stats) Extracted from baselibs' local docs/_ext/module_report.py so any consumer of docs-as-code can now use the directive without a local copy.
…dules Move the 909-line monolithic __init__.py into five thin modules so each layer can be reviewed and tested independently: * scanner.py - filesystem regex scan for .. mod:: / .. comp:: * coverage.py - coverage_summary.json loading + intro selection * templates.py - RST templates, WP-table CSS, default workproducts * rendering.py - pure template-expansion helpers * directive.py - the Sphinx directive class __init__.py is now a thin entry point (only setup() and re-exports). BUILD is aligned with score_mounts (sources / tests filegroups) and still exposes the same py_library target name, so the sphinx bundle consumer needs no change. The public surface is unchanged: the directive name, the config schema, env.module_verification_report_needs and the setup() return value all stay identical. Verified end-to-end against baselibs via local_path_override: the rendered report is byte-for-byte equivalent (same 42 wp-doc-table occurrences).
36 pytest cases exercising every branch of the pure layers: * test_scanner.py (15 tests): scan_rst_needs, module_includes, discover_components, scan_source_tree. Covers directive filtering, version-pinned includes, non-utf-8 files, deep walks, prefix mismatches, missing env attribute. * test_coverage.py (8 tests): load_coverage_summary (missing / invalid / null JSON, note_dependency), coverage_intro (measured vs. specification-only decision, trailing blank line). * test_rendering.py (13 tests): slug utilities, override vs. filter work-product rows, render_component / render_feature substitutions and end-to-end render_report assembly (with feature and component overrides). BUILD adds score_pytest(name = 'score_module_verification_report_tests'). Follows the existing score_mounts test pattern.
New src/extensions/docs/module_verification_report.rst documents: * the .. module-verification-report:: directive (arguments, options, fatal errors, warnings); * the YAML config schema, with defaults derived from module_id; * the sphinx-needs data model the extension reads or filters by (.. mod:: / .. comp:: / .. feat:: / .. wp:: / .. document:: / comp_req / comp_arc_* / feat_req / feat_arc_*); * what the read-hook actually scans and why (regex over srcdir, not SphinxNeedsData, to keep parallel_read_safe = True); * the report structure (CSS, feature section, component overview, per component sections); * work-product row rendering (override vs. sphinx-needs filter path, including the underscore-free slug normalisation); * the optional coverage_summary.json integration and its currently disabled section; * the 5-module architecture and public surface; * known limitations (feature-only repos, line-scan boundary conditions, nested DataTables cost); * how to run the unit tests. The extensions landing page (index.rst) gains a grid card and a toctree entry pointing to the new page.
…esult Moves the doctree-resolved handler that previously lived in each consumer's docs/conf.py (baselibs, etc.) into the shared extension as a new module 'testcase_annotations'. It walks doctree references whose visible text starts with 'testcase__', looks up the corresponding sphinx-needs entry via SphinxNeedsData.get_needs_view() and appends a coloured '(passed)' / '(failed)' / '(skipped)' / '(disabled)' badge in the same palette as the report pie charts. To keep the hook scoped to pages that actually render the directive (and to avoid affecting unrelated docs), the directive registers its docname in env.module_verification_report_docnames. The lifecycle is kept parallel-read-safe via three matching handlers: - env-before-read-docs -> init_docnames (create the set) - env-purge-doc -> purge_docname (drop stale entries) - env-merge-info -> merge_docnames (union worker sets) Also: - 16 unit tests covering every branch (colours, fallback, no-op paths, lifecycle handlers) — no dependency on sphinx-needs being installed. - Extension reference page updated: architecture table gains the new module, public surface list mentions the new env attribute, testing section mentions the new test file. - Version bumped 0.6 -> 0.7.
…ent-prefix options
Replace the mandatory :config: YAML file with direct RST directive
options so the common case requires no external file at all:
.. module-verification-report::
:module-id: mod__mymodule
feature-id defaults to feat__<module-short> and component-prefix
defaults to comp__<module-short>_ when omitted. :config: is retained
as an optional escape hatch for non-default workproducts and
per-component doc-id overrides; fields in the file are ignored when
the corresponding directive option is set.
Also: 12 unit tests in test_directive.py covering the option-vs-config
precedence rules and all derivation paths; extension reference docs
updated (typical usage, at-a-glance table, directive reference,
config schema section retitled to 'advanced'); version unchanged.
…omponents: option
Instead of scanning .rst files at env-before-read-docs time to resolve
the mod's :includes: list, component ids are now declared directly on
the directive:
.. module-verification-report::
:module-id: mod__baselibs
:feature-id: feat__baselibs
:components: comp__baselibs_json,
comp__baselibs_bit_manipulation, ...
Changes:
- scanner.py removed entirely (no filesystem walk, no regex parsing,
no env.module_verification_report_needs attribute).
- env-before-read-docs hook for scan_source_tree removed from setup().
- _parse_components() helper in directive.py: splits on commas, strips
optional [version==N] qualifiers, derives slug by stripping
component_prefix, derives title from slug (underscore -> space,
title-case).
- Error if :components: is empty / omitted.
- Version bumped 0.7 -> 0.8.
- test_scanner.py removed; test_directive.py extended with 9 tests for
_parse_components (id parsing, version stripping, title derivation,
whitespace handling, multi-line values, prefix mismatch).
- Reference docs updated: typical usage, at-a-glance table, directive
reference (:components: option), 'No filesystem scan' rationale
section replaces 'Filesystem scan' section, architecture table updated
to five modules, limitations updated, testing section updated.
…inished Add consistency_checks.py with a build-finished hook that warns when: - a component listed in :components: is not in the module need's :includes: - the feature ID is not in the component need's :belongs_to: The check is entirely passive (Sphinx warnings, no build failure) and requires no configuration in consumer repos. The registry is populated by the directive during the read phase and is parallel-read safe via init_registry / purge_registry / merge_registry lifecycle hooks. 17 new unit tests (75 total). Version bumped to 0.9.
…n omitted
The directive previously derived feature_id as 'feat__{module_short}'
when :feature-id: was not provided. This was pure name convention
guessing; the metamodel has no mod->feat link (mod only links to comp
via :includes:, comp links to feat via :belongs_to:).
New behaviour:
- :feature-id: is truly optional with no fallback
- When omitted, feature_id is None and the entire feature section
(needtable, statistics) is skipped from the rendered report
- The belongs_to consistency check (Rule 2) is also skipped when
feature_id is None
Update _resolve helper in test_directive.py to mirror the new logic
and add a regression test in test_consistency_checks.py.
… from extension - Delete coverage.py and tests/test_coverage.py (LCOV-based code coverage loading) - Remove COMPONENT_COVERAGE_SECTION_DISABLED template (lines/functions/branches section) - Remove overrides_by_id mechanism from render_report, render_component, render_feature, and workproduct_rows - Simplify directive: drop coverage_data and overrides_by_id locals - Requirements coverage needpie charts and fully_verifies_back columns are unchanged
New docs_and_test macro generates two py_binary targets that run
'bazel test' (or 'bazel coverage --combined_report=lcov' when
coverage=True) followed by 'bazel run //:docs' resp. '//:live_preview'
in a single command:
load('@score_docs_as_code//:bzl/docs_and_test.bzl', 'docs_and_test')
docs_and_test(
name = 'module_verification_report',
test_targets = ['//score/...'],
)
Consumers get //:<name> and //:<name>_preview without any local
Python driver. Extra Bazel flags forward via '--test-flag=…'. Ctrl+C
in the driver propagates cleanly as exit 130.
Ships the driver via exports_files so external py_binary(srcs=…)
can reference it.
Adds an optional 'Test Coverage' section to each component in the
verification report. When an LCOV file is available (produced by
'bazel coverage'), the extension aggregates per-source-file line
and branch coverage and renders it as a collapsible list-table
matching the existing requirements/architecture dropdowns. When
no LCOV file is found or the component has no matching records,
a 'No coverage data available' note is shown instead so the
section is consistently present across components.
New module coverage.py:
* parse_lcov(): SF/LF/LH/BRF/BRH records -> FileCoverage list.
* load_coverage(): resolves workspace-relative LCOV paths via
helper_lib.find_ws_root with a Path.cwd() fallback for pytest.
* records_for_slug(): filters records by normalised component slug
using the same underscore-strip lower-case match as
workproduct_rows().
* coverage_rows(): renders 7-column table body + Total row.
Config:
* New app.add_config_value('mvr_coverage_lcov', ...) with default
'bazel-out/_coverage/_coverage_report.dat'.
Templates:
* COMPONENT_TEMPLATE gains a {coverage_block} slot between the
requirements dropdown and Architectural Elements heading.
* COMPONENT_COVERAGE_TEMPLATE wraps the block; body is either
COVERAGE_TABLE_HEADER + rows or COVERAGE_EMPTY_BODY.
Rendering / directive:
* render_component / render_report accept coverage_records=None.
* directive.py loads LCOV via load_coverage(config.mvr_coverage_lcov)
and passes the result through.
The env.module_verification_report_docnames set duplicated information already present in env.module_verification_report_registry (every entry has a 'docname' field). Removed the separate set and its three lifecycle hooks (init_docnames/purge_docname/merge_docnames); annotate_testcase_results now checks membership via the registry directly. Reduces app.connect() calls from 8 to 5. Also removes a stale ':config:' docstring paragraph in __init__.py referring to a YAML-config option that no longer exists.
Extend the directive with mandatory-only mod_ver_report generation, relying on score_metamodel for consistency checking: - templates.py: new MOD_VER_REPORT_TEMPLATE emitting only the 4 mandatory options (safety, security, status, verification_method) plus the mandatory belongs_to link. - rendering.py: new render_mod_ver_report(); render_report() gains an optional mod_ver_report parameter (existing callers unaffected). - directive.py: four new mandatory option_spec entries (safety, security, status, verification-method) with RST-error validation analogous to the existing :components: check; new _mod_ver_report_id_and_title() helper. - __init__.py: docstring updated with the new options. - Tests added for rendering and directive helpers.
91120cb to
0ee7de5
Compare
…rator for negative bazel targets - coverage.py: blank percentage and skip table rows entirely when a file has no line/branch data at all (e.g. headers never instrumented), instead of misleadingly showing 0%. - run_docs_and_test.py: insert '--' before test targets so negative Bazel target patterns (e.g. '-//foo:bar') are parsed correctly instead of being mistaken for flags.
| """Bazel macro that chains ``bazel test`` (or ``bazel coverage``) with a | ||
| docs target in one command. |
There was a problem hiding this comment.
this should be a separate pull request. I dont understand why this works, while normally we cannot run bazel from bazel, but that can be discussed there.
| return f"mod_vrep__{module_short}__report", f"{title_case} Verification Report" | ||
|
|
||
|
|
||
| class ModuleVerificationReportDirective(SphinxDirective): |
There was a problem hiding this comment.
did you try using a simple needs template instead of a directive?
This PR introduces an extension to generate a module verification report, that can be used by every module. For detailed documentation see module_verification_report.rst
See eclipse-score/baselibs#491 (comment) for an example usage