workflow.core 1.12.0__tar.gz → 1.12.3__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.
- {workflow_core-1.12.0 → workflow_core-1.12.3}/PKG-INFO +4 -3
- {workflow_core-1.12.0 → workflow_core-1.12.3}/README.md +1 -1
- {workflow_core-1.12.0 → workflow_core-1.12.3}/pyproject.toml +6 -8
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/run.py +15 -25
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/lifecycle/configure.py +12 -2
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/workspaces/chimefrb.yml +2 -1
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/buckets.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/configs.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/main.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/pipelines.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/results.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/schedules.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/cli/workspace.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/daemons/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/daemons/audit.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/daemons/transfer.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/definitions/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/definitions/config.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/definitions/jsonschema.md +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/definitions/notify.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/definitions/work.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/definitions/workspace.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/examples/autocomplete.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/examples/function.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/examples/sample.svg +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/examples/sample.workflow.yml +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/exceptions.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/helpers/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/helpers/date.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/http/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/http/buckets.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/http/client.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/http/configs.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/http/context.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/http/pipelines.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/http/results.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/http/schedules.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/lifecycle/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/lifecycle/archive/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/lifecycle/archive/http.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/lifecycle/archive/posix.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/lifecycle/archive/s3.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/lifecycle/attempt.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/lifecycle/execute.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/decorators.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/format.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/logger.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/prompt.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/read.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/renderers.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/tmate.sh +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/validate.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/variables.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/utils/write.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/workspaces/__init__.py +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/workspaces/development.yml +0 -0
- {workflow_core-1.12.0 → workflow_core-1.12.3}/workflow/workspaces/site-dev.yml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: workflow.core
|
|
3
|
-
Version: 1.12.
|
|
3
|
+
Version: 1.12.3
|
|
4
4
|
Summary: Workflow Core
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Shiny Brar
|
|
@@ -14,17 +14,18 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
17
18
|
Requires-Dist: click (>=8.1,<9.0)
|
|
18
19
|
Requires-Dist: click-params (>=0.5,<0.6)
|
|
19
20
|
Requires-Dist: docker (>=6.1)
|
|
20
21
|
Requires-Dist: minio (>=7.2,<8.0)
|
|
21
22
|
Requires-Dist: pydantic (>=2.0,<3.0)
|
|
22
23
|
Requires-Dist: pydantic-settings (>=2.0,<3.0)
|
|
23
|
-
Requires-Dist: python-logging-loki (>=0.3,<0.4)
|
|
24
24
|
Requires-Dist: pyyaml (>=6.0,<7.0)
|
|
25
25
|
Requires-Dist: requests (>=2.31,<3.0)
|
|
26
26
|
Requires-Dist: rich (>=13.4,<14.0)
|
|
27
27
|
Requires-Dist: tenacity (>=8.2,<9.0)
|
|
28
|
+
Requires-Dist: tjzegmott-python-logging-loki (>=0,<1)
|
|
28
29
|
Requires-Dist: toml (>=0.10,<0.11)
|
|
29
30
|
Project-URL: Documentation, https://chimefrb.github.io/workflow-docs/
|
|
30
31
|
Project-URL: Repository, https://github.com/chimefrb/workflow
|
|
@@ -57,7 +58,7 @@ pip install git+https://github.com/chimefrb/workflow.git
|
|
|
57
58
|
Alternatively, you can add the Workflow project as a dependency to your own project using Poetry:
|
|
58
59
|
|
|
59
60
|
```bash
|
|
60
|
-
poetry add git+https://github.
|
|
61
|
+
poetry add git+https://github.com/chimefrb/workflow.git
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
## Contributing
|
|
@@ -25,7 +25,7 @@ pip install git+https://github.com/chimefrb/workflow.git
|
|
|
25
25
|
Alternatively, you can add the Workflow project as a dependency to your own project using Poetry:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
poetry add git+https://github.
|
|
28
|
+
poetry add git+https://github.com/chimefrb/workflow.git
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Contributing
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "workflow.core"
|
|
3
|
-
version = "1.12.
|
|
3
|
+
version = "1.12.3"
|
|
4
4
|
description = "Workflow Core"
|
|
5
5
|
authors = ["Shiny Brar <charanjotbrar@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
repository = "https://github.com/chimefrb/workflow"
|
|
9
9
|
documentation = "https://chimefrb.github.io/workflow-docs/"
|
|
10
|
-
packages = [
|
|
11
|
-
{ include = "workflow", from = "." }
|
|
12
|
-
]
|
|
10
|
+
packages = [{ include = "workflow", from = "." }]
|
|
13
11
|
|
|
14
12
|
[tool.poetry.dependencies]
|
|
15
13
|
python = ">=3.8.1,<4.0"
|
|
@@ -22,9 +20,9 @@ toml = "^0.10"
|
|
|
22
20
|
rich = "^13.4"
|
|
23
21
|
minio = "^7.2"
|
|
24
22
|
pydantic-settings = "^2.0"
|
|
25
|
-
python-logging-loki = "^0.3"
|
|
26
23
|
click-params = "^0.5"
|
|
27
24
|
docker = ">=6.1"
|
|
25
|
+
tjzegmott-python-logging-loki = "^0"
|
|
28
26
|
|
|
29
27
|
[tool.poetry.group.dev.dependencies]
|
|
30
28
|
mypy = "*"
|
|
@@ -50,7 +48,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
50
48
|
# Pytest Environment Variables
|
|
51
49
|
[tool.pytest.ini_options]
|
|
52
50
|
env = [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
"WORKFLOW_S3_ENDPOINT=play.min.io",
|
|
52
|
+
"WORKFLOW_S3_ACCESS_KEY=Q3AM3UQ867SPQQA43P2F",
|
|
53
|
+
"WORKFLOW_S3_SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
|
|
56
54
|
]
|
|
@@ -196,31 +196,21 @@ def run(
|
|
|
196
196
|
"[bold red]Backend Checks [/bold red]",
|
|
197
197
|
extra=dict(markup=True, color="green"),
|
|
198
198
|
)
|
|
199
|
-
# Add pipeline and site to loki tags
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
"loki": {
|
|
215
|
-
"tags": {
|
|
216
|
-
# Assumes that there is only one bucket
|
|
217
|
-
"pipeline": buckets[0],
|
|
218
|
-
"site": site,
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
)
|
|
199
|
+
# Add pipeline and site to loki tags, without clobbering the rest of the
|
|
200
|
+
# logging config in the workspace (e.g. loki headers).
|
|
201
|
+
logging_config: Dict[str, Any] = config.get("logging") or {}
|
|
202
|
+
loki_config: Dict[str, Any] = logging_config.get("loki") or {}
|
|
203
|
+
loki_tags: Dict[str, Any] = loki_config.get("tags") or {}
|
|
204
|
+
loki_tags.update(
|
|
205
|
+
{
|
|
206
|
+
# Assumes that there is only one bucket
|
|
207
|
+
"pipeline": buckets[0],
|
|
208
|
+
"site": site,
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
loki_config["tags"] = loki_tags
|
|
212
|
+
logging_config["loki"] = loki_config
|
|
213
|
+
config["logging"] = logging_config
|
|
224
214
|
loki_status: bool = configure.loki(logger=logger, config=config)
|
|
225
215
|
logger.info(f"Loki Logs: {'✅' if loki_status else '❌'}")
|
|
226
216
|
http: HTTPContext = HTTPContext(backends=["buckets"])
|
|
@@ -61,6 +61,9 @@ def loki(logger: Logger, config: Dict[str, Any]) -> bool:
|
|
|
61
61
|
urls: List[str] = []
|
|
62
62
|
loki_urls: Optional[Any] = config.get("http", {}).get("baseurls", {}).get("loki")
|
|
63
63
|
loki_tags: Optional[Any] = config.get("logging", {}).get("loki", {}).get("tags", {})
|
|
64
|
+
loki_headers: Optional[Any] = (
|
|
65
|
+
config.get("logging", {}).get("loki", {}).get("headers", {})
|
|
66
|
+
)
|
|
64
67
|
if not loki_urls:
|
|
65
68
|
return status
|
|
66
69
|
elif isinstance(loki_urls, str):
|
|
@@ -74,10 +77,17 @@ def loki(logger: Logger, config: Dict[str, Any]) -> bool:
|
|
|
74
77
|
for url in urls:
|
|
75
78
|
try:
|
|
76
79
|
status_code: int = requests.get(
|
|
77
|
-
url.replace("loki/api/v1/push", "
|
|
80
|
+
url.replace("loki/api/v1/push", "loki/api/v1/status/buildinfo"),
|
|
81
|
+
timeout=1,
|
|
78
82
|
).status_code
|
|
79
83
|
if status_code == 200:
|
|
80
|
-
loki_handler = LokiHandler(
|
|
84
|
+
loki_handler = LokiHandler(
|
|
85
|
+
url=url,
|
|
86
|
+
tags=loki_tags,
|
|
87
|
+
headers=loki_headers,
|
|
88
|
+
version="1",
|
|
89
|
+
suppress_errors=True,
|
|
90
|
+
)
|
|
81
91
|
loki_handler.setFormatter(
|
|
82
92
|
Formatter("%(levelname)s %(tag)s %(name)s %(message)s")
|
|
83
93
|
)
|
|
@@ -28,7 +28,7 @@ http:
|
|
|
28
28
|
schedules:
|
|
29
29
|
- http://frb-vsop.chime:8007/v2
|
|
30
30
|
- https://frb.chimenet.ca/workflow/pipelines/v2
|
|
31
|
-
loki: https://
|
|
31
|
+
loki: https://loki.chimefrb.xyz/loki/api/v1/push
|
|
32
32
|
# This is the prefix url to make a output data plot or product accessible to the user
|
|
33
33
|
products: https://frb.chimenet.ca/frb-master/v1/events/query-file?filename=
|
|
34
34
|
|
|
@@ -107,3 +107,4 @@ deployers:
|
|
|
107
107
|
logging:
|
|
108
108
|
loki:
|
|
109
109
|
tags: {}
|
|
110
|
+
headers: { X-Scope-OrgID: chime }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|