Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bluesky_blissdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
fs-ec
bluesky_blissdata
Commits
2ab47430
Commit
2ab47430
authored
3 months ago
by
Devin Burke
Browse files
Options
Downloads
Patches
Plain Diff
Dockerfile now builds from local project directory for easier testing
parent
52c2af37
No related branches found
No related tags found
1 merge request
!1
Formatting and changes to blissdata server options
Pipeline
#145266
passed
3 months ago
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/Dockerfile
+2
-2
2 additions, 2 deletions
docker/Dockerfile
src/bluesky_blissdata/dispatcher.py
+15
-1
15 additions, 1 deletion
src/bluesky_blissdata/dispatcher.py
with
17 additions
and
3 deletions
docker/Dockerfile
+
2
−
2
View file @
2ab47430
...
...
@@ -11,9 +11,9 @@ RUN apt-get update && \
rm
-rf
/var/lib/apt/lists/
*
# Clone repos
WORKDIR
/
WORKDIR
/
bluesky_blissdata
RUN
git clone https://gitlab.desy.de/fs-ec
/bluesky_blissdata
.git
COPY
.
/bluesky_blissdata
# Setup environment
RUN
conda config
--append
channels esrf-bcu
&&
\
...
...
This diff is collapsed.
Click to expand it.
src/bluesky_blissdata/dispatcher.py
+
15
−
1
View file @
2ab47430
...
...
@@ -7,6 +7,7 @@ from blissdata.redis_engine.store import DataStore
from
blissdata.redis_engine.encoding.numeric
import
NumericStreamEncoder
from
blissdata.schemas.scan_info
import
DeviceDict
,
ChainDict
,
ChannelDict
from
blissdata.scan
import
Scan
import
event_model
_logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -58,14 +59,27 @@ class BlissdataDispatcher:
}
if
name
==
"
start
"
:
_logger
.
debug
(
"
Validating start document.
"
)
event_model
.
schema_validators
[
event_model
.
DocumentNames
.
start
].
validate
(
doc
)
_logger
.
debug
(
"
Start document validated. Preparing scan.
"
)
self
.
prepare_scan
(
doc
)
elif
name
==
"
descriptor
"
:
_logger
.
debug
(
"
Validating descriptor document.
"
)
event_model
.
schema_validators
[
event_model
.
DocumentNames
.
descriptor
].
validate
(
doc
)
_logger
.
debug
(
"
Descriptor document validated. Configuring datastream.
"
)
self
.
config_datastream
(
doc
)
elif
name
==
"
event
"
:
_logger
.
debug
(
"
Validating event document.
"
)
event_model
.
schema_validators
[
event_model
.
DocumentNames
.
event
].
validate
(
doc
)
_logger
.
debug
(
"
Event document validated. Pushing data to datastream.
"
)
self
.
push_datastream
(
doc
)
elif
name
==
"
stop
"
:
_logger
.
debug
(
"
Validating stop document.
"
)
event_model
.
schema_validators
[
event_model
.
DocumentNames
.
stop
].
validate
(
doc
)
_logger
.
debug
(
"
Stop document validated. Stopping datastream.
"
)
self
.
stop_datastream
(
doc
)
def
prepare_scan
(
self
,
doc
:
Dict
[
str
,
Any
])
->
None
:
self
.
scan_id
[
"
name
"
]
=
doc
.
get
(
"
plan_name
"
,
self
.
scan_id
.
get
(
"
name
"
,
""
))
self
.
scan_id
[
"
number
"
]
=
doc
.
get
(
"
scan_id
"
,
self
.
scan_id
.
get
(
"
number
"
,
0
))
...
...
@@ -148,7 +162,7 @@ class BlissdataDispatcher:
scalar_stream
=
self
.
scan
.
create_stream
(
elem
[
"
label
"
],
encoder
,
info
=
{
"
unit
"
:
unit
,
"
shape
"
:
[],
"
dtype
"
:
"
float64
"
,
"
group
"
:
"
scatter
"
},
{
"
unit
"
:
unit
,
"
shape
"
:
[],
"
dtype
"
:
"
float64
"
,
"
group
"
:
"
scatter
"
},
)
ddesc_dict
[
elem
[
"
label
"
]]
=
dict
(
elem
)
self
.
stream_list
[
elem
[
"
label
"
]]
=
scalar_stream
...
...
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