diff --git a/doc/c_cpp_api.rst b/doc/c_cpp_api.rst index 3a7b43944864cb520f6e13f91e9d309b81986059..af67006c9f26e5eb3e0587beb2ed13c4b04af514 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 1c095bbd73a4fc880b17599be9f7457ac17162b2..e8d6f04f3780ac6adc3c5c0cde7f3d3315bdd504 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -25,14 +25,35 @@ extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode', + #'matplotlib.sphinxext.plot_directive' ] import sphinx if sphinx.__version__ >= "1.4.1": extensions.append('sphinx.ext.imgmath') + imgmath_image_format = 'svg' else: extensions.append('sphinx.ext.pngmath') +# Be picky about warnings +nitpicky = True + +# Ignores stuff we can't easily resolve on other project's sphinx manuals +nitpick_ignore = [] + +# Allows the user to override warnings from a separate file +if os.path.exists('nitpick-exceptions.txt'): + for line in open('nitpick-exceptions.txt'): + if line.strip() == "" or line.startswith("#"): + continue + dtype, target = line.split(None, 1) + target = target.strip() + try: # python 2.x + target = unicode(target) + except NameError: + pass + nitpick_ignore.append((dtype, target)) + # Always includes todos todo_include_todos = True @@ -216,8 +237,16 @@ autodoc_default_flags = [ ] # For inter-documentation mapping: -from bob.extension.utils import link_documentation -intersphinx_mapping = link_documentation() +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=['python','numpy'] + \ + load_requirements(sphinx_requirements) + ) +else: + intersphinx_mapping = link_documentation() + # We want to remove all private (i.e. _. or __.__) members # that are not in the list of accepted functions @@ -237,4 +266,4 @@ def member_function_test(app, what, name, obj, skip, options): return False def setup(app): - app.connect('autodoc-skip-member', member_function_test) \ No newline at end of file + app.connect('autodoc-skip-member', member_function_test) diff --git a/doc/extra-intersphinx.txt b/doc/extra-intersphinx.txt new file mode 100644 index 0000000000000000000000000000000000000000..60ec20086e73028726182a8032a6cee85f820524 --- /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 ba226b3964a456e262caf1379cde0d3af295d4bf..cc498b2d10c142445ef600358094be2d71a8aff2 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/links.rst b/doc/links.rst index 1b931d011f70121744da703eebbd924fe7759a79..e6df9b37b30490bb53f48e0d895760f35b9d57ef 100644 --- a/doc/links.rst +++ b/doc/links.rst @@ -10,7 +10,7 @@ .. _argparse: http://code.google.com/p/argparse/ .. _blitz++: http://www.oonumerics.org/blitz -.. _bob's idiap guide: http://github.com/idiap/bob/wiki/Using-Bob-at-Idiap +.. _bob's idiap guide: https://gitlab.idiap.ch/bob/bob/wikis/Using-Bob-at-Idiap .. _bob's website: https://www.idiap.ch/software/bob .. _boost: http://www.boost.org .. _buildbot: http://trac.buildbot.net @@ -50,13 +50,13 @@ .. _python: http://www.python.org .. _pypi: http://pypi.python.org .. _qt4: http://qt.nokia.com/ -.. _satellite packages: https://github.com/idiap/bob/wiki/Satellite-Packages +.. _satellite packages: https://gitlab.idiap.ch/bob/bob/wikis/Packages .. _scipy: http://www.scipy.org .. _setuptools: http://trac.edgewall.org/wiki/setuptools .. _sphinx: http://sphinx.pocoo.org .. _sqlalchemy: http://www.sqlalchemy.org/ .. _sqlite: http://www.sqlite.org/ -.. _submit a new bug report: https://github.com/idiap/bob/issues +.. _submit a new bug report: https://groups.google.com/forum/?fromgroups#!forum/bob-devel .. _torch 3 vision: http://torch3vision.idiap.ch .. _torch 3: http://www.torch.ch .. _torch 5: http://torch5.sourceforge.net diff --git a/doc/nitpick-exceptions.txt b/doc/nitpick-exceptions.txt new file mode 100644 index 0000000000000000000000000000000000000000..3544621b7deae1d2014c31a8fd6953ed5f81c120 --- /dev/null +++ b/doc/nitpick-exceptions.txt @@ -0,0 +1,24 @@ +# 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 RuntimeError +py:class tuple +c:func PyUnicode_FSConverter + +# these don't exists on numpy's manual +py:class numpy.uint8