chris-kck / SmartAgro

ECE Design API
Other
1 stars 1 forks source link

Breaking of sphinx docs generation #5

Closed chris-kck closed 4 years ago

chris-kck commented 4 years ago

Description

Generation of docs was breaking because an import of smartagro which was requiring RPi and spidev library was not installable on makethedocs.

What I Did

cd ./docs && make html

Running Sphinx v3.2.1

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "C:\Users\...\SmartAgro\venv\lib\site-packages\sphinx\config.py", line 319, in
eval_config_file
    execfile_(filename, namespace)
  File "C:\Users\...\SmartAgro\venv\lib\site-packages\sphinx\util\pycompat.py", line 8
9, in execfile_
    exec(code, _globals)
  File "C:\Users\...\SmartAgro\docs\conf.py", line 24, in <module>
    import smartagro
  File "C:\Users\...\SmartAgro\smartagro\__init__.py", line 5, in <module>
    import smartagro.smart, smartagro.utils
  File "C:\Users\...\SmartAgro\smartagro\utils.py", line 5, in <module>
    import mcp3008
ModuleNotFoundError: No module named 'RPi'
chris-kck commented 4 years ago

Commented out the import and added imports to be mocked in autodoc_mock_imports.