thinking-processes 1.8.3__tar.gz → 1.9.0__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.
Files changed (25) hide show
  1. {thinking_processes-1.8.3/thinking_processes.egg-info → thinking_processes-1.9.0}/PKG-INFO +1 -1
  2. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/pyproject.toml +1 -1
  3. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/evaporating_cloud.py +34 -0
  4. {thinking_processes-1.8.3 → thinking_processes-1.9.0/thinking_processes.egg-info}/PKG-INFO +1 -1
  5. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/LICENSE +0 -0
  6. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/MANIFEST.in +0 -0
  7. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/README.md +0 -0
  8. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/setup.cfg +0 -0
  9. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/__init__.py +0 -0
  10. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/current_reality_tree/__init__.py +0 -0
  11. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/current_reality_tree/causal_relation.py +0 -0
  12. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/current_reality_tree/current_reality_tree.py +0 -0
  13. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/current_reality_tree/node.py +0 -0
  14. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/diagram.py +0 -0
  15. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/future_reality_tree/__init__.py +0 -0
  16. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/future_reality_tree/causal_relation.py +0 -0
  17. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/future_reality_tree/future_reality_tree.py +0 -0
  18. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/future_reality_tree/node.py +0 -0
  19. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/prerequisite_tree/__init__.py +0 -0
  20. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/prerequisite_tree/node.py +0 -0
  21. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes/prerequisite_tree/prerequisite_tree.py +0 -0
  22. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes.egg-info/SOURCES.txt +0 -0
  23. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes.egg-info/dependency_links.txt +0 -0
  24. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes.egg-info/requires.txt +0 -0
  25. {thinking_processes-1.8.3 → thinking_processes-1.9.0}/thinking_processes.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thinking-processes
3
- Version: 1.8.3
3
+ Version: 1.9.0
4
4
  Summary: Diagramming tools for the Thinking Processes from the Theory of Constraints
5
5
  Author-email: Boris Wiegand <boris.wiegand@stahl-holding-saar.de>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -7,7 +7,7 @@ include = ["thinking_processes*"]
7
7
 
8
8
  [project]
9
9
  name = "thinking-processes"
10
- version = "1.8.3"
10
+ version = "1.9.0"
11
11
  dependencies = [
12
12
  "graphviz",
13
13
  "drawpyo"
@@ -77,6 +77,40 @@ class EvaporatingCloud(Diagram):
77
77
  if assumption != text
78
78
  ]
79
79
 
80
+ def set_assumption_truth_value(self, text: str, is_true: bool|None):
81
+ """
82
+ sets the truth value of any assumption equalling the given text.
83
+ if there is no matching node in the diagram, nothing happens.
84
+ """
85
+ self.__assumptions_between_conflict_parts = [
86
+ (assumption, is_true if assumption == text else current_is_true)
87
+ for assumption, current_is_true in self.__assumptions_between_conflict_parts
88
+ ]
89
+ self.__assumptions_on_need_a = [
90
+ (assumption, is_true if assumption == text else current_is_true)
91
+ for assumption, current_is_true in self.__assumptions_on_need_a
92
+ ]
93
+ self.__assumptions_on_need_b = [
94
+ (assumption, is_true if assumption == text else current_is_true)
95
+ for assumption, current_is_true in self.__assumptions_on_need_b
96
+ ]
97
+
98
+ def get_assumption_truth_value(self, text: str) -> bool|None:
99
+ """
100
+ returns the truth value of any assumption equalling the given text.
101
+ if there is no matching node in the diagram, a ValueError is raised.
102
+ """
103
+ for assumption, is_true in self.__assumptions_between_conflict_parts:
104
+ if assumption == text:
105
+ return is_true
106
+ for assumption, is_true in self.__assumptions_on_need_a:
107
+ if assumption == text:
108
+ return is_true
109
+ for assumption, is_true in self.__assumptions_on_need_b:
110
+ if assumption == text:
111
+ return is_true
112
+ raise ValueError(f"Assumption '{text}' not found.")
113
+
80
114
  @override
81
115
  def to_graphviz(self) -> Graph:
82
116
  graph = Digraph(graph_attr=dict(rankdir="RL", nodesep='0.5'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thinking-processes
3
- Version: 1.8.3
3
+ Version: 1.9.0
4
4
  Summary: Diagramming tools for the Thinking Processes from the Theory of Constraints
5
5
  Author-email: Boris Wiegand <boris.wiegand@stahl-holding-saar.de>
6
6
  License: GNU GENERAL PUBLIC LICENSE