snakemake-wrappers icon indicating copy to clipboard operation
snakemake-wrappers copied to clipboard

utility functions for general-purpose wrapper setup (e.g. JVM memory option handling)

Open dlaehnemann opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. @tdayris is currently working on unifying the handling of Java memory specifications in wrappers where the bioconda recipes allow for this. This leads to rather large blocks of code that is repeated across all the respective recipes and whenever we want to change the strategy of memory handling, we will have to edit all those places in sync. See here: https://github.com/snakemake/snakemake-wrappers/pull/204#issuecomment-712724197

Describe the solution you'd like I would like to have some kind of common or utils module that provides useful functions. In the case above, it would e.g. need to take the snakemake object and a java_opts string variable as parameters and would adjust the java_opts string accordingly with the Java memory option.

Describe alternatives you've considered The alternative is keeping all those copies of code around. This might make the wrappers more readable, as no reference to another code file is needed. But as described above, it incurs the maintenance burden of having to keep all those code blocks in sync.

dlaehnemann avatar Oct 20 '20 12:10 dlaehnemann

Just pinging in some people to get some more opinions and ideas on this: @johanneskoester, @jafors, @tedil, @christopher-schroeder

dlaehnemann avatar Oct 21 '20 12:10 dlaehnemann