Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
est
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
workflow
ewoksapps
est
Commits
f849a471
Commit
f849a471
authored
3 years ago
by
Henri Payno
Browse files
Options
Downloads
Patches
Plain Diff
move dependency to ewoks 0.1.0rc
parent
9407dc5e
No related branches found
No related tags found
1 merge request
!49
Move to ewwoks 0 1 0rc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
est/test/test_ewoks.py
+5
-61
5 additions, 61 deletions
est/test/test_ewoks.py
setup.cfg
+1
-1
1 addition, 1 deletion
setup.cfg
with
6 additions
and
62 deletions
est/test/test_ewoks.py
+
5
−
61
View file @
f849a471
...
...
@@ -30,6 +30,7 @@ __date__ = "20/07/2021"
from
ewoksorange.bindings
import
ows_to_ewoks
,
ewoks_to_ows
from
ewokscore.graph
import
TaskGraph
from
ewokscore.graph.analysis
import
start_nodes
from
est.core.utils
import
DownloadDataset
import
unittest
import
tempfile
...
...
@@ -81,22 +82,12 @@ class TestOrangeGraph(unittest.TestCase):
# step 1: from ows to ewoks graph
graph
=
ows_to_ewoks
(
self
.
_example_pymca_ows
)
self
.
assertTrue
(
isinstance
(
graph
,
TaskGraph
))
self
.
assertEqual
(
len
(
graph
.
start_nodes
()),
1
)
self
.
assertTrue
(
"
input
"
in
graph
.
start_nodes
())
for
node
in
(
"
input
"
,
"
output
"
,
"
normalization
"
,
"
exafs
"
,
"
k weight
"
,
"
fourier transform
"
,
):
self
.
assertTrue
(
node
in
graph
.
graph
.
nodes
())
self
.
assertEqual
(
len
(
start_nodes
(
graph
.
graph
)),
1
)
self
.
assertEqual
(
len
(
graph
.
graph
.
edges
),
5
)
# step 2: from generated ewoks graph to orange
destination
=
os
.
path
.
join
(
self
.
folder
,
"
output_pymca_examples.ows
"
)
ewoks_to_ows
(
ewoks
graph
=
graph
,
destination
=
destination
)
ewoks_to_ows
(
graph
=
graph
,
destination
=
destination
)
self
.
assertTrue
(
os
.
path
.
exists
(
destination
))
# insure links and nodes are defined
tree
=
ET
.
parse
(
destination
)
...
...
@@ -106,29 +97,6 @@ class TestOrangeGraph(unittest.TestCase):
self
.
assertTrue
(
"
nodes
"
in
children_tags
)
self
.
assertTrue
(
"
links
"
in
children_tags
)
self
.
assertTrue
(
"
node_properties
"
in
children_tags
)
# check nodes
nodes
=
[
elmt
for
elmt
in
children_tags
[
"
nodes
"
]]
nodes_by_name
=
{
node
.
get
(
"
name
"
):
node
.
get
(
"
qualified_name
"
)
for
node
in
nodes
}
qualified_names
=
(
"
orangecontrib.est.widgets.utils.xas_input.XASInputOW
"
,
"
orangecontrib.est.widgets.utils.xas_output.XASOutputOW
"
,
"
orangecontrib.est.widgets.pymca.normalization.NormalizationOW
"
,
"
orangecontrib.est.widgets.pymca.exafs.ExafsOW
"
,
"
orangecontrib.est.widgets.pymca.k_weight.KWeightOW
"
,
"
orangecontrib.est.widgets.pymca.ft.FTOW
"
,
)
names
=
(
"
input
"
,
"
output
"
,
"
normalization
"
,
"
exafs
"
,
"
k weight
"
,
"
fourier transform
"
,
)
for
q_name
,
name
in
zip
(
qualified_names
,
names
):
self
.
assertEqual
(
nodes_by_name
[
name
],
q_name
)
# check links
links
=
[
elmt
for
elmt
in
children_tags
[
"
links
"
]]
...
...
@@ -142,15 +110,12 @@ class TestOrangeGraph(unittest.TestCase):
# step 1: from ows to ewoks graph
graph
=
ows_to_ewoks
(
self
.
_example_larch_ows
)
self
.
assertTrue
(
isinstance
(
graph
,
TaskGraph
))
self
.
assertEqual
(
len
(
graph
.
start_nodes
()),
1
)
self
.
assertTrue
(
"
input
"
in
graph
.
start_nodes
())
for
node
in
(
"
input
"
,
"
output
"
,
"
pre edge
"
,
"
autobk
"
,
"
xftf
"
):
self
.
assertTrue
(
node
in
graph
.
graph
.
nodes
())
self
.
assertEqual
(
len
(
start_nodes
(
graph
.
graph
)),
1
)
self
.
assertEqual
(
len
(
graph
.
graph
.
edges
),
4
)
# step 2: from generated ewoks graph to orange
destination
=
os
.
path
.
join
(
self
.
folder
,
"
output_larch_examples.ows
"
)
ewoks_to_ows
(
ewoks
graph
=
graph
,
destination
=
destination
)
ewoks_to_ows
(
graph
=
graph
,
destination
=
destination
)
self
.
assertTrue
(
os
.
path
.
exists
(
destination
))
# insure links and nodes are defined
tree
=
ET
.
parse
(
destination
)
...
...
@@ -160,27 +125,6 @@ class TestOrangeGraph(unittest.TestCase):
self
.
assertTrue
(
"
nodes
"
in
children_tags
)
self
.
assertTrue
(
"
links
"
in
children_tags
)
self
.
assertTrue
(
"
node_properties
"
in
children_tags
)
# check nodes
nodes
=
[
elmt
for
elmt
in
children_tags
[
"
nodes
"
]]
nodes_by_name
=
{
node
.
get
(
"
name
"
):
node
.
get
(
"
qualified_name
"
)
for
node
in
nodes
}
qualified_names
=
(
"
orangecontrib.est.widgets.utils.xas_input.XASInputOW
"
,
"
orangecontrib.est.widgets.utils.xas_output.XASOutputOW
"
,
"
orangecontrib.est.widgets.larch.pre_edge.PreEdgeOW
"
,
"
orangecontrib.est.widgets.larch.autobk.AutobkOW
"
,
"
orangecontrib.est.widgets.larch.xftf.XFTFOW
"
,
)
names
=
(
"
input
"
,
"
output
"
,
"
pre edge
"
,
"
autobk
"
,
"
xftf
"
,
)
for
q_name
,
name
in
zip
(
qualified_names
,
names
):
self
.
assertEqual
(
nodes_by_name
[
name
],
q_name
)
# check links
links
=
[
elmt
for
elmt
in
children_tags
[
"
links
"
]]
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
1
−
1
View file @
f849a471
...
...
@@ -33,7 +33,7 @@ install_requires =
numpy
h5py>=3.1
Pint
ewoks
orange
@
git+https://gitlab.esrf.fr/workflow/ewoks/ewoksorange
ewoks
>=0.1.0rc
silx>=0.15
[options.entry_points]
...
...
This diff is collapsed.
Click to expand it.
payno
@payno
mentioned in commit
b49ddaa7
·
3 years ago
mentioned in commit
b49ddaa7
mentioned in commit b49ddaa74cc19b315bbcb7d373306c28beb6c81e
Toggle commit list
payno
@payno
mentioned in commit
a6f6aedd
·
3 years ago
mentioned in commit
a6f6aedd
mentioned in commit a6f6aedde63a6db7a8bd222f12171c48422b9cdf
Toggle commit list
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