CLIMADA-project / climada_python

Python (3.8+) version of CLIMADA
GNU General Public License v3.0
291 stars 115 forks source link

readthedocs build silently fails to document Python modules #873

Closed peanutfun closed 2 months ago

peanutfun commented 2 months ago

When trying to import almost any Climada module, the following warning is raised: cannot import name 'colormaps' from 'matplotlib'. Because the modules cannot be imported, their documentation does not appear in the compiled docs, see e.g. https://climada-python.readthedocs.io/en/latest/climada/climada.hazard.html

Maybe we need to upgrade the matplotlib version in the env_docs.yml?

For reference, a full warning message from the rtd build log:

WARNING: autodoc: failed to import module 'hazard.base' from module 'climada'; the following exception was raised:
cannot import name 'colormaps' from 'matplotlib' (/home/docs/checkouts/readthedocs.org/user_builds/climada-python/conda/latest/lib/python3.9/site-packages/matplotlib/__init__.py)
emanuel-schmid commented 2 months ago

🙌 Thanks for pointing this out. It would have totally escaped my attention for a while. solved with #687. for good hopefully.