Describe the bug
Older versions of Snakemake behave oddly if pathvars are used in combination with functions for rule inputs / outputs.
This PR fixed the problem.
snakemake/snakemake#4105
To Reproduce
Rules like the following will trigger this problem.
rule standardise_country_nuts:
message:
"Standardise '{wildcards.country}_{wildcards.subtype}' NUTS dataset."
params:
year=lambda wc: config["countries"][wc.country]["year"],
input:
raw=lambda wc: f"<resources>/automatic/nuts/nuts_{config["countries"][wc.country]["resolution"]}_{config["countries"][wc.country]["year"]}_{wc.subtype}.parquet",
output:
path="<resources>/automatic/countries/nuts_{country}_{subtype}.parquet",
log:
"<logs>/{country}/standardise_country_nuts_{subtype}.log",
conda:
"../envs/shape.yaml"
script:
"../scripts/standardise_country_nuts.py"
For reference, see: modelblocks-org/module_geo_boundaries#52
Downgrading snakemake will fail the integration test (just be sure to delete intermediary files before running the test).
Expected behavior
Pathvars are core to modularity in snakemake. They should work by default
Describe the bug
Older versions of Snakemake behave oddly if pathvars are used in combination with functions for rule inputs / outputs.
This PR fixed the problem.
snakemake/snakemake#4105
To Reproduce
Rules like the following will trigger this problem.
For reference, see: modelblocks-org/module_geo_boundaries#52
Downgrading snakemake will fail the integration test (just be sure to delete intermediary files before running the test).
Expected behavior
Pathvars are core to modularity in snakemake. They should work by default