snakemake / snakefmt

The uncompromising Snakemake code formatter
MIT License
147 stars 28 forks source link

does not handle new global-level workflow dependencies #209

Open jbloom opened 8 months ago

jbloom commented 8 months ago

Starting in snakemake version 8, global workflow dependencies are allowed as here. This code looks like this in the top-level Snakefile:

conda:
    "envs/global.yaml"

However, this raises an error in snakefmt.

mbhall88 commented 8 months ago

Hi @jbloom thanks for reporting this.

The new version of snakemake requires python>=3.11, which presents some issues for us as we rely on snakemake for testing. Long story short we would either need to increase the python min. version for snakefmt to match snakemake (which I am a little hesistant to do), or remove snakemake from our dev dependencies.

I would prefer the second option, but this will take time. The reason for this is we are in discussions about creating a concrete grammar and parser for snakemake files, which would mean we would only need to rely on the grammar/parser and not the whole snakemake package itself. This will also significantly improve our ability to fix bugs, which have been extremely difficult without a snakemake parser.

Thank you for your patience while we try and sort this all out