Open cmeesters opened 1 month ago
The changes enhance the Executor
class in the SLURM executor plugin for Snakemake by introducing new log management features and configuration options. A method named clean_old_logs
is added to delete outdated log files, and the ExecutorSettings
dataclass is updated with new fields for configuring the log directory and retention settings. The run_job
method is modified to utilize the new log configuration, and the check_active_jobs
method now respects the setting for retaining successful logs.
File | Change Summary |
---|---|
snakemake_executor_plugin_slurm/__init__.py |
- Added method clean_old_logs(self) in Executor . - Added fields logdir , keep_successful_logs , and delete_logfiles_older_than in ExecutorSettings . - Updated run_job to use logdir for SLURM log file path. - Modified check_active_jobs to consider keep_successful_logs . |
snakemake_executor_plugin_slurm/utils.py |
- Imported logging , created a logger instance. - No changes to delete_slurm_environment . |
docs/further.md |
- Added command line flags: --slurm-logdir , --slurm-keep-successful-logs , --slurm-delete-logfiles-older-than . - Clarified existing flags: --slurm-init-seconds-before-status-checks , --slurm-requeue . - Expanded section on "Advanced Resource Specifications" and updated "Retries" section. - Introduced section on "Dynamic Parameterization". |
warn_on_jobcontext
method in the ExecutorSettings
class, which is related to the Executor
class changes in the main PR, as both involve enhancements to job management within the SLURM context.run_job
method in this PR directly relate to the modifications made in the main PR's run_job
method, specifically regarding log file handling and job execution.run_job
method, enhancing error handling during SLURM job submission, which is relevant to the changes made in the main PR regarding log management and job execution.ExecutorSettings
dataclass in the main PR.🐰 In the log dir, where bunnies hop,
New methods sprout, they never stop!
With jobs to run and logs to clear,
SLURM's now tidy, bring on the cheer!
Hopping through tasks, all is bright,
In the world of jobs, everything's right! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@johanneskoester , @dlaehnemann , @fgvieira - I would be happy if at least two of you agreed on the changes in this PR. There are a number of design decisions and coding decisions to consider.
~/.snakemake/slurm_logs
. This is a constant which allows the previous feature to work. Users may overwrite this behaviour.atexit
module is just. Triggering by __del__
has its own issues. For atexit.register()
to work, the clean-up methods needs to proceed the __post_init__
method. Not nice, but stable.
This PR should allow to
The idea behind this PR is to
It addresses issues #94 and #123.
Summary by CodeRabbit
New Features
Improvements