nextpipe 0.3.0__tar.gz → 0.3.2.dev0__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.3.2.dev0/.github/workflows/release.yml +190 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/PKG-INFO +2 -2
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/examples/complex-workflow-csv.md +1 -1
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/examples/ensemble-workflow.md +1 -1
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/examples/fanout-workflow.md +3 -3
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/tutorials/getting-started.md +45 -0
- nextpipe-0.3.2.dev0/nextpipe/__about__.py +1 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/pyproject.toml +1 -1
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/foreach-2-pred.py +1 -1
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/foreach.py +1 -1
- nextpipe-0.3.0/.github/workflows/release.yml +0 -146
- nextpipe-0.3.0/nextpipe/__about__.py +0 -1
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/.github/workflows/lint.yml +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/.github/workflows/test.yml +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/.gitignore +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/.markdownlint.jsonc +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/.nextmv/bump_requirements.sh +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/.prettierrc.yml +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/.readthedocs.yaml +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/LICENSE.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/README.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/examples/basic-chained-workflow.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/examples/complex-workflow.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/images/logo-180.png +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/images/nextmv-favicon.svg +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/images/routing-ortools-pyvroom-selected.png +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/images/routing-selected.png +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/index.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/reference/config.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/reference/decorators.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/reference/flow.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/reference/graph.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/reference/schema.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/reference/threads.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/reference/uplink.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/reference/utils.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/requirements.txt +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/docs/tutorials/echo.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/mkdocs.yml +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/__init__.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/config.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/decorators.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/flow.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/graph.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/schema.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/threads.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/uplink.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe/utils.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/nextpipe.code-workspace +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/.gitignore +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/README.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/__init__.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/apps/echo/.gitignore +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/apps/echo/README.md +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/apps/echo/app.yaml +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/apps/echo/main.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/apps/echo/requirements.txt +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/deploy/app.yaml +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/deploy/main.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/deploy/requirements.txt +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/chain.json +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/chain.json.golden +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/chain.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/complex.json +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/complex.json.golden +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/complex.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/fail.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/foreach-2-pred.json +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/foreach-2-pred.json.golden +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/foreach.json +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/pipelines/foreach.json.golden +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/test_graph.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/test_integration.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/test_schema.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/test_threads.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/test_uplink.py +0 -0
- {nextpipe-0.3.0 → nextpipe-0.3.2.dev0}/tests/test_version.py +0 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
run-name: Release ${{ inputs.VERSION }} by @${{ github.actor }} from ${{ github.ref_name }}
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
inputs:
|
|
7
|
+
VERSION:
|
|
8
|
+
description: "The version to release"
|
|
9
|
+
required: true
|
|
10
|
+
push:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
env:
|
|
16
|
+
VERSION: ${{ inputs.VERSION }}
|
|
17
|
+
GH_TOKEN: ${{ github.token }}
|
|
18
|
+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
|
19
|
+
IS_AUTOMATED: true
|
|
20
|
+
RELEASE_NEEDED: true
|
|
21
|
+
IS_PRE_RELEASE: true
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write # Required for creating releases and tags
|
|
24
|
+
id-token: write # This is required for trusted publishing to PyPI
|
|
25
|
+
environment:
|
|
26
|
+
name: pypi
|
|
27
|
+
url: https://pypi.org/p/nextpipe
|
|
28
|
+
steps:
|
|
29
|
+
- name: set up Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: "3.13"
|
|
33
|
+
|
|
34
|
+
- name: install dependencies
|
|
35
|
+
run: |
|
|
36
|
+
pip install --upgrade pip
|
|
37
|
+
pip install build hatch
|
|
38
|
+
|
|
39
|
+
- name: configure git with the bot credentials
|
|
40
|
+
run: |
|
|
41
|
+
mkdir -p ~/.ssh
|
|
42
|
+
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
|
43
|
+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
|
44
|
+
ssh-add - <<< "${{ secrets.NEXTMVBOT_SSH_KEY }}"
|
|
45
|
+
|
|
46
|
+
echo "${{ secrets.NEXTMVBOT_SIGNING_KEY }}" > ~/.ssh/signing.key
|
|
47
|
+
chmod 600 ~/.ssh/signing.key
|
|
48
|
+
|
|
49
|
+
git config --global user.name "nextmv-bot"
|
|
50
|
+
git config --global user.email "tech+gh-nextmv-bot@nextmv.io"
|
|
51
|
+
git config --global gpg.format ssh
|
|
52
|
+
git config --global user.signingkey ~/.ssh/signing.key
|
|
53
|
+
|
|
54
|
+
git clone git@github.com:nextmv-io/nextpipe.git
|
|
55
|
+
cd nextpipe
|
|
56
|
+
git switch ${{ github.ref_name }}
|
|
57
|
+
|
|
58
|
+
- name: check that a manual release cannot be done on develop
|
|
59
|
+
if: ${{ env.IS_AUTOMATED == 'false' && github.ref_name == 'develop' }}
|
|
60
|
+
run: |
|
|
61
|
+
echo "Manual release cannot be done on develop"
|
|
62
|
+
exit 1
|
|
63
|
+
|
|
64
|
+
- name: set the automated flag based on workflow trigger
|
|
65
|
+
run: |
|
|
66
|
+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
67
|
+
echo "IS_AUTOMATED=false" >> $GITHUB_ENV
|
|
68
|
+
exit 0
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
echo "IS_AUTOMATED=true" >> $GITHUB_ENV
|
|
72
|
+
|
|
73
|
+
- name: set filters file for changed paths - automated mode
|
|
74
|
+
if: ${{ env.IS_AUTOMATED == 'true' }}
|
|
75
|
+
run: |
|
|
76
|
+
FILTERS_FILE="./.github/filters.yml"
|
|
77
|
+
touch $FILTERS_FILE
|
|
78
|
+
echo "nextpipe:" >> $FILTERS_FILE
|
|
79
|
+
echo " - 'nextpipe/__about__.py'" >> $FILTERS_FILE
|
|
80
|
+
|
|
81
|
+
echo "Successfully created filters and wrote them to ${FILTERS_FILE}"
|
|
82
|
+
cat $FILTERS_FILE
|
|
83
|
+
working-directory: ./nextpipe
|
|
84
|
+
|
|
85
|
+
- name: filter changed directories - automated mode
|
|
86
|
+
if: ${{ env.IS_AUTOMATED == 'true' }}
|
|
87
|
+
id: filter
|
|
88
|
+
uses: dorny/paths-filter@v3
|
|
89
|
+
with:
|
|
90
|
+
filters: .github/filters.yml
|
|
91
|
+
working-directory: ./nextpipe
|
|
92
|
+
|
|
93
|
+
- name: determine if release is needed
|
|
94
|
+
run: |
|
|
95
|
+
echo "Checking if release is needed"
|
|
96
|
+
echo "IS_AUTOMATED: ${{ env.IS_AUTOMATED }}"
|
|
97
|
+
if [ "${{ env.IS_AUTOMATED }}" = "false" ]; then
|
|
98
|
+
echo "RELEASE_NEEDED=true" >> $GITHUB_ENV
|
|
99
|
+
echo "Manual mode - Release is needed"
|
|
100
|
+
exit 0
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
CHANGES=${{ steps.filter.outputs.changes }}
|
|
104
|
+
echo "CHANGES: $CHANGES"
|
|
105
|
+
CHANGES_ARE_ZERO=$(echo $CHANGES | jq '. | length == 0')
|
|
106
|
+
if [ "$CHANGES_ARE_ZERO" = "true" ]; then
|
|
107
|
+
echo "Automated mode - No changes detected"
|
|
108
|
+
echo "RELEASE_NEEDED=false" >> $GITHUB_ENV
|
|
109
|
+
echo "Automated mode - Release is not needed"
|
|
110
|
+
exit 0
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
echo "RELEASE_NEEDED=true" >> $GITHUB_ENV
|
|
114
|
+
echo "Automated mode - Release is needed"
|
|
115
|
+
|
|
116
|
+
- name: upgrade version with hatch - manual mode
|
|
117
|
+
if: ${{ env.IS_AUTOMATED == 'false' && env.RELEASE_NEEDED == 'true' }}
|
|
118
|
+
run: hatch version ${{ inputs.VERSION }}
|
|
119
|
+
working-directory: ./nextpipe
|
|
120
|
+
|
|
121
|
+
- name: set the package version
|
|
122
|
+
if: ${{ env.RELEASE_NEEDED == 'true' }}
|
|
123
|
+
run: |
|
|
124
|
+
export VERSION="v$(hatch version)"
|
|
125
|
+
echo "This is the version"
|
|
126
|
+
echo $VERSION
|
|
127
|
+
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
128
|
+
|
|
129
|
+
# Check if version is a pre-release
|
|
130
|
+
if [[ "$VERSION" =~ (alpha|beta|rc|dev|pre|a|b) ]]; then
|
|
131
|
+
echo "IS_PRE_RELEASE=true" >> $GITHUB_ENV
|
|
132
|
+
echo "Detected pre-release version: $VERSION"
|
|
133
|
+
exit 0
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
echo "IS_PRE_RELEASE=false" >> $GITHUB_ENV
|
|
137
|
+
echo "Detected stable release version: $VERSION"
|
|
138
|
+
working-directory: ./nextpipe
|
|
139
|
+
|
|
140
|
+
- name: bump version in requirements.txt
|
|
141
|
+
if: ${{ env.RELEASE_NEEDED == 'true' }}
|
|
142
|
+
run: |
|
|
143
|
+
bash .nextmv/bump_requirements.sh ${{ env.VERSION }}
|
|
144
|
+
working-directory: ./nextpipe
|
|
145
|
+
|
|
146
|
+
- name: commit new version - manual mode
|
|
147
|
+
if: ${{ env.IS_AUTOMATED == 'false' && env.RELEASE_NEEDED == 'true' }}
|
|
148
|
+
run: |
|
|
149
|
+
git add nextpipe/__about__.py
|
|
150
|
+
git commit -S -m "Bump nextpipe version to ${{ env.VERSION }}"
|
|
151
|
+
git push
|
|
152
|
+
working-directory: ./nextpipe
|
|
153
|
+
|
|
154
|
+
- name: tag new version
|
|
155
|
+
if: ${{ env.RELEASE_NEEDED == 'true' }}
|
|
156
|
+
run: |
|
|
157
|
+
git tag ${{ env.VERSION }}
|
|
158
|
+
git push origin ${{ env.VERSION }}
|
|
159
|
+
working-directory: ./nextpipe
|
|
160
|
+
|
|
161
|
+
- name: create release
|
|
162
|
+
if: ${{ env.RELEASE_NEEDED == 'true' }}
|
|
163
|
+
run: |
|
|
164
|
+
PRERELEASE_FLAG=""
|
|
165
|
+
if [ ${{ env.IS_PRE_RELEASE }} = true ]; then
|
|
166
|
+
PRERELEASE_FLAG="--prerelease"
|
|
167
|
+
fi
|
|
168
|
+
|
|
169
|
+
gh release create $VERSION \
|
|
170
|
+
--verify-tag \
|
|
171
|
+
--generate-notes \
|
|
172
|
+
--title $VERSION $PRERELEASE_FLAG
|
|
173
|
+
working-directory: ./nextpipe
|
|
174
|
+
|
|
175
|
+
- name: build binary wheel and source tarball
|
|
176
|
+
if: ${{ env.RELEASE_NEEDED == 'true' }}
|
|
177
|
+
run: python -m build
|
|
178
|
+
working-directory: ./nextpipe
|
|
179
|
+
|
|
180
|
+
- name: publish package distributions to PyPI
|
|
181
|
+
if: ${{ env.RELEASE_NEEDED == 'true' }}
|
|
182
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
183
|
+
with:
|
|
184
|
+
packages-dir: ./nextpipe/dist
|
|
185
|
+
|
|
186
|
+
- name: notify slack
|
|
187
|
+
if: ${{ env.RELEASE_NEEDED == 'true' && env.IS_PRE_RELEASE == 'false' }}
|
|
188
|
+
run: |
|
|
189
|
+
export DATA="{\"text\":\"Release notification - nextpipe ${{ inputs.VERSION }} (see <https://github.com/nextmv-io/nextpipe/releases/${{ inputs.VERSION }}|release notes> / <https://pypi.org/project/nextpipe|PyPI>)\"}"
|
|
190
|
+
curl -X POST -H 'Content-type: application/json' --data "$DATA" ${{ secrets.SLACK_URL_MISSION_CONTROL }}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nextpipe
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2.dev0
|
|
4
4
|
Summary: Framework for Decision Pipeline modeling and execution
|
|
5
5
|
Project-URL: Homepage, https://www.nextmv.io
|
|
6
|
-
Project-URL: Documentation, https://
|
|
6
|
+
Project-URL: Documentation, https://nextpipe.docs.nextmv.io/en/latest/
|
|
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>
|
|
@@ -15,7 +15,7 @@ workflow that runs multiple solver instances in parallel and then picks the
|
|
|
15
15
|
best result.
|
|
16
16
|
|
|
17
17
|
This is useful when you want to run multiple solver instances with different
|
|
18
|
-
|
|
18
|
+
options or configurations, and then select the best result from the
|
|
19
19
|
ensemble.
|
|
20
20
|
|
|
21
21
|
```python
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
This is a more advanced example demonstrating dynamic fanout and joining of
|
|
9
9
|
results. This example shows how to create multiple copies of the input data,
|
|
10
|
-
configure them with different
|
|
10
|
+
configure them with different options, and then run the model in parallel.
|
|
11
11
|
Finally, it collects the results and merges them into a single output.
|
|
12
12
|
|
|
13
13
|
This is useful when you need to parallelize the execution of a model with
|
|
14
|
-
different configurations or
|
|
14
|
+
different configurations or options.
|
|
15
15
|
|
|
16
16
|
```python
|
|
17
17
|
import copy
|
|
@@ -28,7 +28,7 @@ class Workflow(FlowSpec):
|
|
|
28
28
|
@step
|
|
29
29
|
def fanout(data: dict[str, Any]) -> list[AppRunConfig]:
|
|
30
30
|
"""
|
|
31
|
-
Creates 3 copies of the input and configures them for 3 different app
|
|
31
|
+
Creates 3 copies of the input and configures them for 3 different app options.
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
inputs = [copy.deepcopy(data) for _ in range(3)]
|
|
@@ -185,6 +185,51 @@ def merge(results: list[dict]):
|
|
|
185
185
|
return merged_result
|
|
186
186
|
```
|
|
187
187
|
|
|
188
|
+
### Dynamically customizing App Runs
|
|
189
|
+
|
|
190
|
+
!!! tip "Reference"
|
|
191
|
+
|
|
192
|
+
Find the reference for the `AppRunConfig` class [here](../reference/config.md##nextpipe.schema.AppRunConfig).
|
|
193
|
+
|
|
194
|
+
The `AppRunConfig` class allows you to dynamically customize app runs.
|
|
195
|
+
Particularly, when fanning out steps using the `@foreach` decorator, you can
|
|
196
|
+
pass a list of `AppRunConfig` objects to specify different configurations for
|
|
197
|
+
each run:
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
from nextpipe.schema import AppRunConfig
|
|
201
|
+
|
|
202
|
+
@foreach()
|
|
203
|
+
@step
|
|
204
|
+
def create_scenarios(data: dict):
|
|
205
|
+
"""Create multiple scenarios to solve with different configurations."""
|
|
206
|
+
return [
|
|
207
|
+
AppRunConfig(
|
|
208
|
+
name="scenario1",
|
|
209
|
+
input=data,
|
|
210
|
+
options={
|
|
211
|
+
"solve.duration": "5s",
|
|
212
|
+
},
|
|
213
|
+
),
|
|
214
|
+
AppRunConfig(
|
|
215
|
+
name="scenario2",
|
|
216
|
+
input=data,
|
|
217
|
+
options={
|
|
218
|
+
"solve.duration": "10s",
|
|
219
|
+
},
|
|
220
|
+
),
|
|
221
|
+
]
|
|
222
|
+
|
|
223
|
+
@needs(predecessors=[create_scenarios])
|
|
224
|
+
@app(app_id="solver-app", instance_id="latest")
|
|
225
|
+
@step
|
|
226
|
+
def solve():
|
|
227
|
+
"""Run external solver for each scenario."""
|
|
228
|
+
pass
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
The `AppRunConfig` will be applied to each run of the `solve` step.
|
|
232
|
+
|
|
188
233
|
## Output & visualization
|
|
189
234
|
|
|
190
235
|
After running a `nextpipe` program, the output is composed of the following
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "v0.3.2.dev0"
|
|
@@ -47,7 +47,7 @@ requires-python = ">=3.9"
|
|
|
47
47
|
|
|
48
48
|
[project.urls]
|
|
49
49
|
Homepage = "https://www.nextmv.io"
|
|
50
|
-
Documentation = "https://
|
|
50
|
+
Documentation = "https://nextpipe.docs.nextmv.io/en/latest/"
|
|
51
51
|
Repository = "https://github.com/nextmv-io/nextpipe"
|
|
52
52
|
|
|
53
53
|
[tool.ruff]
|
|
@@ -12,7 +12,7 @@ class Flow(FlowSpec):
|
|
|
12
12
|
@step
|
|
13
13
|
def fanout(data: dict):
|
|
14
14
|
"""
|
|
15
|
-
Creates 3 copies of the input and configures them for 3 different app
|
|
15
|
+
Creates 3 copies of the input and configures them for 3 different app options.
|
|
16
16
|
"""
|
|
17
17
|
inputs = [copy.deepcopy(data) for _ in range(3)]
|
|
18
18
|
run_configs = [AppRunConfig(input, [AppOption("param", i)]) for i, input in enumerate(inputs)]
|
|
@@ -12,7 +12,7 @@ class Flow(FlowSpec):
|
|
|
12
12
|
@step
|
|
13
13
|
def prepare(data: dict):
|
|
14
14
|
"""
|
|
15
|
-
Creates 3 copies of the input and configures them for 3 different app
|
|
15
|
+
Creates 3 copies of the input and configures them for 3 different app options.
|
|
16
16
|
"""
|
|
17
17
|
inputs = [copy.deepcopy(data) for _ in range(3)]
|
|
18
18
|
run_configs = [AppRunConfig(input, [AppOption("param", i)]) for i, input in enumerate(inputs)]
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
name: release
|
|
2
|
-
run-name: Release ${{ inputs.VERSION }} (pre-release - ${{ inputs.IS_PRE_RELEASE }}) by @${{ github.actor }} from ${{ github.ref_name }}
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
workflow_dispatch:
|
|
6
|
-
inputs:
|
|
7
|
-
VERSION:
|
|
8
|
-
description: "The version to release"
|
|
9
|
-
required: true
|
|
10
|
-
IS_PRE_RELEASE:
|
|
11
|
-
description: "It IS a pre-release"
|
|
12
|
-
required: true
|
|
13
|
-
default: false
|
|
14
|
-
type: boolean
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
bump: # This job is used to bump the version and create a release
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
env:
|
|
20
|
-
VERSION: ${{ inputs.VERSION }}
|
|
21
|
-
GH_TOKEN: ${{ github.token }}
|
|
22
|
-
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
|
23
|
-
permissions:
|
|
24
|
-
contents: write
|
|
25
|
-
steps:
|
|
26
|
-
- name: set up Python
|
|
27
|
-
uses: actions/setup-python@v5
|
|
28
|
-
with:
|
|
29
|
-
python-version: "3.12"
|
|
30
|
-
|
|
31
|
-
- name: install dependencies
|
|
32
|
-
run: |
|
|
33
|
-
pip install --upgrade pip
|
|
34
|
-
pip install build hatch
|
|
35
|
-
|
|
36
|
-
- name: configure git with the bot credentials
|
|
37
|
-
run: |
|
|
38
|
-
mkdir -p ~/.ssh
|
|
39
|
-
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
|
40
|
-
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
|
41
|
-
ssh-add - <<< "${{ secrets.NEXTMVBOT_SSH_KEY }}"
|
|
42
|
-
|
|
43
|
-
echo "${{ secrets.NEXTMVBOT_SIGNING_KEY }}" > ~/.ssh/signing.key
|
|
44
|
-
chmod 600 ~/.ssh/signing.key
|
|
45
|
-
|
|
46
|
-
git config --global user.name "nextmv-bot"
|
|
47
|
-
git config --global user.email "tech+gh-nextmv-bot@nextmv.io"
|
|
48
|
-
git config --global gpg.format ssh
|
|
49
|
-
git config --global user.signingkey ~/.ssh/signing.key
|
|
50
|
-
|
|
51
|
-
git clone git@github.com:nextmv-io/nextpipe.git
|
|
52
|
-
cd nextpipe
|
|
53
|
-
git switch ${{ github.ref_name }}
|
|
54
|
-
|
|
55
|
-
- name: upgrade version with hatch
|
|
56
|
-
run: hatch version ${{ env.VERSION }}
|
|
57
|
-
working-directory: ./nextpipe
|
|
58
|
-
|
|
59
|
-
- name: bump version in requirements.txt
|
|
60
|
-
run: |
|
|
61
|
-
bash .nextmv/bump_requirements.sh ${{ env.VERSION }}
|
|
62
|
-
working-directory: ./nextpipe
|
|
63
|
-
|
|
64
|
-
- name: commit new version
|
|
65
|
-
run: |
|
|
66
|
-
git add --all
|
|
67
|
-
git commit -S -m "Bump version to $VERSION"
|
|
68
|
-
git push
|
|
69
|
-
git tag $VERSION
|
|
70
|
-
git push origin $VERSION
|
|
71
|
-
working-directory: ./nextpipe
|
|
72
|
-
|
|
73
|
-
- name: create release
|
|
74
|
-
run: |
|
|
75
|
-
PRERELEASE_FLAG=""
|
|
76
|
-
if [ ${{ inputs.IS_PRE_RELEASE }} = true ]; then
|
|
77
|
-
PRERELEASE_FLAG="--prerelease"
|
|
78
|
-
fi
|
|
79
|
-
|
|
80
|
-
gh release create $VERSION \
|
|
81
|
-
--verify-tag \
|
|
82
|
-
--generate-notes \
|
|
83
|
-
--title $VERSION $PRERELEASE_FLAG
|
|
84
|
-
working-directory: ./nextpipe
|
|
85
|
-
|
|
86
|
-
- name: ensure passing build
|
|
87
|
-
run: python -m build
|
|
88
|
-
working-directory: ./nextpipe
|
|
89
|
-
|
|
90
|
-
release: # This job is used to publish the release to PyPI/TestPyPI
|
|
91
|
-
runs-on: ubuntu-latest
|
|
92
|
-
needs: bump
|
|
93
|
-
strategy:
|
|
94
|
-
matrix:
|
|
95
|
-
include:
|
|
96
|
-
- target-env: pypi
|
|
97
|
-
target-url: https://pypi.org/p/nextpipe
|
|
98
|
-
- target-env: testpypi
|
|
99
|
-
target-url: https://test.pypi.org/p/nextpipe
|
|
100
|
-
environment:
|
|
101
|
-
name: ${{ matrix.target-env }}
|
|
102
|
-
url: ${{ matrix.target-url }}
|
|
103
|
-
permissions:
|
|
104
|
-
contents: read
|
|
105
|
-
id-token: write # This is required for trusted publishing to PyPI
|
|
106
|
-
steps:
|
|
107
|
-
- name: git clone ${{ github.ref_name }}
|
|
108
|
-
uses: actions/checkout@v4
|
|
109
|
-
with:
|
|
110
|
-
ref: ${{ github.ref_name }}
|
|
111
|
-
|
|
112
|
-
- name: set up Python
|
|
113
|
-
uses: actions/setup-python@v5
|
|
114
|
-
with:
|
|
115
|
-
python-version: "3.12"
|
|
116
|
-
|
|
117
|
-
- name: install dependencies
|
|
118
|
-
run: |
|
|
119
|
-
pip install --upgrade pip
|
|
120
|
-
pip install build hatch
|
|
121
|
-
|
|
122
|
-
- name: build binary wheel and source tarball
|
|
123
|
-
run: python -m build
|
|
124
|
-
|
|
125
|
-
- name: Publish package distributions to PyPI
|
|
126
|
-
if: ${{ matrix.target-env == 'pypi' }}
|
|
127
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
128
|
-
with:
|
|
129
|
-
packages-dir: ./dist
|
|
130
|
-
|
|
131
|
-
- name: Publish package distributions to TestPyPI
|
|
132
|
-
if: ${{ matrix.target-env == 'testpypi' }}
|
|
133
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
134
|
-
with:
|
|
135
|
-
repository-url: https://test.pypi.org/legacy/
|
|
136
|
-
packages-dir: ./dist
|
|
137
|
-
|
|
138
|
-
notify:
|
|
139
|
-
runs-on: ubuntu-latest
|
|
140
|
-
needs: release
|
|
141
|
-
if: ${{ needs.release.result == 'success' && inputs.IS_PRE_RELEASE == false }}
|
|
142
|
-
steps:
|
|
143
|
-
- name: notify slack
|
|
144
|
-
run: |
|
|
145
|
-
export DATA="{\"text\":\"Release notification - nextpipe ${{ inputs.VERSION }} (see <https://github.com/nextmv-io/nextpipe/releases/${{ inputs.VERSION }}|release notes> / <https://pypi.org/project/nextpipe|PyPI>)\"}"
|
|
146
|
-
curl -X POST -H 'Content-type: application/json' --data "$DATA" ${{ secrets.SLACK_URL_MISSION_CONTROL }}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "v0.3.0"
|
|
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
|