Conversation
…by integration
Phase 1 – Logging layer + cosmetic cleanup:
- Add log_info, log_step, log_ok, log_warn, log_error, log_next, log_divider functions
- Replace noisy err() ASCII-art heredoc with clean log_error + exit
- Replace all raw echo calls in init(), preruncleanup(), reconfig(),
set_singularity_binds(), dryrun(), runlocal(), runslurm(), run() local
branch, reset(), and main()
- dryrun() restructured to print log_ok/log_next guidance on completion
Phase 2 – Pre-run summary + print_versions():
- Add print_versions() printing Snakemake and Singularity versions with
OK/WARN status
- runslurm() and runlocal() now print structured pre-run summary (mode,
workdir, genome, log file, singularity cache) before launching
Phase 3 – Pipeline state markers + SIGTERM trap + jobby:
- Add json_escape() and write_pipeline_state_marker() to write
pipeline.{running,completed,failed,canceled} marker files and a
pipeline.status.json sidecar in WORKDIR
- write_pipeline_state_marker() called from runslurm() before and after
sbatch submission
- submit_script.sbatch now embeds _write_pipeline_state_marker() inline,
SIGTERM/SIGINT traps, snakemake exit-code capture via PIPESTATUS[0],
jobby post-run call (with module load ccbrpipeliner fallback), and proper
success/failure state marker writes
- Stale-script guard: if existing submit_script.sbatch lacks state marker
logic, it is backed up and regenerated automatically
- Add run_jobby_best_effort() for best-effort jobby generation on
submission failure
- sbatch submission now uses --parsable to capture SLURM job ID; emits
log_next guidance (squeue, tail -f, pipeline.* status, sidecar path)
Closes #118
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Port structured logging and UX improvements from CARLISLE's
carlislewrapper to ASPEN'saspenCLI script.Phase 1 – Logging layer + cosmetic cleanup
log_info,log_step,log_ok,log_warn,log_error,log_next,log_dividererr()ASCII-art heredoc with a cleanlog_error "$@"; exit 1echocalls ininit(),preruncleanup(),reconfig(),set_singularity_binds(),dryrun(),runlocal(),runslurm(),run()local branch,reset(), andmain()dryrun()now printslog_ok+log_nextguidance on completionPhase 2 – Pre-run summary +
print_versions()print_versions()function prints Snakemake and Singularity versions with OK/WARN statusrunslurm()andrunlocal()print a structured pre-run summary (mode, workdir, genome, log file, singularity cache) before launchingPhase 3 – Pipeline state markers + SIGTERM trap + jobby
json_escape(),write_pipeline_state_marker(), andrun_jobby_best_effort()functionswrite_pipeline_state_marker()writespipeline.{running,completed,failed,canceled}marker files and apipeline.status.jsonsidecar in WORKDIR for machine-readable status trackingsubmit_script.sbatchnow embeds inline_write_pipeline_state_marker(), SIGTERM/SIGINT traps,${PIPESTATUS[0]}exit-code capture, jobby post-run call (module load ccbrpipelinerfallback), and proper success/failure state writessubmit_script.sbatchfiles lacking state marker logic are backed up and regenerated automaticallysbatch --parsablecaptures SLURM job ID;log_nextguidance printed after submission (squeue,tail -f snakemake.log,pipeline.*status, sidecar path)Issues
Closes #118
PR Checklist
Update docs if there are any API changes.(no API changes; this is CLI cosmetic/logging only)CHANGELOG.mdwith a short description of any user-facing changes and reference the PR number. Guidelines: https://keepachangelog.com/en/1.1.0/