nextstrain / ncov

Nextstrain build for novel coronavirus SARS-CoV-2
https://nextstrain.org/ncov
MIT License
1.35k stars 403 forks source link

Are dependencies in nextstrain.yaml purposely pinned and out of date? E.g. nextalign=0.2.0? #758

Closed corneliusroemer closed 2 years ago

corneliusroemer commented 3 years ago

When updating my Nextstrain conda environment, I was surprised to see pango not upgrading. When inspecting nextstrain.yaml I found, the following:

name: nextstrain
channels:
  - conda-forge
  - bioconda
  - defaults
dependencies:
  - augur=13.0.0
  - epiweeks=2.1.2
  - iqtree=2.1.2
  - mafft=7.475
  - nextalign=0.2.0
  - pangolin=2.3.8
  - pangolearn=2021.04.01
  - python>=3.7*

https://github.com/nextstrain/ncov/blob/master/workflow/envs/nextstrain.yaml

Does it make sense that we pin a lot of packages? Also, nextalign, why is it pinned at 0.2.0 and not updated to 1.4.1? Same for pangolin etc.

huddlej commented 3 years ago

Yes, we pin packages to ensure that the conda environment will run the workflow as expected and also to trigger Snakemake's automatic updating of the conda environment with --use-conda (Snakemake will rebuild your local environment when the contents of the environment file change).

We don't regularly update the pinned versions, but you should definitely feel free to update these as you notice packages that need it (nextalign and pangolearn are both good to update).

I don't know how many people use the --use-conda interface to run their workflows, but I suspect few people on our team (other than me) do. If more people used it, I bet more people would notice packages that need to be updated. :)

(I just assigned this to you, @corneliusroemer, in case you want to close it with a commit that updates the packages mentioned above.)

corneliusroemer commented 3 years ago

If you install a nextstrain env from the .yaml and you update --all it will also not update, even if you don't use --use-conda in Snakemake, right?

huddlej commented 3 years ago

The pinned versions should only affect the initial installation. I would expect the update command to upgrade software that has newer versions available.

mamba env create -n test-ncov -f=workflow/envs/nextstrain.yaml
conda activate test-ncov
mamba update --all -c conda-forge -c bioconda

This works for me as expected, installing nextalign 1.4.0, for example, in place of 0.2.0.