From 83bb7997836985d81d147ec14a7eb9e1f89311d7 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Thu, 4 May 2017 18:02:35 +0200 Subject: [PATCH] improve docs --- MANIFEST.in | 1 + bob/pad/face/extractor/LBPHistogram.py | 16 +--------------- doc/conf.py | 1 - doc/index.rst | 1 + doc/py_api.rst | 6 ++---- doc/refrences.rst | 10 ++++++++++ 6 files changed, 15 insertions(+), 20 deletions(-) create mode 100644 doc/refrences.rst diff --git a/MANIFEST.in b/MANIFEST.in index 9d10504b..ee009709 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include README.rst bootstrap-buildout.py buildout.cfg COPYING version.txt requirements.txt recursive-include doc *.py *.rst *.ico *.png +recursive-include bob/pad/face/test/data *.hdf5 diff --git a/bob/pad/face/extractor/LBPHistogram.py b/bob/pad/face/extractor/LBPHistogram.py index 2c8762f2..c66d7b46 100644 --- a/bob/pad/face/extractor/LBPHistogram.py +++ b/bob/pad/face/extractor/LBPHistogram.py @@ -7,7 +7,7 @@ import numpy class LBPHistogram(Extractor): """Calculates a normalized LBP histogram over an image. - These features are implemented based on the chingovska_effectiveness_2012_. + These features are implemented based on [ChingovskaEffectivnes12]_. Parameters ---------- @@ -32,13 +32,6 @@ class LBPHistogram(Extractor): resulting features have that dtype. lbp : bob.ip.base.LBP The LPB extractor object. - - - .. _chingovska_effectiveness_2012: - I. Chingovska, A. Anjos, and S. Marcel, ``On the effectiveness of - local binary patterns in face anti-spoofing,'' in Biometrics Special - Interest Group (BIOSIG), 2012 BIOSIG-Proceedings of the International - Conference of the, 2012, pp. 1-7. """ def __init__(self, @@ -130,10 +123,3 @@ class LBPHistogram(Extractor): if self.dtype is not None: hist = hist.astype(self.dtype) return hist - - # re-define unused functions, just so that they do not get documented - def train(*args, **kwargs): - raise NotImplementedError() - - def load(*args, **kwargs): - pass diff --git a/doc/conf.py b/doc/conf.py index d18851fb..2dbdd540 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -232,7 +232,6 @@ autodoc_member_order = 'bysource' autodoc_default_flags = [ 'members', 'undoc-members', - 'inherited-members', 'show-inheritance', ] diff --git a/doc/index.rst b/doc/index.rst index a09a2bfc..8e68816b 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -15,6 +15,7 @@ Package Documentation :maxdepth: 2 guide + refrences py_api diff --git a/doc/py_api.rst b/doc/py_api.rst index 8f040ca2..127fc0ee 100644 --- a/doc/py_api.rst +++ b/doc/py_api.rst @@ -19,9 +19,6 @@ Video Preprocessors Image Extractors ~~~~~~~~~~~~~~~~ -Image Extractors -~~~~~~~~~~~~~~~~ - .. autosummary:: bob.pad.face.extractor.LBPHistogram @@ -37,4 +34,5 @@ Image Extractors ---------------- .. automodule:: bob.pad.face.extractor - + :special-members: __call__ + :no-inherited-members: diff --git a/doc/refrences.rst b/doc/refrences.rst new file mode 100644 index 00000000..c1233b03 --- /dev/null +++ b/doc/refrences.rst @@ -0,0 +1,10 @@ +.. vim: set fileencoding=utf-8 : + +========== +References +========== + +.. [ChingovskaEffectivnes12] I. Chingovska, A. Anjos, and S. Marcel, ''On the + effectiveness of local binary patterns in face anti- spoofing,'' in + Biometrics Special Interest Group (BIOSIG), 2012 BIOSIG- Proceedings of the + International Conference of the, 2012, pp. 1-7. -- GitLab