Skip to content

Commit 8858049

Browse files
committed
fix: use virtool-workflow==2.0.0
* Use updated base image and Python package. * Combine upload steps into single finalize step. * Add `display_name` and `description` parameters where appropriate.
1 parent 16412ab commit 8858049

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM virtool/workflow:1.1.0
1+
FROM virtool/workflow:2.0.0
22

33
WORKDIR /app
44

poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88

99
[tool.poetry.dependencies]
1010
python = "^3.8"
11-
virtool-workflow = "^1.0.0"
11+
virtool-workflow = "^2.0.0"
1212

1313
[tool.poetry.dev-dependencies]
1414
autopep8 = "^1.5.7"

workflow.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,25 @@ async def run_fastqc(
2626
intermediate: SimpleNamespace,
2727
read_files,
2828
):
29-
"""Run `fastqc` on the read files. Parse the output into a dictionary and add it to the scope."""
30-
intermediate.quality = await fastqc(read_files)
29+
"""
30+
Run `fastqc` on the read files.
3131
32-
return "Fastqc run completed."
32+
Parse the output into a dictionary and add it to the scope.
33+
"""
34+
intermediate.quality = await fastqc(read_files)
3335

3436

3537
@step
36-
async def upload_read_files(sample_provider: SampleProvider, read_files):
37-
"""Upload the read files."""
38+
async def finalize(intermediate: SimpleNamespace, sample_provider: SampleProvider, read_files):
39+
"""
40+
Save the sample data in Virtool.
41+
42+
* Upload the read files to the sample file endpoints.
43+
* POST the JSON quality data to sample endpoint.
44+
"""
3845
for file in read_files:
3946
await sample_provider.upload(file)
4047

41-
42-
@step
43-
async def upload_quality(sample_provider: SampleProvider, intermediate: SimpleNamespace):
44-
"""Upload the resulting quality to the sample record."""
4548
await sample_provider.finalize(intermediate.quality)
4649

4750

0 commit comments

Comments
 (0)