Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ability to return input functions from input functions. Suc…
…h nesting is evaluated 10 times at most. Beyond that, an error is thrown. (#2717) ### Description Snakemake fails building the DAG when a function containing a inner-function is called within an expand-command. ### QC <!-- Make sure that you can tick the boxes below. --> * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake). --------- Co-authored-by: Johannes Koester <johannes.koester@uni-due.de>
- Loading branch information
1 parent
b6636e9
commit 7a47924
Showing
6 changed files
with
75 additions
and
24 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
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,22 @@ | ||
def some_b(): | ||
def inner(wildcards): | ||
return {wildcards.x} | ||
return inner | ||
|
||
def some_a(): | ||
def inner(wildcards): | ||
return expand("{x}.in", x=some_b()) | ||
return inner | ||
|
||
rule all: | ||
input: | ||
"a.txt" | ||
|
||
rule b: | ||
input: | ||
some_a() | ||
output: | ||
"{x}.txt" | ||
shell: | ||
"touch {output}" | ||
|
Empty file.
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