Skip to content

Commit 7d5fac0

Browse files
committed
chore: format black
1 parent 11cbe89 commit 7d5fac0

File tree

3 files changed

+67
-29
lines changed

3 files changed

+67
-29
lines changed

tests/test_github_issue_3265_respect_dryrun_delete_all/Snakefile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
shell.executable("bash")
22

3+
34
rule all:
4-
input: "delete_all_output", "delete_temp_output"
5-
output: touch("all_ok")
5+
input:
6+
"delete_all_output",
7+
"delete_temp_output",
8+
output:
9+
touch("all_ok"),
10+
611

712
rule delete_all_output:
8-
output: touch("delete_all_output")
13+
output:
14+
touch("delete_all_output"),
915
shell:
1016
"""
1117
echo $PATH
@@ -17,16 +23,14 @@ rule delete_all_output:
1723
test -d empty_dir && test -L dangling && test -d full_dir
1824
"""
1925

26+
2027
rule delete_temp_output:
21-
output: touch("delete_temp_output")
28+
output:
29+
touch("delete_temp_output"),
2230
shell:
2331
"""
2432
python -m snakemake --cores 1 -s Snakefile_inner --notemp temp && \
2533
python -m snakemake --cores 1 -s Snakefile_inner --dry-run --delete-temp-output temp && \
2634
test -f infile && test -f temp_intermediate && \
2735
test -d temp_empty_dir && test -d temp_full_dir && test -f temp_keep
2836
"""
29-
30-
31-
32-
Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,75 @@
11
shell.executable("bash")
22

3+
34
rule all:
45
input:
56
"some_dir/final",
67
"empty_dir",
7-
"full_dir"
8+
"full_dir",
9+
810

911
rule a:
10-
input: "infile"
11-
output: "intermediate", "dangling", touch(protected("protected"))
12-
shell: "ln -s {input} {output[0]} && touch nothere && ln -s nothere {output[1]}"
12+
input:
13+
"infile",
14+
output:
15+
"intermediate",
16+
"dangling",
17+
touch(protected("protected")),
18+
shell:
19+
"ln -s {input} {output[0]} && touch nothere && ln -s nothere {output[1]}"
20+
1321

1422
rule b:
15-
input: "intermediate"
16-
output: touch("some_dir/final")
23+
input:
24+
"intermediate",
25+
output:
26+
touch("some_dir/final"),
27+
1728

1829
rule c:
19-
output: directory("empty_dir")
20-
shell: "mkdir empty_dir"
30+
output:
31+
directory("empty_dir"),
32+
shell:
33+
"mkdir empty_dir"
34+
2135

2236
rule d:
23-
output: directory("full_dir")
24-
shell: "mkdir full_dir && touch full_dir/somefile"
37+
output:
38+
directory("full_dir"),
39+
shell:
40+
"mkdir full_dir && touch full_dir/somefile"
41+
2542

2643
rule e:
27-
input: "infile"
28-
output: temp("temp_intermediate")
29-
shell: "touch {output}"
44+
input:
45+
"infile",
46+
output:
47+
temp("temp_intermediate"),
48+
shell:
49+
"touch {output}"
50+
3051

3152
rule f:
32-
input: "temp_intermediate"
33-
output: directory(temp("temp_empty_dir"))
34-
shell: "mkdir temp_empty_dir"
53+
input:
54+
"temp_intermediate",
55+
output:
56+
directory(temp("temp_empty_dir")),
57+
shell:
58+
"mkdir temp_empty_dir"
59+
3560

3661
rule g:
37-
input: "temp_intermediate"
38-
output: directory(temp("temp_full_dir"))
39-
shell: "mkdir temp_full_dir && touch temp_full_dir/somefile"
62+
input:
63+
"temp_intermediate",
64+
output:
65+
directory(temp("temp_full_dir")),
66+
shell:
67+
"mkdir temp_full_dir && touch temp_full_dir/somefile"
68+
4069

4170
rule temp:
42-
input: "temp_empty_dir", "temp_full_dir"
43-
output: touch("temp_keep")
71+
input:
72+
"temp_empty_dir",
73+
"temp_full_dir",
74+
output:
75+
touch("temp_keep"),

tests/tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ def test_list_untracked():
4343
def test_delete_all_output():
4444
run(dpath("test_delete_all_output"))
4545

46+
4647
def test_github_issue_3265_respect_dryrun_delete_all():
4748
run(dpath("test_github_issue_3265_respect_dryrun_delete_all"))
4849

50+
4951
def test_github_issue_14():
5052
"""Add cleanup_scripts argument to allow the user to keep scripts"""
5153
# Return temporary directory for inspection - we should keep scripts here

0 commit comments

Comments
 (0)