Skip to content
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

Setting workflow.use_conda = True in Snakefile stopped working #2434

Open
sebschmi opened this issue Sep 7, 2023 · 3 comments
Open

Setting workflow.use_conda = True in Snakefile stopped working #2434

sebschmi opened this issue Sep 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sebschmi
Copy link
Contributor

sebschmi commented Sep 7, 2023

Snakemake version
7.32.3

Describe the bug
In version 7.16 or so, I was able to add the line workflow.use_conda = True into my snakefile to not have to bother setting it manually on the command line.

Logs

AttributeError in file /home/sebschmi/git/helsitigs/Snakefile, line 30:
property 'use_conda' of 'Workflow' object has no setter
  File "/home/sebschmi/git/helsitigs/Snakefile", line 30, in <module>

Minimal example
Any valid snakefile with the line workflow.use_conda = True.

Additional context
I searched this repo and stackoverflow, but there was no mention of why using this line is not supported anymore. So I assume it was an accident and hence a bug.
If there is a new way to setup snakemake to use conda by default, without having to specify any extra command line arguments such as --use-conda or --config, I would be happy to know.

@sebschmi sebschmi added the bug Something isn't working label Sep 7, 2023
@ASLeonard
Copy link
Contributor

Some of those variables (like workflow.singularity_args) was changed recently and now can be set with workflow._singularity_args, with a leading underscore before the variable. I assume this would work for you

workflow._use_conda = True

@sebschmi
Copy link
Contributor Author

sebschmi commented Sep 7, 2023

Yes this works. Thanks!

@corneliusroemer
Copy link
Contributor

I really really love snakemake, but this is another one of numerous examples of snakemake introducing breaking changes in non-semantic-versioning-compliant ways. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants