cescalara / fancy

UHECR modelling and fitting tools
BSD 3-Clause "New" or "Revised" License
4 stars 6 forks source link

Dependency conflict for Python3.8 #31

Open kwat0308 opened 9 months ago

kwat0308 commented 9 months ago

Currently, using this package with Python <3.9 is not supported due to the dependency of the ligo.skymap package. However, using the Galactic Magnetic Field Lensing with CRPropa3 is currently only support up to Python3.8 due to issues with SWIG. While this may be fixed in the future, currently utilising this package with the lensing feature leads to dependency conflicts. The only way to resolve this is to manually comment out the installation dependency in setup.cfg and the import in fancy/plotting/allskymap.py.

There should be a simple way to remove the dependency for ligo.skymap for python versions < 3.9. This will not affect any important part of the interface as this package is only used for plotting purposes, which can be done through cartopy for Py<3.9.

cescalara commented 9 months ago

I agree - could we use the try/except structure + a warning message or so when importing ligo.skymap for plots? I think I set up this structure for crpropa e.g. here

I think the easiest way is to setup the dependencies for the package without conflicts, then document the required setup for e.g. GMF lens. What do you think?

kwat0308 commented 9 months ago

I think that works. There are anyways two options for skymap plotting, and we dont have to force installation for either one and rather let the user choose. As long as we document this properly I think this will work fine.