Commit e098b785 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

add the get_version in Component class

parent 93238711
......@@ -38,7 +38,8 @@ class Component(object):
self.prefix = "default"
self.output_directory = None
self.config_reader = JFlowConfigReader()
self.version = self.get_version()
def _longestCommonSubstr(self, data):
substr = ''
if len(data) > 1 and len(data[0]) > 0:
......@@ -103,6 +104,12 @@ class Component(object):
"""
raise NotImplementedError
def get_version(self):
"""
Return the tool version, has to be implemented by subclasses
"""
raise NotImplementedError
def get_temporary_file(self, suffix=".txt"):
# first check if tmp directory exists
if not os.path.isdir(self.config_reader.get_tmp_directory()):
......
......@@ -127,12 +127,6 @@ class Analysis (Component):
os.makedirs(work_dir, 0751)
self.directory = os.path.join(self.DIRECTORIES_STRUCTURE, directory_name)
logging.getLogger("Analysis.__init__").debug("Building brand new analysis [" + str(self) + "]")
def get_version(self):
"""
Return the tool version, has to be implemented by subclasses
"""
raise NotImplementedError
def define_analysis(self):
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment