nextpipe 0.7.0.dev0__tar.gz → 0.7.2__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 (112) hide show
  1. nextpipe-0.7.2/.github/workflows/lint.yml +23 -0
  2. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/.github/workflows/release.yml +18 -7
  3. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/.github/workflows/test.yml +7 -8
  4. nextpipe-0.7.2/.python-version +1 -0
  5. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/PKG-INFO +23 -17
  6. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/README.md +19 -10
  7. nextpipe-0.7.2/nextpipe/__about__.py +1 -0
  8. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/pyproject.toml +6 -5
  9. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/README.md +4 -4
  10. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo/README.md +2 -2
  11. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo/main.py +1 -1
  12. nextpipe-0.7.2/tests/apps/echo/requirements.txt +1 -0
  13. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo-multi/README.md +2 -2
  14. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo-multi/app.yaml +3 -0
  15. nextpipe-0.7.2/tests/apps/echo-multi/requirements.txt +1 -0
  16. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/appapp.json.golden +1 -1
  17. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/complex.json.golden +12 -18
  18. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/complex.py +7 -2
  19. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/foreach-2-pred.json.golden +4 -4
  20. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/foreach.json.golden +4 -4
  21. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/test_integration.py +23 -14
  22. nextpipe-0.7.2/uv.lock +1228 -0
  23. nextpipe-0.7.0.dev0/.github/workflows/lint.yml +0 -24
  24. nextpipe-0.7.0.dev0/.markdownlint.jsonc +0 -51
  25. nextpipe-0.7.0.dev0/.readthedocs.yaml +0 -19
  26. nextpipe-0.7.0.dev0/docs/examples/basic-chained-workflow.md +0 -124
  27. nextpipe-0.7.0.dev0/docs/examples/complex-workflow-csv.md +0 -345
  28. nextpipe-0.7.0.dev0/docs/examples/complex-workflow.md +0 -264
  29. nextpipe-0.7.0.dev0/docs/examples/ensemble-workflow.md +0 -663
  30. nextpipe-0.7.0.dev0/docs/examples/fanout-workflow.md +0 -187
  31. nextpipe-0.7.0.dev0/docs/examples/multifile-workflow.md +0 -180
  32. nextpipe-0.7.0.dev0/docs/images/active-plan.png +0 -0
  33. nextpipe-0.7.0.dev0/docs/images/api-keys.png +0 -0
  34. nextpipe-0.7.0.dev0/docs/images/app-diagram.png +0 -0
  35. nextpipe-0.7.0.dev0/docs/images/apps-orchestrate-full.png +0 -0
  36. nextpipe-0.7.0.dev0/docs/images/apps-orchestrate.png +0 -0
  37. nextpipe-0.7.0.dev0/docs/images/innovator.png +0 -0
  38. nextpipe-0.7.0.dev0/docs/images/logo-180.png +0 -0
  39. nextpipe-0.7.0.dev0/docs/images/new-run-orchestrate.png +0 -0
  40. nextpipe-0.7.0.dev0/docs/images/nextmv-favicon.svg +0 -4
  41. nextpipe-0.7.0.dev0/docs/images/plans.png +0 -0
  42. nextpipe-0.7.0.dev0/docs/images/pushed-app.png +0 -0
  43. nextpipe-0.7.0.dev0/docs/images/routing-ortools-pyvroom-selected.png +0 -0
  44. nextpipe-0.7.0.dev0/docs/images/routing-selected.png +0 -0
  45. nextpipe-0.7.0.dev0/docs/images/run-metadata.png +0 -0
  46. nextpipe-0.7.0.dev0/docs/images/run-summary.png +0 -0
  47. nextpipe-0.7.0.dev0/docs/images/run-workflow.png +0 -0
  48. nextpipe-0.7.0.dev0/docs/images/secrets-collection-orchestrate.png +0 -0
  49. nextpipe-0.7.0.dev0/docs/images/workflow-diagram.png +0 -0
  50. nextpipe-0.7.0.dev0/docs/index.md +0 -411
  51. nextpipe-0.7.0.dev0/docs/reference/config.md +0 -5
  52. nextpipe-0.7.0.dev0/docs/reference/decorators.md +0 -5
  53. nextpipe-0.7.0.dev0/docs/reference/echo-multi.md +0 -154
  54. nextpipe-0.7.0.dev0/docs/reference/echo.md +0 -114
  55. nextpipe-0.7.0.dev0/docs/reference/flow.md +0 -6
  56. nextpipe-0.7.0.dev0/docs/reference/graph.md +0 -6
  57. nextpipe-0.7.0.dev0/docs/reference/schema.md +0 -5
  58. nextpipe-0.7.0.dev0/docs/reference/threads.md +0 -5
  59. nextpipe-0.7.0.dev0/docs/reference/uplink.md +0 -5
  60. nextpipe-0.7.0.dev0/docs/reference/utils.md +0 -5
  61. nextpipe-0.7.0.dev0/docs/requirements.txt +0 -4
  62. nextpipe-0.7.0.dev0/docs/tutorials/orchestrate-multiple-models.md +0 -1986
  63. nextpipe-0.7.0.dev0/mkdocs.yml +0 -144
  64. nextpipe-0.7.0.dev0/nextpipe/__about__.py +0 -1
  65. nextpipe-0.7.0.dev0/tests/apps/echo/requirements.txt +0 -1
  66. nextpipe-0.7.0.dev0/tests/apps/echo-multi/requirements.txt +0 -1
  67. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/.gitignore +0 -0
  68. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/.nextmv/bump_requirements.sh +0 -0
  69. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/.prettierrc.yml +0 -0
  70. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/LICENSE.md +0 -0
  71. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/RELEASE.md +0 -0
  72. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/__init__.py +0 -0
  73. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/config.py +0 -0
  74. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/constants.py +0 -0
  75. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/decorators.py +0 -0
  76. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/flow.py +0 -0
  77. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/graph.py +0 -0
  78. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/schema.py +0 -0
  79. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/threads.py +0 -0
  80. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/uplink.py +0 -0
  81. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe/utils.py +0 -0
  82. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/nextpipe.code-workspace +0 -0
  83. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/.gitignore +0 -0
  84. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/__init__.py +0 -0
  85. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo/.gitignore +0 -0
  86. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo/app.yaml +0 -0
  87. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo-multi/.gitignore +0 -0
  88. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo-multi/inputs/data.csv +0 -0
  89. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo-multi/inputs/input.xlsx +0 -0
  90. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/apps/echo-multi/main.py +0 -0
  91. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/deploy/app.yaml +0 -0
  92. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/deploy/main.py +0 -0
  93. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/deploy/requirements.txt +0 -0
  94. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/appapp.json +0 -0
  95. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/appapp.py +0 -0
  96. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/chain.json +0 -0
  97. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/chain.json.golden +0 -0
  98. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/chain.py +0 -0
  99. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/complex.json +0 -0
  100. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/fail.py +0 -0
  101. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/foreach-2-pred.json +0 -0
  102. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/foreach-2-pred.py +0 -0
  103. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/foreach.json +0 -0
  104. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/foreach.py +0 -0
  105. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/inputs/data.csv +0 -0
  106. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/inputs/input.xlsx +0 -0
  107. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/pipelines/multifile.py +0 -0
  108. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/test_graph.py +0 -0
  109. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/test_schema.py +0 -0
  110. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/test_threads.py +0 -0
  111. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/test_uplink.py +0 -0
  112. {nextpipe-0.7.0.dev0 → nextpipe-0.7.2}/tests/test_version.py +0 -0
@@ -0,0 +1,23 @@
1
+ name: lint
2
+ on: [push]
3
+ jobs:
4
+ lint:
5
+ runs-on: ubuntu-latest
6
+ strategy:
7
+ matrix:
8
+ python-version: ["3.10"]
9
+ steps:
10
+ - name: git clone
11
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
12
+
13
+ - name: install uv
14
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
15
+ with:
16
+ version: "0.9.29"
17
+ python-version: ${{ matrix.python-version }}
18
+
19
+ - name: install the project
20
+ run: uv sync --locked --dev
21
+
22
+ - name: lint with ruff
23
+ run: uv run ruff check --output-format=github .
@@ -3,10 +3,16 @@ run-name: Release by @${{ github.actor }} from ${{ github.ref_name }}
3
3
 
4
4
  on: [push]
5
5
 
6
+ permissions:
7
+ contents: read
8
+
6
9
  jobs:
7
10
  release:
8
11
  if: ${{ github.ref_type == 'branch' }}
9
- uses: nextmv-io/release/.github/workflows/release.yml@develop
12
+ uses: nextmv-io/release/.github/workflows/release.yml@949cbb3b90ab294f8da42cf9c314637deaa578f5 # develop
13
+ permissions:
14
+ contents: write
15
+ pull-requests: write
10
16
  with:
11
17
  BRANCH: ${{ github.ref_name }}
12
18
  REPOSITORY: nextpipe
@@ -14,7 +20,10 @@ jobs:
14
20
  PACKAGE_NAME: nextpipe
15
21
  PACKAGE_LOCATION: .
16
22
  VERSION_FILE: __about__.py
17
- secrets: inherit
23
+ secrets:
24
+ SLACK_URL_MISSION_CONTROL: ${{ secrets.SLACK_URL_MISSION_CONTROL }}
25
+ NEXTMVBOT_SSH_KEY: ${{ secrets.NEXTMVBOT_SSH_KEY }}
26
+ NEXTMVBOT_SIGNING_KEY: ${{ secrets.NEXTMVBOT_SIGNING_KEY }}
18
27
 
19
28
  publish: # Unfortunately, PyPI publishing does not support reusable workflows, so we must publish here.
20
29
  needs: release
@@ -27,12 +36,13 @@ jobs:
27
36
  id-token: write # This is required for trusted publishing to PyPI
28
37
  steps:
29
38
  - name: git clone ${{ github.ref_name }}
30
- uses: actions/checkout@v4
39
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31
40
  with:
32
41
  ref: ${{ github.ref_name }}
42
+ persist-credentials: false
33
43
 
34
44
  - name: set up Python
35
- uses: actions/setup-python@v5
45
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
36
46
 
37
47
  - name: install dependencies
38
48
  run: |
@@ -43,16 +53,17 @@ jobs:
43
53
  run: python -m build
44
54
 
45
55
  - name: python - publish package distributions to PyPI
46
- uses: pypa/gh-action-pypi-publish@release/v1
56
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
47
57
  with:
48
58
  packages-dir: ./dist
49
59
 
50
60
  notify:
51
61
  needs: [release, publish]
52
62
  if: ${{ needs.release.outputs.RELEASE_NEEDED == 'true' && needs.release.outputs.SHOULD_NOTIFY_SLACK == 'true' }}
53
- uses: nextmv-io/release/.github/workflows/notify-slack.yml@develop
63
+ uses: nextmv-io/release/.github/workflows/notify-slack.yml@949cbb3b90ab294f8da42cf9c314637deaa578f5 # develop
54
64
  with:
55
65
  PACKAGE_NAME: nextpipe
56
66
  VERSION: ${{ needs.release.outputs.VERSION }}
57
67
  REPOSITORY: nextpipe
58
- secrets: inherit
68
+ secrets:
69
+ SLACK_URL_MISSION_CONTROL: ${{ secrets.SLACK_URL_MISSION_CONTROL }}
@@ -8,21 +8,20 @@ jobs:
8
8
  python-version: ["3.10", "3.14"]
9
9
  steps:
10
10
  - name: git clone
11
- uses: actions/checkout@v4
11
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
12
12
 
13
- - name: set up Python ${{ matrix.python-version }}
14
- uses: actions/setup-python@v5
13
+ - name: install uv
14
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
15
15
  with:
16
+ version: "0.9.29"
16
17
  python-version: ${{ matrix.python-version }}
17
18
 
18
- - name: install dependencies
19
- run: |
20
- python -m pip install --upgrade pip
21
- pip install .[dev]
19
+ - name: install the project
20
+ run: uv sync --locked --dev
22
21
 
23
22
  - name: unit tests
24
23
  env:
25
24
  NEXTMV_API_KEY_NEXTPIPE: ${{ secrets.NEXTMV_API_KEY_NEXTPIPE }}
26
25
  run: |
27
26
  export NEXTMV_API_KEY=$NEXTMV_API_KEY_NEXTPIPE
28
- python -m unittest
27
+ uv run pytest
@@ -0,0 +1 @@
1
+ 3.13
@@ -1,9 +1,9 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: nextpipe
3
- Version: 0.7.0.dev0
3
+ Version: 0.7.2
4
4
  Summary: Framework for Decision Pipeline modeling and execution
5
5
  Project-URL: Homepage, https://www.nextmv.io
6
- Project-URL: Documentation, https://nextpipe.docs.nextmv.io/en/latest/
6
+ Project-URL: Documentation, https://docs.nextmv.io/nextpipe
7
7
  Project-URL: Repository, https://github.com/nextmv-io/nextpipe
8
8
  Author-email: Nextmv <tech@nextmv.io>
9
9
  Maintainer-email: Nextmv <tech@nextmv.io>
@@ -105,17 +105,12 @@ Classifier: Programming Language :: Python :: 3.13
105
105
  Classifier: Programming Language :: Python :: 3.14
106
106
  Requires-Python: >=3.10
107
107
  Requires-Dist: dataclasses-json>=0.6.7
108
- Requires-Dist: nextmv>=1.2.2
108
+ Requires-Dist: nextmv>=1.10.3
109
109
  Requires-Dist: requests>=2.31.0
110
- Provides-Extra: dev
111
- Requires-Dist: goldie>=0.1.8; extra == 'dev'
112
- Requires-Dist: ruff>=0.11.6; extra == 'dev'
113
110
  Description-Content-Type: text/markdown
114
111
 
115
112
  # Nextpipe
116
113
 
117
- <!-- markdownlint-disable MD033 MD013 -->
118
-
119
114
  <p align="center">
120
115
  <a href="https://nextmv.io"><img src="https://cdn.prod.website-files.com/60dee0fad10d14c8ab66dd74/65c66addcd07eed09be35114_blog-banner-what-is-cicd-for-decision-science-p-2000.jpeg" alt="Nextmv" width="45%"></a>
121
116
  </p>
@@ -137,8 +132,6 @@ Description-Content-Type: text/markdown
137
132
  </a>
138
133
  </p>
139
134
 
140
- <!-- markdownlint-enable MD033 MD013 -->
141
-
142
135
  Nextpipe is a Python package that provides a framework for Decision Workflows
143
136
  modeling and execution. It provides first-class support for Workflows in the
144
137
  [Nextmv Platform][nextmv].
@@ -152,13 +145,26 @@ modeling and execution. It provides first-class support for Workflows in the
152
145
 
153
146
  ## Installation
154
147
 
155
- The package is hosted on [PyPI][nextpipe-pypi]. Python `>=3.10` is required.
148
+ The package is hosted on [PyPI][nextpipe-pypi]. Requires Python `>=3.10`.
149
+ Install using the Python package manager of your choice:
156
150
 
157
- Install via `pip`:
151
+ * `uv`
158
152
 
159
- ```bash
160
- pip install nextpipe
161
- ```
153
+ ```bash
154
+ uv add nextpipe
155
+ ```
156
+
157
+ * `pip`
158
+
159
+ ```bash
160
+ pip install nextpipe
161
+ ```
162
+
163
+ * `pipx`
164
+
165
+ ```bash
166
+ pipx install nextpipe
167
+ ```
162
168
 
163
169
  ## Preview
164
170
 
@@ -192,4 +198,4 @@ graph LR
192
198
 
193
199
  [nextpipe-pypi]: https://pypi.org/project/nextpipe/
194
200
  [nextmv]: https://nextmv.io
195
- [docs]: https://nextpipe.docs.nextmv.io/en/latest/
201
+ [docs]: https://docs.nextmv.io/nextpipe
@@ -1,7 +1,5 @@
1
1
  # Nextpipe
2
2
 
3
- <!-- markdownlint-disable MD033 MD013 -->
4
-
5
3
  <p align="center">
6
4
  <a href="https://nextmv.io"><img src="https://cdn.prod.website-files.com/60dee0fad10d14c8ab66dd74/65c66addcd07eed09be35114_blog-banner-what-is-cicd-for-decision-science-p-2000.jpeg" alt="Nextmv" width="45%"></a>
7
5
  </p>
@@ -23,8 +21,6 @@
23
21
  </a>
24
22
  </p>
25
23
 
26
- <!-- markdownlint-enable MD033 MD013 -->
27
-
28
24
  Nextpipe is a Python package that provides a framework for Decision Workflows
29
25
  modeling and execution. It provides first-class support for Workflows in the
30
26
  [Nextmv Platform][nextmv].
@@ -38,13 +34,26 @@ modeling and execution. It provides first-class support for Workflows in the
38
34
 
39
35
  ## Installation
40
36
 
41
- The package is hosted on [PyPI][nextpipe-pypi]. Python `>=3.10` is required.
37
+ The package is hosted on [PyPI][nextpipe-pypi]. Requires Python `>=3.10`.
38
+ Install using the Python package manager of your choice:
42
39
 
43
- Install via `pip`:
40
+ * `uv`
44
41
 
45
- ```bash
46
- pip install nextpipe
47
- ```
42
+ ```bash
43
+ uv add nextpipe
44
+ ```
45
+
46
+ * `pip`
47
+
48
+ ```bash
49
+ pip install nextpipe
50
+ ```
51
+
52
+ * `pipx`
53
+
54
+ ```bash
55
+ pipx install nextpipe
56
+ ```
48
57
 
49
58
  ## Preview
50
59
 
@@ -78,4 +87,4 @@ graph LR
78
87
 
79
88
  [nextpipe-pypi]: https://pypi.org/project/nextpipe/
80
89
  [nextmv]: https://nextmv.io
81
- [docs]: https://nextpipe.docs.nextmv.io/en/latest/
90
+ [docs]: https://docs.nextmv.io/nextpipe
@@ -0,0 +1 @@
1
+ __version__ = "v0.7.2"
@@ -17,7 +17,7 @@ classifiers = [
17
17
  ]
18
18
  dependencies = [
19
19
  "requests>=2.31.0",
20
- "nextmv>=1.2.2",
20
+ "nextmv>=1.10.3",
21
21
  "dataclasses-json>=0.6.7",
22
22
  ]
23
23
  description = "Framework for Decision Pipeline modeling and execution"
@@ -47,7 +47,7 @@ requires-python = ">=3.10"
47
47
 
48
48
  [project.urls]
49
49
  Homepage = "https://www.nextmv.io"
50
- Documentation = "https://nextpipe.docs.nextmv.io/en/latest/"
50
+ Documentation = "https://docs.nextmv.io/nextpipe"
51
51
  Repository = "https://github.com/nextmv-io/nextpipe"
52
52
 
53
53
  [tool.ruff]
@@ -68,8 +68,9 @@ max-complexity = 20
68
68
  [tool.hatch.version]
69
69
  path = "nextpipe/__about__.py"
70
70
 
71
- [project.optional-dependencies]
71
+ [dependency-groups]
72
72
  dev = [
73
- "ruff>=0.11.6",
74
- "goldie>=0.1.8",
73
+ "goldie==0.1.8",
74
+ "pytest==9.0.2",
75
+ "ruff==0.16.3",
75
76
  ]
@@ -9,13 +9,13 @@ Setup the custom apps as follows:
9
9
  ```bash
10
10
  # Setup echo app
11
11
  cd apps/echo
12
- nextmv app create -a echo -n "Echo" || true
13
- nextmv app push -a echo
12
+ nextmv cloud app create -a echo -n "Echo" || true
13
+ nextmv cloud app push -a echo
14
14
  cd ../..
15
15
  # Setup echo-multi app
16
16
  cd apps/echo-multi
17
- nextmv app create -a echo-multi -n "Echo Multi" || true
18
- nextmv app push -a echo-multi
17
+ nextmv cloud app create -a echo-multi -n "Echo Multi" || true
18
+ nextmv cloud app push -a echo-multi
19
19
  cd ../..
20
20
  ```
21
21
 
@@ -14,6 +14,6 @@ echo '{"hello": "world!"}' | python main.py
14
14
  ## Push to Nextmv
15
15
 
16
16
  ```bash
17
- nextmv app create -a echo -n "JSON echo" -d "This is a sample app that reads JSON from the input and writes it to the output."
18
- nextmv app push -a echo
17
+ nextmv cloud app create -a echo -n "JSON echo" -d "This is a sample app that reads JSON from the input and writes it to the output."
18
+ nextmv cloud app push -a echo
19
19
  ```
@@ -12,6 +12,6 @@ output = nextmv.Output(
12
12
  "args": sys.argv[1:],
13
13
  },
14
14
  },
15
- statistics={"run": {"duration": time.time() - before}},
15
+ metrics={"run": {"duration": time.time() - before}},
16
16
  )
17
17
  nextmv.write(output)
@@ -0,0 +1 @@
1
+ nextmv==1.10.1
@@ -14,6 +14,6 @@ python main.py -threads 10 -duration 10
14
14
  ## Push to Nextmv
15
15
 
16
16
  ```bash
17
- nextmv app create -a echo-multi -n "JSON echo multi-file" -d "This is a sample app that reads input files and echoes them as output."
18
- nextmv app push -a echo-multi
17
+ nextmv cloud app create -a echo-multi -n "JSON echo multi-file" -d "This is a sample app that reads input files and echoes them as output."
18
+ nextmv cloud app push -a echo-multi
19
19
  ```
@@ -4,3 +4,6 @@ python:
4
4
  pip-requirements: requirements.txt
5
5
  files:
6
6
  - main.py
7
+ configuration:
8
+ content:
9
+ format: multi-file
@@ -0,0 +1 @@
1
+ nextmv==1.10.1
@@ -11,7 +11,7 @@
11
11
  "args": []
12
12
  }
13
13
  },
14
- "statistics": {
14
+ "metrics": {
15
15
  "run": {
16
16
  "duration": 0.123
17
17
  }
@@ -1,7 +1,5 @@
1
1
  {
2
2
  "options": {
3
- "input": "",
4
- "output": "",
5
3
  "duration": 30
6
4
  },
7
5
  "solution": {
@@ -51,22 +49,18 @@
51
49
  ],
52
50
  "unplanned": []
53
51
  },
54
- "statistics": {
55
- "run": {
56
- "duration": "0.123"
57
- },
52
+ "assets": [],
53
+ "metrics": {
54
+ "duration": "0.123",
55
+ "objective_value": 287,
56
+ "solution_found": true,
57
+ "activated_vehicles": 1,
58
+ "max_route_duration": 287,
59
+ "max_stops_in_vehicle": 2,
60
+ "min_stops_in_vehicle": 2,
58
61
  "result": {
59
- "value": 287.0,
60
- "custom": {
61
- "solution_found": true,
62
- "activated_vehicles": 1,
63
- "max_route_duration": 287,
64
- "max_stops_in_vehicle": 2,
65
- "min_stops_in_vehicle": 2
66
- },
62
+ "value": 287,
67
63
  "duration": "0.123"
68
- },
69
- "schema": "v1"
70
- },
71
- "assets": []
64
+ }
65
+ }
72
66
  }
@@ -43,12 +43,17 @@ class Flow(FlowSpec):
43
43
  ):
44
44
  """Aggregates the results."""
45
45
  results = results_nextroute + [result_ortools, result_pyvroom]
46
+
47
+ # Define value extractor for both output formats of the solvers.
48
+ def get_value(sol: dict):
49
+ return sol["metrics"]["result"]["value"] if "metrics" in sol else sol["statistics"]["result"]["value"]
50
+
46
51
  best_solution_idx = min(
47
52
  range(len(results)),
48
- key=lambda i: results[i]["statistics"]["result"]["value"],
53
+ key=lambda i: get_value(results[i]),
49
54
  )
50
55
 
51
- values = [result["statistics"]["result"]["value"] for result in results]
56
+ values = [get_value(result) for result in results]
52
57
  values.sort()
53
58
  log(f"Values: {values}")
54
59
 
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  }
12
12
  },
13
- "statistics": {
13
+ "metrics": {
14
14
  "run": {
15
15
  "duration": 0.123
16
16
  }
@@ -31,7 +31,7 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "statistics": {
34
+ "metrics": {
35
35
  "run": {
36
36
  "duration": 0.123
37
37
  }
@@ -52,7 +52,7 @@
52
52
  ]
53
53
  }
54
54
  },
55
- "statistics": {
55
+ "metrics": {
56
56
  "run": {
57
57
  "duration": 0.123
58
58
  }
@@ -62,4 +62,4 @@
62
62
  "count": 1
63
63
  }
64
64
  }
65
- ]
65
+ ]
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  }
12
12
  },
13
- "statistics": {
13
+ "metrics": {
14
14
  "run": {
15
15
  "duration": 0.123
16
16
  }
@@ -28,7 +28,7 @@
28
28
  ]
29
29
  }
30
30
  },
31
- "statistics": {
31
+ "metrics": {
32
32
  "run": {
33
33
  "duration": 0.123
34
34
  }
@@ -46,11 +46,11 @@
46
46
  ]
47
47
  }
48
48
  },
49
- "statistics": {
49
+ "metrics": {
50
50
  "run": {
51
51
  "duration": 0.123
52
52
  }
53
53
  },
54
54
  "assets": []
55
55
  }
56
- ]
56
+ ]
@@ -46,17 +46,26 @@ class TestPlatform(unittest.TestCase):
46
46
  current_dir = os.getcwd()
47
47
  os.chdir(path)
48
48
  _create_key_file(path)
