Skip to content

Commit

Permalink
Fix import errors in make docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GDYendell committed Jul 18, 2016
1 parent 988b08b commit 98a26aa
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 88 deletions.
11 changes: 10 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@
import re
import sys

from pkg_resources import require
require('mock')
from mock import MagicMock

# Mock out failing imports
MOCK_MODULES = ["tornado", "tornado.websocket", "tornado.websocket",
"tornado.web", "tornado.httpserver", "tornado.ioloop",
"cothread", "scanpointgenerator"]
sys.modules.update((mod_name, MagicMock()) for mod_name in MOCK_MODULES)

sys.path.append(os.path.dirname(__file__))
from generate_api_docs import generate_docs

generate_docs() # Generate api.rst


def get_version():
"""
Extracts the version number from the version.py file.
Expand Down
85 changes: 0 additions & 85 deletions docs/dev/api.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/dev/metas_api/scalarmeta.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ScalarMeta
----------

.. module:: malcolm.metas
.. module:: malcolm.metas.scalarmeta

.. autoclass:: ScalarMeta
:members:
2 changes: 1 addition & 1 deletion docs/dev/wscomms_api/wsservercomms.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
WSServerComms
-------------

.. module:: malcolm.wscomms.wservercomms
.. module:: malcolm.wscomms.wsservercomms

.. autoclass:: WSServerComms
:members:
1 change: 1 addition & 0 deletions malcolm/wscomms/wsclientcomms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import OrderedDict
import json

import tornado
from tornado.ioloop import IOLoop
from tornado.websocket import websocket_connect

Expand Down
1 change: 1 addition & 0 deletions malcolm/wscomms/wsservercomms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import OrderedDict
import json

import tornado
from tornado.websocket import WebSocketHandler
from tornado.ioloop import IOLoop
from tornado.web import Application
Expand Down

0 comments on commit 98a26aa

Please sign in to comment.