gbrammer / eazy-py

Pythonic photometric redshift tools based on EAZY
MIT License
37 stars 25 forks source link

Add dust_attenuation and dust_extinction to setup as required dependencies #30

Closed larrybradley closed 1 year ago

larrybradley commented 1 year ago

The dust_attenuation and dust_extinction packages are required runtime dependencies (https://github.com/gbrammer/eazy-py/blob/master/eazy/__init__.py#L12-L24). I've added these packages (using your forks) in the setup so they will be installed with only pip install eazy.

BTW, why do you require your forked versions of these packages? Your fork of dust_attenuation is currently identical to https://github.com/karllark/dust_attenuation and dust_extinction is 31 commits behind https://github.com/karllark/dust_extinction.

gbrammer commented 1 year ago

Thanks, @larrybradley. I had made some modifications to dust_extinction some time ago and haven't checked recently. That was back when I wasn't doing much to push changes through PRs back to the original modules, so I'll have a look to see if that will be straightforward for dust_extinction.

larrybradley commented 1 year ago

Since it's the same, I updated dust_attenuation to use Karl's repo (it's not available on PyPI yet). I don't see any commits from you (or a new branch) in your dust_extinction fork. It appears to be simply 31 commits behind Karl's. dust_extinction is available on PyPI.

gbrammer commented 1 year ago

Hmm, this is why I had left those out:

pip install grizli
...
ERROR: Packages installed from PyPI cannot depend on packages which are not also hosted on PyPI.
eazy depends on dust-attenuation@ git+https://github.com/karllark/dust_attenuation#egg=dust_attenuation 

dust_extinction was fine since it is on pip, but installing dust_attenuation from the repo doesn't play well.

larrybradley commented 1 year ago

That's a bit annoying, but I understand why PyPI is restricted.

There is a workaround to this issue, but it's not great:

pip install [-U] eazy --no-deps
pip install [-U] eazy

I'll remove the dust_attenuation package from setup.