nextpipe 0.6.1.dev0__tar.gz → 0.6.2.dev1__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 (106) hide show
  1. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/PKG-INFO +1 -1
  2. nextpipe-0.6.2.dev1/nextpipe/__about__.py +1 -0
  3. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/decorators.py +10 -0
  4. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/flow.py +44 -8
  5. nextpipe-0.6.1.dev0/nextpipe/__about__.py +0 -1
  6. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/.github/workflows/lint.yml +0 -0
  7. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/.github/workflows/release.yml +0 -0
  8. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/.github/workflows/test.yml +0 -0
  9. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/.gitignore +0 -0
  10. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/.markdownlint.jsonc +0 -0
  11. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/.nextmv/bump_requirements.sh +0 -0
  12. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/.prettierrc.yml +0 -0
  13. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/.readthedocs.yaml +0 -0
  14. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/LICENSE.md +0 -0
  15. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/README.md +0 -0
  16. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/RELEASE.md +0 -0
  17. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/examples/basic-chained-workflow.md +0 -0
  18. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/examples/complex-workflow-csv.md +0 -0
  19. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/examples/complex-workflow.md +0 -0
  20. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/examples/ensemble-workflow.md +0 -0
  21. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/examples/fanout-workflow.md +0 -0
  22. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/examples/multifile-workflow.md +0 -0
  23. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/active-plan.png +0 -0
  24. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/api-keys.png +0 -0
  25. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/app-diagram.png +0 -0
  26. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/apps-orchestrate-full.png +0 -0
  27. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/apps-orchestrate.png +0 -0
  28. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/innovator.png +0 -0
  29. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/logo-180.png +0 -0
  30. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/new-run-orchestrate.png +0 -0
  31. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/nextmv-favicon.svg +0 -0
  32. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/plans.png +0 -0
  33. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/pushed-app.png +0 -0
  34. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/routing-ortools-pyvroom-selected.png +0 -0
  35. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/routing-selected.png +0 -0
  36. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/run-metadata.png +0 -0
  37. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/run-summary.png +0 -0
  38. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/run-workflow.png +0 -0
  39. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/secrets-collection-orchestrate.png +0 -0
  40. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/images/workflow-diagram.png +0 -0
  41. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/index.md +0 -0
  42. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/config.md +0 -0
  43. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/decorators.md +0 -0
  44. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/echo-multi.md +0 -0
  45. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/echo.md +0 -0
  46. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/flow.md +0 -0
  47. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/graph.md +0 -0
  48. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/schema.md +0 -0
  49. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/threads.md +0 -0
  50. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/uplink.md +0 -0
  51. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/reference/utils.md +0 -0
  52. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/requirements.txt +0 -0
  53. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/docs/tutorials/orchestrate-multiple-models.md +0 -0
  54. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/mkdocs.yml +0 -0
  55. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/__init__.py +0 -0
  56. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/config.py +0 -0
  57. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/graph.py +0 -0
  58. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/schema.py +0 -0
  59. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/threads.py +0 -0
  60. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/uplink.py +0 -0
  61. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe/utils.py +0 -0
  62. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/nextpipe.code-workspace +0 -0
  63. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/pyproject.toml +0 -0
  64. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/.gitignore +0 -0
  65. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/README.md +0 -0
  66. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/__init__.py +0 -0
  67. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo/.gitignore +0 -0
  68. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo/README.md +0 -0
  69. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo/app.yaml +0 -0
  70. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo/main.py +0 -0
  71. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo/requirements.txt +0 -0
  72. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo-multi/.gitignore +0 -0
  73. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo-multi/README.md +0 -0
  74. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo-multi/app.yaml +0 -0
  75. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo-multi/inputs/data.csv +0 -0
  76. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo-multi/inputs/input.xlsx +0 -0
  77. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo-multi/main.py +0 -0
  78. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/apps/echo-multi/requirements.txt +0 -0
  79. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/deploy/app.yaml +0 -0
  80. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/deploy/main.py +0 -0
  81. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/deploy/requirements.txt +0 -0
  82. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/appapp.json +0 -0
  83. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/appapp.json.golden +0 -0
  84. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/appapp.py +0 -0
  85. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/chain.json +0 -0
  86. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/chain.json.golden +0 -0
  87. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/chain.py +0 -0
  88. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/complex.json +0 -0
  89. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/complex.json.golden +0 -0
  90. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/complex.py +0 -0
  91. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/fail.py +0 -0
  92. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/foreach-2-pred.json +0 -0
  93. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/foreach-2-pred.json.golden +0 -0
  94. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/foreach-2-pred.py +0 -0
  95. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/foreach.json +0 -0
  96. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/foreach.json.golden +0 -0
  97. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/foreach.py +0 -0
  98. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/inputs/data.csv +0 -0
  99. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/inputs/input.xlsx +0 -0
  100. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/pipelines/multifile.py +0 -0
  101. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/test_graph.py +0 -0
  102. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/test_integration.py +0 -0
  103. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/test_schema.py +0 -0
  104. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/test_threads.py +0 -0
  105. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/test_uplink.py +0 -0
  106. {nextpipe-0.6.1.dev0 → nextpipe-0.6.2.dev1}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nextpipe
3
- Version: 0.6.1.dev0
3
+ Version: 0.6.2.dev1
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://nextpipe.docs.nextmv.io/en/latest/
@@ -0,0 +1 @@
1
+ __version__ = "v0.6.2-dev.1"
@@ -781,6 +781,7 @@ class App:
781
781
  full_result: bool = False,
782
782
  run_configuration: nextmv.RunConfiguration = None,
