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
b7a42ca8
Commit
b7a42ca8
authored
1 month ago
by
George Marchment
Browse files
Options
Downloads
Patches
Plain Diff
Updated the difference in graphs print
parent
268ed73d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#14652
failed with stage
in 2 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/outils_graph.py
+6
-4
6 additions, 4 deletions
src/outils_graph.py
with
6 additions
and
4 deletions
src/outils_graph.py
+
6
−
4
View file @
b7a42ca8
...
...
@@ -1175,13 +1175,15 @@ def check_if_equal(dicoA, dicoB):
translated_new
,
translated_original
=
translate_dico
(
dicoA
),
translate_dico
(
dicoB
)
#TO do that we rewrite the structure using a commun language (without using the ids) -> then just check if the translated structures are the same
equal
=
translated_new
==
translated_original
from
collections
import
Counter
if
(
not
equal
):
#TODO -> make a better affichage des differences
if
(
translated_new
[
'
nodes
'
]
!=
translated_original
[
"
nodes
"
]):
diff
=
list
(
set
(
translated_original
[
'
nodes
'
])
-
set
(
translated_new
[
'
nodes
'
]))
diff
=
list
(
Counter
(
translated_original
[
'
nodes
'
])
-
Counter
(
translated_new
[
'
nodes
'
]))
if
(
diff
!=
[]):
print
(
f
"
The processes
{
diff
}
are missing from the new workflow
"
)
diff
=
list
(
set
(
translated_new
[
'
nodes
'
])
-
set
(
translated_original
[
'
nodes
'
]))
diff
=
list
(
Counter
(
translated_new
[
'
nodes
'
])
-
Counter
(
translated_original
[
'
nodes
'
]))
if
(
diff
!=
[]):
print
(
f
"
The processes
{
diff
}
have been added to the new workflow
"
)
...
...
@@ -1191,10 +1193,10 @@ def check_if_equal(dicoA, dicoB):
edges_original
.
append
(
str
(
e
))
for
e
in
translated_new
[
'
edges
'
]:
edges_new
.
append
(
str
(
e
))
diff
=
list
(
set
(
edges_original
)
-
set
(
edges_new
))
diff
=
list
(
Counter
(
edges_original
)
-
Counter
(
edges_new
))
if
(
diff
!=
[]):
print
(
f
"
The edges
{
diff
}
are missing from the new workflow
"
)
diff
=
list
(
set
(
edges_new
)
-
set
(
edges_original
))
diff
=
list
(
Counter
(
edges_new
)
-
Counter
(
edges_original
))
if
(
diff
!=
[]):
print
(
f
"
The edges
{
diff
}
have been added to the new workflow
"
)
return
equal
...
...
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