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):
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")
......
......@@ -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__"
......
......@@ -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")
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment