Skip to content

Commit

Permalink
Fix the first two MREs from snakemake#823.
Browse files Browse the repository at this point in the history
- Incorporates @epruesse's fix for MRE snakemake#1
- Adds a fix for MRE snakemake#2 - properly marks group jobs as finished
- Some minor updates to tests
  • Loading branch information
DonFreed committed Oct 12, 2021
1 parent cf22d77 commit 5cbefd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions snakemake/dag.py
Expand Up @@ -617,8 +617,13 @@ def unneeded_files():
yield from filterfalse(partial(needed, job_), tempfiles & files)

# temp output
if not job.dynamic_output and (
job not in self.targetjobs or job.rule.name == self.workflow.first_rule
if (
not job.dynamic_output
and not job.is_checkpoint
and (
job not in self.targetjobs
or job.rule.name == self.workflow.first_rule
)
):
tempfiles = (
f
Expand Down Expand Up @@ -1349,7 +1354,11 @@ def finish(self, job, update_dynamic=True):
self._running.remove(job)

# turn off this job's Reason
self.reason(job).mark_finished()
if job.is_group():
for j in job:
self.reason(j).mark_finished()
else:
self.reason(job).mark_finished()

try:
self._ready_jobs.remove(job)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_issue823_1/Snakefile
Expand Up @@ -21,7 +21,7 @@ rule b:
input:
_checkpoint_output,
output:
temp('b.txt')
'b.txt'
shell:
"touch {output}"

Empty file.

0 comments on commit 5cbefd2

Please sign in to comment.