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
Rules that are based on scripts ignore metadata for code-change trigger #2192
Comments
It seems that testrule regard the |
When snakemake runs code directly written in the Snakefile (either through A basic fix would be to remove the |
This funciton For me, I always declare Rmd code file as input when I'm going to knit it to html, and I've never use script to use external code, instead, I'll just import a python package and never detect whether it is changed. |
After some tests, there’s no record of code changes for scripts and notebooks via the I tried to understand if there’s a technical limitation that impedes keeping track of script changes in metadata but it’s not trivial. I think we’ll need help from contributors who actually understand where and how metadata are generated. If this cannot be fixed, it would be wise to edit the warning displayed after code changes, especially this part:
|
Snakemake version
7.25.0
Describe the bug
When updating a script that is used in a rule, we get the following message from Snakemake :
But apparently, there is actually no way to really skip this trigger because cleaning up metadata is not sufficient (even removing the
.snakemake
directory entirely still triggers a "code changed"). This is because a script being older than output has priority over any metadata snakemake stores:snakemake/snakemake/dag.py
Lines 1166 to 1169 in 5e5cb61
The message is thus rather confusing as there is nothing the user can do except to use the
--rerun-triggers mtime
option. This is really annoying when we changed real code in some parts of the pipeline, but only formatting in other parts, as we cannot select which rules will have to be re-run (since --rerun-triggers apply globally, contrary to --cleanup-metadata).Logs
Minimal example
Snakefile
Additional context
The text was updated successfully, but these errors were encountered: