Skip to content

Commit 7b19c80

Browse files
committed
rules_score: Remove description from dependable_element
We do not want that in BUILD files, we have to write descriptions. This seems unnatural, what the dependable element does, comes out of the whole architecture / design description.
1 parent 6ae09a3 commit 7b19c80

6 files changed

Lines changed: 0 additions & 55 deletions

File tree

bazel/rules/rules_score/examples/seooc/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ dependable_element(
5555
dependability_analysis = [
5656
":sample_dependability_analysis",
5757
],
58-
description = "Safety Element out of Context (SEooC) example",
5958
integrity_level = "B",
6059
requirements = [
6160
"//bazel/rules/rules_score/examples/seooc/docs/requirements:feature_requirements",

bazel/rules/rules_score/examples/some_other_library/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ dependable_element(
5151
assumptions_of_use = [],
5252
components = [":component_example"],
5353
dependability_analysis = [],
54-
description = "XYZ",
5554
integrity_level = "D",
5655
requirements = [],
5756
tests = [],

bazel/rules/rules_score/private/dependable_element.bzl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,6 @@ def _dependable_element_index_impl(ctx):
769769
substitutions = {
770770
"{title}": title,
771771
"{underline}": underline,
772-
"{description}": ctx.attr.description,
773772
"{components}": components_ref,
774773
"{assumptions_of_use}": "\n ".join(artifacts_by_type["assumptions_of_use"]),
775774
"{requirements}": "\n ".join(artifacts_by_type["requirements"]),
@@ -988,10 +987,6 @@ _dependable_element_index = rule(
988987
mandatory = True,
989988
doc = "Name of the dependable element module (used as document title)",
990989
),
991-
"description": attr.string(
992-
mandatory = True,
993-
doc = "Description of the dependable element. Supports RST formatting.",
994-
),
995990
"assumptions_of_use": attr.label_list(
996991
mandatory = True,
997992
doc = "Assumptions of Use targets or files.",
@@ -1158,7 +1153,6 @@ _dependable_element_test = rule(
11581153
# lobster-trace: Tools.ArchitectureModelingDependableElement
11591154
def dependable_element(
11601155
name,
1161-
description,
11621156
assumptions_of_use,
11631157
requirements,
11641158
architectural_design,
@@ -1185,9 +1179,6 @@ def dependable_element(
11851179
Args:
11861180
name: The name of the dependable element. Used as the base name for
11871181
all generated targets.
1188-
description: String containing a high-level description of the element.
1189-
This text provides context about what the element does and its purpose.
1190-
Supports RST formatting.
11911182
assumptions_of_use: List of labels to assumptions_of_use targets that
11921183
define the safety-relevant operating conditions and constraints.
11931184
requirements: List of labels to requirements targets (component_requirements,
@@ -1227,7 +1218,6 @@ def dependable_element(
12271218
_dependable_element_index(
12281219
name = name + "_index",
12291220
module_name = name,
1230-
description = description,
12311221
template = Label("//bazel/rules/rules_score:templates/dependable_element_index.template.rst"),
12321222
assumptions_of_use = assumptions_of_use,
12331223
requirements = requirements,

bazel/rules/rules_score/templates/dependable_element_index.template.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
Dependable element: {title}
1616
===================={underline}
1717

18-
{description}
19-
2018
Architectural Design
2119
--------------------
2220

bazel/rules/rules_score/test/BUILD

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ load(
6969
load(
7070
":seooc_test.bzl",
7171
"seooc_artifacts_copied_test",
72-
"seooc_description_test",
7372
"seooc_index_generation_test",
7473
"seooc_needs_provider_test",
7574
"seooc_sphinx_module_generated_test",
@@ -214,7 +213,6 @@ dependable_element(
214213
assumptions_of_use = [":aous"],
215214
components = [],
216215
dependability_analysis = [":dependability_analysis_target"],
217-
description = "Dependency SEooC module for testing the deps attribute of dependable_element.",
218216
integrity_level = "B",
219217
requirements = [":feat_req"],
220218
tests = [],
@@ -227,7 +225,6 @@ dependable_element(
227225
assumptions_of_use = [":aous"],
228226
components = [],
229227
dependability_analysis = [":dependability_analysis_target"],
230-
description = "Test SEooC module demonstrating S-CORE process compliance structure.",
231228
integrity_level = "B",
232229
requirements = [":feat_req"],
233230
tests = [],
@@ -336,7 +333,6 @@ dependable_element(
336333
assumptions_of_use = [":aous"],
337334
components = [":test_component"],
338335
dependability_analysis = [":dependability_analysis_target"],
339-
description = "Test dependable element for unit testing",
340336
integrity_level = "B",
341337
requirements = [":feat_req"],
342338
tests = [], # Empty for testing
@@ -408,7 +404,6 @@ dependable_element(
408404
assumptions_of_use = [":aous"],
409405
components = [":test_parent_component"],
410406
dependability_analysis = [":dependability_analysis_target"],
411-
description = "Test dependable element with nested components for testing recursive unit collection and deduplication",
412407
integrity_level = "B",
413408
requirements = [":feat_req"],
414409
tests = [],
@@ -501,11 +496,6 @@ seooc_index_generation_test(
501496
target_under_test = ":seooc_test_lib_index",
502497
)
503498

504-
seooc_description_test(
505-
name = "seooc_tests_description",
506-
target_under_test = ":seooc_test_lib_index",
507-
)
508-
509499
# ============================================================================
510500
# Test Suites
511501
# ============================================================================
@@ -571,7 +561,6 @@ test_suite(
571561
name = "seooc_tests",
572562
tests = [
573563
":seooc_tests_artifacts_copied",
574-
":seooc_tests_description",
575564
":seooc_tests_index_generation",
576565
":seooc_tests_needs_provider",
577566
":seooc_tests_sphinx_module_generated",

bazel/rules/rules_score/test/seooc_test.bzl

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -115,33 +115,3 @@ def _seooc_needs_provider_test_impl(ctx):
115115
seooc_needs_provider_test = analysistest.make(
116116
impl = _seooc_needs_provider_test_impl,
117117
)
118-
119-
def _seooc_description_test_impl(ctx):
120-
"""Test that SEooC includes description in generated index.rst."""
121-
env = analysistest.begin(ctx)
122-
target_under_test = analysistest.target_under_test(env)
123-
124-
# Get the generated index file
125-
files = target_under_test[DefaultInfo].files.to_list()
126-
127-
# Find index.rst
128-
index_file = None
129-
for f in files:
130-
if f.basename == "index.rst":
131-
index_file = f
132-
break
133-
134-
# Note: We can't easily read file contents in analysis test,
135-
# but we can verify the file exists. The description content
136-
# would be validated through integration tests or manual inspection.
137-
asserts.true(
138-
env,
139-
index_file != None,
140-
"Expected index.rst to exist for description validation",
141-
)
142-
143-
return analysistest.end(env)
144-
145-
seooc_description_test = analysistest.make(
146-
impl = _seooc_description_test_impl,
147-
)

0 commit comments

Comments
 (0)