funcnodes-basic 0.2.3__py3-none-any.whl → 0.2.4__py3-none-any.whl
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.
- funcnodes_basic/logic.py +29 -6
- {funcnodes_basic-0.2.3.dist-info → funcnodes_basic-0.2.4.dist-info}/METADATA +2 -2
- {funcnodes_basic-0.2.3.dist-info → funcnodes_basic-0.2.4.dist-info}/RECORD +7 -7
- {funcnodes_basic-0.2.3.dist-info → funcnodes_basic-0.2.4.dist-info}/WHEEL +0 -0
- {funcnodes_basic-0.2.3.dist-info → funcnodes_basic-0.2.4.dist-info}/entry_points.txt +0 -0
- {funcnodes_basic-0.2.3.dist-info → funcnodes_basic-0.2.4.dist-info}/licenses/LICENSE +0 -0
- {funcnodes_basic-0.2.3.dist-info → funcnodes_basic-0.2.4.dist-info}/top_level.txt +0 -0
funcnodes_basic/logic.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"""Logic Nodes for control flow and decision making."""
|
2
2
|
|
3
|
-
from funcnodes_core.node import Node
|
3
|
+
from funcnodes_core.node import Node
|
4
4
|
from typing import Any, List, Optional
|
5
5
|
from funcnodes_core.io import NodeInput, NodeOutput, NoValue
|
6
6
|
import asyncio
|
@@ -35,8 +35,19 @@ class WhileNode(Node):
|
|
35
35
|
async def func(self, condition: bool, input: Any) -> None:
|
36
36
|
if self.inputs["condition"].value:
|
37
37
|
self.outputs["do"].value = input
|
38
|
-
|
39
|
-
|
38
|
+
datapaths = [
|
39
|
+
ip.datapath
|
40
|
+
for ip in self.outputs["do"].connections
|
41
|
+
if ip.datapath is not None
|
42
|
+
]
|
43
|
+
|
44
|
+
while datapaths:
|
45
|
+
for dp in datapaths:
|
46
|
+
if dp.done(breaking_nodes=[self]):
|
47
|
+
datapaths.remove(dp)
|
48
|
+
break
|
49
|
+
else:
|
50
|
+
await asyncio.sleep(0.1)
|
40
51
|
self.request_trigger()
|
41
52
|
else:
|
42
53
|
self.outputs["done"].value = input
|
@@ -94,9 +105,21 @@ class ForNode(Node):
|
|
94
105
|
pass
|
95
106
|
|
96
107
|
for i in self.progress(input, desc="Iterating", unit="it", total=iplen):
|
97
|
-
self.outputs["do"].set_value(i, does_trigger=
|
98
|
-
|
99
|
-
|
108
|
+
self.outputs["do"].set_value(i, does_trigger=True)
|
109
|
+
datapaths = [
|
110
|
+
ip.datapath
|
111
|
+
for ip in self.outputs["do"].connections
|
112
|
+
if ip.datapath is not None
|
113
|
+
]
|
114
|
+
|
115
|
+
while datapaths:
|
116
|
+
for dp in datapaths:
|
117
|
+
if dp.done(breaking_nodes=[self]):
|
118
|
+
datapaths.remove(dp)
|
119
|
+
break
|
120
|
+
else:
|
121
|
+
await asyncio.sleep(0.1)
|
122
|
+
|
100
123
|
v = self.inputs["collector"].value
|
101
124
|
if v is not NoValue:
|
102
125
|
results.append(v)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: funcnodes-basic
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.4
|
4
4
|
Summary: Basic functionalities for funcnodes
|
5
5
|
Author-email: Julian Kimmig <julian.kimmig@linkdlab.de>
|
6
6
|
License: AGPL-3.0
|
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or l
|
|
12
12
|
Requires-Python: >=3.11
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: funcnodes-core>=0.
|
15
|
+
Requires-Dist: funcnodes-core>=0.4.1
|
16
16
|
Requires-Dist: funcnodes
|
17
17
|
Dynamic: license-file
|
18
18
|
|
@@ -3,12 +3,12 @@ funcnodes_basic/dataclass.py,sha256=p7IjTek7XnHOxZCJnFHhmNtmYM1DpacmfuaUePvDQ7Y,
|
|
3
3
|
funcnodes_basic/dicts.py,sha256=koNJEwIq9ryC7evBpnI-QmR7MBIbgUWqpPpwhB3M69Y,2507
|
4
4
|
funcnodes_basic/input.py,sha256=FSHS1bIJ2dJc9NqWaJO0MxegRBERhfxFdkmDiwAuE6o,1654
|
5
5
|
funcnodes_basic/lists.py,sha256=9kGnovK-oClFatslbIeYne27l2-EPEXZbr_6yQ1B1cY,5835
|
6
|
-
funcnodes_basic/logic.py,sha256=
|
6
|
+
funcnodes_basic/logic.py,sha256=HrJzM9h34PJUWiULU9Ol5iQ2tI6rl7c39iTt6RO6mRg,4952
|
7
7
|
funcnodes_basic/math_nodes.py,sha256=PasNf-1wAvbJ_c-_qeiIDaUVfgPQEREJApeUcTS4FQg,10586
|
8
8
|
funcnodes_basic/strings.py,sha256=O6rcxBQJ5eYd765w_tolaD6xMwsNmtBjiPgJ_69tKyA,16429
|
9
|
-
funcnodes_basic-0.2.
|
10
|
-
funcnodes_basic-0.2.
|
11
|
-
funcnodes_basic-0.2.
|
12
|
-
funcnodes_basic-0.2.
|
13
|
-
funcnodes_basic-0.2.
|
14
|
-
funcnodes_basic-0.2.
|
9
|
+
funcnodes_basic-0.2.4.dist-info/licenses/LICENSE,sha256=21Lj2q2SYKHMY4768_a3pr3q0jY2VYamAHipoodhMDc,34273
|
10
|
+
funcnodes_basic-0.2.4.dist-info/METADATA,sha256=Y6AOiZG7PW9kf_TEg2NJ0lTN50eAAaU67lmKc08JSNk,2001
|
11
|
+
funcnodes_basic-0.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
12
|
+
funcnodes_basic-0.2.4.dist-info/entry_points.txt,sha256=HZ0g1oDO8PrL_f6b09lfTrS-jXqbZrP0qYf1Km_pVxw,79
|
13
|
+
funcnodes_basic-0.2.4.dist-info/top_level.txt,sha256=xYbcX5Jx-Ow3N3kgXtyvh8kuhCahb3eHBIZfMvkpVKI,16
|
14
|
+
funcnodes_basic-0.2.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|