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: #2750, does not correctly check time stamps of scripts with wildcards #2751

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions snakemake/jobs.py
Expand Up @@ -39,6 +39,7 @@
from snakemake.settings import SharedFSUsage
from snakemake.resources import GroupResources
from snakemake.target_jobs import TargetSpec
from snakemake.sourcecache import infer_source_file
from snakemake.utils import format
from snakemake.exceptions import RuleException, ProtectedOutputException, WorkflowError

Expand Down Expand Up @@ -360,9 +361,13 @@ async def outputs_older_than_script_or_notebook(self):
path = self.rule.script or self.rule.notebook
if not path:
return
if self.wildcards is not None or self.params is not None:
# parse wildcards and params to get the correct script name
path = infer_source_file(format(path, wildcards=self.wildcards, params=self.params))
if self.rule.basedir:
# needed if rule is included from another subdirectory
path = self.rule.basedir.join(path).get_path_or_uri()

if is_local_file(path) and os.path.exists(path):
script_mtime = os.lstat(path).st_mtime
for f in self.output:
Expand Down