From 5a3e8c12975bb3b06cc211904258eb8f9bfcb73f Mon Sep 17 00:00:00 2001
From: Pavel Korshunov <pavel.korshunov@idiap.ch>
Date: Thu, 13 Oct 2016 13:53:50 +0200
Subject: [PATCH] [sphinx] Hacked warnings

---
 bob/pad/base/algorithm/Algorithm.py | 2 +-
 bob/pad/base/database/database.py   | 7 ++++---
 bob/pad/base/database/file.py       | 6 +++---
 bob/pad/base/tools/FileSelector.py  | 2 +-
 doc/conf.py                         | 1 -
 doc/extra-intersphinx.txt           | 6 +++---
 doc/implementation.rst              | 6 +++---
 doc/implemented.rst                 | 2 +-
 doc/installation.rst                | 4 ++--
 doc/nitpick-exceptions.txt          | 7 +++++++
 requirements.txt                    | 4 ++--
 11 files changed, 27 insertions(+), 20 deletions(-)
 create mode 100644 doc/nitpick-exceptions.txt

diff --git a/bob/pad/base/algorithm/Algorithm.py b/bob/pad/base/algorithm/Algorithm.py
index 88f0911..e61570c 100644
--- a/bob/pad/base/algorithm/Algorithm.py
+++ b/bob/pad/base/algorithm/Algorithm.py
@@ -41,7 +41,7 @@ class Algorithm:
       Set this flag to ``False``, when the projection is applied, but the projector does not need to be trained.
 
     kwargs : ``key=value`` pairs
-      A list of keyword arguments to be written in the :py:meth:`__str__` function.
+      A list of keyword arguments to be written in the `__str__` function.
 
     """
 
diff --git a/bob/pad/base/database/database.py b/bob/pad/base/database/database.py
index fa74404..5be494f 100644
--- a/bob/pad/base/database/database.py
+++ b/bob/pad/base/database/database.py
@@ -6,11 +6,12 @@
 #
 
 import abc
-import bob.bio.base.database
-import bob.pad.base.database
+import bob.bio.base
+import bob.pad.base
+from bob.bio.base.database import BioDatabase
 
 
-class PadDatabase(bob.bio.base.database.BioDatabase):
+class PadDatabase(BioDatabase):
     """This class represents the basic API for database access.
     Please use this class as a base class for your database access classes.
     Do not forget to call the constructor of this base class in your derived class.
diff --git a/bob/pad/base/database/file.py b/bob/pad/base/database/file.py
index 585f804..e8745a8 100644
--- a/bob/pad/base/database/file.py
+++ b/bob/pad/base/database/file.py
@@ -4,10 +4,10 @@
 # @date:   Wed May 18 10:09:22 CET 2016
 #
 
-import bob.bio.base.database
+from bob.bio.base.database import BioFile
 
 
-class PadFile(bob.bio.base.database.BioFile):
+class PadFile(BioFile):
     """A simple base class that defines basic properties of File object for the use in PAD experiments"""
 
     def __init__(self, client_id, path, attack_type=None, file_id=None):
@@ -21,7 +21,7 @@ class PadFile(bob.bio.base.database.BioFile):
           In cased of a spoofed data, this parameter should indicate what kind of spoofed attack it is.
           The default None value is interpreted that the PadFile is a genuine or real sample.
 
-        For client_id, path and file_id, please refer to :py:class:`bob.bio.base.BioFile` constructor
+        For client_id, path and file_id, please refer to :py:class:`bob.bio.base.database.BioFile` constructor
         """
         super(PadFile, self).__init__(client_id, path, file_id)
 
diff --git a/bob/pad/base/tools/FileSelector.py b/bob/pad/base/tools/FileSelector.py
index d55c470..e91e218 100644
--- a/bob/pad/base/tools/FileSelector.py
+++ b/bob/pad/base/tools/FileSelector.py
@@ -31,7 +31,7 @@ class FileSelector(object):
 
     **Parameters:**
 
-    database : :py:class:`antispoofing.utils.db` or derived.
+    database : :py:class:`bob.pad.base.database.PadDatabase` or derived.
       The database object that provides the list of files.
 
     preprocessed_directory : str
diff --git a/doc/conf.py b/doc/conf.py
index b7a6757..5e0205c 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -243,7 +243,6 @@ if os.path.exists(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
 accepted_private_functions = ['__array__']
diff --git a/doc/extra-intersphinx.txt b/doc/extra-intersphinx.txt
index ac09811..084964f 100644
--- a/doc/extra-intersphinx.txt
+++ b/doc/extra-intersphinx.txt
@@ -1,7 +1,7 @@
 python
 numpy
-bob.pad.voice
-bob.bio.base
 bob.bio.spear
 gridtk
-bob.db.base
\ No newline at end of file
+bob.db.base
+bob.db.avspoof
+bob.pad.voice
\ No newline at end of file
diff --git a/doc/implementation.rst b/doc/implementation.rst
index 586e0f3..1e487a3 100644
--- a/doc/implementation.rst
+++ b/doc/implementation.rst
@@ -32,8 +32,8 @@ This will assure that all parameters of the experiments are stored into the ``Ex
 If you plan to write your own tools, please assure that you are following the following structure.
 
 
-.. _bob.bio.base.preprocessors:
-.. _bob.bio.base.extractors:
+.. _bob.pad.base.preprocessors:
+.. _bob.pad.base.extractors:
 
 Preprocessors and Extractors
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -148,7 +148,7 @@ These variable names are:
 * ``grid`` for an instance of the :py:class:`bob.bio.base.grid.Grid`
 
 
-.. _bob.bio.base.resources:
+.. _bob.pad.base.resources:
 
 Resources
 ---------
diff --git a/doc/implemented.rst b/doc/implemented.rst
index 535bc7a..7228f2b 100644
--- a/doc/implemented.rst
+++ b/doc/implemented.rst
@@ -1,4 +1,4 @@
-.. _bob.bio.base.implemented:
+.. _bob.pad.base.implemented:
 
 =================================
 Tools implemented in bob.pad.base
diff --git a/doc/installation.rst b/doc/installation.rst
index c53f6b9..094b115 100644
--- a/doc/installation.rst
+++ b/doc/installation.rst
@@ -30,8 +30,8 @@ There, in the ``eggs`` section of the ``buildout.cfg`` file, simply list the ``b
 
 in order to download and install all packages that are required for your experiments.
 In the example above, you might want to run a simple speech presentation attack detection
-experiment using the :py:class:`bob.pad.voice.preprocessor.EnergyBandsPreprocessor` and
-the :py:class:`bob.pad.voice.extractor.LBPExtractor` feature extractor
+experiment using the :py:class:`bob.bio.spear.preprocessor.Mod_4Hz` and
+the :py:class:`bob.pad.voice.extractor.LBPHistograms` feature extractor
 defined in :ref:`bob.pad.voice <bob.pad.voice>`, using the AVspoof database interface defined in :ref:`bob.db.avspoof <bob.db.avspoof>`.
 Running the simple command line:
 
diff --git a/doc/nitpick-exceptions.txt b/doc/nitpick-exceptions.txt
new file mode 100644
index 0000000..8b228c0
--- /dev/null
+++ b/doc/nitpick-exceptions.txt
@@ -0,0 +1,7 @@
+py:class BioFile
+py:class BioFileSet
+py:class bob.bio.base.database.database.BioDatabase
+py:class bob.bio.base.preprocessor.Preprocessor.Preprocessor
+py:class bob.bio.base.extractor.Extractor.Extractor
+py:class bob.bio.base.database.file.BioFile
+py:class bob.pad.voice.extractor.LBPHistograms
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 5f1a473..1752529 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 setuptools
 bob.extension
 bob.db.base
-bob.bio.base
-bob.io.base
\ No newline at end of file
+bob.io.base
+bob.bio.base
\ No newline at end of file
-- 
GitLab