Skip to content

Conda - use Python 3#462

Merged
ewels merged 8 commits intonf-core:devfrom
ewels:conda-py3
Dec 10, 2019
Merged

Conda - use Python 3#462
ewels merged 8 commits intonf-core:devfrom
ewels:conda-py3

Conversation

@ewels
Copy link
Copy Markdown
Member

@ewels ewels commented Nov 26, 2019

We noticed in nf-core/methylseq#123 that the conda environments we're using everywhere are still using Python 2.7. This PR shifts the conda environments to Python 3.7

  • Update base Dockerfile to use miniconda3, and update to conda 4.7.12
  • Add Python 3.7 dependency to the template environment.yml file

Note that this is quite a big change! It could impact a lot of pipelines that are using Python tools.. However, if pipelines still require Python 2.7, they can change the dependency in the environment.yml file to 2.7 and stuff should still work.

* Update base Dockerfile to use miniconda3, and update to conda 4.7.12
* Add Python 3.7 dependency to the template environment.yml file
@ewels ewels requested a review from a team November 26, 2019 09:55
@drpatelh
Copy link
Copy Markdown
Member

Think it's probably the right time to bump this up 👍 Note though I am still able to get a Python 3 conda environment with the current set-up. Had to deal with the switch when updating all the software for the chipseq and atacseq pipelines.

@drpatelh
Copy link
Copy Markdown
Member

If I remember correctly this is the only line I had to change in the template to get things running with Python 3:
https://github.com/nf-core/chipseq/blob/1939e4842dbc17e7f5b370c771802948271dde11/bin/scrape_software_versions.py#L57

@drpatelh
Copy link
Copy Markdown
Member

Maybe worth creating a dummy pipeline from the template and testing though?

@ewels
Copy link
Copy Markdown
Member Author

ewels commented Nov 26, 2019

I think it's ok as long as we're clear about what people should do if stuff breaks...

dependencies:
  - python=2.7
  #..everything else as before

This should still work, even if the base environment is python 3 ^

@ewels
Copy link
Copy Markdown
Member Author

ewels commented Nov 26, 2019

(but yes, we should make sure that at least the template scripts work with py3 and preferably both if they don't already)

@apeltzer
Copy link
Copy Markdown
Member

apeltzer commented Dec 6, 2019

Just opened PR #476 to fix the issue - then things work fine even in miniconda3 and this PR should be good t o go I think?

Copy link
Copy Markdown
Member

@apeltzer apeltzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now!

Comment thread CHANGELOG.md Outdated
Comment thread nf_core/pipeline-template/{{cookiecutter.name_noslash}}/environment.yml Outdated
ewels and others added 2 commits December 10, 2019 15:46
Co-Authored-By: Patrick Hüther <patrick.huether@gmail.com>
@ewels ewels merged commit c8d3c57 into nf-core:dev Dec 10, 2019
@ewels ewels deleted the conda-py3 branch December 10, 2019 21:14
@drpatelh drpatelh mentioned this pull request Jan 24, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants