From 9b3097b715ccc33ee69641fd81e81cf8d66b8645 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Wed, 20 Feb 2019 12:38:05 +0100 Subject: [PATCH] [doc] Re-enable nitpicky mode; Fix broken docs --- beat/core/dataformat.py | 4 ++-- beat/core/execution/base.py | 8 ++++---- beat/core/execution/remote.py | 8 ++++---- beat/core/execution/subprocess.py | 8 ++++---- beat/core/experiment.py | 2 +- beat/core/plotter.py | 2 +- beat/core/stats.py | 2 +- doc/conf.py | 29 ++++++++++++----------------- 8 files changed, 29 insertions(+), 34 deletions(-) diff --git a/beat/core/dataformat.py b/beat/core/dataformat.py index 077471b3..3906feea 100644 --- a/beat/core/dataformat.py +++ b/beat/core/dataformat.py @@ -92,8 +92,8 @@ class DataFormat(BackendDataFormat): storage (object): A simple object that provides information about file paths for this dataformat - errors (list of str): A list containing errors found while loading this - dataformat. + errors (list): A list of strings containing errors found while loading + this dataformat. data (dict): The original data for this dataformat, as loaded by our JSON decoder. diff --git a/beat/core/execution/base.py b/beat/core/execution/base.py index a1f14ff5..ec419d27 100644 --- a/beat/core/execution/base.py +++ b/beat/core/execution/base.py @@ -123,11 +123,11 @@ class BaseExecutor(object): for that particular combination of details. The dictionary may be empty in case all inputs are taken from the file cache. - input_list (beat.core.inputs.InputList): A list of inputs that will be - served to the algorithm. + input_list (beat.backend.python.inputs.InputList): A list of inputs that + will be served to the algorithm. - output_list (beat.core.outputs.OutputList): A list of outputs that the - algorithm will produce. + output_list (beat.backend.python.outputs.OutputList): A list of outputs + that the algorithm will produce. data_sources (list): A list with all data-sources created by our execution loader. diff --git a/beat/core/execution/remote.py b/beat/core/execution/remote.py index 566e212c..291a9039 100644 --- a/beat/core/execution/remote.py +++ b/beat/core/execution/remote.py @@ -115,11 +115,11 @@ class RemoteExecutor(BaseExecutor): for that particular combination of details. The dictionary may be empty in case all inputs are taken from the file cache. - input_list (beat.core.inputs.InputList): A list of inputs that will be - served to the algorithm. + input_list (beat.backend.python.inputs.InputList): A list of inputs that + will be served to the algorithm. - output_list (beat.core.outputs.OutputList): A list of outputs that the - algorithm will produce. + output_list (beat.backend.python.outputs.OutputList): A list of outputs + that the algorithm will produce. data_sources (list): A list with all data-sources created by our execution loader. diff --git a/beat/core/execution/subprocess.py b/beat/core/execution/subprocess.py index 9bf5df0f..e72cd976 100644 --- a/beat/core/execution/subprocess.py +++ b/beat/core/execution/subprocess.py @@ -141,11 +141,11 @@ class SubprocessExecutor(RemoteExecutor): for that particular combination of details. The dictionary may be empty in case all inputs are taken from the file cache. - input_list (beat.core.inputs.InputList): A list of inputs that will be - served to the algorithm. + input_list (beat.backend.python.inputs.InputList): A list of inputs that + will be served to the algorithm. - output_list (beat.core.outputs.OutputList): A list of outputs that the - algorithm will produce. + output_list (beat.backend.python.outputs.OutputList): A list of outputs + that the algorithm will produce. data_sources (list): A list with all data-sources created by our execution loader. diff --git a/beat/core/experiment.py b/beat/core/experiment.py index de1e2851..2e3bc9ac 100644 --- a/beat/core/experiment.py +++ b/beat/core/experiment.py @@ -164,7 +164,7 @@ class Experiment(object): :py:class:`beat.core.algorithm.Algorithm` pointers for all analyzers in this experiment. - errors (list of str): A list containing errors found while loading this + errors (list): A list strings containing errors found while loading this experiment. data (dict): The original data for this experiment, as loaded by our JSON diff --git a/beat/core/plotter.py b/beat/core/plotter.py index 87c11e76..e466d298 100644 --- a/beat/core/plotter.py +++ b/beat/core/plotter.py @@ -148,7 +148,7 @@ class Plotter(object): storage (object): A simple object that provides information about file paths for this algorithm - dataformat (obj): An object of type :py:class:`.dataformat.DataFormat` + dataformat (object): An object of type :py:class:`.dataformat.DataFormat` that represents the dataformat to which this plotter is applicable. libraries (dict): A mapping object defining other libraries this plotter diff --git a/beat/core/stats.py b/beat/core/stats.py index 02341beb..357b5ba9 100644 --- a/beat/core/stats.py +++ b/beat/core/stats.py @@ -64,7 +64,7 @@ class Statistics(object): Attributes: - errors (list of str): A list containing errors found while loading this + errors (list): A list strings containing errors found while loading this statistics information. data (dict): The original data for these statistics diff --git a/doc/conf.py b/doc/conf.py index 2f1e2d79..df960e57 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# vim: set fileencoding=utf-8 : +# -*- coding: utf-8 -*- ############################################################################### # # @@ -26,11 +26,8 @@ ############################################################################### import os -import sys -import glob import pkg_resources - # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -54,7 +51,7 @@ extensions = [ ] # Be picky about warnings -nitpicky = False +nitpicky = True # Ignores stuff we can't easily resolve on other project's sphinx manuals nitpick_ignore = [] @@ -82,7 +79,7 @@ autosummary_generate = True numfig = True # If we are on OSX, the 'dvipng' path maybe different -dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng' +dvipng_osx = '/Library/TeX/texbin/dvipng' if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx # Add any paths that contain templates here, relative to this directory. @@ -253,23 +250,20 @@ autodoc_default_flags = [ 'show-inheritance', ] +if not 'BOB_DOCUMENTATION_SERVER' in os.environ: + # notice we need to overwrite this for BEAT projects - defaults from Bob are + # not OK + os.environ['BOB_DOCUMENTATION_SERVER'] = "https://www.idiap.ch/software/beat/docs/beat/%(name)s/%(version)s/|https://www.idiap.ch/software/beat/docs/beat/%(name)s/master/" + # For inter-documentation mapping: -doc_server = [ - 'http://www.idiap.ch/software/beat/docs/beat/%(name)s/%(version)s/', - 'http://www.idiap.ch/software/beat/docs/beat/%(name)s/master/', - 'http://www.idiap.ch/software/beat/docs/beat/%(name)s/1.5.x/', - ] -doc_server = '|'.join(doc_server) 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), - server=doc_server, - ) + load_requirements(sphinx_requirements)) else: - intersphinx_mapping = link_documentation(server=doc_server) + intersphinx_mapping = link_documentation() # Adds simplejson, pyzmq links intersphinx_mapping['http://simplejson.readthedocs.io/en/stable/'] = None @@ -286,7 +280,8 @@ def member_function_test(app, what, name, obj, skip, options): if len(name) > 1 and name[0] == '_': # test if this private function should be allowed if name not in accepted_private_functions: - # omit privat functions that are not in the list of accepted private functions + # omit private functions that are not in the list of accepted private + # functions return skip else: # test if the method is documented -- GitLab