PAHFIT / pahfit

Model Decomposition for Near- to Mid-Infrared Spectroscopy of Astronomical Sources
https://pahfit.readthedocs.io/
18 stars 26 forks source link

Use of pkg_resources #277

Closed drvdputt closed 4 months ago

drvdputt commented 5 months ago

In pahfit/features/features.py, pkg_resources is used. In a few cases (e.g. freshly created environment with Python venv and then pip install pahfit), I have run into an import error for this. The quick fix is always to pip install setuptools. For a smoother install experience, we should either

  1. Include setuptools as a dependency in setup.cfg
  2. Refactor the code to use the native importlib.resources instead (https://docs.python.org/3/library/importlib.resources.html) (I'm not sure if pkg_resources is deprecated or not)
drvdputt commented 4 months ago

Fixed in dev branch by #278