ddeutil-workflow 0.0.79__tar.gz → 0.0.81__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.79/src/ddeutil_workflow.egg-info → ddeutil_workflow-0.0.81}/PKG-INFO +16 -29
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/README.md +15 -28
- ddeutil_workflow-0.0.81/src/ddeutil/workflow/__about__.py +1 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/__init__.py +1 -1
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/routes/logs.py +5 -5
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/routes/workflows.py +3 -3
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/audits.py +93 -164
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/cli.py +39 -29
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/conf.py +24 -22
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/errors.py +3 -2
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/job.py +0 -1
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/reusables.py +16 -17
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/traces.py +50 -32
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/utils.py +0 -11
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/workflow.py +31 -30
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81/src/ddeutil_workflow.egg-info}/PKG-INFO +16 -29
- ddeutil_workflow-0.0.81/tests/test_audits.py +178 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_conf.py +58 -26
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_params.py +3 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_traces.py +104 -1
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_workflow.py +41 -22
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_workflow_release.py +25 -1
- ddeutil_workflow-0.0.79/src/ddeutil/workflow/__about__.py +0 -1
- ddeutil_workflow-0.0.79/tests/test_audits.py +0 -205
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/LICENSE +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/pyproject.toml +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/setup.cfg +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/__cron.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/__main__.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/__types.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/__init__.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/log_conf.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/routes/__init__.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/routes/job.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/event.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/params.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/__init__.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/__init__.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/aws.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/az.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/container.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/gcs.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/result.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/stages.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/SOURCES.txt +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/dependency_links.txt +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/entry_points.txt +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/requires.txt +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/top_level.txt +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test__cron.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test__regex.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_cli.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_errors.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_event.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_job.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_job_exec.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_job_exec_strategy.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_result.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_reusables_call_tag.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_reusables_func_model.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_reusables_template.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_reusables_template_filter.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_strategy.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_utils.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_workflow_exec.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_workflow_exec_job.py +0 -0
- {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/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.81
|
4
4
|
Summary: Lightweight workflow orchestration with YAML template
|
5
5
|
Author-email: ddeutils <korawich.anu@gmail.com>
|
6
6
|
License: MIT
|
@@ -168,19 +168,6 @@ For comprehensive API documentation, examples, and best practices:
|
|
168
168
|
- **[Full Documentation](https://ddeutils.github.io/ddeutil-workflow/)** - Complete user guide and API reference
|
169
169
|
- **[Getting Started](https://ddeutils.github.io/ddeutil-workflow/getting-started/)** - Quick start guide
|
170
170
|
- **[API Reference](https://ddeutils.github.io/ddeutil-workflow/api/workflow/)** - Detailed API documentation
|
171
|
-
- **[Optimized Tracing](docs/optimized-tracing.md)** - High-performance logging system (2-5x faster)
|
172
|
-
|
173
|
-
## ⚡ Performance Improvements
|
174
|
-
|
175
|
-
The workflow system now includes an optimized tracing system that provides significant performance improvements:
|
176
|
-
|
177
|
-
- **🚀 2-5x faster logging** with buffered I/O operations
|
178
|
-
- **💾 60-80% reduction** in disk I/O operations
|
179
|
-
- **🛡️ Built-in thread safety** with minimal overhead
|
180
|
-
- **🔄 Backward compatible** - existing code automatically benefits
|
181
|
-
- **📊 Lower memory footprint** for high-volume logging
|
182
|
-
|
183
|
-
See [Optimized Tracing Documentation](docs/optimized-tracing.md) for details and performance benchmarks.
|
184
171
|
|
185
172
|
## 🎯 Usage
|
186
173
|
|
@@ -316,21 +303,21 @@ it will use default value and do not raise any error to you.
|
|
316
303
|
> The config value that you will set on the environment should combine with
|
317
304
|
> prefix, component, and name which is `WORKFLOW_{component}_{name}` (Upper case).
|
318
305
|
|
319
|
-
| Name
|
320
|
-
|
321
|
-
| **REGISTRY_CALLER**
|
322
|
-
| **REGISTRY_FILTER**
|
323
|
-
| **CONF_PATH**
|
324
|
-
| **STAGE_DEFAULT_ID**
|
325
|
-
| **GENERATE_ID_SIMPLE_MODE**
|
326
|
-
| **DEBUG_MODE**
|
327
|
-
| **TIMEZONE**
|
328
|
-
| **FORMAT**
|
329
|
-
| **FORMAT_FILE**
|
330
|
-
| **DATETIME_FORMAT**
|
331
|
-
| **TRACE_HANDLERS**
|
332
|
-
| **
|
333
|
-
| **AUDIT_ENABLE_WRITE**
|
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. |
|
334
321
|
|
335
322
|
## :rocket: Deployment
|
336
323
|
|
@@ -118,19 +118,6 @@ For comprehensive API documentation, examples, and best practices:
|
|
118
118
|
- **[Full Documentation](https://ddeutils.github.io/ddeutil-workflow/)** - Complete user guide and API reference
|
119
119
|
- **[Getting Started](https://ddeutils.github.io/ddeutil-workflow/getting-started/)** - Quick start guide
|
120
120
|
- **[API Reference](https://ddeutils.github.io/ddeutil-workflow/api/workflow/)** - Detailed API documentation
|
121
|
-
- **[Optimized Tracing](docs/optimized-tracing.md)** - High-performance logging system (2-5x faster)
|
122
|
-
|
123
|
-
## ⚡ Performance Improvements
|
124
|
-
|
125
|
-
The workflow system now includes an optimized tracing system that provides significant performance improvements:
|
126
|
-
|
127
|
-
- **🚀 2-5x faster logging** with buffered I/O operations
|
128
|
-
- **💾 60-80% reduction** in disk I/O operations
|
129
|
-
- **🛡️ Built-in thread safety** with minimal overhead
|
130
|
-
- **🔄 Backward compatible** - existing code automatically benefits
|
131
|
-
- **📊 Lower memory footprint** for high-volume logging
|
132
|
-
|
133
|
-
See [Optimized Tracing Documentation](docs/optimized-tracing.md) for details and performance benchmarks.
|
134
121
|
|
135
122
|
## 🎯 Usage
|
136
123
|
|
@@ -266,21 +253,21 @@ it will use default value and do not raise any error to you.
|
|
266
253
|
> The config value that you will set on the environment should combine with
|
267
254
|
> prefix, component, and name which is `WORKFLOW_{component}_{name}` (Upper case).
|
268
255
|
|
269
|
-
| Name
|
270
|
-
|
271
|
-
| **REGISTRY_CALLER**
|
272
|
-
| **REGISTRY_FILTER**
|
273
|
-
| **CONF_PATH**
|
274
|
-
| **STAGE_DEFAULT_ID**
|
275
|
-
| **GENERATE_ID_SIMPLE_MODE**
|
276
|
-
| **DEBUG_MODE**
|
277
|
-
| **TIMEZONE**
|
278
|
-
| **FORMAT**
|
279
|
-
| **FORMAT_FILE**
|
280
|
-
| **DATETIME_FORMAT**
|
281
|
-
| **TRACE_HANDLERS**
|
282
|
-
| **
|
283
|
-
| **AUDIT_ENABLE_WRITE**
|
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. |
|
284
271
|
|
285
272
|
## :rocket: Deployment
|
286
273
|
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__: str = "0.0.81"
|
@@ -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.79 → ddeutil_workflow-0.0.81}/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
|
)
|