specware 1.3.35__tar.gz → 1.3.37__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: specware
3
- Version: 1.3.35
3
+ Version: 1.3.37
4
4
  Summary: Provides utilities to specify software.
5
5
  Keywords: certification,documentation,markdown,qualification,requirements-management,traceability
6
6
  Author: The specware Authors
@@ -20,7 +20,7 @@ Classifier: Topic :: Software Development :: Quality Assurance
20
20
  Classifier: Topic :: Software Development :: Testing :: Acceptance
21
21
  Classifier: Topic :: Text Processing :: Markup
22
22
  Classifier: Typing :: Typed
23
- Requires-Dist: specitems>=1.7.19
23
+ Requires-Dist: specitems>=1.7.20
24
24
  Requires-Python: >=3.11
25
25
  Project-URL: Source Code, https://github.com/specthings/specware
26
26
  Project-URL: Bug Tracker, https://github.com/specthings/specware/issues
@@ -4,7 +4,7 @@
4
4
 
5
5
  [project]
6
6
  name = "specware"
7
- version = "1.3.35"
7
+ version = "1.3.37"
8
8
  description = "Provides utilities to specify software."
9
9
  authors = [
10
10
  {name = "The specware Authors", email = "specthings@embedded-brains.de"}
@@ -13,7 +13,7 @@ license = "BSD-2-Clause"
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.11"
15
15
  dependencies = [
16
- "specitems >=1.7.19",
16
+ "specitems >=1.7.20",
17
17
  ]
18
18
  keywords = [
19
19
  "certification",
@@ -57,13 +57,26 @@ _ENABLEMENT_CHILD_ROLES = ("interface-host", "interface-group-member",
57
57
  "register-block-base", "register-block-include")
58
58
 
59
59
 
60
+ def _is_design_property_enabled(enabled_set: EnabledSet, item: Item) -> bool:
61
+ result = True
62
+ for design_property in item.parents("design-property",
63
+ is_link_enabled=link_is_enabled):
64
+ if recursive_is_enabled(enabled_set, design_property):
65
+ return True
66
+ result = False
67
+ return result
68
+
69
+
60
70
  def recursive_is_enabled(enabled_set: EnabledSet, item: Item) -> bool:
61
71
  """
62
- Return true, if the item is enabled and there exists a path to the root
63
- item where each item on the path is enabled, otherwise false.
72
+ Return true, if the item is enabled, at least one of its design properties
73
+ is enabled or it has no design property, and there exists a path to the
74
+ root item where each item on the path is enabled, otherwise false.
64
75
  """
65
76
  if not item.is_enabled(enabled_set):
66
77
  return False
78
+ if not _is_design_property_enabled(enabled_set, item):
79
+ return False
67
80
  result = True
68
81
  for parent in itertools.chain(
69
82
  item.parents(_ENABLEMENT_ROLES, is_link_enabled=link_is_enabled),
index 7944dbb..722e79c 100644
Binary file
File without changes