thinking-processes 1.2.0__tar.gz → 1.2.1__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.
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/MANIFEST.in +1 -0
- {thinking_processes-1.2.0/thinking_processes.egg-info → thinking_processes-1.2.1}/PKG-INFO +2 -2
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/pyproject.toml +5 -2
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/current_reality_tree/current_reality_tree.py +4 -6
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/evaporating_cloud.py +8 -16
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/future_reality_tree/future_reality_tree.py +7 -17
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/prerequisite_tree/prerequisite_tree.py +7 -15
- {thinking_processes-1.2.0 → thinking_processes-1.2.1/thinking_processes.egg-info}/PKG-INFO +2 -2
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/LICENSE +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/README.md +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/setup.cfg +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/__init__.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/current_reality_tree/__init__.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/current_reality_tree/causal_relation.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/current_reality_tree/node.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/diagram.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/future_reality_tree/__init__.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/future_reality_tree/causal_relation.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/future_reality_tree/node.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/prerequisite_tree/__init__.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/prerequisite_tree/node.py +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes.egg-info/SOURCES.txt +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes.egg-info/dependency_links.txt +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes.egg-info/requires.txt +0 -0
- {thinking_processes-1.2.0 → thinking_processes-1.2.1}/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.2.
|
|
3
|
+
Version: 1.2.1
|
|
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
|
|
@@ -678,7 +678,7 @@ License: GNU GENERAL PUBLIC LICENSE
|
|
|
678
678
|
Public License instead of this License. But first, please read
|
|
679
679
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
680
680
|
|
|
681
|
-
Keywords: TOC,current reality tree,evaporation cloud,conflict resolution diagram
|
|
681
|
+
Keywords: TOC,theory of constraints,current reality tree,evaporation cloud,conflict resolution diagram,thinking processes
|
|
682
682
|
Classifier: Intended Audience :: Education
|
|
683
683
|
Classifier: Intended Audience :: Manufacturing
|
|
684
684
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
requires = ["setuptools", "wheel"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
|
+
[tool.setuptools.packages.find]
|
|
6
|
+
include = ["thinking_processes*"]
|
|
7
|
+
|
|
5
8
|
[project]
|
|
6
9
|
name = "thinking-processes"
|
|
7
|
-
version = "1.2.
|
|
10
|
+
version = "1.2.1"
|
|
8
11
|
dependencies = [
|
|
9
12
|
"graphviz",
|
|
10
13
|
"drawpyo"
|
|
@@ -13,7 +16,7 @@ description = "Diagramming tools for the Thinking Processes from the Theory of C
|
|
|
13
16
|
readme = "README.md"
|
|
14
17
|
requires-python = ">=3.11"
|
|
15
18
|
license = { file = "LICENSE" }
|
|
16
|
-
keywords = ["TOC", "current reality tree", "evaporation cloud", "conflict resolution diagram"]
|
|
19
|
+
keywords = ["TOC", "theory of constraints", "current reality tree", "evaporation cloud", "conflict resolution diagram", "thinking processes"]
|
|
17
20
|
authors = [{ name = "Boris Wiegand", email = "boris.wiegand@stahl-holding-saar.de" }]
|
|
18
21
|
|
|
19
22
|
classifiers = [
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
You should have received a copy of the GNU General Public License
|
|
15
15
|
along with thinking-processes. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
'''
|
|
17
|
-
import os
|
|
18
|
-
from tempfile import TemporaryDirectory
|
|
19
17
|
import re
|
|
20
18
|
from typing import override
|
|
21
19
|
|
|
@@ -25,13 +23,13 @@ from thinking_processes.current_reality_tree.causal_relation import CausalRelati
|
|
|
25
23
|
from thinking_processes.current_reality_tree.node import Node
|
|
26
24
|
from thinking_processes.diagram import Diagram
|
|
27
25
|
|
|
28
|
-
NODE_ID_PATTERN = re.compile('[1-9]\d*')
|
|
26
|
+
NODE_ID_PATTERN = re.compile(r'[1-9]\d*')
|
|
29
27
|
NODE_LINE_PATTERN = re.compile(rf'{NODE_ID_PATTERN.pattern}:.+')
|
|
30
|
-
RIGHT_ARROW_PATTERN = re.compile('(->|=>)')
|
|
31
|
-
LEFT_ARROW_PATTERN = re.compile('(<-|<=)')
|
|
28
|
+
RIGHT_ARROW_PATTERN = re.compile(r'(->|=>)')
|
|
29
|
+
LEFT_ARROW_PATTERN = re.compile(r'(<-|<=)')
|
|
32
30
|
Y_CAUSED_BY_X_LINE_PATTERN = re.compile(rf'[1-9]\d*\s*{LEFT_ARROW_PATTERN.pattern}(\s*[1-9]\d*,?)+')
|
|
33
31
|
X_CAUSES_Y_LINE_PATTERN = re.compile(rf'(\s*[1-9]\d*,?)+\s*{RIGHT_ARROW_PATTERN.pattern}\s*([1-9]\d*)')
|
|
34
|
-
RELATION_LINE_PATTERN = re.compile(
|
|
32
|
+
RELATION_LINE_PATTERN = re.compile(rf'({X_CAUSES_Y_LINE_PATTERN.pattern}|{Y_CAUSED_BY_X_LINE_PATTERN.pattern})\s*')
|
|
35
33
|
NODE_ID_LIST_SEPARATOR_PATTERN = re.compile(r'(\s*,\s*|\s+)')
|
|
36
34
|
|
|
37
35
|
class CurrentRealityTree(Diagram):
|
{thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/evaporating_cloud.py
RENAMED
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
You should have received a copy of the GNU General Public License
|
|
15
15
|
along with thinking-processes. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
'''
|
|
17
|
-
import os
|
|
18
|
-
from tempfile import TemporaryDirectory
|
|
19
17
|
|
|
20
|
-
from
|
|
18
|
+
from typing import override
|
|
19
|
+
from graphviz import Digraph, Graph
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
from thinking_processes.diagram import Diagram
|
|
22
|
+
|
|
23
|
+
class EvaporatingCloud(Diagram):
|
|
23
24
|
"""
|
|
24
25
|
an evaporating cloud, also known as conflict resolution diagram
|
|
25
26
|
|
|
@@ -48,14 +49,8 @@ class EvaporatingCloud:
|
|
|
48
49
|
def add_assumption_on_need_b(self, text: str, is_true: bool|None = None):
|
|
49
50
|
self.__assumptions_on_need_b.append((text, is_true))
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
plots this evaporating cloud.
|
|
54
|
-
|
|
55
|
-
Args:
|
|
56
|
-
view (bool, optional): set to False if you do not want to immediately view the diagram. Defaults to True.
|
|
57
|
-
filepath (str | None, optional): path to the file in which you want to save the plot. Defaults to None.
|
|
58
|
-
"""
|
|
52
|
+
@override
|
|
53
|
+
def to_graphviz(self) -> Graph:
|
|
59
54
|
graph = Digraph(graph_attr=dict(rankdir="RL", nodesep='0.5'))
|
|
60
55
|
graph.node(
|
|
61
56
|
'objective', self.__objective,
|
|
@@ -105,10 +100,7 @@ class EvaporatingCloud:
|
|
|
105
100
|
f'assumption_c_{i}', assumption, is_true,
|
|
106
101
|
'conflict_part_a', 'conflict_part_b'
|
|
107
102
|
)
|
|
108
|
-
|
|
109
|
-
# => write it to a temporary file
|
|
110
|
-
with TemporaryDirectory() as tempdir:
|
|
111
|
-
graph.render(filename=os.path.join(tempdir, 'ec.gv'), view=view, outfile=filepath)
|
|
103
|
+
return graph
|
|
112
104
|
|
|
113
105
|
def __add_assumption_node(
|
|
114
106
|
self, graph: Digraph, node_id: str,
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
You should have received a copy of the GNU General Public License
|
|
15
15
|
along with thinking-processes. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
'''
|
|
17
|
-
import
|
|
18
|
-
from tempfile import TemporaryDirectory
|
|
17
|
+
from typing import override
|
|
19
18
|
|
|
20
|
-
from graphviz import Digraph
|
|
19
|
+
from graphviz import Digraph, Graph
|
|
21
20
|
|
|
22
21
|
from thinking_processes.future_reality_tree.causal_relation import CausalRelation
|
|
23
22
|
from thinking_processes.future_reality_tree.node import Node
|
|
23
|
+
from thinking_processes.diagram import Diagram
|
|
24
24
|
|
|
25
|
-
class FutureRealityTree:
|
|
25
|
+
class FutureRealityTree(Diagram):
|
|
26
26
|
"""
|
|
27
27
|
you can use a future reality tree to analyze necessary injections that cause a set of desirable effects.
|
|
28
28
|
"""
|
|
@@ -104,14 +104,8 @@ class FutureRealityTree:
|
|
|
104
104
|
raise ValueError(f'injection "{effect.text}" must not be an effect')
|
|
105
105
|
self.__causal_relations.append(CausalRelation(causes, effect))
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
plots this future reality tree.
|
|
110
|
-
|
|
111
|
-
Args:
|
|
112
|
-
view (bool, optional): set to False if you do not want to immediately view the diagram. Defaults to True.
|
|
113
|
-
filepath (str | None, optional): path to the file in which you want to save the plot. Defaults to None.
|
|
114
|
-
"""
|
|
107
|
+
@override
|
|
108
|
+
def to_graphviz(self) -> Graph:
|
|
115
109
|
graph = Digraph(graph_attr=dict(rankdir="BT"))
|
|
116
110
|
for node in self.__desirable_effects:
|
|
117
111
|
graph.node(node.id, node.text, fillcolor='lightgreen', style='filled,rounded', shape='rect')
|
|
@@ -131,9 +125,5 @@ class FutureRealityTree:
|
|
|
131
125
|
subgraph.node(mid_of_edge_id, label='', margin='0', height='0', width='0')
|
|
132
126
|
graph.edge(str(cause.id), mid_of_edge_id, arrowhead='none')
|
|
133
127
|
graph.edge(mid_of_edge_id, str(relation.effect.id))
|
|
134
|
-
|
|
135
|
-
#we do not want to see the generated .dot code
|
|
136
|
-
# => write it to a temporary file
|
|
137
|
-
with TemporaryDirectory() as tempdir:
|
|
138
|
-
graph.render(filename=os.path.join(tempdir, 'frt.gv'), view=view, outfile=filepath)
|
|
128
|
+
return graph
|
|
139
129
|
|
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
'''
|
|
17
17
|
import os
|
|
18
18
|
from tempfile import TemporaryDirectory
|
|
19
|
-
from
|
|
19
|
+
from typing import override
|
|
20
|
+
from graphviz import Digraph, Graph
|
|
20
21
|
|
|
21
22
|
from thinking_processes.prerequisite_tree.node import Obstacle, Solution
|
|
23
|
+
from thinking_processes.diagram import Diagram
|
|
22
24
|
|
|
23
|
-
class PrerequisiteTree:
|
|
25
|
+
class PrerequisiteTree(Diagram):
|
|
24
26
|
"""
|
|
25
27
|
you can use a prerequisite to analyze how to overcome obstacles in order to achieve a desirable effect or goal.
|
|
26
28
|
"""
|
|
@@ -52,23 +54,13 @@ class PrerequisiteTree:
|
|
|
52
54
|
for obstacle in self.__obstacles
|
|
53
55
|
)
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
plots this prerequisite tree.
|
|
58
|
-
|
|
59
|
-
Args:
|
|
60
|
-
view (bool, optional): set to False if you do not want to immediately view the diagram. Defaults to True.
|
|
61
|
-
filepath (str | None, optional): path to the file in which you want to save the plot. Defaults to None.
|
|
62
|
-
"""
|
|
57
|
+
@override
|
|
58
|
+
def to_graphviz(self) -> Graph:
|
|
63
59
|
graph = Digraph(graph_attr=dict(rankdir="BT"))
|
|
64
60
|
graph.node('objective', self.__objective, fillcolor='green', style='filled,rounded')
|
|
65
61
|
for obstacle in self.__obstacles:
|
|
66
62
|
obstacle.add_to_graphviz_graph(graph, 'objective')
|
|
67
|
-
|
|
68
|
-
#we do not want to see the generated .dot code
|
|
69
|
-
# => write it to a temporary file
|
|
70
|
-
with TemporaryDirectory(delete=filepath is not None) as tempdir:
|
|
71
|
-
graph.render(filename=os.path.join(tempdir, 'prt.gv'), view=view, outfile=filepath)
|
|
63
|
+
return graph
|
|
72
64
|
|
|
73
65
|
@staticmethod
|
|
74
66
|
def from_txt_file(path_to_txt: str) -> 'PrerequisiteTree':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: thinking-processes
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.1
|
|
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
|
|
@@ -678,7 +678,7 @@ License: GNU GENERAL PUBLIC LICENSE
|
|
|
678
678
|
Public License instead of this License. But first, please read
|
|
679
679
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
680
680
|
|
|
681
|
-
Keywords: TOC,current reality tree,evaporation cloud,conflict resolution diagram
|
|
681
|
+
Keywords: TOC,theory of constraints,current reality tree,evaporation cloud,conflict resolution diagram,thinking processes
|
|
682
682
|
Classifier: Intended Audience :: Education
|
|
683
683
|
Classifier: Intended Audience :: Manufacturing
|
|
684
684
|
Classifier: Intended Audience :: Science/Research
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/future_reality_tree/node.py
RENAMED
|
File without changes
|
|
File without changes
|
{thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes/prerequisite_tree/node.py
RENAMED
|
File without changes
|
{thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes.egg-info/requires.txt
RENAMED
|
File without changes
|
{thinking_processes-1.2.0 → thinking_processes-1.2.1}/thinking_processes.egg-info/top_level.txt
RENAMED
|
File without changes
|