From d2236b9d9e1127a46f144304adb51b08d89f8c15 Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Thu, 31 Jul 2025 14:08:14 +0200 Subject: [PATCH 01/12] Improve check_id_format by adding parts option in the metamodel and removing the hardcoded need in the check, then adapt tests --- src/extensions/score_metamodel/__init__.py | 4 ++ .../checks/attributes_format.py | 55 ++++--------------- src/extensions/score_metamodel/metamodel.yaml | 47 +++++++++++++++- .../test_attributes_format_id_format.rst | 32 ++++++----- 4 files changed, 81 insertions(+), 57 deletions(-) diff --git a/src/extensions/score_metamodel/__init__.py b/src/extensions/score_metamodel/__init__.py index ee9f7259..efa88b2c 100644 --- a/src/extensions/score_metamodel/__init__.py +++ b/src/extensions/score_metamodel/__init__.py @@ -39,6 +39,7 @@ @dataclass class ScoreNeedType(NeedType): tags: list[str] + parts: int @dataclass @@ -207,6 +208,8 @@ def load_metamodel_data(): one_type["mandatory_options"] = mandatory_options tags = directive_data.get("tags", []) one_type["tags"] = tags + parts = directive_data.get("parts", 3) + one_type["parts"] = parts optional_options = directive_data.get("optional_options", {}) optional_options.update(global_base_options_optional_opts) @@ -296,6 +299,7 @@ def default_options() -> list[str]: "has_forbidden_dead_links", "tags", "arch", + "parts", ] diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index 3cd01f98..a099d3cd 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -32,51 +32,20 @@ def check_id_format(app: Sphinx, need: NeedsInfoType, log: CheckLogger): the requirement id or not. --- """ - # These folders are taken from 'https://github.com/eclipse-score/process_description/tree/main/process' - # This means, any needs within any of these folders (no matter where they are) will not be required to have 3 parts - process_folder_names = [ - "general_concepts", - "introduction", - "process_areas", - "roles", - "standards", - "workflows", - "workproducts", - "process", - ] - # Split the string by underscores - parts = need["id"].split("__") - if need["type"] in [ - "std_wp", - "document", # This is used in 'platform_managment' in score. - "doc_tool", - "gd_guidl", - "workflow", - "gd_chklst", - "std_req", - "tool_req", - "role", - "doc_concept", - "gd_temp", - "gd_method", - "gd_req", - "workproduct", - "doc_getstrt", - ] or any(prefix in str(need.get("docname", "")) for prefix in process_folder_names): - if len(parts) != 2 and len(parts) != 3: - msg = ( - "expected to consisting of one of these 2 formats:" - "`__` or " - "`____`." - ) - log.warning_for_option(need, "id", msg) - else: - if len(parts) != 3: + need_options = get_need_type(app.config.needs_types, need["type"]) + expected_parts = need_options.get("parts", 3) + id_parts = need["id"].split("__") + id_parts_len = len(id_parts) + + if id_parts_len != expected_parts: + if expected_parts == 2: + msg = "expected to consist of this format: `__`." + else: msg = ( - "expected to consisting of this format: " - "`____`." + "expected to consist of this format: " + "`____`."+ str(expected_parts)+str(id_parts_len) ) - log.warning_for_option(need, "id", msg) + log.warning_for_option(need, "id", msg) @local_check diff --git a/src/extensions/score_metamodel/metamodel.yaml b/src/extensions/score_metamodel/metamodel.yaml index fd11bcc8..b334cad1 100644 --- a/src/extensions/score_metamodel/metamodel.yaml +++ b/src/extensions/score_metamodel/metamodel.yaml @@ -59,6 +59,7 @@ needs_types: status: "^(draft|valid)$" optional_links: links: "^.*$" + parts: 3 tenet: title: "Tenet" @@ -68,6 +69,7 @@ needs_types: status: "^(draft|valid)$" optional_links: links: "^.*$" + parts: 3 assertion: title: "Assertion" @@ -77,6 +79,7 @@ needs_types: status: "^(draft|valid)$" optional_links: links: "^.*$" + parts: 3 # Standard Requirement and Work Product # req-Id: tool_req__docs_stdreq_types @@ -88,6 +91,7 @@ needs_types: status: ^(valid)$ optional_links: links: ^.*$ + parts: 3 std_wp: title: Standard Work Product @@ -95,6 +99,7 @@ needs_types: mandatory_options: id: std_wp__(iso26262|isosae21434|isopas8926|aspice_40)__[0-9a-z_]*$ status: ^(valid)$ + parts: 3 # Workflow # req-Id: tool_req__docs_wf_types @@ -113,6 +118,7 @@ needs_types: supported_by: ^rl__.*$ contains: ^gd_(req|temp|chklst|guidl|meth)__.*$ has: ^doc_(getstrt|concept)__.*$ + parts: 2 # req-Id: tool_req__docs_req_types gd_req: @@ -130,6 +136,7 @@ needs_types: complies: ^std_req__(iso26262|isosae21434|isopas8926|aspice_40)__.*$ tags: - requirement + parts: 2 gd_temp: title: Process Template @@ -139,6 +146,7 @@ needs_types: status: ^(valid|draft)$ optional_links: complies: std_req__(iso26262|isodae21434|isopas8926|aspice_40)__.*$ + parts: 2 gd_chklst: title: Process Checklist @@ -148,6 +156,7 @@ needs_types: status: ^(valid|draft)$ optional_links: complies: std_req__(iso26262|isodae21434|isopas8926|aspice_40)__.*$ + parts: 2 gd_guidl: title: Process Guideline @@ -157,6 +166,7 @@ needs_types: status: ^(valid|draft)$ optional_links: complies: std_req__(iso26262|isosae21434|isopas8926|aspice_40)__.*$ + parts: 2 gd_method: title: Process Method @@ -166,6 +176,8 @@ needs_types: status: ^(valid|draft)$ optional_links: complies: std_req__(iso26262|isosae21434|isopas8926|aspice_40)__.*$ + parts: 2 + # S-CORE Workproduct workproduct: title: Workproduct @@ -175,6 +187,7 @@ needs_types: status: ^(valid|draft)$ optional_links: complies: std_(wp__iso26262|wp__isosae21434|wp__isopas8926|iic_aspice_40)__.*$ + parts: 2 # Role role: @@ -184,6 +197,7 @@ needs_types: id: ^rl__[0-9a-z_]*$ optional_links: contains: ^rl__.*$ + parts: 2 # Documents, process_description only doc_concept: @@ -192,6 +206,7 @@ needs_types: mandatory_options: id: ^doc_concept__[0-9a-z_]*$ status: ^(valid|draft)$ + parts: 2 doc_getstrt: title: Getting Startet @@ -199,6 +214,7 @@ needs_types: mandatory_options: id: ^doc_getstrt__[0-9a-z_]*$ status: ^(valid|draft)$ + parts: 2 # req-Id: tool_req__docs_doc_types document: @@ -216,6 +232,7 @@ needs_types: reviewer: ^.*$ optional_links: realizes: "^wp__.+$" + parts: 2 # req-Id: tool_req__docs_doc_types doc_tool: @@ -238,6 +255,7 @@ needs_types: reviewer: ^.*$ optional_links: realizes: "^wp__.+$" + parts: 2 # Requirements # req-Id: tool_req__docs_req_types @@ -269,6 +287,7 @@ needs_types: tags: - requirement - requirement_excl_process + parts: 3 # req-Id: tool_req__docs_req_types feat_req: @@ -300,6 +319,7 @@ needs_types: tags: - requirement - requirement_excl_process + parts: 3 # req-Id: tool_req__docs_req_types comp_req: @@ -330,6 +350,7 @@ needs_types: tags: - requirement - requirement_excl_process + parts: 3 # req-Id: tool_req__docs_req_types tool_req: @@ -363,6 +384,7 @@ needs_types: tags: - requirement - requirement_excl_process + parts: 2 # req-Id: tool_req__docs_req_types aou_req: @@ -390,9 +412,9 @@ needs_types: tags: - requirement - requirement_excl_process + parts: 3 # - Architecture - - # Architecture Element & View # req-Id: tool_req__docs_arch_types # req-Id: tool_req__docs_arch_views @@ -416,6 +438,7 @@ needs_types: tags: - architecture_element - architecture_view + parts: 3 # Architecture View # req-Id: tool_req__docs_arch_views @@ -436,6 +459,8 @@ needs_types: fulfils: ^feat_req__.+$ tags: - architecture_view + - architecture_element + parts: 3 # Architecture Element & View # req-Id: tool_req__docs_arch_types @@ -459,6 +484,7 @@ needs_types: tags: - architecture_element - architecture_view + parts: 3 # Architecture Element # req-Id: tool_req__docs_arch_types @@ -479,6 +505,7 @@ needs_types: included_by: ^logic_arc_int__.+$ tags: - architecture_element + parts: 3 # Architecture View # req-Id: tool_req__docs_arch_views @@ -493,6 +520,7 @@ needs_types: includes: ^comp_arc_sta__.+$ tags: - architecture_view + parts: 3 # No process requirement mod_view_dyn: @@ -502,6 +530,7 @@ needs_types: style: card mandatory_options: id: ^mod_view_dyn__[0-9a-z_]+$ + parts: 3 # Architecture Element & View # req-Id: tool_req__docs_arch_types @@ -527,6 +556,7 @@ needs_types: tags: - architecture_element - architecture_view + parts: 3 # Architecture View # req-Id: tool_req__docs_arch_views @@ -547,6 +577,8 @@ needs_types: fulfils: ^comp_req__.+$ tags: - architecture_view + - architecture_element + parts: 3 # Architecture Element & View # req-Id: tool_req__docs_arch_types @@ -570,6 +602,7 @@ needs_types: tags: - architecture_element - architecture_view + parts: 3 # Architecture Element # req-Id: tool_req__docs_arch_types @@ -592,6 +625,7 @@ needs_types: implements: ^logic_arc_int_op__.+$ tags: - architecture_element + parts: 3 # - architecture end - @@ -604,6 +638,7 @@ needs_types: approvers: ^.*$ hash: ^.*$ template: ^.*$ + parts: 3 # Implementation dd_sta: @@ -621,6 +656,7 @@ needs_types: satisfies: ^comp_arc_sta__.*$ optional_links: includes: ^sw_unit__.*$ + parts: 3 dd_dyn: title: Dynamic detailed design @@ -635,6 +671,7 @@ needs_types: mandatory_links: implements: ^comp_req__.*$ satisfies: ^comp_arc_sta__.*$ + parts: 3 sw_unit: title: Software unit @@ -644,6 +681,8 @@ needs_types: security: ^(YES|NO)$ safety: ^(QM|ASIL_B)$ status: ^(valid|invalid)$ + parts: 3 + sw_unit_int: title: Software unit interfaces prefix: sw_unit_int__ @@ -654,6 +693,7 @@ needs_types: security: ^(YES|NO)$ safety: ^(QM|ASIL_B)$ status: ^(valid|invalid)$ + parts: 3 # DFA (Dependent Failure Analysis) # No requirement!! @@ -673,6 +713,7 @@ needs_types: mitigation_issue: ^https://github.com/.*$ optional_links: mitigated_by: ^(feat_req__.*|aou_req__.*)$ + parts: 3 # req-Id: tool_req__docs_saf_types feat_saf_dfa: @@ -701,6 +742,7 @@ needs_types: tags: - dependent_failure_analysis - safety_analysis + parts: 3 # req-Id: tool_req__docs_saf_types comp_saf_dfa: @@ -729,6 +771,7 @@ needs_types: tags: - dependent_failure_analysis - safety_analysis + parts: 3 # FMEA (Failure Mode and Effects Analysis) # req-Id: tool_req__docs_saf_types @@ -758,6 +801,7 @@ needs_types: tags: - failure_mode_effects_analysis - safety_analysis + parts: 3 # req-Id: tool_req__docs_saf_types comp_saf_fmea: @@ -784,6 +828,7 @@ needs_types: tags: - failure_mode_effects_analysis - safety_analysis + parts: 3 # Extra link types, which shall be available and allow need types to be linked to each other. # We use a dedicated linked type for each type of a connection, for instance from diff --git a/src/extensions/score_metamodel/tests/rst/attributes/test_attributes_format_id_format.rst b/src/extensions/score_metamodel/tests/rst/attributes/test_attributes_format_id_format.rst index 3c8025c5..79b0d0ca 100644 --- a/src/extensions/score_metamodel/tests/rst/attributes/test_attributes_format_id_format.rst +++ b/src/extensions/score_metamodel/tests/rst/attributes/test_attributes_format_id_format.rst @@ -14,25 +14,31 @@ #CHECK: check_id_format .. Id does not consists of 3 parts -#EXPECT: stk_req__test.id (stk_req__test): expected to consisting of this format: `____`. +#EXPECT: stkh_req__test.id (stkh_req__test): expected to consist of this format: `____`. .. stkh_req:: This is a test - :id: stk_req__test + :id: stkh_req__test + +.. Id consists of 3 parts +#EXPECT-NOT: stkh_req__test__abcd.id (stkh_req__test__abcd): expected to consist of this format: `____`. + +.. stkh_req:: This is a test + :id: stkh_req__test__abcd .. Id follows pattern -#EXPECT-NOT: expected to consisting of this format: `____`. +#EXPECT: stkh_req__test__test__abcd.id (stkh_req__test__test__abcd): expected to consist of this format: `____`. -.. std_wp:: This is a test - :id: std_wp__test__test__abcd +.. stkh_req:: This is a test + :id: stkh_req__test__test__abcd -.. Id starts with wp and number of parth is neither 2 nor 3 -#EXPECT: wp__test__test__abcd.id (wp__test__test__abcd): expected to consisting of one of these 2 formats:`__` or `____`. +.. Id starts with wp and number of parts is 3 +#EXPECT: wp__test__abcd.id (wp__test__abcd): expected to consist of this format: `__`. -.. std_wp:: This is a test - :id: wp__test__test__abcd +.. workproduct:: This is a test + :id: wp__test__abcd -.. Id is valid, because it starts with wp and contains 3 parts -#EXPECT-NOT: expected to consisting of one of these 2 formats:`__` or `____`. +.. Id is invalid, because it starts with wp and contains 2 parts +#EXPECT-NOT: wp__test.id (wp__test): expected to consist of this format: `__`. -.. std_wp:: This is a test - :id: wp__test__abce +.. workproduct:: This is a test + :id: wp__test From 01a483022c668b72ce339fdffb9c898bd98fc8c2 Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Fri, 1 Aug 2025 10:18:32 +0200 Subject: [PATCH 02/12] Fix Review comments --- src/extensions/score_metamodel/checks/attributes_format.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index a099d3cd..02dfeeb8 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -38,12 +38,13 @@ def check_id_format(app: Sphinx, need: NeedsInfoType, log: CheckLogger): id_parts_len = len(id_parts) if id_parts_len != expected_parts: + msg = "" if expected_parts == 2: - msg = "expected to consist of this format: `__`." - else: + msg = "expected to consist of this format: `__`. Only one '__' id allowed in this need's id." + elif expected_parts == 3: msg = ( "expected to consist of this format: " - "`____`."+ str(expected_parts)+str(id_parts_len) + "`____`. Only two '__' are allowed in this need's id." ) log.warning_for_option(need, "id", msg) From dcd93841fd1ae745aebc10c862be46148ae0d9a8 Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Fri, 1 Aug 2025 10:19:13 +0200 Subject: [PATCH 03/12] Fix small spelling issue --- src/extensions/score_metamodel/checks/attributes_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index 02dfeeb8..b2f8f449 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -40,7 +40,7 @@ def check_id_format(app: Sphinx, need: NeedsInfoType, log: CheckLogger): if id_parts_len != expected_parts: msg = "" if expected_parts == 2: - msg = "expected to consist of this format: `__`. Only one '__' id allowed in this need's id." + msg = "expected to consist of this format: `__`. Only one '__' is allowed in this need's id." elif expected_parts == 3: msg = ( "expected to consist of this format: " From 0b78b914d168cac0eaadcbebfba14fdfdd8fba4e Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Fri, 8 Aug 2025 15:10:42 +0200 Subject: [PATCH 04/12] handle example_feature case in check_id_length --- .../score_metamodel/checks/attributes_format.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index b2f8f449..5dc1492d 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -from score_metamodel import CheckLogger, local_check, ScoreNeedType, ProhibitedWordCheck +from score_metamodel import CheckLogger, ProhibitedWordCheck, ScoreNeedType, local_check from sphinx.application import Sphinx from sphinx_needs.data import NeedsInfoType @@ -56,9 +56,15 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): While the recommended limit is 30 characters, this check enforces a strict maximum of 45 characters. If the ID exceeds 45 characters, a warning is logged specifying the actual length. + Any examples that are required to have 3 parts (2x'__') have an exception, and get 16 extra characters + to compensate for the lenght of `example_feature` that would be replaced by actually feature names. --- """ - if len(need["id"]) > 45: + max_lenght = 45 + parts = need["id"].split("__") + if parts[1] == "example_feature": + max_lenght += 15 # '_example_feature_' + if len(need["id"]) > max_lenght: msg = ( f"exceeds the maximum allowed length of 45 characters " f"(current length: {len(need['id'])})." @@ -66,6 +72,7 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): log.warning_for_option(need, "id", msg) + def _check_options_for_prohibited_words( prohibited_word_checks: ProhibitedWordCheck, need: NeedsInfoType, log: CheckLogger ): From 25f063a05716721fe5510fae816c0550a4e272ee Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Fri, 8 Aug 2025 15:23:49 +0200 Subject: [PATCH 05/12] change example_feature comment --- src/extensions/score_metamodel/checks/attributes_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index 5dc1492d..0a2285fa 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -63,7 +63,7 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): max_lenght = 45 parts = need["id"].split("__") if parts[1] == "example_feature": - max_lenght += 15 # '_example_feature_' + max_lenght += 15 # 'example_feature' if len(need["id"]) > max_lenght: msg = ( f"exceeds the maximum allowed length of 45 characters " From 8d7aeb52385f5833ca722e6b29c583086d349cb3 Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Fri, 8 Aug 2025 15:34:17 +0200 Subject: [PATCH 06/12] clean special cases for check_id_length --- src/extensions/score_metamodel/checks/attributes_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index 0a2285fa..cc7f64e1 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -63,7 +63,7 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): max_lenght = 45 parts = need["id"].split("__") if parts[1] == "example_feature": - max_lenght += 15 # 'example_feature' + return if len(need["id"]) > max_lenght: msg = ( f"exceeds the maximum allowed length of 45 characters " From b84e9ff19d2185448293ae8d831eda37db3d4a0c Mon Sep 17 00:00:00 2001 From: Maximilian Pollak Date: Mon, 11 Aug 2025 10:53:01 +0200 Subject: [PATCH 07/12] Adding exceptions for example_feature --- src/extensions/score_metamodel/checks/attributes_format.py | 6 +++--- .../score_metamodel/checks/id_contains_feature.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index cc7f64e1..0a66e304 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -56,14 +56,14 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): While the recommended limit is 30 characters, this check enforces a strict maximum of 45 characters. If the ID exceeds 45 characters, a warning is logged specifying the actual length. - Any examples that are required to have 3 parts (2x'__') have an exception, and get 16 extra characters - to compensate for the lenght of `example_feature` that would be replaced by actually feature names. + Any examples that are required to have 3 parts (2x'__') have an exception, and get 17 extra characters + to compensate for the lenght of `_example_feature_` that would be replaced by actually feature names. --- """ max_lenght = 45 parts = need["id"].split("__") if parts[1] == "example_feature": - return + max_lenght += 17 # _example_feature_ if len(need["id"]) > max_lenght: msg = ( f"exceeds the maximum allowed length of 45 characters " diff --git a/src/extensions/score_metamodel/checks/id_contains_feature.py b/src/extensions/score_metamodel/checks/id_contains_feature.py index 2c0712b7..d7115098 100644 --- a/src/extensions/score_metamodel/checks/id_contains_feature.py +++ b/src/extensions/score_metamodel/checks/id_contains_feature.py @@ -38,6 +38,8 @@ def id_contains_feature(app: Sphinx, need: NeedsInfoType, log: CheckLogger): # Get the part of the string after the first two underscores: the path feature = parts[1] + if feature == "example_feature": + return featureparts = re.split(r"[_-]", feature) dir_docname = os.path.dirname(str(need.get("docname", ""))) From 41dca3136bc3e42aed05dcd8c58b0f25a8d70967 Mon Sep 17 00:00:00 2001 From: Maximilian Pollak Date: Mon, 11 Aug 2025 11:07:54 +0200 Subject: [PATCH 08/12] Fixing IDs --- MODULE.bazel | 5 + docs/requirements/requirements.rst | 122 +++++++++--------- .../checks/attributes_format.py | 4 +- .../score_metamodel/checks/check_options.py | 10 +- src/extensions/score_metamodel/metamodel.yaml | 4 +- .../score_source_code_linker/__init__.py | 2 +- 6 files changed, 76 insertions(+), 71 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 49ca9456..220582e7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -96,3 +96,8 @@ bazel_dep(name = "score_dash_license_checker", version = "0.1.1") # docs dependency bazel_dep(name = "score_process", version = "1.1.0") +git_override( + module_name = "score_process", + remote="https://github.com/eclipse-score/process_description", + commit="4404b128578f92d4d88d94c3047d4ad7f62435cd" +) diff --git a/docs/requirements/requirements.rst b/docs/requirements/requirements.rst index 942943af..e4d8c858 100644 --- a/docs/requirements/requirements.rst +++ b/docs/requirements/requirements.rst @@ -55,9 +55,9 @@ This section provides an overview of current process requirements and their clar :implemented: YES :tags: Common Attributes :satisfies: - PROCESS_gd_req__req__attr_uid, - PROCESS_gd_req__tool__attr_uid, - PROCESS_gd_req__arch__attribute_uid, + PROCESS_gd_req__req_attr_uid, + PROCESS_gd_req__tool_attr_uid, + PROCESS_gd_req__arch_attribute_uid, PROCESS_gd_req__saf_attr_uid, :parent_covered: NO @@ -73,10 +73,10 @@ This section provides an overview of current process requirements and their clar :implemented: PARTIAL :tags: Common Attributes :satisfies: - PROCESS_gd_req__req__attr_uid, - PROCESS_gd_req__arch__attribute_uid, + PROCESS_gd_req__req_attr_uid, + PROCESS_gd_req__arch_attribute_uid, PROCESS_gd_req__saf_attr_uid, - :parent_covered: NO: cannot check non-existent "doc__naming_conventions" in PROCESS_gd_req__req__attr_uid + :parent_covered: NO: cannot check non-existent "doc__naming_conventions" in PROCESS_gd_req__req_attr_uid Docs-as-Code shall enforce that Need IDs follow the following naming scheme: @@ -97,8 +97,8 @@ This section provides an overview of current process requirements and their clar :implemented: YES :tags: Common Attributes :satisfies: - PROCESS_gd_req__req__attr_title, - PROCESS_gd_req__saf__attr_title, + PROCESS_gd_req__req_attr_title, + PROCESS_gd_req__saf_attr_title, :parent_covered: NO: Can not ensure summary Docs-as-Code shall enforce that all needs have titles and titles do not contain the following words: @@ -117,7 +117,7 @@ This section provides an overview of current process requirements and their clar :tags: Common Attributes :parent_covered: NO: Can not cover 'ISO/IEC/IEEE/29148' :implemented: YES - :satisfies: PROCESS_gd_req__req__attr_description + :satisfies: PROCESS_gd_req__req_attr_description Docs-as-Code shall enforce that each need of type :need:`tool_req__docs_req_types` has a description (content) @@ -127,7 +127,7 @@ This section provides an overview of current process requirements and their clar :tags: Common Attributes :implemented: YES :satisfies: - PROCESS_gd_req__req__desc_weak, + PROCESS_gd_req__req_desc_weak, :parent_covered: YES Docs-as-Code shall enforce that requirement descriptions do not contain the following weak words: @@ -149,8 +149,8 @@ This section provides an overview of current process requirements and their clar :implemented: YES :tags: Common Attributes :satisfies: - PROCESS_gd_req__req__attr_security, - PROCESS_gd_req__arch__attr_security, + PROCESS_gd_req__req_attr_security, + PROCESS_gd_req__arch_attr_security, Docs-as-Code shall enforce that the ``security`` attribute has one of the following values: @@ -175,8 +175,8 @@ This section provides an overview of current process requirements and their clar :implemented: YES :parent_covered: YES :satisfies: - PROCESS_gd_req__req__attr_safety, - PROCESS_gd_req__arch__attr_safety + PROCESS_gd_req__req_attr_safety, + PROCESS_gd_req__arch_attr_safety Docs-as-Code shall enforce that the ``safety`` attribute has one of the following values: @@ -201,8 +201,8 @@ This section provides an overview of current process requirements and their clar :implemented: YES :parent_covered: NO: gd_req__saf_attr_status has additional constraints :satisfies: - PROCESS_gd_req__req__attr_status, - PROCESS_gd_req__arch__attr_status, + PROCESS_gd_req__req_attr_status, + PROCESS_gd_req__arch_attr_status, PROCESS_gd_req__saf_attr_status, Docs-as-Code shall enforce that the ``status`` attribute has one of the following values: @@ -227,7 +227,7 @@ Versioning :tags: Common Attributes :implemented: NO :parent_covered: NO: to be checked after demo - :satisfies: PROCESS_gd_req__req__attr_version + :satisfies: PROCESS_gd_req__req_attr_version Docs-As-Code shall enable and enforce a versioning attribute for all needs. @@ -241,7 +241,7 @@ Versioning :tags: Common Attributes :implemented: NO :parent_covered: NO: parent talks about setting covered to false, but we want to issue a build error. - :satisfies: PROCESS_gd_req__req__suspicious + :satisfies: PROCESS_gd_req__req_suspicious :status: invalid Docs-as-Code shall check if linked parent needs have different versions, compared to @@ -258,7 +258,7 @@ Versioning :tags: Documents :implemented: YES :parent_covered: YES - :satisfies: PROCESS_gd_req__doc__types + :satisfies: PROCESS_gd_req__doc_types Docs-as-Code shall support the following document types: @@ -271,9 +271,9 @@ Versioning :tags: Documents :implemented: NO :satisfies: - PROCESS_gd_req__doc__author, - PROCESS_gd_req__doc__approver, - PROCESS_gd_req__doc__reviewer, + PROCESS_gd_req__doc_author, + PROCESS_gd_req__doc_approver, + PROCESS_gd_req__doc_reviewer, :parent_covered: NO, process requirement has changed and we do not understand the new wording. :status: invalid @@ -289,7 +289,7 @@ Versioning :id: tool_req__docs_doc_attr_author_autofill :tags: Documents :implemented: NO - :satisfies: PROCESS_gd_req__doc__author + :satisfies: PROCESS_gd_req__doc_author :parent_covered: NO, process requirement has changed and we do not understand the new wording. :status: invalid @@ -307,7 +307,7 @@ Versioning :id: tool_req__docs_doc_attr_approver_autofill :tags: Documents :implemented: NO - :satisfies: PROCESS_gd_req__doc__approver + :satisfies: PROCESS_gd_req__doc_approver :parent_covered: NO, process requirement has changed and we do not understand the new wording. :status: invalid @@ -321,7 +321,7 @@ Versioning :id: tool_req__docs_doc_attr_reviewer_autofill :tags: Documents :implemented: NO - :satisfies: PROCESS_gd_req__doc__reviewer + :satisfies: PROCESS_gd_req__doc_reviewer :parent_covered: NO, process requirement has changed and we do not understand the new wording. :status: invalid @@ -353,7 +353,7 @@ Mapping :id: tool_req__docs_req_types :tags: Requirements :implemented: YES - :satisfies: PROCESS_gd_req__req__structure + :satisfies: PROCESS_gd_req__req_structure :parent_covered: YES: Together with tool_req__docs_linkage Docs-as-Code shall support the following requirement types: @@ -374,7 +374,7 @@ Mapping :tags: Requirements :implemented: YES :parent_covered: NO: Can not ensure correct reasoning - :satisfies: PROCESS_gd_req__req__attr_rationale + :satisfies: PROCESS_gd_req__req_attr_rationale Docs-as-Code shall enforce that each stakeholder requirement (stkh_req) contains a ``rationale`` attribute. @@ -382,7 +382,7 @@ Mapping :id: tool_req__docs_req_attr_reqtype :tags: Requirements :implemented: YES - :satisfies: PROCESS_gd_req__req__attr_type + :satisfies: PROCESS_gd_req__req_attr_type Docs-as-Code shall enforce that each need of type :need:`tool_req__docs_req_types` except process and tool requirements has a ``reqtype`` attribute with one of the @@ -397,7 +397,7 @@ Mapping :id: tool_req__docs_req_attr_reqcov :tags: Requirements :implemented: PARTIAL - :satisfies: PROCESS_gd_req__req__attr_req_cov + :satisfies: PROCESS_gd_req__req_attr_req_cov Docs as code shall shall enable marking requirements as covered by their linked children. @@ -413,7 +413,7 @@ Mapping :tags: Requirements :implemented: PARTIAL :parent_covered: YES - :satisfies: PROCESS_gd_req__req__attr_test_covered + :satisfies: PROCESS_gd_req__req_attr_test_covered :status: invalid Docs-As-Code shall allow for every need of type :need:`tool_req__docs_req_types` to @@ -434,7 +434,7 @@ Mapping :id: tool_req__docs_req_link_satisfies_allowed :tags: Requirements :implemented: PARTIAL - :satisfies: PROCESS_gd_req__req__linkage, PROCESS_gd_req__req__traceability + :satisfies: PROCESS_gd_req__req_linkage, PROCESS_gd_req__req_traceability :parent_covered: YES :status: invalid @@ -463,7 +463,7 @@ Mapping :tags: Common Attributes :implemented: YES :parent_covered: YES - :satisfies: PROCESS_gd_req__req__linkage_safety + :satisfies: PROCESS_gd_req__req_linkage_safety QM requirements (safety == QM) shall not be linked to safety requirements (safety != QM) via the ``satisfies`` attribute. @@ -478,8 +478,8 @@ Mapping :id: tool_req__docs_arch_types :tags: Architecture :satisfies: - PROCESS_gd_req__arch__hierarchical_structure, - PROCESS_gd_req__arch__build_blocks, + PROCESS_gd_req__arch_hierarchical_structure, + PROCESS_gd_req__arch_build_blocks, :implemented: YES :parent_covered: NO :status: invalid @@ -501,8 +501,8 @@ Architecture Attributes :id: tool_req__docs_arch_attr_mandatory :tags: Architecture :satisfies: - PROCESS_gd_req__arch__attr_mandatory, - PROCESS_gd_req__arch__attr_fulfils, + PROCESS_gd_req__arch_attr_mandatory, + PROCESS_gd_req__arch_attr_fulfils, :implemented: PARTIAL :parent_covered: YES :parent_has_problem: YES: Metamodel & Process aren't the same. Some definitions are not consistent in Process @@ -526,10 +526,10 @@ Architecture Attributes :tags: Architecture :implemented: PARTIAL :satisfies: - PROCESS_gd_req__arch__linkage_requirement_type, - PROCESS_gd_req__arch__attr_fulfils, - PROCESS_gd_req__arch__traceability, - PROCESS_gd_req__req__linkage_fulfill + PROCESS_gd_req__arch_linkage_requirement_type, + PROCESS_gd_req__arch_attr_fulfils, + PROCESS_gd_req__arch_traceability, + PROCESS_gd_req__req_linkage_fulfill :parent_covered: YES Docs-as-Code shall enforce that linking via the ``fulfils`` attribute follows defined rules. @@ -555,7 +555,7 @@ Architecture Attributes :id: tool_req__docs_arch_link_safety_to_req :tags: Architecture :implemented: PARTIAL - :satisfies: PROCESS_gd_req__arch__linkage_requirement + :satisfies: PROCESS_gd_req__arch_linkage_requirement :parent_covered: YES Docs-as-Code shall enforce that architecture elements of type @@ -567,7 +567,7 @@ Architecture Attributes :id: tool_req__docs_arch_link_qm_to_safety_req :tags: Architecture :implemented: PARTIAL - :satisfies: PROCESS_gd_req__arch__linkage_requirement + :satisfies: PROCESS_gd_req__arch_linkage_requirement :parent_covered: YES Docs-as-Code shall enforce that architecture elements of type @@ -580,8 +580,8 @@ Architecture Attributes :tags: Architecture :implemented: PARTIAL :satisfies: - PROCESS_gd_req__arch__linkage_safety_trace, - PROCESS_gd_req__req__linkage_safety, + PROCESS_gd_req__arch_linkage_safety_trace, + PROCESS_gd_req__req_linkage_safety, :parent_covered: NO Docs-as-Code shall enforce that valid safety architectural elements (Safety != QM) can @@ -592,7 +592,7 @@ Architecture Attributes :tags: Architecture :implemented: NO :parent_covered: YES - :satisfies: PROCESS_gd_req__arch__linkage_security_trace + :satisfies: PROCESS_gd_req__arch_linkage_security_trace Docs-as-Code shall enforce that security relevant :need:`tool_req__docs_arch_types` (Security == YES) can only be linked against security relevant :need:`tool_req__docs_arch_types`. @@ -606,7 +606,7 @@ Architecture Attributes :tags: Architecture :implemented: YES :satisfies: - PROCESS_gd_req__arch__viewpoints, + PROCESS_gd_req__arch_viewpoints, :parent_covered: YES Docs-as-Code shall enable the rendering of diagrams for the following architecture views: @@ -636,8 +636,8 @@ Architecture Attributes :implemented: YES :parent_covered: NO: we only enable linking, we do not link :satisfies: - PROCESS_gd_req__req__attr_impl, - PROCESS_gd_req__impl__design_code_link, + PROCESS_gd_req__req_attr_impl, + PROCESS_gd_req__impl_design_code_link, Docs-as-Code shall allow source code to link to needs. @@ -651,20 +651,20 @@ Architecture Attributes :tags: Detailed Design & Code :implemented: NO :parent_covered: YES - :satisfies: PROCESS_gd_req__req__linkage_architecture_switch + :satisfies: PROCESS_gd_req__req_linkage_architecture_switch Docs-as-Code shall allow for a to-be-defined list of checks to be non-fatal for non release builds. These are typically better suited for metrics than for checks. - e.g. PROCESS_gd_req__req__linkage_architecture + e.g. PROCESS_gd_req__req_linkage_architecture .. tool_req:: Enable Creation of Dependency Graphs - :id: tool_req__docs__dd_dependency_graph + :id: tool_req__docs_dd_dependency_graph :tags: Detailed Design & Code :implemented: NO :parent_covered: YES - :satisfies: PROCESS_gd_req__impl__dependency_analysis + :satisfies: PROCESS_gd_req__impl_dependency_analysis :status: invalid Docs-As-Code shall support generation and rendering of dependency graphs for @@ -685,7 +685,7 @@ Testing :tags: Testing :implemented: PARTIAL :parent_covered: YES - :satisfies: PROCESS_gd_req__req__attr_testlink + :satisfies: PROCESS_gd_req__req_attr_testlink Docs-as-Code shall allow requirements of type :need:`tool_req__docs_req_types` to include a ``testlink`` attribute. @@ -698,7 +698,7 @@ Testing :tags: Testing :implemented: NO :parent_covered: NO - :satisfies: PROCESS_gd_req__verification__checks + :satisfies: PROCESS_gd_req__verification_checks Docs-as-Code shall ensure that each test case has TestType and DerivationTechnique set. @@ -707,7 +707,7 @@ Testing :tags: Testing :implemented: NO :parent_covered: NO - :satisfies: PROCESS_gd_req__verification__checks + :satisfies: PROCESS_gd_req__verification_checks :status: invalid Docs-as-Code shall ensure that each test case has a non empty description. @@ -719,7 +719,7 @@ Testing :tags: Testing :implemented: NO :parent_covered: NO - :satisfies: PROCESS_gd_req__verification__checks + :satisfies: PROCESS_gd_req__verification_checks :status: invalid Docs-as-Code shall ensure that test cases link to requirements on the correct level: @@ -739,7 +739,7 @@ Testing :tags: Tool Verification Reports :implemented: YES :parent_covered: YES - :satisfies: PROCESS_gd_req__tool__attr_safety_affected, PROCESS_gd_req__tool__check_mandatory + :satisfies: PROCESS_gd_req__tool_attr_safety_affected, PROCESS_gd_req__tool_check_mandatory Docs-as-Code shall enforce that every Tool Verification Report (`doc_tool`) includes a ``safety_affected`` attribute with one of the following values: @@ -752,7 +752,7 @@ Testing :tags: Tool Verification Reports :implemented: YES :parent_covered: YES - :satisfies: PROCESS_gd_req__tool__attr_security_affected, PROCESS_gd_req__tool__check_mandatory + :satisfies: PROCESS_gd_req__tool_attr_security_affected, PROCESS_gd_req__tool_check_mandatory Docs-as-Code shall enforce that every Tool Verification Report (`doc_tool`) includes a `security_affected` attribute with one of the following values: @@ -765,7 +765,7 @@ Testing :id: tool_req__docs_tvr_status :tags: Tool Verification Reports :implemented: YES - :satisfies: PROCESS_gd_req__tool__attr_status, PROCESS_gd_req__tool__check_mandatory + :satisfies: PROCESS_gd_req__tool_attr_status, PROCESS_gd_req__tool_check_mandatory :parent_covered: YES Docs-as-Code shall enforce that every Tool Verification Report (`doc_tool`) includes a @@ -825,7 +825,7 @@ Testing :implemented: NO :tags: Safety Analysis :satisfies: - PROCESS_gd_req__saf__attr_mitigated_by, + PROCESS_gd_req__saf_attr_mitigated_by, PROCESS_gd_req__saf_attr_requirements, PROCESS_gd_req__saf_attr_requirements_check, :parent_covered: YES @@ -839,7 +839,7 @@ Testing :id: tool_req__docs_saf_attrs_mitigation_issue :implemented: NO :tags: Safety Analysis - :satisfies: PROCESS_gd_req__saf__attr_mitigation_issue + :satisfies: PROCESS_gd_req__saf_attr_mitigation_issue :parent_covered: NO Docs-As-Code shall allow needs of type :need:`tool_req__docs_saf_types` to have a diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index 0a66e304..e39ba3d5 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -24,7 +24,7 @@ def get_need_type(needs_types: list[ScoreNeedType], directive: str) -> ScoreNeed raise ValueError(f"Need type {directive} not found in needs_types") -# req-#id: gd_req__req__attr_uid +# req-#id: gd_req__req_attr_uid @local_check def check_id_format(app: Sphinx, need: NeedsInfoType, log: CheckLogger): """ @@ -87,7 +87,7 @@ def _check_options_for_prohibited_words( log.warning_for_need(need, msg) -# req-#id: gd_req__req__attr_desc_weak +# req-#id: gd_req__req_attr_desc_weak # # req-#id: gd_req__requirements_attr_title @local_check def check_for_prohibited_words(app: Sphinx, need: NeedsInfoType, log: CheckLogger): diff --git a/src/extensions/score_metamodel/checks/check_options.py b/src/extensions/score_metamodel/checks/check_options.py index aae651c6..61bb67b9 100644 --- a/src/extensions/score_metamodel/checks/check_options.py +++ b/src/extensions/score_metamodel/checks/check_options.py @@ -91,12 +91,12 @@ def remove_prefix(word: str, prefixes: list[str]) -> str: ) -# req-#id: gd_req__req__attr_type +# req-#id: gd_req__req_attr_type # req-#id: gd_req__requirements_attr_security -# req-#id: gd_req__req__attr_safety -# req-#id: gd_req__req__attr_status -# req-#id: gd_req__req__attr_rationale -# req-#id: gd_req__req__attr_mandatory +# req-#id: gd_req__req_attr_safety +# req-#id: gd_req__req_attr_status +# req-#id: gd_req__req_attr_rationale +# req-#id: gd_req__req_attr_mandatory @local_check def check_options( app: Sphinx, diff --git a/src/extensions/score_metamodel/metamodel.yaml b/src/extensions/score_metamodel/metamodel.yaml index b334cad1..6dbcfbab 100644 --- a/src/extensions/score_metamodel/metamodel.yaml +++ b/src/extensions/score_metamodel/metamodel.yaml @@ -931,8 +931,8 @@ needs_extra_links: # - condition: defines the condition that should be checked # - [and / or / xor / not] ############################################################## -# req- Id: gd_req__req__linkage_architecture -# req- Id: gd_req__req__linkage_safety +# req- Id: gd_req__req_linkage_architecture +# req- Id: gd_req__req_linkage_safety graph_checks: # req-Id: tool_req__docs_common_attr_safety_link_check diff --git a/src/extensions/score_source_code_linker/__init__.py b/src/extensions/score_source_code_linker/__init__.py index 3a4be37a..3d56d1b9 100644 --- a/src/extensions/score_source_code_linker/__init__.py +++ b/src/extensions/score_source_code_linker/__init__.py @@ -225,7 +225,7 @@ def get_current_git_hash(ws_root: Path) -> str: raise -# re-qid: gd_req__req__attr_impl +# re-qid: gd_req__req_attr_impl def inject_links_into_needs(app: Sphinx, env: BuildEnvironment) -> None: """ 'Main' function that facilitates the running of all other functions From c7ff1f2c327576ff86529a0118b7460518a74af4 Mon Sep 17 00:00:00 2001 From: Maximilian Pollak Date: Mon, 11 Aug 2025 11:12:12 +0200 Subject: [PATCH 09/12] Formatting --- MODULE.bazel | 4 ++-- src/extensions/score_metamodel/checks/attributes_format.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 220582e7..79c13c56 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -98,6 +98,6 @@ bazel_dep(name = "score_dash_license_checker", version = "0.1.1") bazel_dep(name = "score_process", version = "1.1.0") git_override( module_name = "score_process", - remote="https://github.com/eclipse-score/process_description", - commit="4404b128578f92d4d88d94c3047d4ad7f62435cd" + commit = "4404b128578f92d4d88d94c3047d4ad7f62435cd", + remote = "https://github.com/eclipse-score/process_description", ) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index e39ba3d5..f553f6a4 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -63,7 +63,7 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): max_lenght = 45 parts = need["id"].split("__") if parts[1] == "example_feature": - max_lenght += 17 # _example_feature_ + max_lenght += 17 # _example_feature_ if len(need["id"]) > max_lenght: msg = ( f"exceeds the maximum allowed length of 45 characters " @@ -72,7 +72,6 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): log.warning_for_option(need, "id", msg) - def _check_options_for_prohibited_words( prohibited_word_checks: ProhibitedWordCheck, need: NeedsInfoType, log: CheckLogger ): From 140378501e00e316347a7a42a2c22d5868c7895e Mon Sep 17 00:00:00 2001 From: Maximilian Pollak Date: Mon, 11 Aug 2025 11:29:06 +0200 Subject: [PATCH 10/12] Remove git override --- MODULE.bazel | 5 ----- 1 file changed, 5 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 79c13c56..49ca9456 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -96,8 +96,3 @@ bazel_dep(name = "score_dash_license_checker", version = "0.1.1") # docs dependency bazel_dep(name = "score_process", version = "1.1.0") -git_override( - module_name = "score_process", - commit = "4404b128578f92d4d88d94c3047d4ad7f62435cd", - remote = "https://github.com/eclipse-score/process_description", -) From 02553e30625bcf556d304582ee652be3f00129f1 Mon Sep 17 00:00:00 2001 From: Maximilian Pollak Date: Mon, 11 Aug 2025 11:52:20 +0200 Subject: [PATCH 11/12] Prep for release --- MODULE.bazel | 2 +- src/extensions/score_metamodel/checks/attributes_format.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 49ca9456..7085ecc6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -13,7 +13,7 @@ module( name = "score_docs_as_code", - version = "1.0.1", + version = "1.0.2-CW1", compatibility_level = 1, ) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index f553f6a4..83d7b0aa 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -67,7 +67,7 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): if len(need["id"]) > max_lenght: msg = ( f"exceeds the maximum allowed length of 45 characters " - f"(current length: {len(need['id'])})." + f"(current length: {len(need['id']) if "example_feature" not in need['id'] else len(need['id'])-17})." ) log.warning_for_option(need, "id", msg) From 9cc038808a2e2f8ff99c6f53ac71a368ed6568ca Mon Sep 17 00:00:00 2001 From: Maximilian Pollak Date: Mon, 11 Aug 2025 11:54:46 +0200 Subject: [PATCH 12/12] Fixing formatting --- src/extensions/score_metamodel/checks/attributes_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/score_metamodel/checks/attributes_format.py b/src/extensions/score_metamodel/checks/attributes_format.py index 83d7b0aa..7fc3d840 100644 --- a/src/extensions/score_metamodel/checks/attributes_format.py +++ b/src/extensions/score_metamodel/checks/attributes_format.py @@ -67,7 +67,7 @@ def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger): if len(need["id"]) > max_lenght: msg = ( f"exceeds the maximum allowed length of 45 characters " - f"(current length: {len(need['id']) if "example_feature" not in need['id'] else len(need['id'])-17})." + f"(current length: {len(need['id']) if 'example_feature' not in need['id'] else len(need['id']) - 17})." ) log.warning_for_option(need, "id", msg)