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.
Files changed (67) hide show
  1. {ddeutil_workflow-0.0.79/src/ddeutil_workflow.egg-info → ddeutil_workflow-0.0.81}/PKG-INFO +16 -29
  2. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/README.md +15 -28
  3. ddeutil_workflow-0.0.81/src/ddeutil/workflow/__about__.py +1 -0
  4. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/__init__.py +1 -1
  5. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/routes/logs.py +5 -5
  6. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/routes/workflows.py +3 -3
  7. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/audits.py +93 -164
  8. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/cli.py +39 -29
  9. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/conf.py +24 -22
  10. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/errors.py +3 -2
  11. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/job.py +0 -1
  12. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/reusables.py +16 -17
  13. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/traces.py +50 -32
  14. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/utils.py +0 -11
  15. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/workflow.py +31 -30
  16. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81/src/ddeutil_workflow.egg-info}/PKG-INFO +16 -29
  17. ddeutil_workflow-0.0.81/tests/test_audits.py +178 -0
  18. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_conf.py +58 -26
  19. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_params.py +3 -0
  20. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_traces.py +104 -1
  21. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_workflow.py +41 -22
  22. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_workflow_release.py +25 -1
  23. ddeutil_workflow-0.0.79/src/ddeutil/workflow/__about__.py +0 -1
  24. ddeutil_workflow-0.0.79/tests/test_audits.py +0 -205
  25. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/LICENSE +0 -0
  26. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/pyproject.toml +0 -0
  27. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/setup.cfg +0 -0
  28. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/__cron.py +0 -0
  29. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/__main__.py +0 -0
  30. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/__types.py +0 -0
  31. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/__init__.py +0 -0
  32. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/log_conf.py +0 -0
  33. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/routes/__init__.py +0 -0
  34. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/api/routes/job.py +0 -0
  35. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/event.py +0 -0
  36. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/params.py +0 -0
  37. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/__init__.py +0 -0
  38. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/__init__.py +0 -0
  39. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/aws.py +0 -0
  40. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/az.py +0 -0
  41. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/container.py +0 -0
  42. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/plugins/providers/gcs.py +0 -0
  43. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/result.py +0 -0
  44. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil/workflow/stages.py +0 -0
  45. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/SOURCES.txt +0 -0
  46. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/dependency_links.txt +0 -0
  47. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/entry_points.txt +0 -0
  48. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/requires.txt +0 -0
  49. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/src/ddeutil_workflow.egg-info/top_level.txt +0 -0
  50. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test__cron.py +0 -0
  51. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test__regex.py +0 -0
  52. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_cli.py +0 -0
  53. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_errors.py +0 -0
  54. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_event.py +0 -0
  55. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_job.py +0 -0
  56. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_job_exec.py +0 -0
  57. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_job_exec_strategy.py +0 -0
  58. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_result.py +0 -0
  59. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_reusables_call_tag.py +0 -0
  60. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_reusables_func_model.py +0 -0
  61. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_reusables_template.py +0 -0
  62. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_reusables_template_filter.py +0 -0
  63. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_strategy.py +0 -0
  64. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_utils.py +0 -0
  65. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_workflow_exec.py +0 -0
  66. {ddeutil_workflow-0.0.79 → ddeutil_workflow-0.0.81}/tests/test_workflow_exec_job.py +0 -0
  67. {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.79
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 | Component | Default | Description |
320
- |:-----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
321
- | **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
322
- | **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
323
- | **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
324
- | **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
325
- | **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
326
- | **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
327
- | **TIMEZONE** | LOG | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
328
- | **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. |
329
- | **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer. |
330
- | **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log. |
331
- | **TRACE_HANDLERS** | LOG | `[{"type": "console"}]` | A pointer URL of trace log that use to emit log message. Now uses optimized handler by default. |
332
- | **AUDIT_URL** | LOG | `file:./audits` | A pointer URL of audit log that use to write audit metrix. |
333
- | **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. |
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 | Component | Default | Description |
270
- |:-----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
271
- | **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
272
- | **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
273
- | **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
274
- | **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
275
- | **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
276
- | **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
277
- | **TIMEZONE** | LOG | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
278
- | **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. |
279
- | **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer. |
280
- | **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log. |
281
- | **TRACE_HANDLERS** | LOG | `[{"type": "console"}]` | A pointer URL of trace log that use to emit log message. Now uses optimized handler by default. |
282
- | **AUDIT_URL** | LOG | `file:./audits` | A pointer URL of audit log that use to write audit metrix. |
283
- | **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. |
284
271
 
285
272
  ## :rocket: Deployment
286
273
 
@@ -0,0 +1 @@
1
+ __version__: str = "0.0.81"
@@ -52,7 +52,7 @@ from .__types import DictData, DictStr, Matrix, Re, TupleStr
52
52
  from .audits import (
53
53
  Audit,
54
54
  FileAudit,
55
- get_audit_model,
55
+ get_audit,
56
56
  )
57
57
  from .conf import *
58
58
  from .errors import (
@@ -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 get_audit_model
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(get_audit_model().find_audits(name="demo")),
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(get_audit_model().find_audits(name="demo")),
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(get_audit_model().find_audits(name="demo")),
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(get_audit_model().find_audits(name="demo")),
170
+ "audits": list(get_audit().find_audits(name="demo")),
171
171
  }
@@ -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, get_audit_model
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 get_audit_model().find_audits(name=name)
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 = get_audit_model().find_audit_with_release(
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
  )