nextpipe 0.1.5.dev0__tar.gz → 0.1.5.dev2__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.
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.github/workflows/test.yml +1 -1
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/PKG-INFO +1 -1
- nextpipe-0.1.5.dev2/examples/pipeline-chain/requirements.txt +1 -0
- nextpipe-0.1.5.dev2/examples/pipeline-complex/requirements.txt +1 -0
- nextpipe-0.1.5.dev2/examples/pipeline-ensemble/requirements.txt +1 -0
- nextpipe-0.1.5.dev2/examples/pipeline-foreach/requirements.txt +1 -0
- nextpipe-0.1.5.dev2/examples/pipeline-preprocess/requirements.txt +1 -0
- nextpipe-0.1.5.dev2/nextpipe/__about__.py +1 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/flow.py +11 -11
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/utils.py +3 -3
- nextpipe-0.1.5.dev0/examples/pipeline-chain/requirements.txt +0 -1
- nextpipe-0.1.5.dev0/examples/pipeline-complex/requirements.txt +0 -1
- nextpipe-0.1.5.dev0/examples/pipeline-ensemble/requirements.txt +0 -1
- nextpipe-0.1.5.dev0/examples/pipeline-foreach/requirements.txt +0 -1
- nextpipe-0.1.5.dev0/examples/pipeline-preprocess/requirements.txt +0 -1
- nextpipe-0.1.5.dev0/nextpipe/__about__.py +0 -1
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.github/workflows/lint.yml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.github/workflows/release.yml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.gitignore +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.nextmv/bump_requirements.sh +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.prettierrc.yml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/LICENSE.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/.gitignore +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/app.yaml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/input.json +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/main.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/requirements.txt +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-chain/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-chain/app.yaml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-chain/main.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-complex/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-complex/app.yaml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-complex/main.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-ensemble/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-ensemble/app.yaml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-ensemble/main.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-foreach/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-foreach/app.yaml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-foreach/main.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-preprocess/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-preprocess/app.yaml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-preprocess/main.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/__init__.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/config.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/decorators.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/graph.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/schema.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/threads.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/uplink.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe.code-workspace +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/pyproject.toml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/.gitignore +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/__init__.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/.gitignore +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/README.md +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/app.yaml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/main.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/requirements.txt +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/deploy/app.yaml +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/deploy/main.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/deploy/requirements.txt +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/chain.json +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/chain.json.golden +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/chain.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/complex.json +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/complex.json.golden +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/complex.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/fail.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach-2-pred.json +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach-2-pred.json.golden +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach-2-pred.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach.json +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach.json.golden +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_graph.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_integration.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_threads.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_uplink.py +0 -0
- {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_version.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nextpipe==0.1.5.dev.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nextpipe==0.1.5.dev.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nextpipe==0.1.5.dev.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nextpipe==0.1.5.dev.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nextpipe==0.1.5.dev.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "v0.1.5.dev2"
|
|
@@ -69,7 +69,7 @@ class FlowSpec:
|
|
|
69
69
|
self.client = Client() if client is None else client
|
|
70
70
|
self.uplink = uplink.UplinkClient(self.client, uplink_config)
|
|
71
71
|
# Create the graph
|
|
72
|
-
self.graph = FlowGraph(self
|
|
72
|
+
self.graph = FlowGraph(self)
|
|
73
73
|
# Inform platform about the graph
|
|
74
74
|
self.uplink.submit_update(self.graph._to_uplink_dto())
|
|
75
75
|
# Prepare for running the flow
|
|
@@ -104,9 +104,9 @@ class FlowSpec:
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
class FlowGraph:
|
|
107
|
-
def __init__(self,
|
|
108
|
-
self.
|
|
109
|
-
self.__create_graph(
|
|
107
|
+
def __init__(self, flow_spec: FlowSpec):
|
|
108
|
+
self.flow_spec = flow_spec
|
|
109
|
+
self.__create_graph(flow_spec)
|
|
110
110
|
self.__debug_print()
|
|
111
111
|
# Create a Mermaid diagram of the graph and log it
|
|
112
112
|
mermaid = self._to_mermaid()
|
|
@@ -118,12 +118,12 @@ class FlowGraph:
|
|
|
118
118
|
def get_step(self, definition: decorators.Step) -> FlowStep:
|
|
119
119
|
return self.steps_by_definition[definition]
|
|
120
120
|
|
|
121
|
-
def __create_graph(self, flow_spec):
|
|
121
|
+
def __create_graph(self, flow_spec: FlowSpec):
|
|
122
122
|
root = utils.get_ast_root(flow_spec)
|
|
123
123
|
|
|
124
124
|
# Build the graph
|
|
125
125
|
self.steps: list[FlowStep] = []
|
|
126
|
-
visitor = StepVisitor(self.steps, flow_spec)
|
|
126
|
+
visitor = StepVisitor(self.steps, flow_spec.__class__)
|
|
127
127
|
visitor.visit(root)
|
|
128
128
|
|
|
129
129
|
# Init steps for all step definitions
|
|
@@ -217,7 +217,7 @@ class FlowGraph:
|
|
|
217
217
|
)
|
|
218
218
|
|
|
219
219
|
def __debug_print(self):
|
|
220
|
-
utils.log_internal(f"Flow: {self.
|
|
220
|
+
utils.log_internal(f"Flow: {self.flow_spec.__class__.__name__}")
|
|
221
221
|
utils.log_internal(f"nextpipe: {version('nextpipe')}")
|
|
222
222
|
utils.log_internal(f"nextmv: {version('nextmv')}")
|
|
223
223
|
utils.log_internal("Flow graph steps:")
|
|
@@ -228,13 +228,13 @@ class FlowGraph:
|
|
|
228
228
|
|
|
229
229
|
|
|
230
230
|
class StepVisitor(ast.NodeVisitor):
|
|
231
|
-
def __init__(self, steps: list[FlowStep],
|
|
231
|
+
def __init__(self, steps: list[FlowStep], flow_class: type):
|
|
232
232
|
self.steps = steps
|
|
233
|
-
self.
|
|
233
|
+
self.flow_class = flow_class
|
|
234
234
|
super().__init__()
|
|
235
235
|
|
|
236
236
|
def visit_FunctionDef(self, step_function):
|
|
237
|
-
func = getattr(self.
|
|
237
|
+
func = getattr(self.flow_class, step_function.name)
|
|
238
238
|
if hasattr(func, "is_step"):
|
|
239
239
|
self.steps.append(FlowStep(step_function, func.step, func.__doc__))
|
|
240
240
|
|
|
@@ -307,7 +307,7 @@ class Runner:
|
|
|
307
307
|
if len(inputs) > self.spec.config.max_step_inputs:
|
|
308
308
|
raise Exception(
|
|
309
309
|
f"Step {step.definition.get_id()} has too many inputs ({len(inputs)}). "
|
|
310
|
-
+ f"Maximum allowed is {self.graph.
|
|
310
|
+
+ f"Maximum allowed is {self.graph.flow_spec.config.max_step_inputs}."
|
|
311
311
|
)
|
|
312
312
|
return inputs
|
|
313
313
|
|
|
@@ -139,7 +139,7 @@ def __get_notebook_ast_root(obj: object) -> ast.ClassDef:
|
|
|
139
139
|
ipython = get_ipython()
|
|
140
140
|
|
|
141
141
|
# Go backwards in the history to find the cell where the object's class was defined.
|
|
142
|
-
for i in range(len(ipython.history_manager.input_hist_parsed),
|
|
142
|
+
for i in range(len(ipython.history_manager.input_hist_parsed) - 1, -1, -1):
|
|
143
143
|
# Parse the code of the cell into an AST.
|
|
144
144
|
tree = ast.parse(ipython.history_manager.input_hist_parsed[i])
|
|
145
145
|
|
|
@@ -155,8 +155,8 @@ def __get_normal_ast_root(obj: object) -> ast.ClassDef:
|
|
|
155
155
|
"""
|
|
156
156
|
Find the root AST of the given object.
|
|
157
157
|
"""
|
|
158
|
-
module = importlib.import_module(obj.__module__)
|
|
159
|
-
class_name = obj.__name__
|
|
158
|
+
module = importlib.import_module(obj.__class__.__module__)
|
|
159
|
+
class_name = obj.__class__.__name__
|
|
160
160
|
tree = ast.parse(inspect.getsource(module)).body
|
|
161
161
|
root = [n for n in tree if isinstance(n, ast.ClassDef) and n.name == class_name][0]
|
|
162
162
|
return root
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nextpipe==0.1.5.dev.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nextpipe==0.1.5.dev.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nextpipe==0.1.5.dev.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nextpipe==0.1.5.dev.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nextpipe==0.1.5.dev.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "v0.1.5.dev0"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|