Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BioFlow-Insight
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shareFAIR
BioFlow-Insight
Commits
55ae000f
Commit
55ae000f
authored
2 weeks ago
by
George Marchment
Browse files
Options
Downloads
Patches
Plain Diff
Updated tthe rewrite of emits inside a subworkflow
parent
1faf59fd
No related branches found
No related tags found
No related merge requests found
Pipeline
#14527
failed with stage
Stage:
in 2 minutes and 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/subworkflow.py
+22
-9
22 additions, 9 deletions
src/subworkflow.py
with
22 additions
and
9 deletions
src/subworkflow.py
+
22
−
9
View file @
55ae000f
...
@@ -123,17 +123,30 @@ class Subworkflow(Main):
...
@@ -123,17 +123,30 @@ class Subworkflow(Main):
for
e
in
self
.
emit
:
for
e
in
self
.
emit
:
if
(
len
(
e
.
gives
)
==
1
):
if
(
len
(
e
.
gives
)
==
1
):
ch
=
e
.
gives
[
0
]
ch
=
e
.
gives
[
0
]
temp
=
code_after_emit
if
(
ch
.
get_type
()
==
"
Channel
"
):
code_after_emit
=
replace_group1
(
code_after_emit
,
fr
"
[^\w](
{
re
.
escape
(
ch
.
get_code
())
}
)[^\w]
"
,
f
"
{
ch
.
get_code
()
}
_
{
name
}
"
)
temp
=
code_after_emit
if
(
temp
==
code_after_emit
):
code_after_emit
=
replace_group1
(
code_after_emit
,
fr
"
[^\w](
{
re
.
escape
(
ch
.
get_code
())
}
)[^\w]
"
,
f
"
{
ch
.
get_code
()
}
_
{
name
}
"
)
raise
Exception
(
"
This shoudn
'
t happen -> code hasn
'
t been replaced
"
)
if
(
temp
==
code_after_emit
):
raise
Exception
(
"
This shoudn
'
t happen -> code hasn
'
t been replaced
"
)
elif
(
ch
.
get_type
()
==
"
Emitted
"
):
#Case it's an emitted -> we don't change anything -> it is already unique (since the ID has been added to the call)
None
else
:
raise
Exception
(
"
This shouldn
'
t happen
"
)
else
:
else
:
ch
=
e
.
origins
[
0
]
ch
=
e
.
origins
[
0
]
temp
=
code_after_emit
if
(
ch
.
get_type
()
==
"
Channel
"
):
code_after_emit
=
replace_group1
(
code_after_emit
,
fr
"
[^\w](
{
re
.
escape
(
ch
.
get_code
())
}
)[^\w]
"
,
f
"
{
ch
.
get_code
()
}
_
{
name
}
"
)
temp
=
code_after_emit
code_up_to_emit
+=
f
"
\n
{
ch
.
get_code
()
}
_
{
name
}
=
{
ch
.
get_code
()
}
"
code_after_emit
=
replace_group1
(
code_after_emit
,
fr
"
[^\w](
{
re
.
escape
(
ch
.
get_code
())
}
)[^\w]
"
,
f
"
{
ch
.
get_code
()
}
_
{
name
}
"
)
if
(
temp
==
code_after_emit
):
code_up_to_emit
+=
f
"
\n
{
ch
.
get_code
()
}
_
{
name
}
=
{
ch
.
get_code
()
}
"
raise
Exception
(
"
This shoudn
'
t happen -> code hasn
'
t been replaced
"
)
if
(
temp
==
code_after_emit
):
raise
Exception
(
"
This shoudn
'
t happen -> code hasn
'
t been replaced
"
)
elif
(
ch
.
get_type
()
==
"
Emitted
"
):
#Case it's an emitted -> we don't change anything -> it is already unique (since the ID has been added to the call)
None
else
:
raise
Exception
(
"
This shouldn
'
t happen
"
)
#In the emits replacing the 'ch = ....' by 'ch' and adding 'ch = ....' at the end of the body
#In the emits replacing the 'ch = ....' by 'ch' and adding 'ch = ....' at the end of the body
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment