Skip to content
Snippets Groups Projects
Commit f53eeaea authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[algorithm,database,dataformat,library] De-duplicated documentation of attributes

parent 909d5aa8
No related branches found
No related tags found
1 merge request!80Updates to Sphinx 3.2.x
Pipeline #45164 passed
...@@ -404,8 +404,6 @@ class Algorithm(object): ...@@ -404,8 +404,6 @@ class Algorithm(object):
Attributes: Attributes:
name (str): The algorithm name
dataformats (dict): A dictionary containing all pre-loaded dataformats dataformats (dict): A dictionary containing all pre-loaded dataformats
used by this algorithm. Data format objects will be of type used by this algorithm. Data format objects will be of type
:py:class:`.dataformat.DataFormat`. :py:class:`.dataformat.DataFormat`.
...@@ -413,15 +411,6 @@ class Algorithm(object): ...@@ -413,15 +411,6 @@ class Algorithm(object):
libraries (dict): A mapping object defining other libraries this libraries (dict): A mapping object defining other libraries this
algorithm needs to load so it can work properly. 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 input_map (dict): A dictionary where the key is the input name and the
value, its type. All input names (potentially from different groups) value, its type. All input names (potentially from different groups)
are comprised in this dictionary. are comprised in this dictionary.
...@@ -430,11 +419,6 @@ class Algorithm(object): ...@@ -430,11 +419,6 @@ class Algorithm(object):
value, its type. All output names (potentially from different groups) value, its type. All output names (potentially from different groups)
are comprised in this dictionary. 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 groups (dict): A list containing dictionaries with inputs and outputs
belonging to the same synchronization group. belonging to the same synchronization group.
...@@ -653,13 +637,13 @@ class Algorithm(object): ...@@ -653,13 +637,13 @@ class Algorithm(object):
@property @property
def name(self): def name(self):
"""Returns the name of this object """The name of this object
""" """
return self._name or "__unnamed_algorithm__" return self._name or "__unnamed_algorithm__"
@name.setter @name.setter
def name(self, value): def name(self, value):
"""Sets the name of this object """The name of this object
Parameters: Parameters:
name (str): Name of this object name (str): Name of this object
...@@ -801,6 +785,8 @@ class Algorithm(object): ...@@ -801,6 +785,8 @@ class Algorithm(object):
@property @property
def uses(self): def uses(self):
"Mapping object defining the required library import name (keys) and the full-names (values)"""
return self.data.get("uses") return self.data.get("uses")
@uses.setter @uses.setter
...@@ -818,7 +804,12 @@ class Algorithm(object): ...@@ -818,7 +804,12 @@ class Algorithm(object):
@property @property
def results(self): 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") return self.data.get("results")
...@@ -829,7 +820,7 @@ class Algorithm(object): ...@@ -829,7 +820,7 @@ class Algorithm(object):
@property @property
def parameters(self): def parameters(self):
"""The parameters of this algorithm""" """Dictionary containing all pre-defined parameters that this algorithm accepts"""
return self.data.get("parameters") return self.data.get("parameters")
......
...@@ -240,8 +240,6 @@ class Database(object): ...@@ -240,8 +240,6 @@ class Database(object):
Attributes: Attributes:
name (str): The full, valid name of this database
data (dict): The original data for this database, as loaded by our JSON data (dict): The original data for this database, as loaded by our JSON
decoder. decoder.
...@@ -330,7 +328,7 @@ class Database(object): ...@@ -330,7 +328,7 @@ class Database(object):
@property @property
def name(self): def name(self):
"""Returns the name of this object """The full (valid) name of this database
""" """
return self._name or "__unnamed_database__" return self._name or "__unnamed_database__"
......
...@@ -120,13 +120,6 @@ class DataFormat(object): ...@@ -120,13 +120,6 @@ class DataFormat(object):
Attributes: 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 storage (object): A simple object that provides information about file
paths for this dataformat paths for this dataformat
...@@ -262,9 +255,7 @@ class DataFormat(object): ...@@ -262,9 +255,7 @@ class DataFormat(object):
@property @property
def name(self): def name(self):
"""Returns the name of this object, either from the filename or composed """Name of this object, either from the filename or composed from the hierarchy it belongs."""
from the hierarchy it belongs.
"""
if self.parent and self._name is None: if self.parent and self._name is None:
return self.parent[0].name + "." + self.parent[1] + "_type" return self.parent[0].name + "." + self.parent[1] + "_type"
else: else:
...@@ -362,12 +353,11 @@ class DataFormat(object): ...@@ -362,12 +353,11 @@ class DataFormat(object):
@property @property
def description(self): 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) return self.data.get("#description", None)
@description.setter @description.setter
def description(self, value): def description(self, value):
"""Sets the short description for this object"""
self.data["#description"] = value self.data["#description"] = value
@property @property
...@@ -383,7 +373,6 @@ class DataFormat(object): ...@@ -383,7 +373,6 @@ class DataFormat(object):
@documentation.setter @documentation.setter
def documentation(self, value): def documentation(self, value):
"""Sets the full-length description for this object"""
if not self._name: if not self._name:
raise RuntimeError("dataformat has no name") raise RuntimeError("dataformat has no name")
......
...@@ -109,22 +109,12 @@ class Library(object): ...@@ -109,22 +109,12 @@ class Library(object):
Attributes: 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 storage (object): A simple object that provides information about file
paths for this library paths for this library
libraries (dict): A mapping object defining other libraries this library libraries (dict): A mapping object defining other libraries this library
needs to load so it can work properly. 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 errors (list): A list containing errors found while loading this
library. library.
...@@ -223,7 +213,7 @@ class Library(object): ...@@ -223,7 +213,7 @@ class Library(object):
@property @property
def name(self): def name(self):
"""Returns the name of this object""" """The name of this object"""
return self._name or "__unnamed_library__" return self._name or "__unnamed_library__"
...@@ -262,6 +252,7 @@ class Library(object): ...@@ -262,6 +252,7 @@ class Library(object):
@property @property
def uses(self): def uses(self):
"""Mapping object defining the required library import name (keys) and the full-names (values)"""
return self.data.get("uses") return self.data.get("uses")
@uses.setter @uses.setter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment