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

The best way to update pangolin #509

Open
afdhalrashid opened this issue Feb 22, 2023 · 1 comment
Open

The best way to update pangolin #509

afdhalrashid opened this issue Feb 22, 2023 · 1 comment

Comments

@afdhalrashid
Copy link

I believe using "conda update pangolin" will update the package inside pangolin.
While git pull will update the our local pangolin source code.
For update minor release, "pangolin --update". What's the differences? And lastly "pangolin --update-data" .

So which command need to use to update PANGOLIN, either source code and it's data.

Thanks

@AngieHinrichs
Copy link
Member

Hi @afdhalrashid, the best way to update pangolin depends on the way that you installed pangolin. https://cov-lineages.org/resources/pangolin/updating.html covers the two main types of installation: Bioconda/mamba installation and development mode installation. It doesn't completely cover the case of merging upstream changes to the main cov-lineages/pangolin repository on github with changes that you have made locally.

I believe using "conda update pangolin" will update the package inside pangolin.

conda update pangolin is applicable only if you installed pangolin using conda install pangolin as described in the "Using Bioconda or Mamba" section of https://cov-lineages.org/resources/pangolin/installation.html .

If you did the development mode installation and especially if you modified the source code, then don't use conda update pangolin.

While git pull will update the our local pangolin source code.

Yes. If you have made changes to the source code then it might be a little more complicated than simply running git pull. It depends on how you cloned the pangolin repository when you first did a development mode installation of pangolin:

  • Did you run a command like git clone https://github.com/cov-lineages/pangolin.git ? [in this case, git pull should work although you might need to resolve merge conflicts]
  • or did you create a fork of cov-lineages on github.com, and then clone your fork of pangolin to your computer? [in this case you might need to git remote add upstream https://github.com/cov-lineages/pangolin.git and then git pull upstream master instead of only git pull]
  • or some other method?

For update minor release, "pangolin --update". What's the differences? And lastly "pangolin --update-data" .

pangolin --update is usually not applicable for development mode installations, and doesn't work for any type of installation when the latest release of pangolin requires a new conda or pip package or an updated version of a package. It works for Bioconda/mamba installations for "minor releases" (releases that do not need any package/environment changes) but it's always safest to follow the "For Major Releases" instructions for either Bioconda/mamba installation or development mode installation in https://cov-lineages.org/resources/pangolin/updating.html .

pangolin --update sends queries to github to find out the latest release version for the cov-lineages repositories pangolin, scorpio, pangolin-data and constellations. (If you have installed the optional assignment cache then it also queries for pangolin-assignment.) Then it compares the github latest version to the locally installed version for each of those cov-lineages repositories. If the github latest version is more recent than the locally installed version, then pangolin uses pip install to install the latest release from github. That is fine if the latest release does not require any conda package/environment updates, and if you have not made any local changes.

pangolin --update-data does not update the software modules (pangolin and scorpio), only the data (pangolin-data, constellations, and optionally pangolin-assignment). It is usually safe for either Bioconda/mamba or development mode installations.

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

No branches or pull requests

2 participants