ddeutil-workflow 0.0.16__tar.gz → 0.0.17__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.16 → ddeutil_workflow-0.0.17}/PKG-INFO +26 -23
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/README.md +24 -21
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/pyproject.toml +3 -2
- ddeutil_workflow-0.0.17/src/ddeutil/workflow/__about__.py +1 -0
- ddeutil_workflow-0.0.16/src/ddeutil/workflow/cron.py → ddeutil_workflow-0.0.17/src/ddeutil/workflow/__cron.py +12 -6
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/__init__.py +1 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/api.py +1 -2
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/cli.py +1 -2
- ddeutil_workflow-0.0.17/src/ddeutil/workflow/conf.py +483 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/job.py +79 -39
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/on.py +10 -7
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/repeat.py +1 -2
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/route.py +1 -2
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/scheduler.py +8 -9
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/stage.py +50 -19
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/utils.py +21 -21
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil_workflow.egg-info/PKG-INFO +26 -23
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil_workflow.egg-info/SOURCES.txt +7 -5
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil_workflow.egg-info/requires.txt +1 -1
- ddeutil_workflow-0.0.16/tests/test_cron.py → ddeutil_workflow-0.0.17/tests/test__cron.py +35 -9
- ddeutil_workflow-0.0.17/tests/test_conf.py +100 -0
- ddeutil_workflow-0.0.17/tests/test_conf_log.py +74 -0
- ddeutil_workflow-0.0.17/tests/test_job.py +70 -0
- ddeutil_workflow-0.0.17/tests/test_job_py.py +141 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_job_strategy.py +18 -9
- ddeutil_workflow-0.0.17/tests/test_job_strategy_run.py +75 -0
- ddeutil_workflow-0.0.17/tests/test_on.py +190 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_stage.py +6 -10
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_stage_hook.py +5 -15
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_stage_py.py +28 -3
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_utils.py +7 -13
- ddeutil_workflow-0.0.17/tests/test_utils_filter.py +80 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_utils_params.py +0 -3
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_utils_result.py +8 -0
- ddeutil_workflow-0.0.17/tests/test_workflow.py +156 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_workflow_matrix.py +1 -4
- ddeutil_workflow-0.0.17/tests/test_workflow_params.py +23 -0
- ddeutil_workflow-0.0.16/tests/test_poke.py → ddeutil_workflow-0.0.17/tests/test_workflow_poke.py +6 -1
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_workflow_task.py +1 -4
- ddeutil_workflow-0.0.16/src/ddeutil/workflow/__about__.py +0 -1
- ddeutil_workflow-0.0.16/src/ddeutil/workflow/conf.py +0 -318
- ddeutil_workflow-0.0.16/src/ddeutil/workflow/log.py +0 -195
- ddeutil_workflow-0.0.16/tests/test_job.py +0 -18
- ddeutil_workflow-0.0.16/tests/test_job_py.py +0 -47
- ddeutil_workflow-0.0.16/tests/test_log.py +0 -24
- ddeutil_workflow-0.0.16/tests/test_on.py +0 -67
- ddeutil_workflow-0.0.16/tests/test_workflow.py +0 -75
- ddeutil_workflow-0.0.16/tests/test_workflow_params.py +0 -12
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/LICENSE +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/setup.cfg +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/__types.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil/workflow/exceptions.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil_workflow.egg-info/dependency_links.txt +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil_workflow.egg-info/entry_points.txt +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/src/ddeutil_workflow.egg-info/top_level.txt +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test__conf_exist.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test__regex.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_params.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_scheduler.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_stage_bash.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_stage_trigger.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_utils_tag.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_utils_template.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_workflow_depends.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_workflow_on.py +0 -0
- {ddeutil_workflow-0.0.16 → ddeutil_workflow-0.0.17}/tests/test_workflow_run.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ddeutil-workflow
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.17
|
4
4
|
Summary: Lightweight workflow orchestration with less dependencies
|
5
5
|
Author-email: ddeutils <korawich.anu@gmail.com>
|
6
6
|
License: MIT
|
@@ -23,7 +23,7 @@ Requires-Python: >=3.9.13
|
|
23
23
|
Description-Content-Type: text/markdown
|
24
24
|
License-File: LICENSE
|
25
25
|
Requires-Dist: ddeutil>=0.4.3
|
26
|
-
Requires-Dist: ddeutil-io[yaml]>=0.2.3
|
26
|
+
Requires-Dist: ddeutil-io[toml,yaml]>=0.2.3
|
27
27
|
Requires-Dist: python-dotenv==1.0.1
|
28
28
|
Requires-Dist: typer<1.0.0,==0.12.5
|
29
29
|
Requires-Dist: schedule<2.0.0,==1.2.2
|
@@ -33,6 +33,7 @@ Requires-Dist: fastapi<1.0.0,>=0.115.0; extra == "api"
|
|
33
33
|
# Workflow
|
34
34
|
|
35
35
|
[](https://github.com/ddeutils/ddeutil-workflow/actions/workflows/tests.yml)
|
36
|
+
[](https://codecov.io/gh/ddeutils/ddeutil-workflow)
|
36
37
|
[](https://pypi.org/project/ddeutil-workflow/)
|
37
38
|
[](https://pypi.org/project/ddeutil-workflow/)
|
38
39
|
[](https://github.com/ddeutils/ddeutil-workflow)
|
@@ -74,8 +75,9 @@ configuration. It called **Metadata Driven Data Workflow**.
|
|
74
75
|
|
75
76
|
## :round_pushpin: Installation
|
76
77
|
|
77
|
-
This project need `ddeutil-io` extension namespace packages.
|
78
|
-
this package with application add-ons, you should add
|
78
|
+
This project need `ddeutil` and `ddeutil-io` extension namespace packages.
|
79
|
+
If you want to install this package with application add-ons, you should add
|
80
|
+
`app` in installation;
|
79
81
|
|
80
82
|
| Usecase | Install Optional | Support |
|
81
83
|
|-------------------|------------------------------------------|--------------------|
|
@@ -181,29 +183,30 @@ and do not raise any error to you.
|
|
181
183
|
|
182
184
|
| Environment | Component | Default | Description | Remark |
|
183
185
|
|:----------------------------------------|-----------|----------------------------------|--------------------------------------------------------------------------------------------------------------------|--------|
|
184
|
-
| `WORKFLOW_ROOT_PATH` | Core | . | The root path of the workflow application
|
185
|
-
| `WORKFLOW_CORE_REGISTRY` | Core | src.ddeutil.workflow,tests.utils | List of importable string for the hook stage
|
186
|
-
| `WORKFLOW_CORE_REGISTRY_FILTER` | Core | ddeutil.workflow.utils | List of importable string for the filter template
|
187
|
-
| `WORKFLOW_CORE_PATH_CONF` | Core | conf | The config path that keep all template `.yaml` files
|
188
|
-
| `WORKFLOW_CORE_TIMEZONE` | Core | Asia/Bangkok | A Timezone string value that will pass to `ZoneInfo` object
|
189
|
-
| `WORKFLOW_CORE_STAGE_DEFAULT_ID` | Core | true | A flag that enable default stage ID that use for catch an execution output
|
190
|
-
| `WORKFLOW_CORE_STAGE_RAISE_ERROR` | Core | false | A flag that all stage raise StageException from stage execution
|
186
|
+
| `WORKFLOW_ROOT_PATH` | Core | . | The root path of the workflow application. | |
|
187
|
+
| `WORKFLOW_CORE_REGISTRY` | Core | src.ddeutil.workflow,tests.utils | List of importable string for the hook stage. | |
|
188
|
+
| `WORKFLOW_CORE_REGISTRY_FILTER` | Core | ddeutil.workflow.utils | List of importable string for the filter template. | |
|
189
|
+
| `WORKFLOW_CORE_PATH_CONF` | Core | conf | The config path that keep all template `.yaml` files. | |
|
190
|
+
| `WORKFLOW_CORE_TIMEZONE` | Core | Asia/Bangkok | A Timezone string value that will pass to `ZoneInfo` object. | |
|
191
|
+
| `WORKFLOW_CORE_STAGE_DEFAULT_ID` | Core | true | A flag that enable default stage ID that use for catch an execution output. | |
|
192
|
+
| `WORKFLOW_CORE_STAGE_RAISE_ERROR` | Core | false | A flag that all stage raise StageException from stage execution. | |
|
191
193
|
| `WORKFLOW_CORE_JOB_DEFAULT_ID` | Core | false | A flag that enable default job ID that use for catch an execution output. The ID that use will be sequence number. | |
|
192
|
-
| `
|
193
|
-
| `
|
194
|
-
| `
|
195
|
-
| `
|
196
|
-
| `
|
197
|
-
| `
|
198
|
-
| `
|
199
|
-
| `
|
194
|
+
| `WORKFLOW_CORE_JOB_RAISE_ERROR` | Core | true | A flag that all job raise JobException from job strategy execution. | |
|
195
|
+
| `WORKFLOW_CORE_MAX_NUM_POKING` | Core | 4 | . | |
|
196
|
+
| `WORKFLOW_CORE_MAX_JOB_PARALLEL` | Core | 2 | The maximum job number that able to run parallel in workflow executor. | |
|
197
|
+
| `WORKFLOW_CORE_WORKFLOW_ID_SIMPLE_MODE` | Core | true | . | |
|
198
|
+
| `WORKFLOW_LOG_DEBUG_MODE` | Log | true | A flag that enable logging with debug level mode. | |
|
199
|
+
| `WORKFLOW_LOG_ENABLE_WRITE` | Log | true | A flag that enable logging object saving log to its destination. | |
|
200
|
+
| `WORKFLOW_APP_MAX_PROCESS` | Schedule | 2 | The maximum process worker number that run in scheduler app module. | |
|
201
|
+
| `WORKFLOW_APP_MAX_SCHEDULE_PER_PROCESS` | Schedule | 100 | A schedule per process that run parallel. | |
|
202
|
+
| `WORKFLOW_APP_STOP_BOUNDARY_DELTA` | Schedule | '{"minutes": 5, "seconds": 20}' | A time delta value that use to stop scheduler app in json string format. | |
|
200
203
|
|
201
204
|
**API Application**:
|
202
205
|
|
203
|
-
| Environment | Component | Default | Description
|
204
|
-
|
205
|
-
| `WORKFLOW_API_ENABLE_ROUTE_WORKFLOW` | API | true | A flag that enable workflow route to manage execute manually and workflow logging | |
|
206
|
-
| `WORKFLOW_API_ENABLE_ROUTE_SCHEDULE` | API | true | A flag that enable run scheduler | |
|
206
|
+
| Environment | Component | Default | Description | Remark |
|
207
|
+
|:--------------------------------------|-----------|---------|------------------------------------------------------------------------------------|--------|
|
208
|
+
| `WORKFLOW_API_ENABLE_ROUTE_WORKFLOW` | API | true | A flag that enable workflow route to manage execute manually and workflow logging. | |
|
209
|
+
| `WORKFLOW_API_ENABLE_ROUTE_SCHEDULE` | API | true | A flag that enable run scheduler. | |
|
207
210
|
|
208
211
|
## :rocket: Deployment
|
209
212
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# Workflow
|
2
2
|
|
3
3
|
[](https://github.com/ddeutils/ddeutil-workflow/actions/workflows/tests.yml)
|
4
|
+
[](https://codecov.io/gh/ddeutils/ddeutil-workflow)
|
4
5
|
[](https://pypi.org/project/ddeutil-workflow/)
|
5
6
|
[](https://pypi.org/project/ddeutil-workflow/)
|
6
7
|
[](https://github.com/ddeutils/ddeutil-workflow)
|
@@ -42,8 +43,9 @@ configuration. It called **Metadata Driven Data Workflow**.
|
|
42
43
|
|
43
44
|
## :round_pushpin: Installation
|
44
45
|
|
45
|
-
This project need `ddeutil-io` extension namespace packages.
|
46
|
-
this package with application add-ons, you should add
|
46
|
+
This project need `ddeutil` and `ddeutil-io` extension namespace packages.
|
47
|
+
If you want to install this package with application add-ons, you should add
|
48
|
+
`app` in installation;
|
47
49
|
|
48
50
|
| Usecase | Install Optional | Support |
|
49
51
|
|-------------------|------------------------------------------|--------------------|
|
@@ -149,29 +151,30 @@ and do not raise any error to you.
|
|
149
151
|
|
150
152
|
| Environment | Component | Default | Description | Remark |
|
151
153
|
|:----------------------------------------|-----------|----------------------------------|--------------------------------------------------------------------------------------------------------------------|--------|
|
152
|
-
| `WORKFLOW_ROOT_PATH` | Core | . | The root path of the workflow application
|
153
|
-
| `WORKFLOW_CORE_REGISTRY` | Core | src.ddeutil.workflow,tests.utils | List of importable string for the hook stage
|
154
|
-
| `WORKFLOW_CORE_REGISTRY_FILTER` | Core | ddeutil.workflow.utils | List of importable string for the filter template
|
155
|
-
| `WORKFLOW_CORE_PATH_CONF` | Core | conf | The config path that keep all template `.yaml` files
|
156
|
-
| `WORKFLOW_CORE_TIMEZONE` | Core | Asia/Bangkok | A Timezone string value that will pass to `ZoneInfo` object
|
157
|
-
| `WORKFLOW_CORE_STAGE_DEFAULT_ID` | Core | true | A flag that enable default stage ID that use for catch an execution output
|
158
|
-
| `WORKFLOW_CORE_STAGE_RAISE_ERROR` | Core | false | A flag that all stage raise StageException from stage execution
|
154
|
+
| `WORKFLOW_ROOT_PATH` | Core | . | The root path of the workflow application. | |
|
155
|
+
| `WORKFLOW_CORE_REGISTRY` | Core | src.ddeutil.workflow,tests.utils | List of importable string for the hook stage. | |
|
156
|
+
| `WORKFLOW_CORE_REGISTRY_FILTER` | Core | ddeutil.workflow.utils | List of importable string for the filter template. | |
|
157
|
+
| `WORKFLOW_CORE_PATH_CONF` | Core | conf | The config path that keep all template `.yaml` files. | |
|
158
|
+
| `WORKFLOW_CORE_TIMEZONE` | Core | Asia/Bangkok | A Timezone string value that will pass to `ZoneInfo` object. | |
|
159
|
+
| `WORKFLOW_CORE_STAGE_DEFAULT_ID` | Core | true | A flag that enable default stage ID that use for catch an execution output. | |
|
160
|
+
| `WORKFLOW_CORE_STAGE_RAISE_ERROR` | Core | false | A flag that all stage raise StageException from stage execution. | |
|
159
161
|
| `WORKFLOW_CORE_JOB_DEFAULT_ID` | Core | false | A flag that enable default job ID that use for catch an execution output. The ID that use will be sequence number. | |
|
160
|
-
| `
|
161
|
-
| `
|
162
|
-
| `
|
163
|
-
| `
|
164
|
-
| `
|
165
|
-
| `
|
166
|
-
| `
|
167
|
-
| `
|
162
|
+
| `WORKFLOW_CORE_JOB_RAISE_ERROR` | Core | true | A flag that all job raise JobException from job strategy execution. | |
|
163
|
+
| `WORKFLOW_CORE_MAX_NUM_POKING` | Core | 4 | . | |
|
164
|
+
| `WORKFLOW_CORE_MAX_JOB_PARALLEL` | Core | 2 | The maximum job number that able to run parallel in workflow executor. | |
|
165
|
+
| `WORKFLOW_CORE_WORKFLOW_ID_SIMPLE_MODE` | Core | true | . | |
|
166
|
+
| `WORKFLOW_LOG_DEBUG_MODE` | Log | true | A flag that enable logging with debug level mode. | |
|
167
|
+
| `WORKFLOW_LOG_ENABLE_WRITE` | Log | true | A flag that enable logging object saving log to its destination. | |
|
168
|
+
| `WORKFLOW_APP_MAX_PROCESS` | Schedule | 2 | The maximum process worker number that run in scheduler app module. | |
|
169
|
+
| `WORKFLOW_APP_MAX_SCHEDULE_PER_PROCESS` | Schedule | 100 | A schedule per process that run parallel. | |
|
170
|
+
| `WORKFLOW_APP_STOP_BOUNDARY_DELTA` | Schedule | '{"minutes": 5, "seconds": 20}' | A time delta value that use to stop scheduler app in json string format. | |
|
168
171
|
|
169
172
|
**API Application**:
|
170
173
|
|
171
|
-
| Environment | Component | Default | Description
|
172
|
-
|
173
|
-
| `WORKFLOW_API_ENABLE_ROUTE_WORKFLOW` | API | true | A flag that enable workflow route to manage execute manually and workflow logging | |
|
174
|
-
| `WORKFLOW_API_ENABLE_ROUTE_SCHEDULE` | API | true | A flag that enable run scheduler | |
|
174
|
+
| Environment | Component | Default | Description | Remark |
|
175
|
+
|:--------------------------------------|-----------|---------|------------------------------------------------------------------------------------|--------|
|
176
|
+
| `WORKFLOW_API_ENABLE_ROUTE_WORKFLOW` | API | true | A flag that enable workflow route to manage execute manually and workflow logging. | |
|
177
|
+
| `WORKFLOW_API_ENABLE_ROUTE_SCHEDULE` | API | true | A flag that enable run scheduler. | |
|
175
178
|
|
176
179
|
## :rocket: Deployment
|
177
180
|
|
@@ -27,7 +27,7 @@ classifiers = [
|
|
27
27
|
requires-python = ">=3.9.13"
|
28
28
|
dependencies = [
|
29
29
|
"ddeutil>=0.4.3",
|
30
|
-
"ddeutil-io[yaml]>=0.2.3",
|
30
|
+
"ddeutil-io[yaml,toml]>=0.2.3",
|
31
31
|
"python-dotenv==1.0.1",
|
32
32
|
"typer==0.12.5,<1.0.0",
|
33
33
|
"schedule==1.2.2,<2.0.0",
|
@@ -63,7 +63,8 @@ concurrency = ["thread", "multiprocessing"]
|
|
63
63
|
source = ["ddeutil.workflow"]
|
64
64
|
omit = [
|
65
65
|
"src/ddeutil/workflow/__about__.py",
|
66
|
-
|
66
|
+
"src/ddeutil/workflow/__cron.py",
|
67
|
+
# NOTE: Omit this files because it does not ready to production.
|
67
68
|
"src/ddeutil/workflow/api.py",
|
68
69
|
"src/ddeutil/workflow/cli.py",
|
69
70
|
"src/ddeutil/workflow/repeat.py",
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__: str = "0.0.17"
|
@@ -18,10 +18,7 @@ from ddeutil.core import (
|
|
18
18
|
isinstance_check,
|
19
19
|
must_split,
|
20
20
|
)
|
21
|
-
from ddeutil.core.dtutils import
|
22
|
-
next_date,
|
23
|
-
replace_date,
|
24
|
-
)
|
21
|
+
from ddeutil.core.dtutils import next_date, replace_date
|
25
22
|
|
26
23
|
WEEKDAYS: dict[str, int] = {
|
27
24
|
"Sun": 0,
|
@@ -37,7 +34,7 @@ WEEKDAYS: dict[str, int] = {
|
|
37
34
|
class CronYearLimit(Exception): ...
|
38
35
|
|
39
36
|
|
40
|
-
def str2cron(value: str) -> str:
|
37
|
+
def str2cron(value: str) -> str: # pragma: no cov
|
41
38
|
"""Convert Special String with the @ prefix to Crontab value.
|
42
39
|
|
43
40
|
:param value: A string value that want to convert to cron value.
|
@@ -69,6 +66,8 @@ def str2cron(value: str) -> str:
|
|
69
66
|
|
70
67
|
@dataclass(frozen=True)
|
71
68
|
class Unit:
|
69
|
+
"""Unit dataclass for CronPart object."""
|
70
|
+
|
72
71
|
name: str
|
73
72
|
range: partial
|
74
73
|
min: int
|
@@ -85,6 +84,8 @@ class Unit:
|
|
85
84
|
|
86
85
|
@dataclass
|
87
86
|
class Options:
|
87
|
+
"""Options dataclass for config CronPart object."""
|
88
|
+
|
88
89
|
output_weekday_names: bool = False
|
89
90
|
output_month_names: bool = False
|
90
91
|
output_hashes: bool = False
|
@@ -158,7 +159,12 @@ CRON_UNITS_YEAR: tuple[Unit, ...] = CRON_UNITS + (
|
|
158
159
|
|
159
160
|
@total_ordering
|
160
161
|
class CronPart:
|
161
|
-
"""Part of Cron object that represent a collection of positive integers.
|
162
|
+
"""Part of Cron object that represent a collection of positive integers.
|
163
|
+
|
164
|
+
:param unit: A Unit dataclass object.
|
165
|
+
:param values: A crontab values that want to validate
|
166
|
+
:param options: A Options dataclass object.
|
167
|
+
"""
|
162
168
|
|
163
169
|
__slots__: tuple[str, ...] = (
|
164
170
|
"unit",
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# Licensed under the MIT License. See LICENSE in the project root for
|
4
4
|
# license information.
|
5
5
|
# ------------------------------------------------------------------------------
|
6
|
+
from .conf import Config, FileLog, Loader
|
6
7
|
from .exceptions import (
|
7
8
|
JobException,
|
8
9
|
ParamValueException,
|
@@ -21,8 +21,7 @@ from fastapi.responses import UJSONResponse
|
|
21
21
|
from pydantic import BaseModel
|
22
22
|
|
23
23
|
from .__about__ import __version__
|
24
|
-
from .conf import config
|
25
|
-
from .log import get_logger
|
24
|
+
from .conf import config, get_logger
|
26
25
|
from .repeat import repeat_at, repeat_every
|
27
26
|
from .scheduler import WorkflowTaskData
|
28
27
|
|
@@ -13,8 +13,7 @@ from typing import Annotated, Optional
|
|
13
13
|
from ddeutil.core import str2list
|
14
14
|
from typer import Argument, Option, Typer
|
15
15
|
|
16
|
-
from .conf import config
|
17
|
-
from .log import get_logger
|
16
|
+
from .conf import config, get_logger
|
18
17
|
|
19
18
|
logger = get_logger("ddeutil.workflow")
|
20
19
|
cli: Typer = Typer()
|