ddeutil-workflow 0.0.68__tar.gz → 0.0.70__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.
- {ddeutil_workflow-0.0.68/src/ddeutil_workflow.egg-info → ddeutil_workflow-0.0.70}/PKG-INFO +29 -27
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/README.md +28 -26
- ddeutil_workflow-0.0.70/src/ddeutil/workflow/__about__.py +1 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/__init__.py +14 -12
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/api/log_conf.py +16 -29
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/api/routes/logs.py +1 -1
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/api/routes/workflows.py +3 -3
- ddeutil_workflow-0.0.70/src/ddeutil/workflow/audits.py +374 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/cli.py +70 -6
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/conf.py +4 -51
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/errors.py +7 -1
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/event.py +2 -2
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/job.py +9 -3
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/result.py +10 -1
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/reusables.py +1 -1
- ddeutil_workflow-0.0.68/src/ddeutil/workflow/logs.py → ddeutil_workflow-0.0.70/src/ddeutil/workflow/traces.py +224 -409
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/utils.py +19 -11
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/workflow.py +226 -18
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70/src/ddeutil_workflow.egg-info}/PKG-INFO +29 -27
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil_workflow.egg-info/SOURCES.txt +6 -4
- ddeutil_workflow-0.0.68/tests/test_logs_audit.py → ddeutil_workflow-0.0.70/tests/test_audits.py +1 -1
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_conf.py +18 -13
- ddeutil_workflow-0.0.68/tests/test_logs_trace.py → ddeutil_workflow-0.0.70/tests/test_traces.py +6 -7
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_workflow.py +9 -1
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_workflow_exec.py +12 -7
- ddeutil_workflow-0.0.70/tests/test_workflow_rerun.py +167 -0
- ddeutil_workflow-0.0.68/src/ddeutil/workflow/__about__.py +0 -1
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/LICENSE +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/pyproject.toml +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/setup.cfg +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/__cron.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/__main__.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/__types.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/api/__init__.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/api/routes/__init__.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/api/routes/job.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/params.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/stages.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil_workflow.egg-info/dependency_links.txt +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil_workflow.egg-info/entry_points.txt +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil_workflow.egg-info/requires.txt +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil_workflow.egg-info/top_level.txt +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test__cron.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test__regex.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_errors.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_event.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_job.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_job_exec.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_job_exec_strategy.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_params.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_result.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_reusables_call_tag.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_reusables_func_model.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_reusables_template.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_reusables_template_filter.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_strategy.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_utils.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_workflow_exec_job.py +0 -0
- {ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/tests/test_workflow_release.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ddeutil-workflow
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.70
|
4
4
|
Summary: Lightweight workflow orchestration with YAML template
|
5
5
|
Author-email: ddeutils <korawich.anu@gmail.com>
|
6
6
|
License: MIT
|
@@ -61,12 +61,13 @@ by a `.yaml` template.
|
|
61
61
|
|
62
62
|
---
|
63
63
|
|
64
|
-
**:pushpin: <u>Rules of This Workflow
|
64
|
+
**:pushpin: <u>Rules of This Workflow</u>**:
|
65
65
|
|
66
66
|
1. The Minimum frequency unit of built-in scheduling is **1 Minute** 🕘
|
67
67
|
2. **Can not** re-run only failed stage and its pending downstream ↩️
|
68
68
|
3. All parallel tasks inside workflow core engine use **Multi-Threading** pool
|
69
69
|
(Python 3.13 unlock GIL 🐍🔓)
|
70
|
+
4. Recommend to pass a **Secret Value** with environment variable in YAML template 🔐
|
70
71
|
|
71
72
|
---
|
72
73
|
|
@@ -230,14 +231,17 @@ class RestAuth(BaseModel):
|
|
230
231
|
|
231
232
|
@tag("requests", alias="get-api-with-oauth-to-s3")
|
232
233
|
def get_api_with_oauth_to_s3(
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
234
|
+
method: str,
|
235
|
+
url: str,
|
236
|
+
body: dict[str, str],
|
237
|
+
auth: RestAuth,
|
238
|
+
writing_node: str,
|
239
|
+
aws: AwsCredential,
|
240
|
+
result: Result,
|
240
241
|
) -> dict[str, int]:
|
242
|
+
"""Get the data from RestAPI via Authenticate with OAuth and then store to
|
243
|
+
AWS S3 service.
|
244
|
+
"""
|
241
245
|
result.trace.info("[CALLER]: Start get data via RestAPI to S3.")
|
242
246
|
result.trace.info(f"... {method}: {url}")
|
243
247
|
if method != "post":
|
@@ -269,24 +273,22 @@ it will use default value and do not raise any error to you.
|
|
269
273
|
> The config value that you will set on the environment should combine with
|
270
274
|
> prefix, component, and name which is `WORKFLOW_{component}_{name}` (Upper case).
|
271
275
|
|
272
|
-
| Name | Component | Default | Description
|
273
|
-
|
274
|
-
| **REGISTRY_CALLER** |
|
275
|
-
| **REGISTRY_FILTER** |
|
276
|
-
| **CONF_PATH** |
|
277
|
-
| **TIMEZONE** |
|
278
|
-
| **STAGE_DEFAULT_ID** |
|
279
|
-
| **
|
280
|
-
| **
|
281
|
-
| **
|
282
|
-
| **
|
283
|
-
| **
|
284
|
-
| **
|
285
|
-
| **
|
286
|
-
| **
|
287
|
-
| **
|
288
|
-
| **AUDIT_PATH** | Log | `./audits` | |
|
289
|
-
| **AUDIT_ENABLE_WRITE** | Log | `true` | A flag that enable logging object saving log to its destination. |
|
276
|
+
| Name | Component | Default | Description |
|
277
|
+
|:-----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|
|
278
|
+
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
|
279
|
+
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
|
280
|
+
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
|
281
|
+
| **TIMEZONE** | CORE | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
|
282
|
+
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
|
283
|
+
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
|
284
|
+
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
|
285
|
+
| **FORMAT** | LOG | `%(asctime)s.%(msecs)03d (%(name)-10s, %(process)-5d,%(thread)-5d) [%(levelname)-7s] %(message)-120s (%(filename)s:%(lineno)s)` | A trace message console format. |
|
286
|
+
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer. |
|
287
|
+
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log. |
|
288
|
+
| **TRACE_PATH** | LOG | `./logs` | A pointer of trace log that use to store. |
|
289
|
+
| **TRACE_ENABLE_WRITE** | LOG | `false` | A flag that enable writing trace log. |
|
290
|
+
| **AUDIT_PATH** | LOG | `./audits` | A pointer of audit log that use to store. |
|
291
|
+
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable writing audit log after end execution in the workflow release step. |
|
290
292
|
|
291
293
|
## :rocket: Deployment
|
292
294
|
|
@@ -19,12 +19,13 @@ by a `.yaml` template.
|
|
19
19
|
|
20
20
|
---
|
21
21
|
|
22
|
-
**:pushpin: <u>Rules of This Workflow
|
22
|
+
**:pushpin: <u>Rules of This Workflow</u>**:
|
23
23
|
|
24
24
|
1. The Minimum frequency unit of built-in scheduling is **1 Minute** 🕘
|
25
25
|
2. **Can not** re-run only failed stage and its pending downstream ↩️
|
26
26
|
3. All parallel tasks inside workflow core engine use **Multi-Threading** pool
|
27
27
|
(Python 3.13 unlock GIL 🐍🔓)
|
28
|
+
4. Recommend to pass a **Secret Value** with environment variable in YAML template 🔐
|
28
29
|
|
29
30
|
---
|
30
31
|
|
@@ -188,14 +189,17 @@ class RestAuth(BaseModel):
|
|
188
189
|
|
189
190
|
@tag("requests", alias="get-api-with-oauth-to-s3")
|
190
191
|
def get_api_with_oauth_to_s3(
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
192
|
+
method: str,
|
193
|
+
url: str,
|
194
|
+
body: dict[str, str],
|
195
|
+
auth: RestAuth,
|
196
|
+
writing_node: str,
|
197
|
+
aws: AwsCredential,
|
198
|
+
result: Result,
|
198
199
|
) -> dict[str, int]:
|
200
|
+
"""Get the data from RestAPI via Authenticate with OAuth and then store to
|
201
|
+
AWS S3 service.
|
202
|
+
"""
|
199
203
|
result.trace.info("[CALLER]: Start get data via RestAPI to S3.")
|
200
204
|
result.trace.info(f"... {method}: {url}")
|
201
205
|
if method != "post":
|
@@ -227,24 +231,22 @@ it will use default value and do not raise any error to you.
|
|
227
231
|
> The config value that you will set on the environment should combine with
|
228
232
|
> prefix, component, and name which is `WORKFLOW_{component}_{name}` (Upper case).
|
229
233
|
|
230
|
-
| Name | Component | Default | Description
|
231
|
-
|
232
|
-
| **REGISTRY_CALLER** |
|
233
|
-
| **REGISTRY_FILTER** |
|
234
|
-
| **CONF_PATH** |
|
235
|
-
| **TIMEZONE** |
|
236
|
-
| **STAGE_DEFAULT_ID** |
|
237
|
-
| **
|
238
|
-
| **
|
239
|
-
| **
|
240
|
-
| **
|
241
|
-
| **
|
242
|
-
| **
|
243
|
-
| **
|
244
|
-
| **
|
245
|
-
| **
|
246
|
-
| **AUDIT_PATH** | Log | `./audits` | |
|
247
|
-
| **AUDIT_ENABLE_WRITE** | Log | `true` | A flag that enable logging object saving log to its destination. |
|
234
|
+
| Name | Component | Default | Description |
|
235
|
+
|:-----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|
|
236
|
+
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
|
237
|
+
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
|
238
|
+
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
|
239
|
+
| **TIMEZONE** | CORE | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
|
240
|
+
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
|
241
|
+
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
|
242
|
+
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
|
243
|
+
| **FORMAT** | LOG | `%(asctime)s.%(msecs)03d (%(name)-10s, %(process)-5d,%(thread)-5d) [%(levelname)-7s] %(message)-120s (%(filename)s:%(lineno)s)` | A trace message console format. |
|
244
|
+
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer. |
|
245
|
+
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log. |
|
246
|
+
| **TRACE_PATH** | LOG | `./logs` | A pointer of trace log that use to store. |
|
247
|
+
| **TRACE_ENABLE_WRITE** | LOG | `false` | A flag that enable writing trace log. |
|
248
|
+
| **AUDIT_PATH** | LOG | `./audits` | A pointer of audit log that use to store. |
|
249
|
+
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable writing audit log after end execution in the workflow release step. |
|
248
250
|
|
249
251
|
## :rocket: Deployment
|
250
252
|
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__: str = "0.0.70"
|
@@ -5,23 +5,16 @@
|
|
5
5
|
# ------------------------------------------------------------------------------
|
6
6
|
from .__cron import CronJob, CronRunner
|
7
7
|
from .__types import DictData, DictStr, Matrix, Re, TupleStr
|
8
|
-
from .
|
9
|
-
from .errors import *
|
10
|
-
from .event import *
|
11
|
-
from .job import *
|
12
|
-
from .logs import (
|
8
|
+
from .audits import (
|
13
9
|
Audit,
|
14
10
|
AuditModel,
|
15
11
|
FileAudit,
|
16
|
-
FileTrace,
|
17
|
-
Trace,
|
18
|
-
TraceData,
|
19
|
-
TraceMeta,
|
20
|
-
TraceModel,
|
21
12
|
get_audit,
|
22
|
-
get_dt_tznow,
|
23
|
-
get_trace,
|
24
13
|
)
|
14
|
+
from .conf import *
|
15
|
+
from .errors import *
|
16
|
+
from .event import *
|
17
|
+
from .job import *
|
25
18
|
from .params import *
|
26
19
|
from .result import (
|
27
20
|
CANCEL,
|
@@ -34,5 +27,14 @@ from .result import (
|
|
34
27
|
)
|
35
28
|
from .reusables import *
|
36
29
|
from .stages import *
|
30
|
+
from .traces import (
|
31
|
+
ConsoleTrace,
|
32
|
+
FileTrace,
|
33
|
+
Trace,
|
34
|
+
TraceData,
|
35
|
+
TraceMeta,
|
36
|
+
TraceModel,
|
37
|
+
get_trace,
|
38
|
+
)
|
37
39
|
from .utils import *
|
38
40
|
from .workflow import *
|
@@ -1,15 +1,16 @@
|
|
1
1
|
from typing import Any
|
2
2
|
|
3
|
+
from uvicorn.config import LOGGING_CONFIG as LOGGING_CONFIG_UVICORN
|
4
|
+
|
3
5
|
from ..conf import config
|
4
6
|
|
5
7
|
LOGGING_CONFIG: dict[str, Any] = { # pragma: no cov
|
6
8
|
"version": 1,
|
7
9
|
"disable_existing_loggers": False,
|
8
10
|
"formatters": {
|
9
|
-
"
|
10
|
-
|
11
|
-
|
12
|
-
"custom_formatter": {
|
11
|
+
"default": LOGGING_CONFIG_UVICORN["formatters"]["default"],
|
12
|
+
"access": LOGGING_CONFIG_UVICORN["formatters"]["access"],
|
13
|
+
"custom": {
|
13
14
|
"format": config.log_format,
|
14
15
|
"datefmt": config.log_datetime_format,
|
15
16
|
},
|
@@ -18,14 +19,10 @@ LOGGING_CONFIG: dict[str, Any] = { # pragma: no cov
|
|
18
19
|
"level": "DEBUG" if config.debug else "INFO",
|
19
20
|
},
|
20
21
|
"handlers": {
|
21
|
-
"default":
|
22
|
-
|
23
|
-
|
24
|
-
"
|
25
|
-
},
|
26
|
-
"stream_handler": {
|
27
|
-
# "formatter": "standard",
|
28
|
-
"formatter": "custom_formatter",
|
22
|
+
"default": LOGGING_CONFIG_UVICORN["handlers"]["default"],
|
23
|
+
"access": LOGGING_CONFIG_UVICORN["handlers"]["access"],
|
24
|
+
"stream_custom": {
|
25
|
+
"formatter": "custom",
|
29
26
|
"class": "logging.StreamHandler",
|
30
27
|
"stream": "ext://sys.stdout",
|
31
28
|
},
|
@@ -39,34 +36,24 @@ LOGGING_CONFIG: dict[str, Any] = { # pragma: no cov
|
|
39
36
|
},
|
40
37
|
"loggers": {
|
41
38
|
"uvicorn": {
|
42
|
-
# "handlers": ["default", "file_handler"],
|
43
39
|
"handlers": ["default"],
|
44
40
|
"level": "DEBUG" if config.debug else "INFO",
|
45
41
|
"propagate": False,
|
46
42
|
},
|
47
43
|
"uvicorn.access": {
|
48
|
-
|
49
|
-
"handlers": ["stream_handler"],
|
44
|
+
"handlers": ["access"],
|
50
45
|
"level": "DEBUG" if config.debug else "INFO",
|
51
46
|
"propagate": False,
|
52
47
|
},
|
53
48
|
"uvicorn.error": {
|
54
|
-
|
55
|
-
"handlers": ["stream_handler"],
|
49
|
+
"handlers": ["default"],
|
56
50
|
"level": "DEBUG" if config.debug else "INFO",
|
57
|
-
"propagate": False,
|
58
51
|
},
|
59
|
-
"
|
60
|
-
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"propagate":
|
52
|
+
"ddeutil.workflow": {
|
53
|
+
"handlers": ["stream_custom"],
|
54
|
+
"level": "INFO",
|
55
|
+
# "propagate": False,
|
56
|
+
"propagate": True,
|
64
57
|
},
|
65
|
-
# "ddeutil.workflow": {
|
66
|
-
# "handlers": ["stream_handler"],
|
67
|
-
# "level": "INFO",
|
68
|
-
# # "propagate": False,
|
69
|
-
# "propagate": True,
|
70
|
-
# },
|
71
58
|
},
|
72
59
|
}
|
{ddeutil_workflow-0.0.68 → ddeutil_workflow-0.0.70}/src/ddeutil/workflow/api/routes/workflows.py
RENAMED
@@ -16,8 +16,8 @@ from fastapi.responses import UJSONResponse
|
|
16
16
|
from pydantic import BaseModel
|
17
17
|
|
18
18
|
from ...__types import DictData
|
19
|
-
from ...
|
20
|
-
from ...
|
19
|
+
from ...audits import AuditModel, get_audit
|
20
|
+
from ...conf import YamlParser
|
21
21
|
from ...result import Result
|
22
22
|
from ...workflow import Workflow
|
23
23
|
|
@@ -32,7 +32,7 @@ router = APIRouter(
|
|
32
32
|
@router.get(path="/", status_code=st.HTTP_200_OK)
|
33
33
|
async def get_workflows() -> DictData:
|
34
34
|
"""Return all workflow workflows that exists in config path."""
|
35
|
-
workflows: DictData = dict(
|
35
|
+
workflows: DictData = dict(YamlParser.finds(Workflow))
|
36
36
|
return {
|
37
37
|
"message": f"Getting all workflows: {len(workflows)}",
|
38
38
|
"count": len(workflows),
|