Skip to content

Wip tmp tracability improvements#572

Draft
MaximilianSoerenPollak wants to merge 10 commits into
mainfrom
WIP-TMP_Tracability-Improvements
Draft

Wip tmp tracability improvements#572
MaximilianSoerenPollak wants to merge 10 commits into
mainfrom
WIP-TMP_Tracability-Improvements

Conversation

@MaximilianSoerenPollak
Copy link
Copy Markdown
Contributor

⚠️ This is a TMP Branch, just made to see diff's better. DO NOT MERGE ⚠️

Here is a waffle as thanks 🧇

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 1536a1e0-2efe-4bf2-9049-7f523b97c631
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
WARNING: Target pattern parsing failed.
ERROR: Skipping '//src:license-check': no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
ERROR: no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
INFO: Elapsed time: 4.947s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

Copy link
Copy Markdown
Contributor Author

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting some things.

Comment thread docs/conf.py
extensions = [
"score_sphinx_bundle",
]
matplotlib.rcParamsDefault["savefig.bbox"] = "tight"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should have this in the extension so it's set for all things that import docs-as-code

@@ -18,7 +18,7 @@

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this file, has not yet been changed / updated to new architecture

@@ -31,9 +31,6 @@
ProhibitedWordCheck as ProhibitedWordCheck,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was moved to it's own extension

@@ -0,0 +1,218 @@
# *******************************************************************************
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests commented out (to test the metrics stuff).
Will be redone once arch is finished

Comment on lines +52 to +59
app.add_config_value(
"score_metamodel_requirement_types",
"",
rebuild="env",
description=(
"Comma-separated list of need types treated as requirements for "
"traceability metrics. If empty, requirement types are autodiscovered "
"from needs_types tags (requirement, requirement_excl_process)."
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be moved to other function. calculate_need_metrics


def generic_pie_linked_items(
needs: list[NeedItem], results: list[int], **kwargs: str | int | float
needs: list[NeedItem], results: list[int], **kwargs: dict[str, str | int | float]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kwargs typhint should be 'Any' maybe?

Comment on lines +170 to +175
def get_metrics_from_generated_json(
needs: list[NeedItem], results: list[int], **kwargs: str | int | float
) -> None:
metrics_json_path = str(kwargs.get("arg1", "_build/metrics.json"))
# TODO: Read the Metrics.json and give back the data
results
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete

_get_key_values(results, [str(value) for value in kwargs.values()])


# def set_default_include_external(include_external: bool) -> None:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-Read commented out functions, see what 'general' functions you are missing from there if any.

@@ -0,0 +1,208 @@
# *******************************************************************************
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many of this has been copied from the old '_write_metrics' function.
But simplified.

@@ -219,9 +219,10 @@ def read_test_xml_file(file: Path) -> tuple[list[DataOfTestCase], list[str], lis
properties_element = testcase.find("properties")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in a seperate PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants