From 95b582078327e6b02f54c29449c7a2768f51dad5 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 16 Jul 2019 22:29:23 +0200 Subject: [PATCH] Fixes for readthedocs build --- docs/source/conf.py | 9 +++++++++ .../platypush/plugins/assistant.google.pushtotalk.rst | 2 -- platypush/backend/assistant/snowboy/__init__.py | 3 +-- platypush/plugins/camera/__init__.py | 6 +++--- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 508b6c0df..34e63709a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -210,6 +210,15 @@ autodoc_mock_imports = ['googlesamples.assistant.grpc.audio_helpers', 'nfc', 'ndef', 'bcrypt', + 'google', + 'feedparser', + 'kafka', + 'googlesamples', + 'icalendar', + 'httplib2', + 'mpd', + 'serial', + 'pyHS100', ] sys.path.insert(0, os.path.abspath('../..')) diff --git a/docs/source/platypush/plugins/assistant.google.pushtotalk.rst b/docs/source/platypush/plugins/assistant.google.pushtotalk.rst index 19f03e144..5ad2dd045 100644 --- a/docs/source/platypush/plugins/assistant.google.pushtotalk.rst +++ b/docs/source/platypush/plugins/assistant.google.pushtotalk.rst @@ -4,5 +4,3 @@ .. automodule:: platypush.plugins.assistant.google.pushtotalk :members: - - diff --git a/platypush/backend/assistant/snowboy/__init__.py b/platypush/backend/assistant/snowboy/__init__.py index 15912135b..d638887eb 100644 --- a/platypush/backend/assistant/snowboy/__init__.py +++ b/platypush/backend/assistant/snowboy/__init__.py @@ -34,8 +34,7 @@ class AssistantSnowboyBackend(Backend): * **snowboy** (``pip install snowboy``) - Manual installation for snowboy and its Python bindings if the command above - fails: + Manual installation for snowboy and its Python bindings if the command above fails:: $ [sudo] apt-get install libatlas-base-dev swig $ [sudo] pip install pyaudio diff --git a/platypush/plugins/camera/__init__.py b/platypush/plugins/camera/__init__.py index f0b382664..bdd5f1407 100644 --- a/platypush/plugins/camera/__init__.py +++ b/platypush/plugins/camera/__init__.py @@ -37,9 +37,6 @@ class CameraPlugin(Plugin): * **opencv** (``pip install opencv-python``) """ - _default_frames_dir = os.path.join(Config.get('workdir'), 'camera', - 'frames') - _default_warmup_frames = 5 _default_sleep_between_frames = 0 _default_color_transform = 'COLOR_BGR2BGRA' @@ -116,6 +113,9 @@ class CameraPlugin(Plugin): super().__init__(**kwargs) + self._default_frames_dir = os.path.join(Config.get('workdir'), 'camera', + 'frames') + self.default_device_id = device_id self.frames_dir = os.path.abspath(os.path.expanduser(frames_dir)) self.warmup_frames = warmup_frames