Skip to content

Inject code metrics into needs #62

@arnoox

Description

@arnoox

Is your feature request related to a problem? Please describe.

Currently, there is a disconnect between the detailed architectural/design documentation tracked in sphinx-needs and the actual runtime quality metrics, such as code coverage. Users, especially those working within safety-critical frameworks like ASPICE, have to look up these metrics in separate reports or tools, making it difficult to maintain a single, condensed view of a component's maturity, compliance, and design-to-code traceability.

Describe the solution you'd like

I would like a mechanism to be implemented that allows for the automated injection of coding metrics (e.g., code coverage, static analysis results) directly into the attributes of corresponding sphinx-needs items (e.g., component-needs).

The process could look like this:

  • After tests are executed and passing, a build step (e.g., a custom Sphinx-Needs extension or a build-time script) reads the metric report (e.g., code coverage report).
  • The script maps the metric data to the correct need item based on a defined identifier (e.g., the need ID or a specific attribute).
  • The metric (e.g., code_coverage: 95%) is injected as a new attribute value into the need directive.

This would condense the architectural design information and the quality metrics in one place.

Describe alternatives you've considered

...

Additional context

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions