Skip to content

Commit 8bfa0a3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 40f715a commit 8bfa0a3

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

tests/integration/Snakefile

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,47 @@
11
# Emulate a user configuring the module.
22
configfile: workflow.source_path("./test_config.yaml")
33

4+
45
# Emulate how another workflow might create inputs for this module.
56
rule create_external_input:
6-
message: "Example of a rule external to your module."
7+
message:
8+
"Example of a rule external to your module."
79
output:
8-
text_file = "results/module_area_potentials/resources/user/user_message.md"
10+
text_file="results/module_area_potentials/resources/user/user_message.md",
911
run:
1012
from pathlib import Path
1113
from textwrap import dedent
12-
text = dedent("""Modular workflows can be used by more than one project!
14+
15+
text = dedent(
16+
"""Modular workflows can be used by more than one project!
1317
For example, this text comes from a file external to the module.
1418
Try your best to make this workflow reusable so that others may benefit from your methods."""
1519
)
1620
file_path = Path(output.text_file)
1721
with file_path.open("w") as f:
1822
f.write(text)
1923

24+
2025
# Import the module and configure it.
2126
# `snakefile:` specifies the module. It can use file paths and special github(...) / gitlab(...) markers
2227
# `prefix:` re-routes all input/output paths of the module, helping to avoid file conflicts.
2328
module module_area_potentials:
24-
snakefile: "../../workflow/Snakefile"
25-
config: config["module_area_potentials"]
26-
prefix: "results/module_area_potentials/"
29+
snakefile:
30+
"../../workflow/Snakefile"
31+
config:
32+
config["module_area_potentials"]
33+
prefix:
34+
"results/module_area_potentials/"
35+
2736

2837
# rename all module rules with a prefix, to avoid naming conflicts.
2938
use rule * from module_area_potentials as module_area_potentials_*
3039

40+
3141
# Request something from the module
3242
rule all:
33-
message: "A generic test case for your module."
43+
message:
44+
"A generic test case for your module."
3445
default_target: True
3546
input:
36-
"results/module_area_potentials/results/combined_text.md"
47+
"results/module_area_potentials/results/combined_text.md",

0 commit comments

Comments
 (0)