From f0a1d9d9cf4afc02dc6c594257f1bd6892283a22 Mon Sep 17 00:00:00 2001 From: Pavel Korshunov Date: Sun, 23 Oct 2016 18:17:55 +0200 Subject: [PATCH] Fixing issues with sphinx docs --- bob/bio/gmm/algorithm/__init__.py | 20 ++++++++++++++++++++ doc/nitpick-exceptions.txt | 1 + doc/parallel.rst | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 doc/nitpick-exceptions.txt diff --git a/bob/bio/gmm/algorithm/__init__.py b/bob/bio/gmm/algorithm/__init__.py index 18612fe..c64ce2b 100644 --- a/bob/bio/gmm/algorithm/__init__.py +++ b/bob/bio/gmm/algorithm/__init__.py @@ -4,4 +4,24 @@ from .ISV import ISV from .IVector import IVector # gets sphinx autodoc done right - don't remove it +def __appropriate__(*args): + """Says object was actually declared here, and not in the import module. + Fixing sphinx warnings of not being able to find classes, when path is shortened. + Parameters: + + *args: An iterable of objects to modify + + Resolves `Sphinx referencing issues + ` + """ + + for obj in args: obj.__module__ = __name__ + +__appropriate__( + GMM, + GMMRegular, + JFA, + ISV, + IVector, + ) __all__ = [_ for _ in dir() if not _.startswith('_')] diff --git a/doc/nitpick-exceptions.txt b/doc/nitpick-exceptions.txt new file mode 100644 index 0000000..14c3632 --- /dev/null +++ b/doc/nitpick-exceptions.txt @@ -0,0 +1 @@ +py:exc ValueError diff --git a/doc/parallel.rst b/doc/parallel.rst index 1709e87..f6c59f0 100644 --- a/doc/parallel.rst +++ b/doc/parallel.rst @@ -14,7 +14,7 @@ These scripts integrate perfectly into the ``bob.bio`` packages. Particularly, they have exactly the same set of options as documented in :ref:`bob.bio.base.experiments`. In fact, the scripts above only run in parallelized mode, i.e., either the ``--grid`` or ``--parallel`` option is required. -During the submission of the jobs, several hundred jobs might be created (depending on the ``number_of_..._training_iterations`` that you specify in the :py:class:`bob.bio.gmm.algorithms.GMM` constructor). +During the submission of the jobs, several hundred jobs might be created (depending on the ``number_of_..._training_iterations`` that you specify in the :py:class:`bob.bio.gmm.algorithm.GMM` constructor). However, after the training has finished, it is possible to use the normal ``./bin/verify.py`` script to run similar experiments, e.g., if you want to change the protocol of your experiment. .. todo:: improve the documentation of the parallelized scripts. -- GitLab