Skip to content

Wildcards in script specifier not parsed when checking whether the output is older #2750

@mawenzy

Description

@mawenzy

Snakemake version
Latest on main: ce519d7

Describe the bug
Function outputs_older_than_script_or_notebook does not work as intended if the script name contains wildcards, because the wildcards are never parsed.

Minimal example
Snakefile:

rule all:
    input:
        "test.txt",


rule test:
    output:
        "{name}.txt",
    script:
        "{wildcards.name}.py"

test.py

with open(snakemake.output[0], "w") as out:
    out.write("Success!!\n")

Additional context
Running works as intended. However, if test.py is updated, snakemake does not realize this and not rerun this job.

This is because in outputs_older_than_script_or_notebook, snakemake checks whether the script "{wildcards.name}.py" is newer instead of correctly checking "test.py"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions