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

ENH: Add lockfile with exact versions of the various packages for inspection somewhere in this repo #6

Closed
corneliusroemer opened this issue Dec 5, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@corneliusroemer
Copy link
Member

I installed this meta-package using

mamba create -n nextstrain-base -c nextstrain nextstrain-base

and was surprised to find iqtree 1.6 instead of a current version. I'm curious whether this is just a thing that happens to me or whether everyone gets this old package.

Is there such a thing as a lockfile for this metapackage or does this not exist? How can we check which versions get installed then, and make sure there are no hickups? Maybe we need to add constraints to prevent this from happening? Like specifying iqtree >=2 etc?

Here's the env I got: env.txt

@corneliusroemer corneliusroemer added the enhancement New feature or request label Dec 5, 2022
@tsibley
Copy link
Member

tsibley commented Dec 6, 2022

Is there such a thing as a lockfile for this metapackage or does this not exist?

The meta-package is the "lockfile". Each generated and published package locks its full dependency tree. The src/recipe.yaml file in version control is the basis for the initial shallow dependencies.

(Have you read thru the README?)

How can we check which versions get installed then, and make sure there are no hickups?

Inspect the generated Conda packages. Note that dependencies vary between platforms (linux-64, osx-64).

You can use micromamba search:

micromamba search --json --override-channels -c nextstrain nextstrain-base \
  | jq '.result.pkgs[0] | {url, depends}'

or Anaconda's API:

curl -fsSL https://api.anaconda.org/release/nextstrain/nextstrain-base/latest \
  | jq '.distributions | map(select(.attrs.subdir == "linux-64")) | .[0] | {basename, depends: .attrs.depends}'

or look at the info/recipe/recipe.yaml.template included in each package as metadata:

# Download a .conda package archive one way or another, then…
micromamba package extract ~/Downloads/nextstrain-base-20221109T175138Z-hb0f4dca_1_locked.conda /tmp/pkg
cat /tmp/pkg/info/recipe/recipe.yaml.template

or look at this repo's CI build logs or artifacts.

Maybe we need to add constraints to prevent this from happening? Like specifying iqtree >=2 etc?

Maybe! We should see why the resolver uses iqtree 1 in the first place.

@tsibley
Copy link
Member

tsibley commented Dec 6, 2022

Expanding on what the README implies: the fully-locked recipes aren't tracked in version control because:

  1. They are platform-specific, so we'd have to track one per platform.
  2. It's not clear how to handle branches/merges/tags to keep updates from conflicting.
  3. Doing so would be noisy in the commit logs.
  4. The most authoritative thing (the thing that matters) is what's in the actual generated (and published) packages, so inspecting those seems best.
  5. It makes the build workflow is very akin to https://github.com/nextstrain/docker-base. The src/recipe.yaml file here is to the Dockerfile there as the generated Conda packages here are to the generated Docker images there.

@corneliusroemer corneliusroemer added the documentation Improvements or additions to documentation label Dec 6, 2022
@corneliusroemer
Copy link
Member Author

Thanks! I hadn't fully digested the README now it's all clear. Downloaded and inspected the lockfile from a CI run and see that IQtree 1.6 is in there.

It could be very helpful to have your first comment above on "various way to inspect the lockfile" somewhere above the develop section in the README, as part of "how to test/verify".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

2 participants