MTgeophysics / mtpy

Python toolbox for standard Magnetotelluric (MT) data analysis
GNU General Public License v3.0
145 stars 66 forks source link

Docs not building correctly in development version #114

Open SamuelJennings opened 4 years ago

SamuelJennings commented 4 years ago

Raising the issue because I know these things can sometimes be overlooked by those that probably don't need to use the docs as much.

Expected Behavior

Readme section should link to a working version of the documentation.

Current Behavior

The link currently directs to the development version which it seems is technically passing the build but raising a number of warnings. After looking at the build report, it looks like they are mostly related to the autodoc extension.

e.g.

WARNING: autodoc: failed to import module u'core.z' from module u'mtpy'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/mtpy2/envs/develop/lib/python2.7/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module
    __import__(modname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/mtpy2/checkouts/develop/mtpy/__init__.py", line 7, in <module>
    from mtpy.utils.mtpylog import MtPyLog
  File "/home/docs/checkouts/readthedocs.org/user_builds/mtpy2/checkouts/develop/mtpy/utils/__init__.py", line 17, in <module>
    if int(osgeo.__version__[0]) >= 3:
  File "/home/docs/checkouts/readthedocs.org/user_builds/mtpy2/envs/develop/lib/python2.7/site-packages/mock.py", line 660, in __getattr__
    raise AttributeError(name)
AttributeError: __version__

Possible Solution

It looks to me like your readthedocs build settings are still set to use the Python 2 interpreter. Given all the recent changes for Python3 compatibility, maybe switching to the Python3 interpreter would fix the issue.