runnable 0.12.3__py3-none-any.whl → 0.13.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- runnable/extensions/executor/{local/implementation.py → local.py} +0 -2
- runnable/extensions/nodes.py +16 -1
- runnable/tasks.py +148 -3
- {runnable-0.12.3.dist-info → runnable-0.13.0.dist-info}/METADATA +1 -1
- {runnable-0.12.3.dist-info → runnable-0.13.0.dist-info}/RECORD +8 -9
- {runnable-0.12.3.dist-info → runnable-0.13.0.dist-info}/WHEEL +1 -1
- {runnable-0.12.3.dist-info → runnable-0.13.0.dist-info}/entry_points.txt +1 -1
- runnable/extensions/executor/local/__init__.py +0 -0
- {runnable-0.12.3.dist-info → runnable-0.13.0.dist-info}/LICENSE +0 -0
runnable/extensions/nodes.py
CHANGED
@@ -797,12 +797,27 @@ class DagNode(CompositeNode):
|
|
797
797
|
class StubNode(ExecutableNode):
|
798
798
|
"""
|
799
799
|
Stub is a convenience design node.
|
800
|
-
|
801
800
|
It always returns success in the attempt log and does nothing.
|
802
801
|
|
803
802
|
This node is very similar to pass state in Step functions.
|
804
803
|
|
805
804
|
This node type could be handy when designing the pipeline and stubbing functions
|
805
|
+
--8<-- [start:stub_reference]
|
806
|
+
An stub execution node of the pipeline.
|
807
|
+
Please refer to define pipeline/tasks/stub for more information.
|
808
|
+
|
809
|
+
As part of the dag definition, a stub task is defined as follows:
|
810
|
+
|
811
|
+
dag:
|
812
|
+
steps:
|
813
|
+
stub_task: # The name of the node
|
814
|
+
type: stub
|
815
|
+
on_failure: The name of the step to traverse in case of failure
|
816
|
+
next: The next node to execute after this task, use "success" to terminate the pipeline successfully
|
817
|
+
or "fail" to terminate the pipeline with an error.
|
818
|
+
|
819
|
+
It can take arbritary number of parameters, which is handy to temporarily silence a task node.
|
820
|
+
--8<-- [end:stub_reference]
|
806
821
|
"""
|
807
822
|
|
808
823
|
node_type: str = Field(default="stub", serialization_alias="type")
|
runnable/tasks.py
CHANGED
@@ -188,7 +188,56 @@ def task_return_to_parameter(task_return: TaskReturns, value: Any) -> Parameter:
|
|
188
188
|
|
189
189
|
|
190
190
|
class PythonTaskType(BaseTaskType): # pylint: disable=too-few-public-methods
|
191
|
-
"""
|
191
|
+
"""
|
192
|
+
--8<-- [start:python_reference]
|
193
|
+
An execution node of the pipeline of python functions.
|
194
|
+
Please refer to define pipeline/tasks/python for more information.
|
195
|
+
|
196
|
+
As part of the dag definition, a python task is defined as follows:
|
197
|
+
|
198
|
+
dag:
|
199
|
+
steps:
|
200
|
+
python_task: # The name of the node
|
201
|
+
type: task
|
202
|
+
command_type: python # this is default
|
203
|
+
command: my_module.my_function # the dotted path to the function. Please refer to the yaml section of
|
204
|
+
define pipeline/tasks/python for concrete details.
|
205
|
+
returns:
|
206
|
+
- name: # The name to assign the return value
|
207
|
+
kind: json # the default value is json,
|
208
|
+
can be object for python objects and metric for metrics
|
209
|
+
secrets:
|
210
|
+
- my_secret_key # A list of secrets to expose by secrets manager
|
211
|
+
catalog:
|
212
|
+
get:
|
213
|
+
- A list of glob patterns to get from the catalog to the local file system
|
214
|
+
put:
|
215
|
+
- A list of glob patterns to put to the catalog from the local file system
|
216
|
+
on_failure: The name of the step to traverse in case of failure
|
217
|
+
overrides:
|
218
|
+
Individual tasks can override the global configuration config by referring to the
|
219
|
+
specific override.
|
220
|
+
|
221
|
+
For example,
|
222
|
+
#Global configuration
|
223
|
+
executor:
|
224
|
+
type: local-container
|
225
|
+
config:
|
226
|
+
docker_image: "runnable/runnable:latest"
|
227
|
+
overrides:
|
228
|
+
custom_docker_image:
|
229
|
+
docker_image: "runnable/runnable:custom"
|
230
|
+
|
231
|
+
## In the node definition
|
232
|
+
overrides:
|
233
|
+
local-container:
|
234
|
+
docker_image: "runnable/runnable:custom"
|
235
|
+
|
236
|
+
This instruction will override the docker image for the local-container executor.
|
237
|
+
next: The next node to execute after this task, use "success" to terminate the pipeline successfully
|
238
|
+
or "fail" to terminate the pipeline with an error.
|
239
|
+
--8<-- [end:python_reference]
|
240
|
+
"""
|
192
241
|
|
193
242
|
task_type: str = Field(default="python", serialization_alias="command_type")
|
194
243
|
command: str
|
@@ -277,7 +326,56 @@ class PythonTaskType(BaseTaskType): # pylint: disable=too-few-public-methods
|
|
277
326
|
|
278
327
|
|
279
328
|
class NotebookTaskType(BaseTaskType):
|
280
|
-
"""
|
329
|
+
"""
|
330
|
+
--8<-- [start:notebook_reference]
|
331
|
+
An execution node of the pipeline of notebook execution.
|
332
|
+
Please refer to define pipeline/tasks/notebook for more information.
|
333
|
+
|
334
|
+
As part of the dag definition, a notebook task is defined as follows:
|
335
|
+
|
336
|
+
dag:
|
337
|
+
steps:
|
338
|
+
notebook_task: # The name of the node
|
339
|
+
type: task
|
340
|
+
command_type: notebook
|
341
|
+
command: the path to the notebook relative to project root.
|
342
|
+
optional_ploomber_args: a dictionary of arguments to be passed to ploomber engine
|
343
|
+
returns:
|
344
|
+
- name: # The name to assign the return value
|
345
|
+
kind: json # the default value is json,
|
346
|
+
can be object for python objects and metric for metrics
|
347
|
+
secrets:
|
348
|
+
- my_secret_key # A list of secrets to expose by secrets manager
|
349
|
+
catalog:
|
350
|
+
get:
|
351
|
+
- A list of glob patterns to get from the catalog to the local file system
|
352
|
+
put:
|
353
|
+
- A list of glob patterns to put to the catalog from the local file system
|
354
|
+
on_failure: The name of the step to traverse in case of failure
|
355
|
+
overrides:
|
356
|
+
Individual tasks can override the global configuration config by referring to the
|
357
|
+
specific override.
|
358
|
+
|
359
|
+
For example,
|
360
|
+
#Global configuration
|
361
|
+
executor:
|
362
|
+
type: local-container
|
363
|
+
config:
|
364
|
+
docker_image: "runnable/runnable:latest"
|
365
|
+
overrides:
|
366
|
+
custom_docker_image:
|
367
|
+
docker_image: "runnable/runnable:custom"
|
368
|
+
|
369
|
+
## In the node definition
|
370
|
+
overrides:
|
371
|
+
local-container:
|
372
|
+
docker_image: "runnable/runnable:custom"
|
373
|
+
|
374
|
+
This instruction will override the docker image for the local-container executor.
|
375
|
+
next: The next node to execute after this task, use "success" to terminate the pipeline successfully
|
376
|
+
or "fail" to terminate the pipeline with an error.
|
377
|
+
--8<-- [end:notebook_reference]
|
378
|
+
"""
|
281
379
|
|
282
380
|
task_type: str = Field(default="notebook", serialization_alias="command_type")
|
283
381
|
command: str
|
@@ -410,7 +508,54 @@ class NotebookTaskType(BaseTaskType):
|
|
410
508
|
|
411
509
|
class ShellTaskType(BaseTaskType):
|
412
510
|
"""
|
413
|
-
|
511
|
+
--8<-- [start:shell_reference]
|
512
|
+
An execution node of the pipeline of shell execution.
|
513
|
+
Please refer to define pipeline/tasks/shell for more information.
|
514
|
+
|
515
|
+
As part of the dag definition, a shell task is defined as follows:
|
516
|
+
|
517
|
+
dag:
|
518
|
+
steps:
|
519
|
+
shell_task: # The name of the node
|
520
|
+
type: task
|
521
|
+
command_type: shell
|
522
|
+
command: The command to execute, it could be multiline
|
523
|
+
optional_ploomber_args: a dictionary of arguments to be passed to ploomber engine
|
524
|
+
returns:
|
525
|
+
- name: # The name to assign the return value
|
526
|
+
kind: json # the default value is json,
|
527
|
+
can be object for python objects and metric for metrics
|
528
|
+
secrets:
|
529
|
+
- my_secret_key # A list of secrets to expose by secrets manager
|
530
|
+
catalog:
|
531
|
+
get:
|
532
|
+
- A list of glob patterns to get from the catalog to the local file system
|
533
|
+
put:
|
534
|
+
- A list of glob patterns to put to the catalog from the local file system
|
535
|
+
on_failure: The name of the step to traverse in case of failure
|
536
|
+
overrides:
|
537
|
+
Individual tasks can override the global configuration config by referring to the
|
538
|
+
specific override.
|
539
|
+
|
540
|
+
For example,
|
541
|
+
#Global configuration
|
542
|
+
executor:
|
543
|
+
type: local-container
|
544
|
+
config:
|
545
|
+
docker_image: "runnable/runnable:latest"
|
546
|
+
overrides:
|
547
|
+
custom_docker_image:
|
548
|
+
docker_image: "runnable/runnable:custom"
|
549
|
+
|
550
|
+
## In the node definition
|
551
|
+
overrides:
|
552
|
+
local-container:
|
553
|
+
docker_image: "runnable/runnable:custom"
|
554
|
+
|
555
|
+
This instruction will override the docker image for the local-container executor.
|
556
|
+
next: The next node to execute after this task, use "success" to terminate the pipeline successfully
|
557
|
+
or "fail" to terminate the pipeline with an error.
|
558
|
+
--8<-- [end:shell_reference]
|
414
559
|
"""
|
415
560
|
|
416
561
|
task_type: str = Field(default="shell", serialization_alias="command_type")
|
@@ -21,15 +21,14 @@ runnable/extensions/executor/argo/specification.yaml,sha256=wXQcm2gOQYqy-IOQIhuc
|
|
21
21
|
runnable/extensions/executor/k8s_job/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
runnable/extensions/executor/k8s_job/implementation_FF.py,sha256=1IfVG1GRcJcVFzQ-WhkJsmzdJuj51QMxXylY9UrWM0U,10259
|
23
23
|
runnable/extensions/executor/k8s_job/integration_FF.py,sha256=pG6HKhPMgCRIgu1PAnBvsfJQE1FxcjuSiC2I-Hn5sWo,2165
|
24
|
-
runnable/extensions/executor/local
|
25
|
-
runnable/extensions/executor/local/implementation.py,sha256=e8Tzv-FgQmJeUXVut96jeNERTR83JVG_zkQZMEjCVAs,2469
|
24
|
+
runnable/extensions/executor/local.py,sha256=pV1tP9lRn6hwZtt-moKM1SXG_QmohbEF2QGdBbzCpkU,2396
|
26
25
|
runnable/extensions/executor/local_container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
26
|
runnable/extensions/executor/local_container/implementation.py,sha256=6iwt9tNCQawVEfIErzoqys2hrErWK0DHcAOkO49Ov9w,17322
|
28
27
|
runnable/extensions/executor/mocked/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
28
|
runnable/extensions/executor/mocked/implementation.py,sha256=ChvlcLGpBxO6QwJcoqhBgKBR6NfWVnMdOWKQhMgcEjY,5762
|
30
29
|
runnable/extensions/executor/retry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
30
|
runnable/extensions/executor/retry/implementation.py,sha256=-g6PBOhSG7IL4D_IlQOcf9H_En9IXiUzCt-6vKeCB6Q,6892
|
32
|
-
runnable/extensions/nodes.py,sha256=
|
31
|
+
runnable/extensions/nodes.py,sha256=Jz8uJBgvcpdZ8R63EWtzULFE_DjSwsrWgY0P1Z1PYTs,33506
|
33
32
|
runnable/extensions/run_log_store/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
33
|
runnable/extensions/run_log_store/chunked_file_system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
34
|
runnable/extensions/run_log_store/chunked_file_system/implementation.py,sha256=EW2P8lr3eH-pIOsMTJPr5eb-iWc48GQ97W15JzkpC_4,3326
|
@@ -55,10 +54,10 @@ runnable/parameters.py,sha256=yZkMDnwnkdYXIwQ8LflBzn50Y0xRGxEvLlxwno6ovvs,5163
|
|
55
54
|
runnable/pickler.py,sha256=5SDNf0miMUJ3ZauhQdzwk8_t-9jeOqaTjP5bvRnu9sU,2685
|
56
55
|
runnable/sdk.py,sha256=sZWiyGVIqaAmmJuc4p1OhuqLBSqS7svN1VuSOqeZ_xA,29254
|
57
56
|
runnable/secrets.py,sha256=dakb7WRloWVo-KpQp6Vy4rwFdGi58BTlT4OifQY106I,2324
|
58
|
-
runnable/tasks.py,sha256=
|
57
|
+
runnable/tasks.py,sha256=61BYi5DNyTPi8GRlIy8vh2T0DZ1jkTj7gxBx88sK_XY,28058
|
59
58
|
runnable/utils.py,sha256=fXOLoFZKYqh3wQgzA2V-VZOu-dSgLPGqCZIbMmsNzOw,20016
|
60
|
-
runnable-0.
|
61
|
-
runnable-0.
|
62
|
-
runnable-0.
|
63
|
-
runnable-0.
|
64
|
-
runnable-0.
|
59
|
+
runnable-0.13.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
60
|
+
runnable-0.13.0.dist-info/METADATA,sha256=p4fwokQJKU8EJfniOP_DW22yDgSSZmltZDP2reYlBck,10436
|
61
|
+
runnable-0.13.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
62
|
+
runnable-0.13.0.dist-info/entry_points.txt,sha256=cl_K9XPV-qnAVaXfmNuGpZZKaoUu8YwjPsqZW1iSKlo,1479
|
63
|
+
runnable-0.13.0.dist-info/RECORD,,
|
@@ -7,7 +7,7 @@ runnable=runnable.cli:cli
|
|
7
7
|
|
8
8
|
[executor]
|
9
9
|
argo=runnable.extensions.executor.argo.implementation:ArgoExecutor
|
10
|
-
local=runnable.extensions.executor.local
|
10
|
+
local=runnable.extensions.executor.local:LocalExecutor
|
11
11
|
local-container=runnable.extensions.executor.local_container.implementation:LocalContainerExecutor
|
12
12
|
mocked=runnable.extensions.executor.mocked.implementation:MockedExecutor
|
13
13
|
retry=runnable.extensions.executor.retry.implementation:RetryExecutor
|
File without changes
|
File without changes
|