Fix Sphinx documentation

pull/1360/head
Matthew D. Scholefield 2018-01-12 13:47:42 -06:00
parent f48068a50c
commit cc65e045e6
4 changed files with 23 additions and 52 deletions

View File

@ -19,7 +19,7 @@
# Mycroft documentation build configuration file
#
import sys
import re
import os
@ -28,20 +28,26 @@ sys.path.insert(0, os.path.abspath('../'))
# General Configuration
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon'
]
autodoc_mock_imports = [
'speech_recognition',
'pyaudio',
'pyalsaaudio',
'pocketsphinx',
'padatious',
'alsaaudio'
# Assuming package name is the same as the module name
with open(os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'requirements.txt')) as f:
autodoc_mock_imports = map(str.strip, re.findall(r'^\s*[a-zA-Z_]*', f.read().lower().replace('-', '_'), flags=re.MULTILINE))
# Dependencies with different module names
autodoc_mock_imports += [
'adapt',
'alsaaudio',
'dateutil',
'past',
'serial',
'websocket',
'speech_recognition'
]
templates_path = ['_templates']

39
doc/requirements.txt Normal file → Executable file
View File

@ -1,38 +1 @@
# Requirements that don't require C extensions
pystache==0.5.4
wikipedia==1.4.0
requests==2.13.0
gTTS==1.1.7
gTTS-token==1.1.1
backports.ssl-match-hostname==3.4.0.2
pyee==1.0.1
tornado==4.2.1
websocket-client==0.32.0
adapt-parser==0.3.0
pyowm==2.6.1
wolframalpha==3.0
futures==3.0.3
requests-futures==0.9.5
astral==1.4
tzlocal==1.3
parsedatetime==1.5
pyyaml==3.11
feedparser==5.2.1
xmlrunner==1.7.7
pyserial==3.0
netifaces==0.10.6
pyjokes==0.5.0
psutil==5.2.1
pep8==1.7.0
multi_key_dict==2.0.3
wifi==0.3.8
pyric==0.1.6
inflection==0.3.1
pytz==2017.2
pillow==4.1.1
python-dateutil==2.6.0
pychromecast==0.7.7
python-vlc==1.1.2
pulsectl==17.7.4
aiml==0.8.6
six

View File

@ -1,9 +1,9 @@
mycroft.util package
====================
getLogger
---------
.. autofunction:: mycroft.util.getLogger
LOG
---
.. autofunction:: mycroft.util.LOG
wait_while_speaking
-------------------

View File

@ -41,8 +41,10 @@ class LOG:
The logger name is automatically generated by the module of the caller
Usage:
LOG.debug('My message: %s', debug_str)
LOG('custom_name').debug('Another message')
>>> LOG.debug('My message: %s', debug_str)
13:12:43.673 - :<module>:1 - DEBUG - My message: hi
>>> LOG('custom_name').debug('Another message')
13:13:10.462 - custom_name - DEBUG - Another message
"""
_custom_name = None