Skip to content

Documentated dependencies to the doc and remove unecessary dependencies. #7049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
14 changes: 14 additions & 0 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Requirements for building docs
# You will first need a matching matplotlib installed
# e.g (from the matplotlib root directory)
# pip install -e .
#
# Install the documentation requirements with:
# pip install -r doc-requirements.txt
#
sphinx>1.0
numpydoc
ipython
mock
colorspacious
pillow
49 changes: 30 additions & 19 deletions doc/README.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
maptlotlib documentation
========================


Building the documentation
--------------------------

A list of dependencies can be found in ../doc-requirements.txt.

All of these dependencies can be installed through pip::

pip install -r ../doc-requirements.txt

or conda::

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

**Note that Sphinx uses the installed version of the package to build the
documentation**: matplotlib must be installed *before* the docs can be
generated.

You can build the documentation with several options:

* `--small` saves figures in low resolution.
* `--allowsphinxwarnings`: Don't turn Sphinx warnings into errors.
* `-n N` enables parallel build of the documentation using N process.

Organization
-------------

This is the top level build directory for the matplotlib
documentation. All of the documentation is written using sphinx, a
python documentation system built on top of ReST. This directory contains


* users - the user documentation, e.g., plotting tutorials, configuration
tips, etc.

Expand Down Expand Up @@ -33,21 +62,3 @@ python documentation system built on top of ReST. This directory contains
* mpl_examples - a link to the matplotlib examples in case any
documentation wants to literal include them

To build the HTML documentation, install sphinx (1.0 or greater
required), then type "python make.py html" in this directory. Wait
for the initial run (which builds the example gallery) to be done,
then run "python make.py html" again. The top file of the results will
be ./build/html/index.html

Note that Sphinx uses the installed version of the package to build
the documentation, so matplotlib must be installed *before* the docs
can be generated. Even if that is the case, one of the files needed
to do this, '../lib/matplotlib/mpl-data/matplotlibrc', is not version
controlled, but created when matplotlib is built. This means that the
documentation cannot be generated immediately after checking out the
source code, even if matplotlib is installed on your system: you will
have to run ``python setup.py build`` first.

To build a smaller version of the documentation (without
high-resolution PNGs and PDF examples), type "python make.py --small
html".
35 changes: 24 additions & 11 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@
raise ImportError("No module named numpydoc - you need to install "
"numpydoc to build the documentation.")

try:
import colorspacious
except ImportError:
raise ImportError("No module named colorspacious - you need to install "
"colorspacious to build the documentation")

try:
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:
msg = "Error: matplotlib must be installed before building the documentation"
sys.exit(msg)


autosummary_generate = True

Expand All @@ -71,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 @@ -287,11 +305,6 @@
1),
]

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


class MyWX(MagicMock):
class Panel(object):
Expand Down
49 changes: 0 additions & 49 deletions doc/pyplots/plotmap.py

This file was deleted.

10 changes: 0 additions & 10 deletions doc/users/screenshots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,6 @@ The following example emulates one of the financial plots in

.. plot:: mpl_examples/pylab_examples/finance_work2.py


.. _screenshots_basemap_demo:

Basemap demo
============

Jeff Whitaker's :ref:`toolkit_basemap` add-on toolkit makes it possible to plot data on many different map projections. This example shows how to plot contours, markers and text on an orthographic projection, with NASA's "blue marble" satellite image as a background.

.. plot:: pyplots/plotmap.py

.. _screenshots_log_demo:

Log plots
Expand Down