diff --git a/doc/conf.py b/doc/conf.py index 1bd8e04105def95afe03991c6af8846542d1ee60..377d9ae3aec90e0fe448b00676f36d9ccc7593fc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -30,9 +30,29 @@ extensions = [ 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 @@ -111,7 +131,7 @@ pygments_style = 'sphinx' # Some variables which are useful for generated material project_variable = project.replace('.', '_') -short_description = u'Vein Recognition Library' +short_description = u'bob.biovein API' owner = [u'Idiap Research Institute'] @@ -216,8 +236,13 @@ 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=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 diff --git a/doc/nitpick-exceptions.txt b/doc/nitpick-exceptions.txt new file mode 100644 index 0000000000000000000000000000000000000000..0be826e7c544d6770e1bbd99d564db9774ecd43c --- /dev/null +++ b/doc/nitpick-exceptions.txt @@ -0,0 +1,9 @@ +py:class bob.bio.base.database.BioFile +py:class bob.bio.base.database.BioDatabase +py:class BioFile +py:class bob.bio.base.database.database.BioDatabase +py:class BioFileSet +py:class bob.bio.base.database.file.BioFile +py:class bob.bio.base.preprocessor.Preprocessor.Preprocessor +py:class bob.bio.base.extractor.Extractor.Extractor +