Skip to content

Commit

Permalink
mocking dependencies for readthedocs.org
Browse files Browse the repository at this point in the history
  • Loading branch information
skuschel committed Sep 26, 2014
1 parent 932a9bf commit cc5397d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

#pretend to have the following dependecies (needed for autodoc generation)
from mock import Mock as MagicMock
class Mock(MagicMock):
pi = 3.141592653589793
@classmethod
def __getattr__(cls, name):
return Mock()

MOCK_MODULES = ['numpy', 'matplotlib.colors', 'matplotlib.pyplot', 'matplotlib',
'scipy', 'scipy.ndimage',
'scipy.ndimage.interpolation', 'matplotlib.ticker']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
Expand Down
1 change: 1 addition & 0 deletions pip-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--index-url https://pypi.python.org/simple/

mock
pep8
nose
-e .
2 changes: 1 addition & 1 deletion postpic/analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
# Stephan Kuschel 2014
import re
import numpy as np

__all__ = ['PhysicalConstants', 'SpeciesIdentifier']

Expand All @@ -24,7 +25,6 @@ class PhysicalConstants:
"""
gives you some constants.
"""
import numpy as np

c = 299792458.0
me = 9.109383e-31
Expand Down
1 change: 0 additions & 1 deletion postpic/plotting/plotter_matplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"""

import numpy as np
from .. import _const


__all__ = ['MatplotlibPlotter']
Expand Down

0 comments on commit cc5397d

Please sign in to comment.