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

Update bug with the pipe opaerator -> it wasn't the OG code for calls

parent 81f10359
No related branches found
No related tags found
No related merge requests found
Pipeline #14447 failed with stage
in 3 minutes and 14 seconds
......@@ -58,7 +58,8 @@ class Call(Executor):
return self.code.get_code()
return self.OG_code
if(clean_pipe):
return self.clean_pipe_operator(self.code.get_code())
code, _ = self.clean_pipe_operator(self.code.get_code())
return code
else:
return self.code.get_code()
......
......@@ -152,6 +152,7 @@ class Executor(Nextflow_Building_Blocks):
to_call.append(m.get_alias())
searching = True
to_replace = []
OG_pipe = pipe.strip()
while(searching):
if(pipe.find('|')==-1):
searching=False
......@@ -207,7 +208,8 @@ class Executor(Nextflow_Building_Blocks):
pipe = pipe.replace(tag, '|')
for tag in to_replace_double_pipe:
pipe = pipe.replace(tag, '||')
return (head+pipe).replace(str(self), '|', 1)
new_pipe = (pipe).replace(str(self), '|', 1).strip()
return (head+pipe).replace(str(self), '|', 1), {new_pipe: OG_pipe}
#This method analyses if the executor if an operation or a call, and returns
......
......@@ -674,7 +674,7 @@ class Operation(Executor):
if(clean_pipe):
code = self.clean_pipe_operator(code)
code, self.dico_OG_call_2_new_call = self.clean_pipe_operator(code)
if(replace_calls):
for call in self.calls:
......@@ -713,11 +713,10 @@ class Operation(Executor):
for m in self.get_modules_defined():
to_call.append(m.get_alias())
pattern_call = constant.BEGINNING_CALL
searching = True
searching = True
text = " "+self.get_code(clean_pipe = clean_pipe)
while(searching):
searching= False
text = " "+self.get_code(clean_pipe = clean_pipe)
for c in self.calls:
text = text.replace(self.calls[c].get_code(), "")
for match in re.finditer(pattern_call, text):
......@@ -726,7 +725,8 @@ class Operation(Executor):
#We do this cause the first caracter is a " "
start+=1
searching=True
call = Call(code =get_end_call(text, start, end), origin =self)
call_code = get_end_call(text, start, end)
call = Call(code =call_code, origin =self, OG_code=self.dico_OG_call_2_new_call[call_code])
call.initialise()
self.calls[str(call)] = call
break
......
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