Skip to content

Commit 09b1804

Browse files
committed
refactor: extract fixtures to fixtures.py
1 parent 4cf3835 commit 09b1804

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

fixtures.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from pathlib import Path
2+
from types import SimpleNamespace
3+
from typing import Dict
4+
5+
from pyfixtures import fixture
6+
7+
8+
@fixture
9+
def intermediate() -> SimpleNamespace:
10+
return SimpleNamespace()
11+
12+
13+
@fixture
14+
def read_files(input_files: Dict[str, Path]):
15+
return [
16+
file.rename(f"reads_{n}.fq.gz")
17+
for file, n in zip(input_files.values(), (1, 2))
18+
]

workflow.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
1-
from pathlib import Path
21
from types import SimpleNamespace
3-
from typing import Dict
42

5-
from fixtures import fixture
63
from virtool_workflow import hooks, step
74
from virtool_workflow.api.samples import SampleProvider
85

96

10-
@fixture
11-
def intermediate() -> SimpleNamespace:
12-
return SimpleNamespace()
13-
14-
15-
@fixture
16-
def read_files(input_files: Dict[str, Path]):
17-
return [
18-
file.rename(f"reads_{n}.fq.gz")
19-
for file, n in zip(input_files.values(), (1, 2))
20-
]
21-
22-
237
@step(name="Run FastQC")
248
async def run_fastqc(
259
fastqc,

0 commit comments

Comments
 (0)