Skip to content

Configurable logfile names #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
oanegros opened this issue Feb 28, 2025 · 1 comment
Closed

Configurable logfile names #216

oanegros opened this issue Feb 28, 2025 · 1 comment

Comments

@oanegros
Copy link

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.

@cmeesters
Copy link
Member

Logfiles are already "configurable" with --slurm-logdir as a prefix to the directory. The "rest" should be kept constant, as it standardizes lookup and usage. Also, the plugin will remove logfiles of successful runs (they contain redundant information, which is otherwise present in the Snakemake logfiles, too).

Yet, your proposed fix found an entry in PR #220 . And will be merged soon-ish into a new release. Please refrain from opening different issues for one topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants