diff --git a/beat/backend/python/algorithm.py b/beat/backend/python/algorithm.py index 2190b40d788d85416314b4a9d0d394524a0ad6a6..ee6c4489e0a03f1f760c3d4455f1653893195c4a 100644 --- a/beat/backend/python/algorithm.py +++ b/beat/backend/python/algorithm.py @@ -404,8 +404,6 @@ class Algorithm(object): Attributes: - name (str): The algorithm name - dataformats (dict): A dictionary containing all pre-loaded dataformats used by this algorithm. Data format objects will be of type :py:class:`.dataformat.DataFormat`. @@ -413,15 +411,6 @@ class Algorithm(object): libraries (dict): A mapping object defining other libraries this algorithm needs to load so it can work properly. - uses (dict): A mapping object defining the required library import name - (keys) and the full-names (values). - - parameters (dict): A dictionary containing all pre-defined parameters - that this algorithm accepts. - - splittable (bool): A boolean value that indicates if this algorithm is - automatically parallelizeable by our backend. - input_map (dict): A dictionary where the key is the input name and the value, its type. All input names (potentially from different groups) are comprised in this dictionary. @@ -430,11 +419,6 @@ class Algorithm(object): value, its type. All output names (potentially from different groups) are comprised in this dictionary. - results (dict): If this algorithm is actually an analyzer (i.e., there - are no formal outputs, but results that must be saved by the platform), - then this dictionary contains the names and data types of those - elements. - groups (dict): A list containing dictionaries with inputs and outputs belonging to the same synchronization group. @@ -653,13 +637,13 @@ class Algorithm(object): @property def name(self): - """Returns the name of this object + """The name of this object """ return self._name or "__unnamed_algorithm__" @name.setter def name(self, value): - """Sets the name of this object + """The name of this object Parameters: name (str): Name of this object @@ -801,6 +785,8 @@ class Algorithm(object): @property def uses(self): + "Mapping object defining the required library import name (keys) and the full-names (values)""" + return self.data.get("uses") @uses.setter @@ -818,7 +804,12 @@ class Algorithm(object): @property def results(self): - """The results of this algorithm""" + """The results of this algorithm (analyzer) as a dictionary + + If this algorithm is actually an analyzer (i.e., there are no formal + outputs, but results that must be saved by the platform), then this + dictionary contains the names and data types of those elements. + """ return self.data.get("results") @@ -829,7 +820,7 @@ class Algorithm(object): @property def parameters(self): - """The parameters of this algorithm""" + """Dictionary containing all pre-defined parameters that this algorithm accepts""" return self.data.get("parameters") diff --git a/beat/backend/python/database.py b/beat/backend/python/database.py index 1f5ce1db050699dd7bc1583890f34c3727133c08..d9af1c2c7f7cc9540a7e5bc17fff0fe88f217f5b 100644 --- a/beat/backend/python/database.py +++ b/beat/backend/python/database.py @@ -240,8 +240,6 @@ class Database(object): Attributes: - name (str): The full, valid name of this database - data (dict): The original data for this database, as loaded by our JSON decoder. @@ -330,7 +328,7 @@ class Database(object): @property def name(self): - """Returns the name of this object + """The full (valid) name of this database """ return self._name or "__unnamed_database__" diff --git a/beat/backend/python/dataformat.py b/beat/backend/python/dataformat.py index fba3199e166c02702266ddf354129a2fa75fa6d9..2d030fdb2564208b0127c91f70986d3e842dee0a 100644 --- a/beat/backend/python/dataformat.py +++ b/beat/backend/python/dataformat.py @@ -120,13 +120,6 @@ class DataFormat(object): Attributes: - name (str): The full, valid name of this dataformat - - description (str): The short description string, loaded from the JSON - file if one was set. - - documentation (str): The full-length docstring for this object. - storage (object): A simple object that provides information about file paths for this dataformat @@ -262,9 +255,7 @@ class DataFormat(object): @property def name(self): - """Returns the name of this object, either from the filename or composed - from the hierarchy it belongs. - """ + """Name of this object, either from the filename or composed from the hierarchy it belongs.""" if self.parent and self._name is None: return self.parent[0].name + "." + self.parent[1] + "_type" else: @@ -362,12 +353,11 @@ class DataFormat(object): @property def description(self): - """The short description for this object""" + "Short description string, loaded from the JSON file if one was set""" return self.data.get("#description", None) @description.setter def description(self, value): - """Sets the short description for this object""" self.data["#description"] = value @property @@ -383,7 +373,6 @@ class DataFormat(object): @documentation.setter def documentation(self, value): - """Sets the full-length description for this object""" if not self._name: raise RuntimeError("dataformat has no name") diff --git a/beat/backend/python/library.py b/beat/backend/python/library.py index 22bd721bc20215f061a12d465bc2a4da31de3785..db89e6934024c8c750b7949fd4d64e11f14b4fa6 100644 --- a/beat/backend/python/library.py +++ b/beat/backend/python/library.py @@ -109,22 +109,12 @@ class Library(object): Attributes: - name (str): The library name - - description (str): The short description string, loaded from the JSON - file if one was set. - - documentation (str): The full-length docstring for this object. - storage (object): A simple object that provides information about file paths for this library libraries (dict): A mapping object defining other libraries this library needs to load so it can work properly. - uses (dict): A mapping object defining the required library import name - (keys) and the full-names (values). - errors (list): A list containing errors found while loading this library. @@ -223,7 +213,7 @@ class Library(object): @property def name(self): - """Returns the name of this object""" + """The name of this object""" return self._name or "__unnamed_library__" @@ -262,6 +252,7 @@ class Library(object): @property def uses(self): + """Mapping object defining the required library import name (keys) and the full-names (values)""" return self.data.get("uses") @uses.setter diff --git a/doc/conf.py b/doc/conf.py index ac1169be42c642fcc9dea5e5279811c55637e8c7..23be1f685f72c45610d712381087db937a965c50 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -228,11 +228,11 @@ rst_epilog = """ # Default processing flags for sphinx autoclass_content = "class" autodoc_member_order = "bysource" -autodoc_default_flags = [ - "members", - "undoc-members", - "show-inheritance", -] +autodoc_default_options = { + "members": True, + "undoc-members": True, + "show-inheritance": True, + } if "BOB_DOCUMENTATION_SERVER" not in os.environ: # notice we need to overwrite this for BEAT projects - defaults from Bob are @@ -252,26 +252,3 @@ else: # Adds simplejson, pyzmq links intersphinx_mapping["http://simplejson.readthedocs.io/en/stable/"] = None intersphinx_mapping["http://pyzmq.readthedocs.io/en/stable/"] = None - -# We want to remove all private (i.e. _. or __.__) members -# that are not in the list of accepted functions -accepted_private_functions = ["__array__"] - - -def member_function_test(app, what, name, obj, skip, options): - # test if we have a private function - if len(name) > 1 and name[0] == "_": - # test if this private function should be allowed - if name not in 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 - if not hasattr(obj, "__doc__") or not obj.__doc__: - return skip - return False - - -def setup(app): - app.connect("autodoc-skip-member", member_function_test)