snakemake / snakedeploy

deploy a snakemake pipeline directly from version control (under development)
Mozilla Public License 2.0
21 stars 8 forks source link

snakedeploy generates a Snakefile with syntax errors: #22

Closed mrvollger closed 2 years ago

mrvollger commented 2 years ago

Description

snakedeploy with this command generates a Snakefile with syntax errors:

snakedeploy deploy-workflow https://github.com/mrvollger/StainedGlass --force . --tag main
snakemake -n 

Gives this syntax error:

SyntaxError in line 14 of /Users/mrvollger/Desktop/repos/StainedGlass/test_deploy/dd/workflow/Snakefile:
invalid syntax (Snakefile, line **14)**

This is because the github call in the snakemake is in quotes:

 "github("mrvollger/StainedGlass", path="workflow/Snakefile", tag="main")"

removing these quotes fixes the issue:

 github("mrvollger/StainedGlass", path="workflow/Snakefile", tag="main")

Not sure why this is the case, but it breaks the install and run commands for the snakemake standard compliant workflows (at least in my hands).

vsoch commented 2 years ago

It looks like this is because the quotes are hardcoded in the template: https://github.com/snakemake/snakedeploy/blob/b780ce39950e273f682a2ecaca3bd4d400167671/snakedeploy/templates/use_module.smk.jinja#L13. I think an easy fix is to just have the quotes added / not added by the provider - GitHub is currently the only one so that seems easy enough! I can open a PR with a suggested fix!

vsoch commented 2 years ago

See https://github.com/snakemake/snakedeploy/pull/23!

johanneskoester commented 2 years ago

Thanks for reporting! Fixed in the upcoming release now.