Skip to content
Snippets Groups Projects
Commit 566627ee authored by George Marchment's avatar George Marchment
Browse files

Fixed the bug i mentionned

parent 1ec694c9
No related branches found
No related tags found
No related merge requests found
Pipeline #14340 failed with stage
in 2 minutes and 21 seconds
...@@ -206,17 +206,16 @@ class Executor(Nextflow_Building_Blocks): ...@@ -206,17 +206,16 @@ class Executor(Nextflow_Building_Blocks):
#Method which returns the call which calls the element called #Method which returns the call which calls the element called
def get_call_by_name(self, name): def get_call_by_name(self, name):
#This is an old comment:
#We get the calls that have already been analysed or which are currently being analysed #We get the calls that have already been analysed or which are currently being analysed
#for example "p(a.out)" -> the call for 'a' may not have been analysed yet #for example "p(a.out)" -> the call for 'a' may not have been analysed yet
#In that case when calling "get_calls" -> we don't want to reanalyse the "p(a.out)" #In that case when calling "get_calls" -> we don't want to reanalyse the "p(a.out)"
calls_that_have_been_analysed = self.get_calls_that_have_been_analysed()
if(self.origin.get_type() in ['Root', 'Block']): if(self.origin.get_type() in ['Root', 'Block']):
for c in self.origin.get_calls(): for c in self.origin.get_calls():
if(c not in calls_that_have_been_analysed): #c.initialise()#Don't need to analyse the call cause the element called is already analysed when the call is created
calls_that_have_been_analysed[c] = True if(c.first_element_called.get_alias()==name):
#c.initialise() return c
if(c.first_element_called.get_alias()==name):
return c
return None return None
else: else:
......
...@@ -15,9 +15,6 @@ class Main(Nextflow_Building_Blocks): ...@@ -15,9 +15,6 @@ class Main(Nextflow_Building_Blocks):
self.initialised = False self.initialised = False
self.root = None self.root = None
def get_calls_that_have_been_analysed(self):
return self.nextflow_file.get_calls_that_have_been_analysed()
def get_string_line(self, bit_of_code): def get_string_line(self, bit_of_code):
return self.nextflow_file.get_string_line(bit_of_code) return self.nextflow_file.get_string_line(bit_of_code)
......
...@@ -20,9 +20,6 @@ class Nextflow_Building_Blocks: ...@@ -20,9 +20,6 @@ class Nextflow_Building_Blocks:
#--------------------------------- #---------------------------------
#AUXILIARY METHODS FOR ALL CLASSES #AUXILIARY METHODS FOR ALL CLASSES
#--------------------------------- #---------------------------------
def get_calls_that_have_been_analysed(self):
return self.origin.get_calls_that_have_been_analysed()
def get_code(self, get_OG = False): def get_code(self, get_OG = False):
return self.code.get_code(get_OG = get_OG) return self.code.get_code(get_OG = get_OG)
......
...@@ -50,9 +50,7 @@ class Nextflow_File(Nextflow_Building_Blocks): ...@@ -50,9 +50,7 @@ class Nextflow_File(Nextflow_Building_Blocks):
def get_DSL(self): def get_DSL(self):
return self.workflow.get_DSL() return self.workflow.get_DSL()
def get_calls_that_have_been_analysed(self):
return self.workflow.get_calls_that_have_been_analysed()
#Method which returns the DSL of the workflow -> by default it's DSL2 #Method which returns the DSL of the workflow -> by default it's DSL2
#I use the presence of include, subworkflows and into/from in processes as a proxy #I use the presence of include, subworkflows and into/from in processes as a proxy
def find_DSL(self): def find_DSL(self):
......
...@@ -44,13 +44,10 @@ class Subworkflow(Main): ...@@ -44,13 +44,10 @@ class Subworkflow(Main):
return sub return sub
def get_call_by_name(self, name): def get_call_by_name(self, name):
calls_that_have_been_analysed = self.get_calls_that_have_been_analysed()
for c in self.root.get_calls(): for c in self.root.get_calls():
if(c not in calls_that_have_been_analysed): #c.initialise()#Don't need to analyse the call cause the element called is already analysed when the call is created
calls_that_have_been_analysed[c] = True if(c.first_element_called.get_alias()==name):
#c.initialise() return c
if(c.first_element_called.get_alias()==name):
return c
return None return None
......
...@@ -61,7 +61,6 @@ class Workflow: ...@@ -61,7 +61,6 @@ class Workflow:
self.name = name self.name = name
self.graph = None self.graph = None
self.calls_that_have_been_analysed = {}
OG_file = Nextflow_File(file, workflow = self, first_file = True) OG_file = Nextflow_File(file, workflow = self, first_file = True)
self.DSL = OG_file.find_DSL() self.DSL = OG_file.find_DSL()
...@@ -82,9 +81,6 @@ class Workflow: ...@@ -82,9 +81,6 @@ class Workflow:
with open(self.output_dir / "debug" / "operations_in_call.nf",'w') as file: with open(self.output_dir / "debug" / "operations_in_call.nf",'w') as file:
pass pass
def get_calls_that_have_been_analysed(self):
return self.calls_that_have_been_analysed
def get_duplicate_status(self): def get_duplicate_status(self):
return self.duplicate return self.duplicate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment