skypyproject / skypy

SkyPy: A package for modelling the Universe.
BSD 3-Clause "New" or "Revised" License
118 stars 38 forks source link

Speclite 0.13 incompatible with Astropy 4.3.x #482

Closed rrjbca closed 3 years ago

rrjbca commented 3 years ago

With astropy 4.3 the function _find_pkg_data_path was renamed to get_pkg_data_path. Speclite 0.13 uses the old function name and is therefore incompatible with astropy>=4.3. There is a fix for this on the speclite develop branch but this patch has not yet been incorporated into a release. Critically, this incompatibility causes our readthedocs builds to fail and in turn blocks our CI checks. This requires a two stage fix...

To Reproduce

  1. pip install astropy==4.3.1 speclite==0.13
  2. git clone https://github.com/skypy/skypy.git
  3. cd skypy/docs
  4. make html
WARNING: examples/galaxies/plot_photometry.py failed to execute correctly: Traceback (most recent call last): 
  File "examples/galaxies/plot_photometry.py", line 65, in <module>
    pipeline.execute()
  File "skypy/pipeline/_pipeline.py", line 191, in execute
    self.state[table][column] = self.evaluate(settings)
  File "skypy/pipeline/_pipeline.py", line 264, in evaluate
    return value.evaluate(self)
  File "skypy/pipeline/_items.py", line 93, in evaluate
    return self.function(*args, **kwargs)
  File "skypy/galaxies/spectrum.py", line 143, in stellar_mass
    Mt = self.absolute_magnitudes(coefficients, filter)
  File "skypy/utils/photometry.py", line 191, in absolute_magnitudes
    M = mag_ab(self.wavelength, self.templates, filters, coefficients=coefficients)
  File "skypy/utils/photometry.py", line 92, in mag_ab
    filters = load_filters(*filters)
  File "speclite/filters.py", line 1807, in load_filters
    filters_path = astropy.utils.data._find_pkg_data_path('data/filters/')
AttributeError: module 'astropy.utils.data' has no attribute '_find_pkg_data_path'