From 01d92a37961ae66ff040372e5025524745916a6c Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Sun, 24 Sep 2023 02:53:02 -0400 Subject: [PATCH] TST: fix failing tests on `self.shape` --- scripts/start_sirepo.sh | 2 ++ sirepo_bluesky/common/base_classes.py | 1 - sirepo_bluesky/shadow/shadow_ophyd.py | 1 - sirepo_bluesky/srw/srw_ophyd.py | 5 ----- sirepo_bluesky/tests/conftest.py | 24 +++++++++++++----------- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/scripts/start_sirepo.sh b/scripts/start_sirepo.sh index b4a432aa..a81b7a45 100644 --- a/scripts/start_sirepo.sh +++ b/scripts/start_sirepo.sh @@ -82,6 +82,8 @@ cmd_start="${docker_binary} run ${arg} --init ${remove_container} --name sirepo -p 8000:8000 \ -v $SIREPO_SRDB_HOST_RO:/SIREPO_SRDB_ROOT:ro,z " +# TODO: parametrize host port number. + cmd_extra="" if [ ! -z "${SIREPO_SRDB_HOST}" -a ! -z "${SIREPO_SRDB_GUEST}" ]; then cmd_extra="-v ${SIREPO_SRDB_HOST}:${SIREPO_SRDB_GUEST}:rw,z " diff --git a/sirepo_bluesky/common/base_classes.py b/sirepo_bluesky/common/base_classes.py index 324ced0b..982f075a 100644 --- a/sirepo_bluesky/common/base_classes.py +++ b/sirepo_bluesky/common/base_classes.py @@ -27,7 +27,6 @@ def trigger(self, *args, **kwargs): class SirepoWatchpointBase(DeviceWithJSONData): image = Cpt(ExternalFileReference, kind="normal") - # shape = Cpt(Signal) flux = Cpt(Signal, kind="hinted") mean = Cpt(Signal, kind="normal") x = Cpt(Signal, kind="normal") diff --git a/sirepo_bluesky/shadow/shadow_ophyd.py b/sirepo_bluesky/shadow/shadow_ophyd.py index 86be62c7..b640df54 100644 --- a/sirepo_bluesky/shadow/shadow_ophyd.py +++ b/sirepo_bluesky/shadow/shadow_ophyd.py @@ -63,7 +63,6 @@ def trigger(self, *args, **kwargs): self._resource_document["resource_kwargs"]["histogram_bins"] = nbins def update_components(_data): - # self.shape.put(_data["shape"]) self.flux.put(_data["flux"]) self.mean.put(_data["mean"]) self.x.put(_data["x"]) diff --git a/sirepo_bluesky/srw/srw_ophyd.py b/sirepo_bluesky/srw/srw_ophyd.py index 9fec1747..114a60aa 100644 --- a/sirepo_bluesky/srw/srw_ophyd.py +++ b/sirepo_bluesky/srw/srw_ophyd.py @@ -69,9 +69,6 @@ def describe(self): res[self.image.name].update(dict(external="FILESTORE")) - for key in [self.shape.name]: - res[key].update(dict(dtype_str="