Skip to content

Configurable logfile names #216

@aafkegros

Description

@aafkegros

I have wildcards that contain very indented files that then cause even further indented log files which are cumbersome to traverse and check, or get an overview over.
e.g. a rule with input /{folder}/file.txt and output /a/b/c/d/e/file.processed.txt creates a slurm-log file at slurm-logdir/rulename/a/b/c/d/e/job-id.log.
In general, the slurm-log file naming is not very flexible.

Proposed solution
could we have a Python function that takes wildcards as an argument, and returns the log-file name?
i.e. the current default for this would be: '_'.join(wildcards), but i could fix my issues with the indentation by setting it to '_'.join(wildcards).replace('/','_').
I think by making it a simple function that is dependent on the wildcards iterable, this could remain a configurable parameter (maybe slurm-construct-logpath?) for the cli, the rule and the profile.

Alternatively, for only my issue of the deep indentation, a flag could be handed over to handle all / in the wildcards and replace them with _, but this seems less flexible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions