Skip to content
Snippets Groups Projects
Commit 8733cbc8 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[algorithm] Improved documentation and added missing parts

parent 7cb4a16b
No related branches found
No related tags found
2 merge requests!17Merge development branch 1.5.x,!13Improve documentation
......@@ -81,14 +81,14 @@ class Runner(object):
module (:std:term:`module`): The preloaded module containing the
algorithm as returned by :py:func:`.loader.load_module`.
obj_name (str): The name of the object within the module you're interested
on
obj_name (str): The name of the object within the module you're
interested on
algorithm (object): The algorithm instance that is used for parameter
checking.
exc (:std:term:`class`): The class to use as base exception when
translating the exception from the user code. Read the documention of
translating the exception from the user code. Read the documentation of
:py:func:`.loader.run` for more details.
'''
......@@ -498,6 +498,11 @@ class Algorithm(object):
@name.setter
def name(self, value):
"""Sets the name of this object
Parameters:
name (str): Name of this object
"""
if self.data['language'] == 'unknown':
raise RuntimeError("algorithm has no programming language set")
......@@ -616,11 +621,15 @@ class Algorithm(object):
@property
def isAnalyzer(self):
"""Returns whether this algorithms is an analyzer"""
return (self.results is not None)
@property
def results(self):
"""The results of this algorithm"""
return self.data.get('results')
......@@ -632,6 +641,8 @@ class Algorithm(object):
@property
def parameters(self):
"""The parameters of this algorithm"""
return self.data.get('parameters')
......@@ -643,6 +654,7 @@ class Algorithm(object):
@property
def splittable(self):
"""Whether this algorithm can be split between several processes"""
return self.data.get('splittable', False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment