metoppv / improver

IMPROVER is a library of algorithms for meteorological post-processing.
http://improver.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
103 stars 85 forks source link

BLD: Fix CI Tests / Sphinx-Pytest-Coverage (conda-forge) failing #2011

Closed cpelley closed 2 months ago

cpelley commented 3 months ago

Changes in environment resulting in failure in CI Tests / Sphinx-Pytest-Coverage (conda-forge)

Most recent working CI Tests / Sphinx-Pytest-Coverage (conda-forge) run:

package version CI
pandas 2.0.0 (py39h2ad29b5_0) link
pillow 10.0.1 (py39h444a776_1) link

Most recent (broken) CI Tests / Sphinx-Pytest-Coverage (conda-forge) run:

package version CI
pandas 2.2.2 (py39hfc16268_1) link
pillow 10.4.0 (py39h16a7006_0) link

Failure in CI:

https://github.com/metoppv/improver/actions/runs/9810862589/job/27091941214?pr=2003

...
  File "/usr/share/miniconda/envs/imconda-forge/lib/python3.9/site-packages/PIL/Image.py", line 68, in <module>
    from ._typing import StrOrBytesPath, TypeGuard
  File "/usr/share/miniconda/envs/imconda-forge/lib/python3.9/site-packages/PIL/_typing.py", line 10, in <module>
    NumpyArray = npt.NDArray[Any]
AttributeError: module 'numpy.typing' has no attribute 'NDArray'

after pinning pillow only, we get a little further but still fails:

https://github.com/metoppv/improver/actions/runs/9835034815/job/27147915426#step:6:519

WARNING: autodoc: failed to import module 'dataframe_utilities' from module 'improver.calibration'; the following exception was raised:
C extension: None not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext' to build the C extensions first.
WARNING: autodoc: failed to import module 'dz_rescaling' from module 'improver.calibration'; the following exception was raised:
C extension: None not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext' to build the C extensions first.

Issues

cpelley commented 3 months ago

It's gotten further with the pinned pillow package but we do still fail, perhaps related to this warning:

WARNING: autodoc: failed to import module 'dataframe_utilities' from module 'improver.calibration'; the following exception was raised:
C extension: None not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext' to build the C extensions first.
WARNING: autodoc: failed to import module 'dz_rescaling' from module 'improver.calibration'; the following exception was raised:
C extension: None not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext' to build the C extensions first.
cpelley commented 3 months ago

pinning pandas resolved the remaining failure. Updating the description accordingly.

cpelley commented 3 months ago

On approval, I'll open a PR targeting the improver feedstock.