49
- app.push() # Use verbose=True for step-by-step output.
49
+ app.push(verbose=True)
50
50
  os.chdir(current_dir)
51
51
 
52
52
  # Run the app
53
53
  r = random.randint(0, 100)
54
54
  polling_opts = nextmv.PollingOptions(max_tries=500, max_duration=240)
55
55
  result = app.new_run_with_result(input={"random": r}, polling_options=polling_opts)
56
- self.assertTrue(hasattr(result, "error_log") and result.error_log is None)
57
- self.assertEqual(result.output["echo"]["data"]["enhanced"], True)
58
- self.assertEqual(result.output["echo"]["data"]["prepared"], True)
59
- self.assertEqual(result.output["echo"]["data"]["random"], r)
56
+ self.assertTrue(hasattr(result, "error_log"), msg=f"result has no error_log attribute; result: {result}")
57
+ self.assertIsNone(result.error_log, msg=f"expected no error_log, got: {result.error_log}")
58
+ expected_data = {
59
+ "enhanced": True,
60
+ "prepared": True,
61
+ "random": r,
62
+ }
63
+ for name, expected in expected_data.items():
64
+ self.assertEqual(
65
+ result.output["echo"]["data"][name],
66
+ expected,
67
+ msg=f"unexpected '{name}' value; expected {expected}, output: {result.output}",
68
+ )
60
69
  finally:
61
70
  # Make sure to delete the app
62
71
  if app:
@@ -123,7 +132,7 @@ class TestExample(unittest.TestCase):
123
132
  # APPAPP
124
133
  config.comparison_configuration.json_processing_config = goldie.ConfigProcessJson(
125
134
  replacements=[
126
- goldie.JsonReplacement(path="$.echo.data.statistics.run.duration", value=0.123),
135
+ goldie.JsonReplacement(path="$.echo.data.metrics.run.duration", value=0.123),
127
136
  ],
128
137
  )
129
138
  goldie.run_file_unittest(
@@ -138,9 +147,9 @@ class TestExample(unittest.TestCase):
138
147
  # FOREACH
139
148
  config.comparison_configuration.json_processing_config = goldie.ConfigProcessJson(
140
149
  replacements=[
141
- goldie.JsonReplacement(path="$[0].statistics.run.duration", value=0.123),
142
- goldie.JsonReplacement(path="$[1].statistics.run.duration", value=0.123),
143
- goldie.JsonReplacement(path="$[2].statistics.run.duration", value=0.123),
150
+ goldie.JsonReplacement(path="$[0].metrics.run.duration", value=0.123),
151
+ goldie.JsonReplacement(path="$[1].metrics.run.duration", value=0.123),
152
+ goldie.JsonReplacement(path="$[2].metrics.run.duration", value=0.123),
144
153
  ],
145
154
  )
146
155
  goldie.run_file_unittest(
@@ -155,9 +164,9 @@ class TestExample(unittest.TestCase):
155
164
  # FOREACH 2 PREDECESSORS
156
165
  config.comparison_configuration.json_processing_config = goldie.ConfigProcessJson(
157
166
  replacements=[
158
- goldie.JsonReplacement(path="$[0][0].statistics.run.duration", value=0.123),
159
- goldie.JsonReplacement(path="$[1][0].statistics.run.duration", value=0.123),
160
- goldie.JsonReplacement(path="$[2][0].statistics.run.duration", value=0.123),
167
+ goldie.JsonReplacement(path="$[0][0].metrics.run.duration", value=0.123),
168
+ goldie.JsonReplacement(path="$[1][0].metrics.run.duration", value=0.123),
169
+ goldie.JsonReplacement(path="$[2][0].metrics.run.duration", value=0.123),
161
170
  ],
162
171
  )
163
172
  goldie.run_file_unittest(
@@ -172,8 +181,8 @@ class TestExample(unittest.TestCase):
172
181
  # COMPLEX
173
182
  config.comparison_configuration.json_processing_config = goldie.ConfigProcessJson(
174
183
  replacements=[
175
- goldie.JsonReplacement(path="$.statistics.result.duration", value="0.123"),
176
- goldie.JsonReplacement(path="$.statistics.run.duration", value="0.123"),
184
+ goldie.JsonReplacement(path="$.metrics.result.duration", value="0.123"),
185
+ goldie.JsonReplacement(path="$.metrics.duration", value="0.123"),
177
186
  ],
178
187
  )
179
188
  goldie.run_file_unittest(