Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC documents the requirements.txt & updates travis
- This PR documents the doc-requirements file and updates travis to use this
  file during the installation process.
- Added pillow requirements.
- Cleaned up conf.py a bit.
  • Loading branch information
NelleV committed Sep 7, 2016
commit faec918cf8de1445c7364b0ea637ec7b7662f705
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ install:
- |
# Install dependencies from pypi
pip install $PRE python-dateutil $NUMPY pyparsing!=2.1.6 $PANDAS pep8 cycler coveralls coverage
pip install $PRE pillow sphinx!=1.3.0 $MOCK numpydoc ipython colorspacious
pip install $PRE -r doc-requirements.txt

# Install nose from a build which has partial
# support for python36 and suport for coverage output suppressing
Expand Down Expand Up @@ -142,13 +142,6 @@ install:
# Install matplotlib
pip install -e .
- |
# Installing basemap from github until it's back on pypi
# We have to install it after matplotlib to avoid pulling in MPL as
# a dependency
if [[ $BUILD_DOCS == true ]]; then
pip install pyshp!=1.2.8
pip install git+https://github.com/matplotlib/basemap.git
fi;

script:
# The number of processes is hardcoded, because using too many causes the
Expand Down
1 change: 1 addition & 0 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ numpydoc
ipython
mock
colorspacious
pillow
12 changes: 3 additions & 9 deletions doc/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,15 @@ maptlotlib documentation
Building the documentation
--------------------------

Dependencies:

* sphinx > 1.0
* numpydoc
* ipython
* mock
* colorspacious
A list of dependencies can be found in ../doc-requirements.txt.

All of these dependencies can be installed through pip::

pip install sphinx numpydoc ipython mock colorspacious
pip install -r ../doc-requirements.txt

or conda::

conda install sphinx numpydoc ipython mock colorspacious
conda install sphinx numpydoc ipython mock colorspacious pillow

To build the HTML documentation, type ``python make.py html`` in this
directory. The top file of the results will be ./build/html/index.html
Expand Down
30 changes: 16 additions & 14 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,20 @@
"colorspacious to build the documentation")

try:
import mock
from unittest.mock import MagicMock
except ImportError:
try:
from mock import MagicMock
except ImportError:
raise ImportError("No module named mock - you need to install "
"mock to build the documentation")

try:
import matplotlib
except ImportError:
raise ImportError("No module named mock - you need to install "
"mock to build the documentation")
msg = "Error: matplotlib must be installed before building the documentation"
sys.exit(msg)


autosummary_generate = True

Expand All @@ -82,17 +92,14 @@

# General substitutions.
project = 'Matplotlib'
copyright = '2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team; 2012 - 2014 The matplotlib development team'
copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, '
'Michael Droettboom and the matplotlib development '
'team; 2012 - 2016 The matplotlib development team')

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
# The short X.Y version.
try:
import matplotlib
except ImportError:
msg = "Error: matplotlib must be installed before building the documentation"
sys.exit(msg)

version = matplotlib.__version__
# The full version, including alpha/beta/rc tags.
Expand Down Expand Up @@ -298,11 +305,6 @@
1),
]

try:
from unittest.mock import MagicMock
except:
from mock import MagicMock


class MyWX(MagicMock):
class Panel(object):
Expand Down