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
1
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
67b93125
Commit
67b93125
authored
1 month ago
by
George Marchment
Browse files
Options
Downloads
Patches
Plain Diff
Updated the rewrite of the operations (reduce map) + added view into that group
parent
61124ab3
No related branches found
No related tags found
No related merge requests found
Pipeline
#14663
failed with stage
Stage:
in 2 minutes and 17 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/code_.py
+5
-3
5 additions, 3 deletions
src/code_.py
src/constant.py
+3
-2
3 additions, 2 deletions
src/constant.py
src/graph.py
+2
-1
2 additions, 1 deletion
src/graph.py
with
10 additions
and
6 deletions
src/code_.py
+
5
−
3
View file @
67b93125
...
...
@@ -142,10 +142,11 @@ class Code:
while
(
searching
and
timeout
<
constant
.
WHILE_UPPER_BOUND
):
searching
=
False
#TODO -> do the same with flatMap -> 668
for
word
in
[
"
map
"
,
"
flatMap
"
]:
for
word
in
[
"
map
"
,
"
flatMap
"
,
"
view
"
]:
for
end_char
in
[
'
{
'
,
'
\(
'
]:
pattern
=
fr
"
(\.|\|)\s*
"
+
word
+
r
"
\s*
"
+
end_char
for
match
in
re
.
finditer
(
pattern
,
code
):
connector
=
match
.
group
(
1
)
start_map
,
end
=
match
.
span
(
0
)
if
(
end_char
==
"
{
"
):
end_map
=
extract_curly
(
code
,
end
)
...
...
@@ -158,7 +159,7 @@ class Code:
self
.
add_map_element
(
old
,
new
)
old_code
=
code
[
start_map
:
end_map
]
new_code
=
f
"
.
{
word
}
_modified {{
{
new
}
}}
"
new_code
=
f
"
{
connector
}
{
word
}
_modified {{
{
new
}
}}
"
code
=
code
.
replace
(
old_code
,
new_code
)
searching
=
True
...
...
@@ -166,13 +167,14 @@ class Code:
break
#For reduce
for
match
in
re
.
finditer
(
r
"
(\.|\|)\s*reduce[^{]+{
"
,
code
):
connector
=
match
.
group
(
1
)
start_map
,
end
=
match
.
span
(
0
)
end_map
=
extract_curly
(
code
,
end
)
old
=
code
[
end
:
end_map
-
1
]
new
=
f
"
¤
{
id
(
self
)
}
_
{
index
}
¤
"
self
.
add_map_element
(
old
,
new
)
old_code
=
code
[
start_map
:
end_map
]
new_code
=
f
"
.
{
word
}
_modified {{
{
new
}
}}
"
new_code
=
f
"
{
connector
}
reduce
_modified {{
{
new
}
}}
"
code
=
code
.
replace
(
old_code
,
new_code
)
searching
=
True
index
+=
1
...
...
This diff is collapsed.
Click to expand it.
src/constant.py
+
3
−
2
View file @
67b93125
...
...
@@ -15,12 +15,13 @@ ILLEGAL_IMPORTS = ["groovy", "java"]
LIST_AS
=
[
"
as
"
,
"
As
"
,
"
AS
"
,
"
aS
"
]
LIST_OPERATORS
=
[
"
distinct
"
,
"
filter
"
,
"
first
"
,
"
last
"
,
"
randomSample
"
,
"
take
"
,
"
unique
"
,
"
until
"
,
"
buffer
"
,
"
collate
"
,
"
collect
"
,
"
flatten
"
,
"
flatMap
"
,
"
flatMap_modified
"
,
"
groupBy
"
,
"
groupTuple
"
,
"
map
"
,
"
map_modified
"
,
"
reduce
"
,
"
toList
"
,
"
toSortedList
"
,
"
transpose
"
,
"
until
"
,
"
buffer
"
,
"
collate
"
,
"
collect
"
,
"
flatten
"
,
"
flatMap
"
,
"
groupBy
"
,
"
groupTuple
"
,
"
map
"
,
"
toList
"
,
"
toSortedList
"
,
"
transpose
"
,
"
splitCsv
"
,
"
splitFasta
"
,
"
splitFastq
"
,
"
splitText
"
,
"
cross
"
,
"
collectFile
"
,
"
combine
"
,
"
concat
"
,
"
join
"
,
"
merge
"
,
"
mix
"
,
"
phase
"
,
"
spread
"
,
"
tap
"
,
"
branch
"
,
"
choice
"
,
"
multiMap
"
,
"
into
"
,
"
separate
"
,
"
tap
"
,
"
count
"
,
"
countBy
"
,
"
min
"
,
"
max
"
,
"
sum
"
,
"
toInteger
"
,
"
close
"
,
"
dump
"
,
"
ifEmpty
"
,
"
print
"
,
"
println
"
,
"
set
"
,
"
view
"
,
"
close
"
,
"
dump
"
,
"
ifEmpty
"
,
"
print
"
,
"
println
"
,
"
set
"
,
"
view
"
,
"
map_modified
"
,
"
reduce_modified
"
,
"
flatMap_modified
"
,
"
view_modified
"
,
#The articifiel operations
"
empty
"
,
"
of
"
,
"
fromPath
"
,
"
fromList
"
,
"
subscribe
"
,
"
value
"
,
"
from
"
]
#This last line is added by me:)
TOOLS
=
[
...
...
This diff is collapsed.
Click to expand it.
src/graph.py
+
2
−
1
View file @
67b93125
...
...
@@ -233,7 +233,8 @@ class Graph():
add_edges
(
dico
[
"
subworkflows
"
][
sub
],
condition
,
checking_conditions
,
index
=
index
)
return
checking_conditions
if
(
self
.
workflow
.
get_duplicate_status
()):
#if(self.workflow.get_duplicate_status()):
if
(
False
):
#Right now not generating the colored edges
checking_conditions
=
True
most_influential_conditions
=
self
.
workflow
.
get_most_influential_conditions
()
list_most_influential_conditions
=
list
(
most_influential_conditions
.
keys
())
...
...
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