Skip to content

Commit

Permalink
Add mocking back in
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvm committed Oct 7, 2015
1 parent 2fc06f3 commit 377688c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ install:
- conda install -q --yes python=$TRAVIS_PYTHON_VERSION --file req-travis-conda.txt
- pip install -q -r req-travis-pip.txt
script:
- pip install -e . -r req.txt # Tests setup.py
- pip install -e . -r requirements.txt # Tests setup.py
- curl https://raw.githubusercontent.com/mila-udem/fuel/master/.travis-data.sh | bash -s -- mnist
- # Must export environment variable so that the subprocess is aware of it
- export THEANO_FLAGS=floatX=$FLOATX,optimizer=fast_compile
Expand Down
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import sys
import os
from mock import Mock as MagicMock
from sphinx.ext.autodoc import cut_lines

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -58,6 +59,14 @@
'python': ('http://docs.python.org/3.4', None)
}

class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return Mock()

MOCK_MODULES = ['fuel']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

graphviz_dot_args = ['-Gbgcolor=#fcfcfc'] # To match the RTD theme
graphviz_output_format = 'svg' # To produce SVG figures

Expand Down
10 changes: 5 additions & 5 deletions docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ directly from GitHub.
.. code-block:: bash
$ pip install git+git://github.com/mila-udem/blocks.git \
-r https://raw.githubusercontent.com/mila-udem/blocks/master/req.txt
-r https://raw.githubusercontent.com/mila-udem/blocks/master/requirements.txt
This will give you the cutting-edge development version. The latest stable
release is in the ``stable`` branch and can be installed as follows.

.. code-block:: bash
$ pip install git+git://github.com/mila-udem/blocks.git@stable \
-r https://raw.githubusercontent.com/mila-udem/blocks/stable/req.txt
-r https://raw.githubusercontent.com/mila-udem/blocks/stable/requirements.txt
.. note::

Blocks relies on several packages, such as Theano_ and picklable_itertools_,
to be installed directly from GitHub. The only way of doing so reliably is
through a ``req.txt`` file, which is why this installation command
through a ``requirements.txt`` file, which is why this installation command
might look slightly different from what you're used to.

Installing requirements from GitHub requires pip 1.5 or higher; you can
Expand Down Expand Up @@ -85,7 +85,7 @@ with your own GitHub user name:
.. code-block:: bash
$ pip install -e [email protected]:USER/blocks.git#egg=blocks[test,docs] --src=$HOME \
-r https://raw.githubusercontent.com/mila-udem/blocks/master/req.txt
-r https://raw.githubusercontent.com/mila-udem/blocks/master/requirements.txt
As with the usual installation, you can use ``--user`` or ``--no-deps`` if you
need to. You can now make changes in the ``blocks`` directory created by pip,
Expand All @@ -96,7 +96,7 @@ command from the folder you cloned Blocks to:

.. code-block:: bash
$ pip install -e file:.#egg=blocks[test,docs] -r req.txt
$ pip install -e file:.#egg=blocks[test,docs] -r requirements.txt
.. _fork Blocks on GitHub: https://github.com/mila-udem/blocks/fork

Expand Down
9 changes: 9 additions & 0 deletions req-rtd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
picklable-itertools==0.1.1
progressbar2==2.7.3
pyyaml==3.11
six==1.9.0
toolz==0.7.2

--allow-external theano
--allow-unverified theano
git+https://github.com/Theano/Theano.git#egg=theano
File renamed without changes.

0 comments on commit 377688c

Please sign in to comment.