scalable-pypeline 2.0.8__py2.py3-none-any.whl → 2.0.9__py2.py3-none-any.whl
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.
- pypeline/__init__.py +1 -1
- pypeline/flask/api/pipelines.py +27 -6
- {scalable_pypeline-2.0.8.dist-info → scalable_pypeline-2.0.9.dist-info}/METADATA +5 -11
- {scalable_pypeline-2.0.8.dist-info → scalable_pypeline-2.0.9.dist-info}/RECORD +8 -8
- {scalable_pypeline-2.0.8.dist-info → scalable_pypeline-2.0.9.dist-info}/LICENSE +0 -0
- {scalable_pypeline-2.0.8.dist-info → scalable_pypeline-2.0.9.dist-info}/WHEEL +0 -0
- {scalable_pypeline-2.0.8.dist-info → scalable_pypeline-2.0.9.dist-info}/entry_points.txt +0 -0
- {scalable_pypeline-2.0.8.dist-info → scalable_pypeline-2.0.9.dist-info}/top_level.txt +0 -0
pypeline/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "2.0.
|
1
|
+
__version__ = "2.0.9"
|
pypeline/flask/api/pipelines.py
CHANGED
@@ -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,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: scalable-pypeline
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.9
|
4
4
|
Summary: PypeLine - Python pipelines for the Real World
|
5
5
|
Home-page: https://gitlab.com/bravos2/pypeline
|
6
6
|
Author: Bravos Power Corporation
|
@@ -8,30 +8,24 @@ License: Apache License 2.0
|
|
8
8
|
Description-Content-Type: text/markdown
|
9
9
|
License-File: LICENSE
|
10
10
|
Requires-Dist: PyYAML (<7,>=6.0.1)
|
11
|
-
Requires-Dist: click (==8.0.4)
|
12
11
|
Requires-Dist: marshmallow (<4,>=3.2.1)
|
13
12
|
Requires-Dist: redis (<5,>=4.5.4)
|
14
|
-
Requires-Dist: db-medley[redis] (<2,>=1.0.2)
|
15
13
|
Requires-Dist: croniter (<2,>=1.0.15)
|
14
|
+
Requires-Dist: db-medley[redis] (<2,>=1.0.2)
|
16
15
|
Provides-Extra: build
|
17
16
|
Requires-Dist: wheel ; extra == 'build'
|
18
17
|
Requires-Dist: twine ; extra == 'build'
|
19
18
|
Provides-Extra: dev
|
20
|
-
Requires-Dist:
|
19
|
+
Requires-Dist: black ; extra == 'dev'
|
21
20
|
Provides-Extra: flask
|
22
|
-
Requires-Dist:
|
23
|
-
Requires-Dist:
|
24
|
-
Requires-Dist: Flask (<2,>=1.1.2) ; extra == 'flask'
|
25
|
-
Requires-Dist: flask-smorest (<0.29,>=0.23.0) ; extra == 'flask'
|
26
|
-
Requires-Dist: Jinja2 (==3.0.3) ; extra == 'flask'
|
21
|
+
Requires-Dist: markupsafe (==2.0.1) ; extra == 'flask'
|
22
|
+
Requires-Dist: flask-smorest (<1,>=0.23.0) ; extra == 'flask'
|
27
23
|
Provides-Extra: test
|
28
24
|
Requires-Dist: pytest-cov (<3,>=2.6.1) ; extra == 'test'
|
29
25
|
Requires-Dist: tox (<4,>=3.14.1) ; extra == 'test'
|
30
26
|
Requires-Dist: mock (<2,>=1) ; extra == 'test'
|
31
|
-
Requires-Dist: moto (<4,>=1.3.16) ; extra == 'test'
|
32
27
|
Requires-Dist: responses (<0.11,>=0.10.16) ; extra == 'test'
|
33
28
|
Requires-Dist: fakeredis (<3,>=2.10.3) ; extra == 'test'
|
34
|
-
Requires-Dist: importlib-metadata (<5,>=4.12) ; extra == 'test'
|
35
29
|
Provides-Extra: web
|
36
30
|
Requires-Dist: gunicorn ; extra == 'web'
|
37
31
|
Requires-Dist: gevent (<22,>=21.12.0) ; extra == 'web'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pypeline/__init__.py,sha256=
|
1
|
+
pypeline/__init__.py,sha256=pZib55qStLeBfZabni1F1OCNxdT02xP-5e34LjIBswQ,22
|
2
2
|
pypeline/barrier.py,sha256=dLDaprH5NB-C7MQjZqPpBBhMjmO0VV_kTonlgweznHc,1096
|
3
3
|
pypeline/composition.py,sha256=pTw9Xb9h4JnV4siFc3JStm5lB-i9djUADo3Kh5K3s7g,12976
|
4
4
|
pypeline/constants.py,sha256=coiF8dMP25qIwoNYSnS7oy7hCd4-5yqPFmdPsN93Q1A,2892
|
@@ -12,16 +12,16 @@ pypeline/flask/__init__.py,sha256=AdljRh0lMiS8ExgDmgzObwVs8jW7hqQuf83Ml8kn8GQ,49
|
|
12
12
|
pypeline/flask/decorators.py,sha256=ki6jkjZwbDbCWuj7ET7N-ncZwrASp4Fy7257WIYiAAQ,1102
|
13
13
|
pypeline/flask/flask_pypeline.py,sha256=Uqyu3PnSP3DoVZUJPqV9chjT4xdRgvcL3OMXxkbdTEg,5490
|
14
14
|
pypeline/flask/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
pypeline/flask/api/pipelines.py,sha256=
|
15
|
+
pypeline/flask/api/pipelines.py,sha256=RzRmSL5Zaia7ftXmXyDAC0ZAkPoFsvyefzHfIyWhRqk,8118
|
16
16
|
pypeline/flask/api/schedules.py,sha256=31lwoFlGv-S-2ahGUCnD5YbmKws8yddj6_PEzzdBi9s,1321
|
17
17
|
pypeline/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
18
|
pypeline/utils/config_utils.py,sha256=rAIATyoW7kGETZ_Z2DqiXtGd7bJp5uPfcLtfNPOYsNs,2167
|
19
19
|
pypeline/utils/module_utils.py,sha256=boEP9IYr4p_ick7HlVUfIxOYHQlEmo7dgvDBCQc-C28,2914
|
20
20
|
pypeline/utils/pipeline_utils.py,sha256=tt71hLEFgPieokJZlC1rP2dmCTctrOPt7K1rGlbnT4o,5967
|
21
21
|
tests/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
-
scalable_pypeline-2.0.
|
23
|
-
scalable_pypeline-2.0.
|
24
|
-
scalable_pypeline-2.0.
|
25
|
-
scalable_pypeline-2.0.
|
26
|
-
scalable_pypeline-2.0.
|
27
|
-
scalable_pypeline-2.0.
|
22
|
+
scalable_pypeline-2.0.9.dist-info/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
23
|
+
scalable_pypeline-2.0.9.dist-info/METADATA,sha256=Kw2kj-CbTmuRdM8FJALTtgfg-JlW-DG87GQ0HLGMzd4,5929
|
24
|
+
scalable_pypeline-2.0.9.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
|
25
|
+
scalable_pypeline-2.0.9.dist-info/entry_points.txt,sha256=uWs10ODfHSBKo2Cx_QaUjPHQTpZ3e77j9VlAdRRmMyg,119
|
26
|
+
scalable_pypeline-2.0.9.dist-info/top_level.txt,sha256=C7dpkEOc_-nnsAQb28BfQknjD6XHRyS9ZrvVeoIbV7s,15
|
27
|
+
scalable_pypeline-2.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|