virtool-workflow 7.2.1__py3-none-any.whl → 7.2.2__py3-none-any.whl
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.
- virtool_workflow/__init__.py +1 -0
- virtool_workflow/analysis/fastqc.py +2 -2
- virtool_workflow/cli.py +1 -0
- virtool_workflow/runtime/hook.py +3 -1
- virtool_workflow/runtime/ping.py +1 -0
- virtool_workflow/runtime/run.py +7 -4
- virtool_workflow/workflow.py +6 -3
- {virtool_workflow-7.2.1.dist-info → virtool_workflow-7.2.2.dist-info}/METADATA +4 -4
- {virtool_workflow-7.2.1.dist-info → virtool_workflow-7.2.2.dist-info}/RECORD +12 -12
- {virtool_workflow-7.2.1.dist-info → virtool_workflow-7.2.2.dist-info}/LICENSE +0 -0
- {virtool_workflow-7.2.1.dist-info → virtool_workflow-7.2.2.dist-info}/WHEEL +0 -0
- {virtool_workflow-7.2.1.dist-info → virtool_workflow-7.2.2.dist-info}/entry_points.txt +0 -0
virtool_workflow/__init__.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
"""Utilities and fixtures for running FastQC."""
|
2
|
+
|
2
3
|
from __future__ import annotations
|
3
4
|
|
4
5
|
import asyncio
|
@@ -424,8 +425,7 @@ def _parse_fastqc(fastqc_path: Path, output_path: Path) -> dict:
|
|
424
425
|
class FastQCRunner(Protocol):
|
425
426
|
"""A protocol describing callables that can be used to run FastQC."""
|
426
427
|
|
427
|
-
async def __call__(self, paths: ReadPaths, output_path: Path) -> dict:
|
428
|
-
...
|
428
|
+
async def __call__(self, paths: ReadPaths, output_path: Path) -> dict: ...
|
429
429
|
|
430
430
|
|
431
431
|
@fixture
|
virtool_workflow/cli.py
CHANGED
virtool_workflow/runtime/hook.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
"""The :class:`Hook` class is used to hook into the workflow lifecycle."""
|
2
|
+
|
2
3
|
from __future__ import annotations
|
3
4
|
|
4
5
|
from asyncio import gather
|
@@ -119,7 +120,8 @@ class Hook:
|
|
119
120
|
return await callback(*args, **kwargs)
|
120
121
|
|
121
122
|
results = await gather(
|
122
|
-
*[call_callback(callback) for callback in callbacks],
|
123
|
+
*[call_callback(callback) for callback in callbacks],
|
124
|
+
return_exceptions=True,
|
123
125
|
)
|
124
126
|
|
125
127
|
for error in results:
|
virtool_workflow/runtime/ping.py
CHANGED
virtool_workflow/runtime/run.py
CHANGED
@@ -42,8 +42,6 @@ from virtool_workflow.runtime.sentry import configure_sentry, set_workflow_conte
|
|
42
42
|
from virtool_workflow.utils import configure_logs, get_virtool_workflow_version
|
43
43
|
from virtool_workflow.workflow import Workflow
|
44
44
|
|
45
|
-
logger = get_logger("runtime")
|
46
|
-
|
47
45
|
|
48
46
|
def configure_status_hooks():
|
49
47
|
"""Configure built-in job status hooks.
|
@@ -73,11 +71,13 @@ def configure_status_hooks():
|
|
73
71
|
await push_status()
|
74
72
|
|
75
73
|
|
76
|
-
async def execute(workflow: Workflow, scope: FixtureScope, events: Events):
|
74
|
+
async def execute(workflow: Workflow, scope: FixtureScope, events: Events, logger):
|
77
75
|
"""Execute a workflow.
|
78
76
|
|
79
77
|
:param workflow: The workflow to execute
|
80
78
|
:param scope: The :class:`FixtureScope` to use for fixture injection
|
79
|
+
:param events: The events object for cancellation/termination
|
80
|
+
:param logger: The configured logger instance
|
81
81
|
|
82
82
|
"""
|
83
83
|
await on_workflow_start.trigger(scope)
|
@@ -151,6 +151,7 @@ async def run_workflow(
|
|
151
151
|
job_id: str,
|
152
152
|
workflow: Workflow,
|
153
153
|
events: Events,
|
154
|
+
logger,
|
154
155
|
):
|
155
156
|
# Configure hooks here so that they can be tested when using `run_workflow`.
|
156
157
|
configure_status_hooks()
|
@@ -189,7 +190,7 @@ async def run_workflow(
|
|
189
190
|
scope["work_path"] = work_path
|
190
191
|
|
191
192
|
async with ping_periodically(api, job_id):
|
192
|
-
await execute(workflow, scope, events)
|
193
|
+
await execute(workflow, scope, events, logger)
|
193
194
|
cleanup_builtin_status_hooks()
|
194
195
|
|
195
196
|
|
@@ -215,6 +216,7 @@ async def start_runtime(
|
|
215
216
|
"""
|
216
217
|
configure_logs(bool(sentry_dsn))
|
217
218
|
|
219
|
+
logger = get_logger("runtime")
|
218
220
|
logger.info(
|
219
221
|
"found virtool-workflow",
|
220
222
|
version=get_virtool_workflow_version(),
|
@@ -250,6 +252,7 @@ async def start_runtime(
|
|
250
252
|
job_id,
|
251
253
|
workflow,
|
252
254
|
events,
|
255
|
+
logger,
|
253
256
|
),
|
254
257
|
)
|
255
258
|
|
virtool_workflow/workflow.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
"""Main definitions for Virtool Workflows."""
|
2
|
+
|
2
3
|
from __future__ import annotations
|
3
4
|
|
4
5
|
from dataclasses import dataclass, field
|
@@ -9,13 +10,15 @@ from virtool_workflow.utils import coerce_to_coroutine_function
|
|
9
10
|
|
10
11
|
@dataclass
|
11
12
|
class Workflow:
|
12
|
-
"""A step-wise, long-running operation.
|
13
|
-
"""
|
13
|
+
"""A step-wise, long-running operation."""
|
14
14
|
|
15
15
|
steps: list[WorkflowStep] = field(default_factory=list)
|
16
16
|
|
17
17
|
def step(
|
18
|
-
self,
|
18
|
+
self,
|
19
|
+
step: Optional[Callable] = None,
|
20
|
+
*,
|
21
|
+
name: str | None = None,
|
19
22
|
) -> Callable:
|
20
23
|
"""Decorator for adding a step to the workflow."""
|
21
24
|
if step is None:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: virtool-workflow
|
3
|
-
Version: 7.2.
|
3
|
+
Version: 7.2.2
|
4
4
|
Summary: A framework for developing bioinformatics workflows for Virtool.
|
5
5
|
License: MIT
|
6
6
|
Author: Ian Boyes
|
@@ -9,7 +9,7 @@ Requires-Python: >=3.12.3,<3.13.0
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
11
|
Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
|
12
|
-
Requires-Dist: aiohttp (>=3.
|
12
|
+
Requires-Dist: aiohttp (>=3.12.13,<4.0.0)
|
13
13
|
Requires-Dist: biopython (>=1.81,<2.0)
|
14
14
|
Requires-Dist: click (>=8.2.1,<9.0.0)
|
15
15
|
Requires-Dist: orjson (>=3.9.9,<4.0.0)
|
@@ -17,12 +17,12 @@ Requires-Dist: pydantic-factories (>=1.17.3,<2.0.0)
|
|
17
17
|
Requires-Dist: pyfixtures (>=1.0.0,<2.0.0)
|
18
18
|
Requires-Dist: sentry-sdk (>=2.30.0,<3.0.0)
|
19
19
|
Requires-Dist: structlog-sentry (>=2.2.1,<3.0.0)
|
20
|
-
Requires-Dist: virtool (>=31.
|
20
|
+
Requires-Dist: virtool (>=31.9.0,<32.0.0)
|
21
21
|
Description-Content-Type: text/markdown
|
22
22
|
|
23
23
|
# Virtool Workflow
|
24
24
|
|
25
|
-
](https://github.com/virtool/virtool-workflow/actions/workflows/ci.yml)
|
26
26
|
[](https://badge.fury.io/py/virtool-workflow)
|
27
27
|
|
28
28
|
A framework for developing bioinformatic workflows in Python.
|
@@ -1,6 +1,6 @@
|
|
1
|
-
virtool_workflow/__init__.py,sha256=
|
1
|
+
virtool_workflow/__init__.py,sha256=FhPRldtx5dRJftZ3pc3OMl5mWjnDqbX-qeFVQE2QApw,309
|
2
2
|
virtool_workflow/analysis/__init__.py,sha256=eRMQhKOxijlFlYI78FzmHZoF1qYevBXycpIcmlrgFqI,57
|
3
|
-
virtool_workflow/analysis/fastqc.py,sha256
|
3
|
+
virtool_workflow/analysis/fastqc.py,sha256=-D0_Py0e57mVmeA8VZQUB05AcgiCsAmxNQJWMvb2HXU,13142
|
4
4
|
virtool_workflow/analysis/skewer.py,sha256=TWUfiYeUIahHbIosNYo2sqMjS4kUkoFBTspr70eRloI,7186
|
5
5
|
virtool_workflow/analysis/trimming.py,sha256=3Dk0J322ZhBzhuplaVgxZv4l7MLu7ZhqNQHOtNi6CGM,1451
|
6
6
|
virtool_workflow/analysis/utils.py,sha256=YU1_yInZzTNl9nKQTebUz47kUEqZ__d0k-RMLX8DWOA,1108
|
@@ -8,7 +8,7 @@ virtool_workflow/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
8
8
|
virtool_workflow/api/acquire.py,sha256=M8Wf6ck6YOPQU_0dalAYxuQbukj6c4Uat1OPhV7Gj2w,2157
|
9
9
|
virtool_workflow/api/client.py,sha256=fXCriMv0s2L5O78fn8uIBWWPtxtPz0tUk1XHb1L7RGU,4766
|
10
10
|
virtool_workflow/api/utils.py,sha256=Wzf1YseJKUBnUk0Ge8DMwgigWMS7Dn-VFNLlBFo6SW4,4341
|
11
|
-
virtool_workflow/cli.py,sha256=
|
11
|
+
virtool_workflow/cli.py,sha256=Ak--FvkVEtaaBqyuddUBXOot1cbo-W6OAJ94kgNBcFQ,1442
|
12
12
|
virtool_workflow/data/__init__.py,sha256=L2bQ5rMpnCMuLWDMwel4-wPchfQCTHH3EEwxDqwGOsY,610
|
13
13
|
virtool_workflow/data/analyses.py,sha256=tGUU3gLyk_4vn1Xb7FccvBc_HQzYW_AoU7Dh1OkWhAA,3105
|
14
14
|
virtool_workflow/data/hmms.py,sha256=qHtkQO0bF6V7GGVoGDpdhXXR9RxaetWiTL3of6Pd88Y,3210
|
@@ -29,17 +29,17 @@ virtool_workflow/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
29
29
|
virtool_workflow/runtime/config.py,sha256=fHkprWxxqWeEWKOobxpVvSOS5Njk5Mq32sH-p5o_d8g,546
|
30
30
|
virtool_workflow/runtime/discover.py,sha256=-ki36Z4tV0uH_HDP4iD94KT0-JIZ8kHGciuH6wxYDdg,3016
|
31
31
|
virtool_workflow/runtime/events.py,sha256=ZIX3veBfC_2yNTdClHJaYMPn4KAF9JZqpQ3qDq4ox_E,138
|
32
|
-
virtool_workflow/runtime/hook.py,sha256=
|
32
|
+
virtool_workflow/runtime/hook.py,sha256=zNRs6Xy2ZnGWIsAo_uFNh4ybOOWvsh6avc0A4__2FBg,4341
|
33
33
|
virtool_workflow/runtime/path.py,sha256=J8CsNMTg4XgDtib0gVSsLNvv17q793M-ydsxN6pkHrI,562
|
34
|
-
virtool_workflow/runtime/ping.py,sha256=
|
34
|
+
virtool_workflow/runtime/ping.py,sha256=OOqIY8zQujWmjMf4oFA6Ouqt1Uv7YCTPDXn2VXosKBk,1435
|
35
35
|
virtool_workflow/runtime/redis.py,sha256=m-Dtdpbho-Qa9W5IYJCeEEZ7vv04hYu5yALsxOJr0FY,1813
|
36
|
-
virtool_workflow/runtime/run.py,sha256=
|
36
|
+
virtool_workflow/runtime/run.py,sha256=O_XrnBPgWBfYbi70TjhN7C1hviget6kUcTGnADHmLyg,7892
|
37
37
|
virtool_workflow/runtime/run_subprocess.py,sha256=OFHVQ2ao16X8I9nl6Nm_f3IL7rHnmLH8ixtlAFKlOLk,4790
|
38
38
|
virtool_workflow/runtime/sentry.py,sha256=WJ9CI2fshJD5As6s3umUtJrUq4Z-hQRrSxAgbjceXrk,1326
|
39
39
|
virtool_workflow/utils.py,sha256=9rHSlcvZsV2qE1Wo-cUDqESIATswr1zR_P8V-wP6jdk,2545
|
40
|
-
virtool_workflow/workflow.py,sha256=
|
41
|
-
virtool_workflow-7.2.
|
42
|
-
virtool_workflow-7.2.
|
43
|
-
virtool_workflow-7.2.
|
44
|
-
virtool_workflow-7.2.
|
45
|
-
virtool_workflow-7.2.
|
40
|
+
virtool_workflow/workflow.py,sha256=6jUGggiLEsducXyo5owEYflzQb9qZQrAtpNS3t6z4Z4,2675
|
41
|
+
virtool_workflow-7.2.2.dist-info/LICENSE,sha256=nkoVQw9W4aoQM9zgtNzHDmztap5TuXZ1L2-87vNr3w8,1097
|
42
|
+
virtool_workflow-7.2.2.dist-info/METADATA,sha256=CWbWprKHo_pBUmrIQDhxB_8ySL8YLTDWHMnnBEuVVIA,1853
|
43
|
+
virtool_workflow-7.2.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
44
|
+
virtool_workflow-7.2.2.dist-info/entry_points.txt,sha256=d4MA8ZDTJOU0jKZ3ymtHZbfLVoRPgItEIN5U4uIqay8,62
|
45
|
+
virtool_workflow-7.2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|