scalable-pypeline 2.0.8__tar.gz → 2.0.9__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.
- {scalable-pypeline-2.0.8/scalable_pypeline.egg-info → scalable-pypeline-2.0.9}/PKG-INFO +1 -1
- scalable-pypeline-2.0.9/pypeline/__init__.py +1 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/flask/api/pipelines.py +27 -6
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/requirements.txt +1 -2
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9/scalable_pypeline.egg-info}/PKG-INFO +1 -1
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/scalable_pypeline.egg-info/requires.txt +4 -10
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/setup.py +4 -8
- scalable-pypeline-2.0.8/pypeline/__init__.py +0 -1
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/LICENSE +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/MANIFEST.in +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/README.md +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/barrier.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/composition.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/constants.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/dramatiq.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/extensions.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/flask/__init__.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/flask/api/__init__.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/flask/api/schedules.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/flask/decorators.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/flask/flask_pypeline.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/middleware.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/pipeline_config_schema.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/pypeline_yaml.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/schedule_config_schema.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/utils/__init__.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/utils/config_utils.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/utils/module_utils.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/pypeline/utils/pipeline_utils.py +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/scalable_pypeline.egg-info/SOURCES.txt +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/scalable_pypeline.egg-info/dependency_links.txt +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/scalable_pypeline.egg-info/entry_points.txt +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/scalable_pypeline.egg-info/top_level.txt +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/setup.cfg +0 -0
- {scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/tests/fixtures/__init__.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "2.0.9"
|
@@ -1,25 +1,46 @@
|
|
1
1
|
""" Pipeline APIs
|
2
2
|
"""
|
3
|
+
|
4
|
+
import importlib.metadata
|
3
5
|
import logging
|
4
6
|
|
5
7
|
from flask import jsonify
|
6
|
-
from flask_smorest import Blueprint
|
7
8
|
from flask.views import MethodView
|
9
|
+
from flask_smorest import Blueprint
|
8
10
|
from marshmallow import Schema, fields
|
9
11
|
from marshmallow.exceptions import ValidationError
|
10
12
|
from webargs.flaskparser import abort
|
11
|
-
|
13
|
+
from packaging import version
|
12
14
|
from pypeline.composition import PipelineResult
|
13
15
|
from pypeline.constants import API_DOC_RESPONSES, API_DOC_PARAMS, API_PATH_V1
|
14
|
-
from pypeline.utils.pipeline_utils import dag_generator
|
15
16
|
from pypeline.flask.decorators import require_accesskey
|
16
|
-
from pypeline.utils.config_utils import retrieve_latest_pipeline_config
|
17
17
|
from pypeline.pipeline_config_schema import BasePipelineSchema, PipelineSchemaV1
|
18
|
+
from pypeline.utils.config_utils import retrieve_latest_pipeline_config
|
19
|
+
from pypeline.utils.pipeline_utils import dag_generator
|
18
20
|
|
19
21
|
logger = logging.getLogger(__name__)
|
20
22
|
bp = Blueprint("pipelines", __name__, url_prefix=API_PATH_V1 + "/pipelines")
|
21
23
|
|
22
24
|
|
25
|
+
try:
|
26
|
+
flask_smorest_version = importlib.metadata.version("flask-smorest")
|
27
|
+
flask_smorest_version_parsed = version.parse(flask_smorest_version)
|
28
|
+
except importlib.metadata.PackageNotFoundError:
|
29
|
+
flask_smorest_version_parsed = None
|
30
|
+
|
31
|
+
|
32
|
+
def get_response_decorator(bp, status_code, *args, **kwargs):
|
33
|
+
if flask_smorest_version is None:
|
34
|
+
# Handle the case where flask-smorest is not installed
|
35
|
+
raise ImportError("flask-smorest is not installed.")
|
36
|
+
elif flask_smorest_version_parsed < version.parse("0.29"):
|
37
|
+
# Adjust arguments for older versions if needed
|
38
|
+
return bp.response(*args, **kwargs)
|
39
|
+
else:
|
40
|
+
# Adjust arguments for newer versions if needed
|
41
|
+
return bp.response(status_code, *args, **kwargs)
|
42
|
+
|
43
|
+
|
23
44
|
class InvokePipelineSchema(Schema):
|
24
45
|
"""Incoming schema for invoking a pipeline"""
|
25
46
|
|
@@ -135,7 +156,7 @@ class PipelineInvoke(MethodView):
|
|
135
156
|
tags=["Pipelines"],
|
136
157
|
)
|
137
158
|
@bp.arguments(InvokePipelineSchema)
|
138
|
-
@bp
|
159
|
+
@get_response_decorator(bp, "200", InvokePipelineResponseSchema)
|
139
160
|
def post(self, payload: dict, pipeline_id: str):
|
140
161
|
"""Invoke a pipeline by it's ID; optionally provide pipeline arguments."""
|
141
162
|
pipeline_config = retrieve_latest_pipeline_config(pipeline_id=pipeline_id)
|
@@ -191,7 +212,7 @@ class PipelineResults(MethodView):
|
|
191
212
|
],
|
192
213
|
tags=["Pipelines"],
|
193
214
|
)
|
194
|
-
@bp
|
215
|
+
@get_response_decorator(bp, "200", GetPipelineResultResponseSchema)
|
195
216
|
def get(self, execution_id: str):
|
196
217
|
"""Retrieve results of a pipeline's execution based on execution_id
|
197
218
|
|
@@ -1,32 +1,26 @@
|
|
1
1
|
PyYAML<7,>=6.0.1
|
2
|
-
click==8.0.4
|
3
2
|
marshmallow<4,>=3.2.1
|
4
3
|
redis<5,>=4.5.4
|
5
|
-
db-medley[redis]<2,>=1.0.2
|
6
4
|
croniter<2,>=1.0.15
|
5
|
+
db-medley[redis]<2,>=1.0.2
|
7
6
|
|
8
7
|
[build]
|
9
8
|
wheel
|
10
9
|
twine
|
11
10
|
|
12
11
|
[dev]
|
13
|
-
|
12
|
+
black
|
14
13
|
|
15
14
|
[flask]
|
16
|
-
|
17
|
-
|
18
|
-
Flask<2,>=1.1.2
|
19
|
-
flask-smorest<0.29,>=0.23.0
|
20
|
-
Jinja2==3.0.3
|
15
|
+
markupsafe==2.0.1
|
16
|
+
flask-smorest<1,>=0.23.0
|
21
17
|
|
22
18
|
[test]
|
23
19
|
pytest-cov<3,>=2.6.1
|
24
20
|
tox<4,>=3.14.1
|
25
21
|
mock<2,>=1
|
26
|
-
moto<4,>=1.3.16
|
27
22
|
responses<0.11,>=0.10.16
|
28
23
|
fakeredis<3,>=2.10.3
|
29
|
-
importlib-metadata<5,>=4.12
|
30
24
|
|
31
25
|
[web]
|
32
26
|
gunicorn
|
@@ -1,5 +1,6 @@
|
|
1
1
|
""" PypeLine Library Setup
|
2
2
|
"""
|
3
|
+
|
3
4
|
import re
|
4
5
|
import ast
|
5
6
|
import sys
|
@@ -174,11 +175,8 @@ setup(
|
|
174
175
|
extras_require={
|
175
176
|
"build": ["wheel", "twine"],
|
176
177
|
"flask": [
|
177
|
-
"
|
178
|
-
"
|
179
|
-
"Flask>=1.1.2,<2",
|
180
|
-
"flask-smorest>=0.23.0,<0.29",
|
181
|
-
"Jinja2==3.0.3",
|
178
|
+
"markupsafe==2.0.1",
|
179
|
+
"flask-smorest>=0.23.0,<1",
|
182
180
|
],
|
183
181
|
"web": ["gunicorn", "gevent>=21.12.0,<22"],
|
184
182
|
"workers": [
|
@@ -186,15 +184,13 @@ setup(
|
|
186
184
|
"dramatiq[rabbitmq]>=1.17.0,<2",
|
187
185
|
"apscheduler>=3.10.4,<4",
|
188
186
|
],
|
189
|
-
"dev": ["
|
187
|
+
"dev": ["black"],
|
190
188
|
"test": [
|
191
189
|
"pytest-cov>=2.6.1,<3",
|
192
190
|
"tox>=3.14.1,<4",
|
193
191
|
"mock>=1,<2",
|
194
|
-
"moto>=1.3.16,<4",
|
195
192
|
"responses>=0.10.16,<0.11",
|
196
193
|
"fakeredis>=2.10.3,<3",
|
197
|
-
"importlib-metadata>=4.12,<5",
|
198
194
|
],
|
199
195
|
},
|
200
196
|
entry_points={
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "2.0.8"
|
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
|
{scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/scalable_pypeline.egg-info/dependency_links.txt
RENAMED
File without changes
|
{scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/scalable_pypeline.egg-info/entry_points.txt
RENAMED
File without changes
|
{scalable-pypeline-2.0.8 → scalable-pypeline-2.0.9}/scalable_pypeline.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|