openearth / aeolis-python

A process-based model for simulating supply-limited aeolian sediment transport
http://aeolis.readthedocs.io/
GNU General Public License v3.0
34 stars 26 forks source link

Missing imports warnings in docs branch #153

Closed niketagrawal closed 1 year ago

niketagrawal commented 1 year ago

Building the docs in docs branch generates warnings for missing imports.

$ make html
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v7.1.2
making output directory... done
checking bibtex cache... out of date
parsing bibtex file ~/aeolis-python/docs/aeolis.bib... parsed 160 entries
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 18 source files that are out of date
updating environment: [new config] 18 added, 0 changed, 0 removed
<frozen importlib._bootstrap>:219: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 16 from C header, got 96 from PyObject
reading sources... [100%] user/whatsnew
WARNING: autodoc: failed to import class 'AeoLiS' from module 'model'; the following exception was raised:
Traceback (most recent call last):
  File "~/aeolis-dev/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 66, in import_module
    return importlib.import_module(modname)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "~/aeolis-python/aeolis/model.py", line 48, in <module>
    import aeolis.inout
  File "~/aeolis-python/aeolis/__init__.py", line 55, in <module>
    import aeolis.model
  File "~/aeolis-python/aeolis/model.py", line 49, in <module>
    import aeolis.bed
  File "~/aeolis-python/aeolis/bed.py", line 32, in <module>
    import aeolis.gridparams
  File "~/aeolis-python/aeolis/gridparams.py", line 37, in <module>
    def initialize(s:dict, p:dict) -> tuple[dict, dict]:
TypeError: 'type' object is not subscriptable
manuGil commented 1 year ago

While following this issue, another came out. There's a conflict between the versions of RTD theme and docutils. https://github.com/readthedocs/sphinx_rtd_theme/pull/1517

They fixed the incompatibility issue but it requires Sphinx > 7.1

manuGil commented 1 year ago

There is also incompatibility between sphinx-rtd-theme version 1.3 and Sphinx 7. https://github.com/readthedocs/readthedocs.org/issues/10279 Pining the Sphinx versions ot <7 solved the issue