783
783
  polling_options: nextmv.PollingOptions | None = nextmv.DEFAULT_POLLING_OPTIONS,
784
+ bypass_result: typing.Any = None,
784
785
  ):
785
786
  """
786
787
  Initialize an App object.
@@ -799,6 +800,9 @@ class App:
799
800
  The configuration to apply when running the app, by default None.
800
801
  polling_options : Optional[nextmv.PollingOptions], optional
801
802
  Options for polling for the results of the app run, by default _DEFAULT_POLLING_OPTIONS.
803
+ bypass_result : typing.Any, optional
804
+ A value that can be provided to bypass the actual execution of the app.
805
+ This is mainly used for testing purposes, by default None.
802
806
  """
803
807
 
804
808
  if input_type:
@@ -824,6 +828,7 @@ class App:
824
828
  self.full_result = full_result
825
829
  self.run_configuration = run_configuration
826
830
  self.polling_options = polling_options
831
+ self.bypass_result = bypass_result
827
832
 
828
833
  def __repr__(self):
829
834
  """Return a string representation of the app.
@@ -846,6 +851,7 @@ def app(
846
851
  full_result: bool = False,
847
852
  run_configuration: nextmv.RunConfiguration = None,
848
853
  polling_options: nextmv.PollingOptions | None = nextmv.DEFAULT_POLLING_OPTIONS,
854
+ bypass_result: typing.Any = None,
849
855
  ):
850
856
  """
851
857
  Decorator to mark a step as a Nextmv Application (external application)
@@ -885,6 +891,9 @@ def app(
885
891
  class itself. Please note that the `.initial_delay` attribute will be
886
892
  overridden internally, as a strategy to stagger multiple parallel runs
887
893
  and avoid overloading the Platform.
894
+ bypass_result : typing.Any, optional
895
+ A value that can be provided to bypass the actual execution of the app.
896
+ This is mainly used for testing purposes, by default None.
888
897
 
889
898
  Example
890
899
  -------
@@ -957,6 +966,7 @@ def app(
957
966
  full_result=full_result,
958
967
  run_configuration=run_configuration,
959
968
  polling_options=polling_options,
969
+ bypass_result=bypass_result,
960
970
  )
961
971
  wrapper.step.type = StepType.APP
962
972
 
@@ -29,6 +29,7 @@ import inspect
29
29
  import io
30
30
  import os
31
31
  import random
32
+ import shutil
32
33
  import tempfile
33
34
  import threading
34
35
  import time
@@ -991,14 +992,49 @@ class Runner:
991
992
 
992
993
  # Run the application
993
994
  try:
994
- run_id = app.new_run(*run_args[0], **run_args[1])
995
- console_url = f"{client.console_url}/app/{app_step.app_id}/run/{run_id}?view=details"
996
- utils.log_internal(f"Started app step {node.id} run, find it at {console_url}")
997
- node.run_id = run_id
998
- update_dag() # Update the node with the run_id before we start polling for results
999
- result = app.run_result_with_polling(
1000
- run_id=run_id, polling_options=polling_options, output_dir_path=temp_dir
1001
- )
995
+ if app_step.bypass_result is None:
996
+ run_id = app.new_run(*run_args[0], **run_args[1])
997
+ console_url = f"{client.console_url}/app/{app_step.app_id}/run/{run_id}?view=details"
998
+ utils.log_internal(f"Started app step {node.id} run, find it at {console_url}")
999
+ node.run_id = run_id
1000
+ update_dag() # Update the node with the run_id before we start polling for results
1001
+ result = app.run_result_with_polling(
1002
+ run_id=run_id, polling_options=polling_options, output_dir_path=temp_dir
1003
+ )
1004
+ else:
1005
+ utils.log_internal(f"Bypassing app step {node.id} run, using bypass result")
1006
+ # If the user supplied a bypass result, we need to write it to the temp dir if it's in dir mode
1007
+ if isinstance(app_step.bypass_result, str) and os.path.isdir(app_step.bypass_result):
1008
+ # If the bypass result is a directory, we copy its contents to the temp dir
1009
+ for filename in os.listdir(app_step.bypass_result):
1010
+ shutil.copy(os.path.join(app_step.bypass_result, filename), temp_dir)
1011
+ else:
1012
+ # We wrap the bypass result in a dummy RunResult to ensure consistent behavior.
1013
+ result = nextmv.RunResult(
1014
+ id="bypassed_run",
1015
+ name="bypassed_run",
1016
+ description="This run was bypassed using a user-supplied result.",
1017
+ user_email="unavailable",
1018
+ metadata=nextmv.Metadata(
1019
+ application_id="unavailable",
1020
+ application_instance_id="unavailable",
1021
+ application_version_id="unavailable",
1022
+ created_at="unavailable",
1023
+ duration="unavailable",
1024
+ error="unavailable",
1025
+ input_size=0.0,
1026
+ output_size=0.0,
1027
+ format=nextmv.Format(
1028
+ format_input=nextmv.FormatInput(
1029
+ input_type=nextmv.InputFormat.MULTI_FILE
1030
+ if is_dir_mode
1031
+ else nextmv.InputFormat.JSON,
1032
+ ),
1033
+ ),
1034
+ status_v2=nextmv.StatusV2.succeeded,
1035
+ ),
1036
+ output=app_step.bypass_result,
1037
+ )
1002
1038
  finally: # Make sure we clean up temp dir on failure too
1003
1039
  # If the temp dir is empty, remove it
1004
1040
  dir_result = False
@@ -1 +0,0 @@
1
- __version__ = "v0.6.1.dev0"
File without changes
File without changes
File without changes
File without changes
File without changes