Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: proper interpretation of standard resources given as strings (e.…
…g. runtime as '5m'). Avoid the need to set additional quotes around size or timespan resources. Improved error messages for resource handling. (#2716) ### Description Eventually, human-readable resource parsing for runtimes from workflow-profiles ought to be enabled. ### QC * [ x] The PR contains a test case for the changes, or the changes are already covered by an existing test case. * [ ] 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
2f7d4b5
commit b6636e9
Showing
7 changed files
with
80 additions
and
20 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
Empty file.
12 changes: 12 additions & 0 deletions
12
tests/test_runtime_conversion_from_workflow_profile/workflow/Snakefile
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 @@ | ||
rule a: | ||
output: "a.out" | ||
#resources: | ||
# runtime="5m" | ||
shell: """ | ||
if [ {resources.runtime} -eq 5 ]; then | ||
touch {output} | ||
else | ||
echo "Runtime is not 300 seconds" | ||
exit 1 | ||
fi | ||
""" |
3 changes: 3 additions & 0 deletions
3
tests/test_runtime_conversion_from_workflow_profile/workflow/profiles/default/config.yaml
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,3 @@ | ||
set-resources: | ||
a: | ||
runtime: 5m |
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