fix: CLI/profile runtime override is interpreted as minutes not as seconds (#4053)
Restore pre-9.16.3 behavior: treat numeric runtime values from CLI/profile as minutes (not seconds).
- Fix Resource.parse_human_friendly in resources.py to treat plain numeric strings for time resources as minutes.
- Add test: –set-resources echo_runtime:runtime=120 produces expected output.
- Add test: Setting
runtime: 120in profile produces expected output.The parse_human_friendly() function in the Resources class previously divided the specified number by 60, interpreting the specified minutes as seconds.
Fix #4039
QC
- 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). –> not needed since default behavior is restoredSummary by CodeRabbit
Bug Fixes
Runtime parsing refined: pure numeric strings are no longer treated as human-friendly timespans; non-numeric time strings are parsed with adjusted rounding/division so minute values are interpreted consistently.
Tests
Added regression tests and example workflows covering runtime handling via CLI, profile, and default runs; expected outputs updated accordingly.
Co-authored-by: SrPeter128 matthias.peter.kh@online.de Co-authored-by: Cade Mirchandani cmirchan@ucsc.edu
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Snakemake
The Snakemake workflow management system is a tool to create reproducible and scalable data analyses. Snakemake is highly popular, with on average more than 7 new citations per week in 2021, and almost 400k downloads. Workflows are described via a human readable, Python based language. They can be seamlessly scaled to server, cluster, grid and cloud environments without the need to modify the workflow definition. Finally, Snakemake workflows can entail a description of required software, which will be automatically deployed to any execution environment.
Homepage: https://snakemake.github.io
Copyright (c) 2012-2022 Johannes Köster johannes.koester@uni-due.com (see LICENSE)