FABLE-3DXRD / xrd_simulator

Tools for simulating x-ray diffraction. Detailed documentation is found at the below link.
https://fable-3dxrd.github.io/xrd_simulator/
MIT License
21 stars 7 forks source link

Pinned versions? #4

Closed jonwright closed 8 months ago

jonwright commented 9 months ago

Hi Axel, I just tried to install with a draft environment for the ESRF site conda and I got an error with the version on pip (below). With a git checkout I just needed to bump to allow python 3.11 and then pytest in xrd_simulator/tests is passing.

Shall I send a pull request or is there a reason to avoid python 3.11?

Thanks!

Jon

(jupy2023) hpc5-0301:~/git/PolyXSim/test % pip install xrd-simulator
DEPRECATION: Loading egg at /gpfs/easy/data/id11/jon/mamba/envs/jupy2023/lib/python3.11/site-packages/cctbx_base-2023.8-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
Collecting xrd-simulator
  Downloading xrd_simulator-0.1.1-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.4/80.4 kB 6.9 MB/s eta 0:00:00
Collecting matplotlib==3.3.1 (from xrd-simulator)
  Downloading matplotlib-3.3.1.tar.gz (38.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.8/38.8 MB 223.7 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
INFO: pip is looking at multiple versions of xrd-simulator to determine which version is compatible with other requirements. This could take a while.
Collecting xrd-simulator
  Downloading xrd_simulator-0.0.9-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 105.1 MB/s eta 0:00:00
  Downloading xrd_simulator-0.0.8-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 105.4 MB/s eta 0:00:00
  Downloading xrd_simulator-0.0.7-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 104.6 MB/s eta 0:00:00
  Downloading xrd_simulator-0.0.6-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 111.4 MB/s eta 0:00:00
  Downloading xrd_simulator-0.0.5-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 110.0 MB/s eta 0:00:00
  Downloading xrd_simulator-0.0.4-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 113.1 MB/s eta 0:00:00
  Downloading xrd_simulator-0.0.3-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 111.3 MB/s eta 0:00:00
INFO: pip is still looking at multiple versions of xrd-simulator to determine which version is compatible with other requirements. This could take a while.
  Downloading xrd_simulator-0.0.2-py3-none-any.whl (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.1/44.1 kB 79.3 MB/s eta 0:00:00
Collecting miniball==1.1.0 (from xrd-simulator)
  Downloading miniball-1.1.0.tar.gz (6.3 kB)
  Preparing metadata (setup.py) ... done
Collecting xrd-simulator
  Downloading xrd_simulator-0.0.1-py3-none-any.whl (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.0/44.0 kB 97.2 MB/s eta 0:00:00
ERROR: Cannot install xrd-simulator==0.0.1, xrd-simulator==0.0.2, xrd-simulator==0.0.3, xrd-simulator==0.0.4, xrd-simulator==0.0.5, xrd-simulator==0.0.6, xrd-simulator==0.0.7, xrd-simulator==0.0.8, xrd-simulator==0.0.9 and xrd-simulator==0.1.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    xrd-simulator 0.1.1 depends on numpy==1.21.4
    xrd-simulator 0.0.9 depends on numpy==1.21.4
    xrd-simulator 0.0.8 depends on numpy==1.21.4
    xrd-simulator 0.0.7 depends on numpy==1.21.4
    xrd-simulator 0.0.6 depends on numpy==1.21.4
    xrd-simulator 0.0.5 depends on numpy==1.21.4
    xrd-simulator 0.0.4 depends on numpy==1.21.4
    xrd-simulator 0.0.3 depends on numpy==1.21.4
    xrd-simulator 0.0.2 depends on numpy==1.21.4
    xrd-simulator 0.0.1 depends on miniball==1.1.0matplotlib==3.3.1numpy==1.21.4meshio==5.0.2pygalmesh==0.10.6scipy==1.6.1xfab==0.0.4numba

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
AxelHenningsson commented 8 months ago

Hey, 😃

Out of curiosity was it a clean environment with python 3.10 that got you that error, or did you already have some stuff in the env that forced the pin on numpy (maybe ImageD11)?

I think that bumping to python 3.11 at this point should be unproblematic. 👍 I would love a pull request. ❤️ thanks.

Cheers Axel

jonwright commented 8 months ago

Oops - I have just pushed directly onto this repo - sorry. Probably I need to reconfigure something to prevent that in the future? I guess the pip message about numpy is wrong or misleading. Anyway, I removed the upper python version limit in 39e91632 so it may break on a future python release, but at least we will find out.