-
Notifications
You must be signed in to change notification settings - Fork 19
feat: draw_metamodel in docs #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -221,6 +221,19 @@ This section provides an overview of current process requirements and their clar | |
| * all architecture elements defined in :need:`tool_req__docs_arch_types`. | ||
| * all safety analysis elements defined in :need:`tool_req__docs_saf_types`. | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel( | ||
| [ | ||
| "stkh_req", "feat_req", "comp_req", "aou_req", | ||
| "feat_arc_sta", "feat", "logic_arc_int", "logic_arc_int_op", "comp_arc_sta", "comp", "real_arc_int", "real_arc_int_op", | ||
| "feat_saf_fmea", "comp_saf_fmea", "feat_saf_dfa", "comp_saf_dfa", | ||
| ], | ||
| attributes=["status"], | ||
| )}} | ||
|
|
||
|
|
||
|
|
||
| ---------- | ||
|
|
@@ -271,6 +284,12 @@ Versioning | |
| * Tool Verification Report (doc_tool) | ||
| * Change Request is also a generic document | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel(types=["document", "doc_tool"])}} | ||
|
|
||
| .. tool_req:: Mandatory attributes of Generic Documents | ||
| :id: tool_req__docs_doc_generic_mandatory | ||
| :tags: Documents | ||
|
|
@@ -287,6 +306,12 @@ Versioning | |
| * safety | ||
| * realizes | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel("document", attributes=["status", "security", "safety", "realizes"])}} | ||
|
|
||
| .. tool_req:: Mandatory Document attributes | ||
| :id: tool_req__docs_doc_attr | ||
| :tags: Documents | ||
|
|
@@ -307,6 +332,11 @@ Versioning | |
| * approver | ||
| * reviewer | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel(["document", "doc_tool"], attributes=["title", "author", "approver", "reviewer"])}} | ||
|
|
||
| .. tool_req:: Document author is autofilled | ||
| :id: tool_req__docs_doc_attr_author_autofill | ||
|
|
@@ -388,6 +418,16 @@ Mapping | |
| * Process requirement (gd_req) | ||
| * Tool requirement (tool_req) | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel( | ||
| [ | ||
| "stkh_req", "feat_req", "comp_req", "aou_req", "gd_req", "tool_req", | ||
| ], | ||
| )}} | ||
|
|
||
| ------------------------- | ||
| 🏷️ Attributes | ||
| ------------------------- | ||
|
|
@@ -401,6 +441,13 @@ Mapping | |
|
|
||
| Docs-as-Code shall enforce that each stakeholder requirement (stkh_req) contains a ``rationale`` attribute. | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel(["stkh_req"], attributes=["rationale"])}} | ||
|
|
||
|
|
||
| .. tool_req:: Enforces requirement type classification | ||
| :id: tool_req__docs_req_attr_reqtype | ||
| :tags: Requirements | ||
|
|
@@ -507,6 +554,18 @@ Mapping | |
| .. note:: | ||
| Certain tool requirements do not have a matching process requirement. | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel( | ||
| [ | ||
| "stkh_req", "feat_req", "comp_req", "gd_req", "tool_req", "workflow" | ||
| ], | ||
| links="satisfies", | ||
| )}} | ||
|
|
||
|
|
||
| .. tool_req:: Safety: enforce safe linking | ||
| :id: tool_req__docs_common_attr_safety_link_check | ||
| :tags: Common Attributes | ||
|
|
@@ -544,6 +603,16 @@ Mapping | |
| * Interface (real_arc_int) | ||
| * Interface Operation (real_arc_int_op) | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel( | ||
| [ | ||
| "feat_arc_sta", "feat", "logic_arc_int", "logic_arc_int_op", "comp_arc_sta", "comp", "real_arc_int", "real_arc_int_op", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the output alphabetical ordered ? I would like to have it in the original given order or at least by option sorted. The reason is to create an blocks according to the given requirement. Is there any possibility to add artificial line breaks?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The output is currently alphabetical... thought error. We can use the user provided order. But arranging images by providing the arguments here in a specific order... that sounds like a suicide risk. |
||
| ], | ||
| )}} | ||
|
|
||
| -------------------------- | ||
| Architecture Attributes | ||
| -------------------------- | ||
|
|
@@ -564,8 +633,24 @@ Architecture Attributes | |
| * Safety | ||
| * Security | ||
| * Status | ||
| * UID | ||
| * ID (implicitly enforced by sphinx-needs) | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel( | ||
| [ | ||
| "feat_arc_sta", "feat", "logic_arc_int", "logic_arc_int_op", "comp_arc_sta", "comp", "real_arc_int", "real_arc_int_op", | ||
| ], | ||
| attributes=[ | ||
| "fulfils", | ||
| "safety", | ||
| "security", | ||
| "status", | ||
| "id", | ||
| ], | ||
| )}} | ||
|
|
||
|
|
||
| ------------------------ | ||
|
|
@@ -601,6 +686,24 @@ Architecture Attributes | |
| real_arc_int comp_req | ||
| ==================================== ========================================== | ||
|
|
||
| .. admonition:: How is it currently implemented in the current docs-as-code metamodel.yml? | ||
|
|
||
| .. needuml:: | ||
|
|
||
| {{draw_metamodel( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The picture shows only 6 of 8 components. The interfaces are missing. I would like to show them, also if there are no links available.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my examples I've added only the stuff that was mentioned in exactly that requirement. But that's one of the main questions: how do use this draw_metamodel feature in a way that actually helps us. |
||
| [ | ||
| "feat_req", | ||
| "comp_req", | ||
| "feat_arc_sta", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly. We could also add some error reporting... but I'm afraid that we would reimplement the metamodel in the draw functions / make them overly strict in what exactly they can actually draw. |
||
| "feat_arc_dyn", | ||
| "logic_arc_int" | ||
| "comp_arc_sta", | ||
| "comp_arc_dyn", | ||
| "real_arc_int" | ||
| ], | ||
| links=["fulfils"], | ||
| attributes=False | ||
| )}} | ||
|
|
||
| .. tool_req:: Ensure safety architecture elements link a safety requirement | ||
| :id: tool_req__docs_arch_link_safety_to_req | ||
|
|
@@ -675,6 +778,7 @@ Architecture Attributes | |
| but are still defined as architectural elements, which means they have the properties of | ||
| architectural elements. | ||
|
|
||
|
|
||
| 💻 Detailed Design & Code | ||
| ########################## | ||
|
|
||
|
|
@@ -778,9 +882,9 @@ Testing | |
|
|
||
| Docs-as-Code shall ensure that test cases link to requirements on the correct level: | ||
|
|
||
| - If Partially/FullyVerifies are set in Feature Integration Test these shall link to Feature Requirements | ||
| - If Partially/FullyVerifies are set in Component Integration Test these shall link to Component Requirements | ||
| - If Partially/FullyVerifies are set in Unit Test these shall link to Component Requirements | ||
| - If Partially/FullyVerifies are set in Feature Integration Test these shall link to Feature Requirements | ||
| - If Partially/FullyVerifies are set in Component Integration Test these shall link to Component Requirements | ||
| - If Partially/FullyVerifies are set in Unit Test these shall link to Component Requirements | ||
|
|
||
|
|
||
| 🧪 Tool Verification Reports | ||
|
|
@@ -890,7 +994,7 @@ Testing | |
| gd_req__saf_attr_uid, | ||
| :parent_covered: YES | ||
|
|
||
| Docs-As-Code shall support the following need types: | ||
| Docs-As-Code shall support the following need types: | ||
|
|
||
| * Feature FMEA (Failure Modes and Effect Analysis) -> ``feat_saf_fmea`` | ||
| * Component FMEA (Failure Modes and Effect Analysis) -> ``comp_saf_fmea`` | ||
|
|
@@ -998,14 +1102,17 @@ Testing | |
| Docs-As-Code shall enforce that needs of type :need:`tool_req__docs_saf_types` have a | ||
| `violates` links to at least one dynamic / static diagram according to the table. | ||
|
|
||
| | Source | Target | | ||
| | -- | -- | | ||
| | feat_saf_dfa | feat_arc_sta | | ||
| | comp_saf_dfa | comp_arc_sta | | ||
| +---------------+--------------+ | ||
| | Source | Target | | ||
| +===============+==============+ | ||
| | feat_saf_dfa | feat_arc_sta | | ||
| +---------------+--------------+ | ||
| | comp_saf_dfa | comp_arc_sta | | ||
| +---------------+--------------+ | ||
| | feat_saf_fmea | feat_arc_dyn | | ||
| +---------------+--------------+ | ||
| | comp_saf_fmea | comp_arc_dyn | | ||
|
|
||
|
|
||
| +---------------+--------------+ | ||
|
|
||
| .. tool_req:: FMEA: fault id attribute | ||
| :id: tool_req__docs_saf_attr_fmea_fault_id | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulling in parts of the implementation into a requirement is weird from a process point of view. It implies testing is not necessary because the requirement implicitly always reflects what is implemented.
Alternatively, we don't consider metamodel.yaml as implementation but as a requirements artifact. In that case, it should not be placed deep within the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, metamodel could be the requirement. Maybe.
Maybe we need to drop tool requirements.
Maybe we copy process requirements as tool requirements.
etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source code link is actually exactly the same. It shows implementation "in" the requirement.