ddeutil-workflow 0.0.78__tar.gz → 0.0.80__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.78 → ddeutil_workflow-0.0.80}/PKG-INFO +39 -19
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/README.md +28 -16
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/pyproject.toml +15 -2
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/__about__.py +1 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/__init__.py +2 -6
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/api/routes/job.py +2 -2
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/api/routes/logs.py +5 -5
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/api/routes/workflows.py +3 -3
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/audits.py +765 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/cli.py +19 -1
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/conf.py +10 -20
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/event.py +15 -6
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/job.py +147 -74
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/params.py +172 -58
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/plugins/__init__.py +0 -0
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/plugins/providers/__init__.py +0 -0
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/plugins/providers/aws.py +908 -0
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/plugins/providers/az.py +1003 -0
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/plugins/providers/container.py +703 -0
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/plugins/providers/gcs.py +826 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/result.py +6 -4
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/reusables.py +151 -95
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/stages.py +28 -28
- ddeutil_workflow-0.0.80/src/ddeutil/workflow/traces.py +2032 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/utils.py +109 -67
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/workflow.py +42 -30
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil_workflow.egg-info/PKG-INFO +39 -19
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil_workflow.egg-info/SOURCES.txt +6 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil_workflow.egg-info/requires.txt +13 -2
- ddeutil_workflow-0.0.80/tests/test_audits.py +175 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_conf.py +22 -14
- ddeutil_workflow-0.0.80/tests/test_job.py +334 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_job_exec.py +80 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_params.py +3 -0
- ddeutil_workflow-0.0.80/tests/test_traces.py +321 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_workflow.py +41 -22
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_workflow_exec.py +51 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_workflow_release.py +25 -1
- ddeutil_workflow-0.0.78/src/ddeutil/workflow/__about__.py +0 -1
- ddeutil_workflow-0.0.78/src/ddeutil/workflow/audits.py +0 -394
- ddeutil_workflow-0.0.78/src/ddeutil/workflow/traces.py +0 -876
- ddeutil_workflow-0.0.78/tests/test_audits.py +0 -106
- ddeutil_workflow-0.0.78/tests/test_job.py +0 -131
- ddeutil_workflow-0.0.78/tests/test_traces.py +0 -122
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/LICENSE +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/setup.cfg +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/__cron.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/__main__.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/__types.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/api/__init__.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/api/log_conf.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/api/routes/__init__.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/errors.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil_workflow.egg-info/dependency_links.txt +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil_workflow.egg-info/entry_points.txt +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil_workflow.egg-info/top_level.txt +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test__cron.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test__regex.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_cli.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_errors.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_event.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_job_exec_strategy.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_result.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_reusables_call_tag.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_reusables_func_model.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_reusables_template.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_reusables_template_filter.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_strategy.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_utils.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_workflow_exec_job.py +0 -0
- {ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/tests/test_workflow_rerun.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.80
|
4
4
|
Summary: Lightweight workflow orchestration with YAML template
|
5
5
|
Author-email: ddeutils <korawich.anu@gmail.com>
|
6
6
|
License: MIT
|
@@ -24,7 +24,7 @@ Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
25
25
|
Requires-Dist: ddeutil[checksum]>=0.4.8
|
26
26
|
Requires-Dist: ddeutil-io[toml,yaml]>=0.2.14
|
27
|
-
Requires-Dist: pydantic<3.0.0,==2.11.
|
27
|
+
Requires-Dist: pydantic<3.0.0,==2.11.7
|
28
28
|
Requires-Dist: pydantic-extra-types<3.0.0,>=2.10.4
|
29
29
|
Requires-Dist: python-dotenv>=1.1.0
|
30
30
|
Requires-Dist: typer>=0.16.0
|
@@ -35,9 +35,17 @@ Requires-Dist: httpx; extra == "all"
|
|
35
35
|
Requires-Dist: ujson; extra == "all"
|
36
36
|
Requires-Dist: aiofiles; extra == "all"
|
37
37
|
Requires-Dist: aiohttp; extra == "all"
|
38
|
-
Requires-Dist: requests==2.32.
|
38
|
+
Requires-Dist: requests==2.32.4; extra == "all"
|
39
39
|
Provides-Extra: docker
|
40
40
|
Requires-Dist: docker==7.1.0; extra == "docker"
|
41
|
+
Provides-Extra: azure
|
42
|
+
Requires-Dist: azure-batch>=13.0.0; extra == "azure"
|
43
|
+
Requires-Dist: azure-storage-blob>=12.0.0; extra == "azure"
|
44
|
+
Provides-Extra: aws
|
45
|
+
Requires-Dist: boto3>=1.39.0; extra == "aws"
|
46
|
+
Provides-Extra: gcp
|
47
|
+
Requires-Dist: google-cloud-batch>=0.17.0; extra == "gcp"
|
48
|
+
Requires-Dist: google-cloud-storage>=2.10.0; extra == "gcp"
|
41
49
|
Dynamic: license-file
|
42
50
|
|
43
51
|
# Workflow Orchestration
|
@@ -140,6 +148,19 @@ If you want to install this package with application add-ons, you should add
|
|
140
148
|
| Python | `ddeutil-workflow` | ✅ |
|
141
149
|
| FastAPI Server | `ddeutil-workflow[all]` | ✅ |
|
142
150
|
|
151
|
+
Check the version of the current workflow package:
|
152
|
+
|
153
|
+
```shell
|
154
|
+
$ pip install ddeutil-workflow
|
155
|
+
$ workflow-cli version
|
156
|
+
```
|
157
|
+
|
158
|
+
Initial workflow project:
|
159
|
+
|
160
|
+
```shell
|
161
|
+
$ workflow-cli init
|
162
|
+
```
|
163
|
+
|
143
164
|
## 📖 Documentation
|
144
165
|
|
145
166
|
For comprehensive API documentation, examples, and best practices:
|
@@ -282,22 +303,21 @@ it will use default value and do not raise any error to you.
|
|
282
303
|
> The config value that you will set on the environment should combine with
|
283
304
|
> prefix, component, and name which is `WORKFLOW_{component}_{name}` (Upper case).
|
284
305
|
|
285
|
-
| Name | Component | Default | Description
|
286
|
-
|
287
|
-
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage.
|
288
|
-
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template.
|
289
|
-
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files.
|
290
|
-
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output.
|
291
|
-
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm.
|
292
|
-
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode.
|
293
|
-
| **TIMEZONE** | LOG | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object.
|
294
|
-
| **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.
|
295
|
-
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer.
|
296
|
-
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log.
|
297
|
-
| **
|
298
|
-
| **
|
299
|
-
| **
|
300
|
-
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable writing audit log after end execution in the workflow release step. |
|
306
|
+
| Name | Component | Default | Description |
|
307
|
+
|:----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
|
308
|
+
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
|
309
|
+
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
|
310
|
+
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
|
311
|
+
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
|
312
|
+
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
|
313
|
+
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
|
314
|
+
| **TIMEZONE** | LOG | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
|
315
|
+
| **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. |
|
316
|
+
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer. |
|
317
|
+
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log. |
|
318
|
+
| **TRACE_HANDLERS** | LOG | `[{"type": "console"}]` | A pointer URL of trace log that use to emit log message. Now uses optimized handler by default. |
|
319
|
+
| **AUDIT_CONF** | LOG | `{"type": "file", "path": "./audits"}` | A pointer URL of audit log that use to write audit metrix. |
|
320
|
+
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable writing audit log after end execution in the workflow release step. |
|
301
321
|
|
302
322
|
## :rocket: Deployment
|
303
323
|
|
@@ -98,6 +98,19 @@ If you want to install this package with application add-ons, you should add
|
|
98
98
|
| Python | `ddeutil-workflow` | ✅ |
|
99
99
|
| FastAPI Server | `ddeutil-workflow[all]` | ✅ |
|
100
100
|
|
101
|
+
Check the version of the current workflow package:
|
102
|
+
|
103
|
+
```shell
|
104
|
+
$ pip install ddeutil-workflow
|
105
|
+
$ workflow-cli version
|
106
|
+
```
|
107
|
+
|
108
|
+
Initial workflow project:
|
109
|
+
|
110
|
+
```shell
|
111
|
+
$ workflow-cli init
|
112
|
+
```
|
113
|
+
|
101
114
|
## 📖 Documentation
|
102
115
|
|
103
116
|
For comprehensive API documentation, examples, and best practices:
|
@@ -240,22 +253,21 @@ it will use default value and do not raise any error to you.
|
|
240
253
|
> The config value that you will set on the environment should combine with
|
241
254
|
> prefix, component, and name which is `WORKFLOW_{component}_{name}` (Upper case).
|
242
255
|
|
243
|
-
| Name | Component | Default | Description
|
244
|
-
|
245
|
-
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage.
|
246
|
-
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template.
|
247
|
-
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files.
|
248
|
-
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output.
|
249
|
-
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm.
|
250
|
-
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode.
|
251
|
-
| **TIMEZONE** | LOG | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object.
|
252
|
-
| **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.
|
253
|
-
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer.
|
254
|
-
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log.
|
255
|
-
| **
|
256
|
-
| **
|
257
|
-
| **
|
258
|
-
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable writing audit log after end execution in the workflow release step. |
|
256
|
+
| Name | Component | Default | Description |
|
257
|
+
|:----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
|
258
|
+
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
|
259
|
+
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
|
260
|
+
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
|
261
|
+
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
|
262
|
+
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
|
263
|
+
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
|
264
|
+
| **TIMEZONE** | LOG | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
|
265
|
+
| **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. |
|
266
|
+
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer. |
|
267
|
+
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log. |
|
268
|
+
| **TRACE_HANDLERS** | LOG | `[{"type": "console"}]` | A pointer URL of trace log that use to emit log message. Now uses optimized handler by default. |
|
269
|
+
| **AUDIT_CONF** | LOG | `{"type": "file", "path": "./audits"}` | A pointer URL of audit log that use to write audit metrix. |
|
270
|
+
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable writing audit log after end execution in the workflow release step. |
|
259
271
|
|
260
272
|
## :rocket: Deployment
|
261
273
|
|
@@ -27,7 +27,7 @@ requires-python = ">=3.9.13"
|
|
27
27
|
dependencies = [
|
28
28
|
"ddeutil[checksum]>=0.4.8",
|
29
29
|
"ddeutil-io[yaml,toml]>=0.2.14",
|
30
|
-
"pydantic==2.11.
|
30
|
+
"pydantic==2.11.7,<3.0.0",
|
31
31
|
"pydantic-extra-types>=2.10.4,<3.0.0",
|
32
32
|
"python-dotenv>=1.1.0",
|
33
33
|
"typer>=0.16.0",
|
@@ -42,11 +42,22 @@ all = [
|
|
42
42
|
"ujson",
|
43
43
|
"aiofiles",
|
44
44
|
"aiohttp",
|
45
|
-
"requests==2.32.
|
45
|
+
"requests==2.32.4",
|
46
46
|
]
|
47
47
|
docker = [
|
48
48
|
"docker==7.1.0",
|
49
49
|
]
|
50
|
+
azure = [
|
51
|
+
"azure-batch>=13.0.0",
|
52
|
+
"azure-storage-blob>=12.0.0",
|
53
|
+
]
|
54
|
+
aws = [
|
55
|
+
"boto3>=1.39.0",
|
56
|
+
]
|
57
|
+
gcp = [
|
58
|
+
"google-cloud-batch>=0.17.0",
|
59
|
+
"google-cloud-storage>=2.10.0",
|
60
|
+
]
|
50
61
|
|
51
62
|
[project.urls]
|
52
63
|
Homepage = "https://github.com/ddeutils/ddeutil-workflow/"
|
@@ -87,6 +98,7 @@ omit = [
|
|
87
98
|
"src/ddeutil/workflow/api/routes/job.py",
|
88
99
|
"src/ddeutil/workflow/api/routes/logs.py",
|
89
100
|
"src/ddeutil/workflow/api/routes/workflows.py",
|
101
|
+
"src/ddeutil/workflow/plugins/providers/*",
|
90
102
|
]
|
91
103
|
|
92
104
|
[tool.coverage.report]
|
@@ -107,6 +119,7 @@ console_output_style = "count"
|
|
107
119
|
addopts = [
|
108
120
|
"--strict-config",
|
109
121
|
"--strict-markers",
|
122
|
+
"--ignore=tests/providers",
|
110
123
|
# "-p no:launch",
|
111
124
|
# "-p no:launch_ros",
|
112
125
|
]
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__: str = "0.0.80"
|
@@ -52,7 +52,7 @@ from .__types import DictData, DictStr, Matrix, Re, TupleStr
|
|
52
52
|
from .audits import (
|
53
53
|
Audit,
|
54
54
|
FileAudit,
|
55
|
-
|
55
|
+
get_audit,
|
56
56
|
)
|
57
57
|
from .conf import *
|
58
58
|
from .errors import (
|
@@ -132,11 +132,7 @@ from .stages import (
|
|
132
132
|
VirtualPyStage,
|
133
133
|
)
|
134
134
|
from .traces import (
|
135
|
-
|
136
|
-
FileTrace,
|
137
|
-
Trace,
|
138
|
-
TraceData,
|
139
|
-
TraceMeta,
|
135
|
+
TraceManager,
|
140
136
|
get_trace,
|
141
137
|
)
|
142
138
|
from .utils import *
|
@@ -15,7 +15,7 @@ from fastapi.responses import UJSONResponse
|
|
15
15
|
from ...__types import DictData
|
16
16
|
from ...errors import JobError
|
17
17
|
from ...job import Job
|
18
|
-
from ...traces import
|
18
|
+
from ...traces import TraceManager, get_trace
|
19
19
|
from ...utils import gen_id
|
20
20
|
|
21
21
|
logger = logging.getLogger("uvicorn.error")
|
@@ -41,7 +41,7 @@ async def job_execute(
|
|
41
41
|
if extras:
|
42
42
|
job.extras = extras
|
43
43
|
|
44
|
-
trace:
|
44
|
+
trace: TraceManager = get_trace(
|
45
45
|
run_id, parent_run_id=parent_run_id, extras=job.extras
|
46
46
|
)
|
47
47
|
|
@@ -10,7 +10,7 @@ from fastapi import APIRouter, Path, Query
|
|
10
10
|
from fastapi import status as st
|
11
11
|
from fastapi.responses import UJSONResponse
|
12
12
|
|
13
|
-
from ...audits import
|
13
|
+
from ...audits import get_audit
|
14
14
|
from ...result import Result
|
15
15
|
|
16
16
|
router = APIRouter(
|
@@ -90,7 +90,7 @@ async def get_audits():
|
|
90
90
|
"""
|
91
91
|
return {
|
92
92
|
"message": "Getting audit logs",
|
93
|
-
"audits": list(
|
93
|
+
"audits": list(get_audit().find_audits(name="demo")),
|
94
94
|
}
|
95
95
|
|
96
96
|
|
@@ -109,7 +109,7 @@ async def get_audit_with_workflow(workflow: str):
|
|
109
109
|
"""
|
110
110
|
return {
|
111
111
|
"message": f"Getting audit logs with workflow name {workflow}",
|
112
|
-
"audits": list(
|
112
|
+
"audits": list(get_audit().find_audits(name="demo")),
|
113
113
|
}
|
114
114
|
|
115
115
|
|
@@ -136,7 +136,7 @@ async def get_audit_with_workflow_release(
|
|
136
136
|
f"Getting audit logs with workflow name {workflow} and release "
|
137
137
|
f"{release}"
|
138
138
|
),
|
139
|
-
"audits": list(
|
139
|
+
"audits": list(get_audit().find_audits(name="demo")),
|
140
140
|
}
|
141
141
|
|
142
142
|
|
@@ -167,5 +167,5 @@ async def get_audit_with_workflow_release_run_id(
|
|
167
167
|
f"Getting audit logs with workflow name {workflow}, release "
|
168
168
|
f"{release}, and running ID {run_id}"
|
169
169
|
),
|
170
|
-
"audits": list(
|
170
|
+
"audits": list(get_audit().find_audits(name="demo")),
|
171
171
|
}
|
{ddeutil_workflow-0.0.78 → ddeutil_workflow-0.0.80}/src/ddeutil/workflow/api/routes/workflows.py
RENAMED
@@ -16,7 +16,7 @@ from fastapi.responses import UJSONResponse
|
|
16
16
|
from pydantic import BaseModel
|
17
17
|
|
18
18
|
from ...__types import DictData
|
19
|
-
from ...audits import Audit,
|
19
|
+
from ...audits import Audit, get_audit
|
20
20
|
from ...conf import YamlParser
|
21
21
|
from ...result import Result
|
22
22
|
from ...workflow import Workflow
|
@@ -100,7 +100,7 @@ async def get_workflow_audits(name: str):
|
|
100
100
|
exclude_none=False,
|
101
101
|
exclude_unset=True,
|
102
102
|
)
|
103
|
-
for audit in
|
103
|
+
for audit in get_audit().find_audits(name=name)
|
104
104
|
],
|
105
105
|
}
|
106
106
|
except FileNotFoundError:
|
@@ -114,7 +114,7 @@ async def get_workflow_audits(name: str):
|
|
114
114
|
async def get_workflow_release_audit(name: str, release: str):
|
115
115
|
"""Get Workflow audit log with an input release value."""
|
116
116
|
try:
|
117
|
-
audit: Audit =
|
117
|
+
audit: Audit = get_audit().find_audit_with_release(
|
118
118
|
name=name,
|
119
119
|
release=datetime.strptime(release, "%Y%m%d%H%M%S"),
|
120
120
|
)
|