From 7ab4bd219c53eae08dc4aad42736fdea31fa4063 Mon Sep 17 00:00:00 2001 From: "John Chodera (MSKCC)" Date: Sat, 31 Dec 2016 16:32:09 -0500 Subject: [PATCH] Fix some documentation issues --- docs/analysis.rst | 5 ++++- docs/conf.py | 24 +++++++++++++++++++----- docs/getting_started.rst | 11 +++++------ 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/docs/analysis.rst b/docs/analysis.rst index 7f9989d..4e8a2a5 100644 --- a/docs/analysis.rst +++ b/docs/analysis.rst @@ -2,6 +2,10 @@ .. currentmodule:: assaytools +.. note:: + This section is under heavy construction! + For now, see the examples directory: https://github.com/choderalab/assaytools/tree/master/examples + Analysis Functions ================== @@ -11,4 +15,3 @@ Here's an example :: >>> import assaytools >>> dataset = assaytools.load('dataset.xml') - diff --git a/docs/conf.py b/docs/conf.py index f7efcdb..4489eee 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,12 +18,26 @@ #import assaytools #import assaytools.version -# Use mock to make our code think that numpy and scipy are available, even though they might not be available on readthedocs -import mock +import sys +try: + from unittest.mock import MagicMock +except ImportError: + from mock import Mock as MagicMock + +class Mock(MagicMock): + @classmethod + def __getattr__(cls, name): + return MagicMock() -MOCK_MODULES = ['numpy', 'scipy', 'numpy.linalg', 'scipy.special', 'scipy.stats', 'pymc', 'pint'] -for mod_name in MOCK_MODULES: - sys.modules[mod_name] = mock.Mock() +MOCK_MODULES = ['numpy', 'scipy', 'numpy.linalg', 'scipy.special', 'scipy.stats', 'pymc', 'pint', 'pandas'] +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) + +# Use mock to make our code think that numpy and scipy are available, even though they might not be available on readthedocs +#import mock +# +#MOCK_MODULES = ['numpy', 'scipy', 'numpy.linalg', 'scipy.special', 'scipy.stats', 'pymc', 'pint'] +#for mod_name in MOCK_MODULES: +# sys.modules[mod_name] = mock.Mock() # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 0ae8861..3ee87cf 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -10,15 +10,11 @@ Install with conda ------------------ .. _install-with-conda: -To install `AssayTools` with `conda `_`, use the following commands: +To install `AssayTools` and its dependencies with `conda `_`, use the following commands: :: - $ conda install -c omnia assaytools -.. note:: - ``conda`` will automatically all of the tricky dependencies from binary packages automatically! - This includes :mod:`pytables`, :mod:`numpy`, :mod:`scipy`, :mod:`pandas`, and :mod:`pymc`! - The easiest way to get ``conda`` is with the `Anaconda python distribution `_, or its smaller version `Miniconda `_. + $ conda install -c omnia assaytools Install from source ------------------- @@ -27,6 +23,7 @@ Install from source You can install the latest development version of ``AssayTools`` from github via ``pip``: :: + $ pip install git+https://github.com/choderalab/assaytools.git Testing Your Installation @@ -37,9 +34,11 @@ Running the tests is a great way to verify that everything is working. The test suite uses `nose `_, which you can install via ``conda``: :: + $ conda install nose Then, to run the tests: :: + $ nosetests -vv assaytools