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.
Files changed (83) hide show
  1. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.github/workflows/test.yml +1 -1
  2. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/PKG-INFO +1 -1
  3. nextpipe-0.1.5.dev2/examples/pipeline-chain/requirements.txt +1 -0
  4. nextpipe-0.1.5.dev2/examples/pipeline-complex/requirements.txt +1 -0
  5. nextpipe-0.1.5.dev2/examples/pipeline-ensemble/requirements.txt +1 -0
  6. nextpipe-0.1.5.dev2/examples/pipeline-foreach/requirements.txt +1 -0
  7. nextpipe-0.1.5.dev2/examples/pipeline-preprocess/requirements.txt +1 -0
  8. nextpipe-0.1.5.dev2/nextpipe/__about__.py +1 -0
  9. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/flow.py +11 -11
  10. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/utils.py +3 -3
  11. nextpipe-0.1.5.dev0/examples/pipeline-chain/requirements.txt +0 -1
  12. nextpipe-0.1.5.dev0/examples/pipeline-complex/requirements.txt +0 -1
  13. nextpipe-0.1.5.dev0/examples/pipeline-ensemble/requirements.txt +0 -1
  14. nextpipe-0.1.5.dev0/examples/pipeline-foreach/requirements.txt +0 -1
  15. nextpipe-0.1.5.dev0/examples/pipeline-preprocess/requirements.txt +0 -1
  16. nextpipe-0.1.5.dev0/nextpipe/__about__.py +0 -1
  17. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.github/workflows/lint.yml +0 -0
  18. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.github/workflows/release.yml +0 -0
  19. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.gitignore +0 -0
  20. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.nextmv/bump_requirements.sh +0 -0
  21. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/.prettierrc.yml +0 -0
  22. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/LICENSE.md +0 -0
  23. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/README.md +0 -0
  24. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/README.md +0 -0
  25. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/.gitignore +0 -0
  26. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/README.md +0 -0
  27. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/app.yaml +0 -0
  28. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/input.json +0 -0
  29. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/main.py +0 -0
  30. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/apps/echo/requirements.txt +0 -0
  31. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-chain/README.md +0 -0
  32. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-chain/app.yaml +0 -0
  33. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-chain/main.py +0 -0
  34. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-complex/README.md +0 -0
  35. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-complex/app.yaml +0 -0
  36. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-complex/main.py +0 -0
  37. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-ensemble/README.md +0 -0
  38. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-ensemble/app.yaml +0 -0
  39. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-ensemble/main.py +0 -0
  40. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-foreach/README.md +0 -0
  41. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-foreach/app.yaml +0 -0
  42. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-foreach/main.py +0 -0
  43. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-preprocess/README.md +0 -0
  44. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-preprocess/app.yaml +0 -0
  45. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/examples/pipeline-preprocess/main.py +0 -0
  46. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/__init__.py +0 -0
  47. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/config.py +0 -0
  48. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/decorators.py +0 -0
  49. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/graph.py +0 -0
  50. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/schema.py +0 -0
  51. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/threads.py +0 -0
  52. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe/uplink.py +0 -0
  53. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/nextpipe.code-workspace +0 -0
  54. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/pyproject.toml +0 -0
  55. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/.gitignore +0 -0
  56. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/README.md +0 -0
  57. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/__init__.py +0 -0
  58. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/.gitignore +0 -0
  59. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/README.md +0 -0
  60. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/app.yaml +0 -0
  61. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/main.py +0 -0
  62. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/apps/echo/requirements.txt +0 -0
  63. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/deploy/app.yaml +0 -0
  64. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/deploy/main.py +0 -0
  65. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/deploy/requirements.txt +0 -0
  66. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/chain.json +0 -0
  67. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/chain.json.golden +0 -0
  68. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/chain.py +0 -0
  69. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/complex.json +0 -0
  70. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/complex.json.golden +0 -0
  71. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/complex.py +0 -0
  72. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/fail.py +0 -0
  73. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach-2-pred.json +0 -0
  74. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach-2-pred.json.golden +0 -0
  75. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach-2-pred.py +0 -0
  76. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach.json +0 -0
  77. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach.json.golden +0 -0
  78. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/pipelines/foreach.py +0 -0
  79. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_graph.py +0 -0
  80. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_integration.py +0 -0
  81. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_threads.py +0 -0
  82. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_uplink.py +0 -0
  83. {nextpipe-0.1.5.dev0 → nextpipe-0.1.5.dev2}/tests/test_version.py +0 -0
@@ -5,7 +5,7 @@ jobs:
5
5
  runs-on: ubuntu-latest
6
6
  strategy:
7
7
  matrix:
8
- python-version: ["3.9", "3.11", "3.13"]
8
+ python-version: ["3.9", "3.13"]
9
9
  steps:
10
10
  - name: git clone
11
11
  uses: actions/checkout@v4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nextpipe
3
- Version: 0.1.5.dev0
3
+ Version: 0.1.5.dev2
4
4
  Summary: Framework for Decision Pipeline modeling and execution
5
5
  Project-URL: Homepage, https://www.nextmv.io
6
6
  Project-URL: Documentation, https://www.nextmv.io/docs
@@ -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.__class__)
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, flow_spec_type: type):
108
- self.flow_spec_type = flow_spec_type
109
- self.__create_graph(flow_spec_type)
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.flow_spec_type.__name__}")
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], flow: FlowSpec):
231
+ def __init__(self, steps: list[FlowStep], flow_class: type):
232
232
  self.steps = steps
233
- self.flow = flow
233
+ self.flow_class = flow_class
234
234
  super().__init__()
235
235
 
236
236
  def visit_FunctionDef(self, step_function):
237
- func = getattr(self.flow, step_function.name)
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.flow_spec_type.config.max_step_inputs}."
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), 0, -1):
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