Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
b3790a7d
Commit
b3790a7d
authored
May 21, 2021
by
Wout De Nolf
Browse files
Add an icat-mapping to the nexus_writer_session test configuration
parent
4777626b
Changes
3
Hide whitespace changes
Inline
Side-by-side
scripts/testenv.py
View file @
b3790a7d
...
...
@@ -290,6 +290,20 @@ def lima(env=None, tmpdir=None, name="simulator1"):
yield
@
contextmanager
def
machinfo
(
env
=
None
,
tmpdir
=
None
):
name
=
"machinfo"
script
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
,
"tests"
,
"machinfo_tg_server.py"
)
assert
os
.
path
.
isfile
(
script
)
cliargs
=
[
sys
.
executable
,
"-u"
,
script
,
name
]
with
runcontext
(
cliargs
,
tmpdir
=
tmpdir
,
prefix
=
name
,
env
=
env
):
device_fqdn
=
"id00/tango/"
+
name
wait_tango_device
(
device_fqdn
=
device_fqdn
)
yield
@
contextmanager
def
metaexperiment
(
env
=
None
,
tmpdir
=
None
,
name
=
"test"
):
"""Start ICAT proposal/sample manager
...
...
@@ -445,6 +459,9 @@ if __name__ == "__main__":
ctx
=
lima
(
env
=
env
,
tmpdir
=
tmpdir
,
name
=
"simulator2"
)
stack
.
enter_context
(
ctx
)
ctx
=
machinfo
(
env
=
env
,
tmpdir
=
tmpdir
)
stack
.
enter_context
(
ctx
)
if
args
.
writer
==
"TANGO"
:
ctx
=
nexuswriterservice
(
env
=
env
,
tmpdir
=
tmpdir
,
instance
=
"testwriters"
)
elif
args
.
writer
==
"PROCESS"
:
...
...
tests/test_configuration/icat.yml
View file @
b3790a7d
name
:
icat
plugin
:
bliss
class
:
ICATmeta
-
name
:
icat
plugin
:
bliss
class
:
ICATmeta
objects
:
primary_slit
:
$primary_slit
attenuator01
:
$att1
objects
:
primary_slit
:
$primary_slit
attenuator01
:
$att1
positioners
:
sample
:
$roby
insertion_device_gap
:
[
$roby
,
$robz
]
positioners
:
sample
:
$roby
insertion_device_gap
:
[
$roby
,
$robz
]
mapping
:
InstrumentVariables_name
:
[
$roby.name
,
$robz.name
]
InstrumentVariables_value
:
[
$roby.position
,
$robz.position
]
mapping
:
InstrumentVariables_name
:
[
$roby.name
,
$robz.name
]
InstrumentVariables_value
:
[
$roby.position
,
$robz.position
]
-
name
:
icat_nexus_writer_sessions
plugin
:
bliss
class
:
ICATmeta
objects
:
primary_slit
:
$primary_slit
attenuator01
:
$att1
source
:
$machinfo
tests/test_configuration/sessions/nexus_writer_sessions.yml
View file @
b3790a7d
-
class
:
Session
name
:
nexus_writer_session
setup-file
:
./nexus_writer_session_setup.py
icat-mapping
:
icat_nexus_writer_sessions
scan_saving
:
class
:
ESRFScanSaving
beamline
:
id00
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment