From a15b2a8405f6fc8ee6d42c6c852dc1b2bcfa153d Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Wed, 12 Oct 2016 13:19:59 +0200
Subject: [PATCH] Fix documentation

---
 doc/c_cpp_api.rst          | 10 +++++-----
 doc/conf.py                |  8 ++++++--
 doc/extra-intersphinx.txt  |  5 +++++
 doc/index.rst              | 22 +++++++++++-----------
 doc/nitpick-exceptions.txt | 22 ++++++++++++++++++++++
 5 files changed, 49 insertions(+), 18 deletions(-)
 create mode 100644 doc/extra-intersphinx.txt
 create mode 100644 doc/nitpick-exceptions.txt

diff --git a/doc/c_cpp_api.rst b/doc/c_cpp_api.rst
index 3a7b439..af67006 100644
--- a/doc/c_cpp_api.rst
+++ b/doc/c_cpp_api.rst
@@ -93,23 +93,23 @@ Bob File Support
 
 .. cpp:type:: PyBobIoFileObject
 
-   The pythonic object representation for a ``bob::io::File`` object.
+   The pythonic object representation for a ``bob::io::base::File`` object.
 
    .. code-block:: cpp
 
       typedef struct {
         PyObject_HEAD
-        boost::shared_ptr<bob::io::File> f;
+        boost::shared_ptr<bob::io::base::File> f;
       } PyBobIoFileObject;
 
-   .. cpp:member:: boost::shared_ptr<bob::io::File> f
+   .. cpp:member:: boost::shared_ptr<bob::io::base::File> f
 
       A pointer to a file being read or written.
 
 .. cpp:type:: PyBobIoFileIteratorObject
 
-   The pythonic object representation for an iterator over a ``bob::io::File``
-   object.
+   The pythonic object representation for an iterator over a
+   ``bob::io::base::File`` object.
 
    .. code-block:: cpp
 
diff --git a/doc/conf.py b/doc/conf.py
index 90bc668..e8d6f04 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -25,6 +25,7 @@ extensions = [
     'sphinx.ext.intersphinx',
     'sphinx.ext.napoleon',
     'sphinx.ext.viewcode',
+    #'matplotlib.sphinxext.plot_directive'
     ]
 
 import sphinx
@@ -239,9 +240,12 @@ autodoc_default_flags = [
 from bob.extension.utils import link_documentation, load_requirements
 sphinx_requirements = "extra-intersphinx.txt"
 if os.path.exists(sphinx_requirements):
-    intersphinx_mapping = link_documentation(additional_packages=load_requirements(sphinx_requirements))
+  intersphinx_mapping = link_documentation(
+      additional_packages=['python','numpy'] + \
+      load_requirements(sphinx_requirements)
+      )
 else:
-    intersphinx_mapping = link_documentation()
+  intersphinx_mapping = link_documentation()
 
 
 # We want to remove all private (i.e. _. or __.__) members
diff --git a/doc/extra-intersphinx.txt b/doc/extra-intersphinx.txt
new file mode 100644
index 0000000..60ec200
--- /dev/null
+++ b/doc/extra-intersphinx.txt
@@ -0,0 +1,5 @@
+scipy
+bob.io.audio
+bob.io.image
+bob.io.video
+bob.io.matlab
diff --git a/doc/index.rst b/doc/index.rst
index ba226b3..cc498b2 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,8 +1,5 @@
 .. vim: set fileencoding=utf-8 :
-.. Andre Anjos <andre.anjos@idiap.ch>
 .. Wed 14 May 15:22:33 2014 CEST
-..
-.. Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
 
 .. _bob.io.base:
 
@@ -10,14 +7,17 @@
  Bob's Core I/O Routines
 =========================
 
-This module contains a basic interface to read and write files of various types.
-It provides generic functions :py:func:`bob.io.base.save` and :py:func:`bob.io.base.load` to write and read various types of data.
-In this interface, data is mainly written using the :py:class:`bob.io.base.HDF5File` interface.
-To enable further types of IO, please import one of the following packages (the list might not be exhaustive):
-
-* :ref:`bob.io.image <bob.io.image>` to load and save images of various kinds
-* :ref:`bob.io.video <bob.io.video>` to load and save videos of various types
-* :ref:`bob.io.matlab <bob.io.matlab>` to load and save matrices in basic matlab ``.mat`` files
+This module contains a basic interface to read and write files of various
+types.  It provides generic functions :py:func:`bob.io.base.save` and
+:py:func:`bob.io.base.load` to write and read various types of data.  In this
+interface, data is mainly written using the :py:class:`bob.io.base.HDF5File`
+interface.  To enable further types of IO, please import one of the following
+packages (the list might not be exhaustive):
+
+* :ref:`bob.io.audio` to load and save audio data of various kinds
+* :ref:`bob.io.image` to load and save images of various kinds
+* :ref:`bob.io.video` to load and save videos of various types
+* :ref:`bob.io.matlab` to load and save matrices in basic matlab ``.mat`` files
 
 
 Documentation
diff --git a/doc/nitpick-exceptions.txt b/doc/nitpick-exceptions.txt
new file mode 100644
index 0000000..5baa117
--- /dev/null
+++ b/doc/nitpick-exceptions.txt
@@ -0,0 +1,22 @@
+# these are actually c types
+cpp:type PyObject
+cpp:type Py_ssize_t
+
+# no reference exists for these
+cpp:type bob
+cpp:type bob::core
+cpp:type bob::core::array
+cpp:type bob::core::array::typeinfo
+cpp:type bob::core::array::ElementType
+cpp:type boost
+cpp:type boost::shared_ptr
+cpp:type bob::io
+cpp:type bob::io::base
+cpp:type bob::io::base::File
+cpp:type bob::io::base::HDF5File
+
+# exceptions are not found in python 2.7
+py:exc ValueError
+
+# these don't exists on numpy's manual
+py:class numpy.uint8
-- 
GitLab