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

Mismatch between pip and conda dependency pins: which is the intended one? #24

Closed
corneliusroemer opened this issue May 4, 2023 · 3 comments · Fixed by bioconda/bioconda-recipes#40779

Comments

@corneliusroemer
Copy link

In this docker-base PR nextstrain/docker-base#145 the build failed because pip seems to think that evofr constrains jaxlib as 0.3.10 <= jaxlib < 0.4.0 and I upgraded jaxlib to 0.4.6 (see for error in build https://github.com/nextstrain/docker-base/actions/runs/4881147643/jobs/8709697128#step:8:2789)

evofr 0.1.18 depends on jaxlib<0.4.0 and >=0.3.10

I was surprised by this, as the conda recipe has different version pins, allowing any minor version

jaxlib >=0.3.10, <1

see https://github.com/bioconda/bioconda-recipes/blob/master/recipes/evofr/meta.yaml#LL27C7-L27C26

You specify the pip dependencies here as

jaxlib = "^0.3.10"

The caret ^ pins the minor version for major version 0 only (for all major versions >0 it pins only major version), see https://python-poetry.org/docs/dependency-specification/

So either:

  • a) you weren't aware of this when writing the pyproject.toml, you actually wanted to pin major version only, or
  • b) the translation from pyproject.toml to conda is not 1-to-1

jaxlib isn't the only dependency where this matters, same issue for jax, numpyro and blackjax

Would be good to sort out what is intended and align conda and pip to whatever you want it to be.

@tsibley
Copy link

tsibley commented May 4, 2023

Ah, good catch. This is a mistake in my translation of the Poetry dependency specs to Conda specs. I'll make a fix to the Conda packaging so it matches the Python packaging.

If @marlinfiggins wants to relax the dependency specs (or not), that's up to him and can be handled separately. I think Poetry, like npm, defaults to the "compatible release" operator (^) when adding dependencies.

tsibley added a commit to nextstrain/bioconda-recipes that referenced this issue May 4, 2023
I mistranslated from Poetry's specifications to Conda's when creating
this recipe.  Specifically, I didn't properly translate the behaviour of
the "compatible release" operator (^) when applied to 0.x versions, e.g.
in jaxlib = "^0.3.10".

Resolves <blab/evofr#24>.
@tsibley
Copy link

tsibley commented May 4, 2023

@corneliusroemer If you could review bioconda/bioconda-recipes#40779, that'd be appreciated.

corneliusroemer pushed a commit to bioconda/bioconda-recipes that referenced this issue May 5, 2023
I mistranslated from Poetry's specifications to Conda's when creating
this recipe.  Specifically, I didn't properly translate the behaviour of
the "compatible release" operator (^) when applied to 0.x versions, e.g.
in jaxlib = "^0.3.10".

Resolves <blab/evofr#24>.
@corneliusroemer
Copy link
Author

Done! Thanks!

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 a pull request may close this issue.

2 participants