alphamap icon indicating copy to clipboard operation
alphamap copied to clipboard

Unpin Python requirements

Open ecederstrand opened this issue 2 years ago • 4 comments

Overview

https://github.com/MannLabs/alphamap/blob/master/requirements.txt pins a handful of Python package dependencies, e.g. numpy==1.19.2. I cannot decide from the commit history that this is due to specific requirements of alphamap.

Pinning packages makes it difficult to combine alphamap with other packages that also depend on e.g. numpy. Instead, it would be helpful to specify dependencies either open, numpy>=1.19.2, or limited to the next major version (numpy>=1.19.2,<2), assuming dependency maintainers adhere to semantic versioning and don't introduce breaking changes between major versions.

Dependencies that need more specific versions could be pinned with a commit that references the issue describing the reasoning for pinning to exact versions. Then it's easier to go back later and check if the pinning is still necessary.

ecederstrand avatar Dec 20 '22 14:12 ecederstrand

I am facing similar issue and it seems this has stagnated. Any updates? Trying to install with poetry:

> poetry add alphamap
Using version ^0.1.10 for alphamap

Updating dependencies
Resolving dependencies... (3.4s)

Because pandas (1.4.0) depends on numpy (>=1.20.0)
 and alphamap (0.1.10) depends on numpy (1.19.2), pandas (1.4.0) is incompatible with alphamap (0.1.10).
And because alphamap (0.1.10) depends on pandas (1.4.0), alphamap is forbidden.
So, because no versions of alphamap match >0.1.10,<0.2.0
 and peptide-mapping depends on alphamap (^0.1.10), version solving failed.

m-pauper avatar Jul 24 '24 13:07 m-pauper

Sorry for not reacting on this earlier. We have now created a new alphamap release with loose dependencies. This version should now be compatible with other packages and for integration. Please let us know in case you still encounter any issues!

ibludau avatar Jul 25 '24 09:07 ibludau

Hello, thanks for trying to fix. There's a different issue now.

  1. I have had to set python specifically to python = ">=3.8,<3.10", otherwise structuremap would complain.
  2. install alphamap now fails with:
 • Installing kaleido (0.2.1.post1): Failed

  RuntimeError

  Unable to find installation candidates for kaleido (0.2.1.post1)

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/chooser.py:76 in choose_for
       72│
       73│             links.append(link)
       74│
       75│         if not links:
    →  76│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       77│
       78│         # Get the best link
       79│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       80│

Edit: It does work if I first create a poetry shell and then pip install alphamap. But it does not with poetry add alphamap. Maybe not an issue on your side, although if you have any ideas how to fix this I'd be all ears :)

m-pauper avatar Jul 25 '24 09:07 m-pauper

Thanks for your prompt reply:

  1. structuremap is next on my todo list - will get back to you about that
  2. I haven't tried installing alphamap via poetry so far, so no idea what this could be about, but can try to get to the bottom of it

ibludau avatar Jul 25 '24 10:07 ibludau