Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix: fixed parsing of subsequent use rule statements directly beneath…
… each other (#1548)
- Loading branch information
1 parent
c3a593e
commit 77d5a08
Showing
6 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
shell.executable("bash") | ||
|
||
configfile: "config/config.yaml" | ||
|
||
|
||
module test1: | ||
snakefile: | ||
"module-test/Snakefile" | ||
config: | ||
config | ||
replace_prefix: | ||
{"results/": "results/testmodule1/"} | ||
|
||
|
||
|
||
|
||
module test2: | ||
snakefile: | ||
"module-test/Snakefile" | ||
config: | ||
config | ||
replace_prefix: | ||
{"results/": "results/testmodule2/"} | ||
|
||
|
||
use rule * from test1 as test1_* | ||
|
||
use rule * from test2 as test2_* | ||
|
||
|
||
|
||
rule all: | ||
default_target: True | ||
input: | ||
rules.test1_a.output, | ||
rules.test2_a.output | ||
|
||
|
||
assert test1.some_func() == 15 | ||
assert test2.some_func() == 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test: 1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
configfile: "config.yaml" # does not exist, but this statement should be ignored on module import | ||
|
||
|
||
def some_func(): | ||
return 15 | ||
|
||
|
||
rule a: | ||
output: | ||
"results/test.out" | ||
shell: | ||
"echo {config[test]} > {output}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters