Skip to content
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

fix: fix falsely triggered reruns if input files are obtained via workflow.source_path() #1862

Merged
merged 3 commits into from Sep 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion snakemake/persistence.py
Expand Up @@ -20,6 +20,7 @@
from snakemake.logging import logger
from snakemake.jobs import jobfiles
from snakemake.utils import listfiles
from snakemake.io import is_flagged, get_flag_value


class Persistence:
Expand Down Expand Up @@ -419,7 +420,12 @@ def _conda_env(self, job):

@lru_cache()
def _input(self, job):
return sorted(job.input)
get_path = (
lambda f: get_flag_value(f, "sourcecache_entry").get_path_or_uri()
if is_flagged(f, "sourcecache_entry")
else f
)
return sorted(get_path(f) for f in job.input)

@lru_cache()
def _log(self, job):
Expand Down