mxcubecore 1.371.0__py3-none-any.whl → 1.373.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mxcubecore might be problematic. Click here for more details.

@@ -23,6 +23,7 @@ from __future__ import absolute_import
23
23
  import ast
24
24
  import copy
25
25
  import enum
26
+ import itertools
26
27
  import logging
27
28
  import typing
28
29
  import warnings
@@ -520,14 +521,14 @@ class HardwareObjectNode:
520
521
  #
521
522
  # Look-up object by role the old way.
522
523
  #
523
- objects = [self]
524
524
 
525
- for curr in objects:
526
- result = curr._objects_by_role.get(role)
527
- if result is None:
528
- objects.extend(obj for obj in curr if obj)
529
-
530
- else:
525
+ #
526
+ # Look for object recursively, starting with our self
527
+ # and then checking the child objects.
528
+ #
529
+ for object in itertools.chain([self], *self.__objects):
530
+ result = object._objects_by_role.get(role)
531
+ if result is not None:
531
532
  return result
532
533
 
533
534
  def _objects_names(self) -> List[Union[str, None]]:
@@ -236,8 +236,15 @@ class EdnaWorkflow(HardwareObject):
236
236
  self.dict_parameters.get("sample_lims_id")
237
237
  )
238
238
 
239
- except RuntimeError:
240
- logging.exception("Failed to fetch sample information for")
239
+ except (RuntimeError, AttributeError):
240
+ logging.warning("Failed to fetch sample information for")
241
+
242
+ try:
243
+ self.dict_parameters["investigationId"] = (
244
+ HWR.beamline.lims.session_manager.active_session.session_id
245
+ )
246
+ except (RuntimeError, AttributeError):
247
+ logging.warning("Failed to fetch investigationId from HWR.beamline.lims")
241
248
 
242
249
  self.dict_parameters["token"] = (
243
250
  self.token
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mxcubecore
3
- Version: 1.371.0
3
+ Version: 1.373.0
4
4
  Summary: Core libraries for the MXCuBE application
5
5
  License: LGPL-3.0-or-later
6
6
  Keywords: mxcube,mxcube3,mxcubecore
@@ -1,4 +1,4 @@
1
- mxcubecore/BaseHardwareObjects.py,sha256=KuvnwMTXRZsozQcuMqhQVGdj-T6xSsaeoFu2NuprL18,41184
1
+ mxcubecore/BaseHardwareObjects.py,sha256=2kMsbOvqMsRv5qoHP_dOY6_eAC_roA_KP8o3BEN4b3w,41268
2
2
  mxcubecore/Command/Epics.py,sha256=9ftSEd4VdaFTE0qSrjL7LikLc_LJjz1-nNZF4J7hbWE,7748
3
3
  mxcubecore/Command/Exporter.py,sha256=HL6hncI_EUjjVX7frOsmxGa2Gyc-3PwUPXLUBJk4B20,8076
4
4
  mxcubecore/Command/Mockup.py,sha256=OrGAJC0JjTTjGSMZl7NiWJmVUQeEThMYdSQzuBD-bEc,1949
@@ -176,7 +176,7 @@ mxcubecore/HardwareObjects/ESRF/queue_entry/ssx_laser_injector_collection.py,sha
176
176
  mxcubecore/HardwareObjects/ESRF/queue_entry/ssx_line_scan_collection.py,sha256=Ld9rt1ITfSoLzhBvaLx5sWZ8xMzbIZRKocZKAJWhNAY,5377
177
177
  mxcubecore/HardwareObjects/ESRF/queue_entry/test_collection.py,sha256=288dLh6rZxLcvpl5wDi_TaTK5g5nAU2Vc7ySgzLq6zs,2430
178
178
  mxcubecore/HardwareObjects/ESRFLIMS.py,sha256=pZzy4yC_QZytWFSGTzsR5zxkBoj8WkIgUWwRlhXPp2s,9838
179
- mxcubecore/HardwareObjects/EdnaWorkflow.py,sha256=zuNVFWXHcnKRZPRnY3yjW__yRjnl_FWR_OrFLF2qESc,8741
179
+ mxcubecore/HardwareObjects/EdnaWorkflow.py,sha256=0SKi0Y-6O5dmBeEgb8x3z-G-1hQAqpyPCsecYcZSM-A,9050
180
180
  mxcubecore/HardwareObjects/Energy.py,sha256=iZyLDPPrmx38SlpeP7V82DY32AT2NovuslONB5aYGPU,6496
181
181
  mxcubecore/HardwareObjects/ExporterMotor.py,sha256=7XjyUcymJjJM7YVyteBxjLutgfSuThQ3OvwvwrJ9K1A,8671
182
182
  mxcubecore/HardwareObjects/ExporterNState.py,sha256=BH9jkRoud4bHLiflj_1mgDL0Y-LmMjesfTtTGr7EzJ0,6129
@@ -469,8 +469,8 @@ mxcubecore/utils/conversion.py,sha256=G1bk2Mi2ZwGbZa5pEeiFaKWxhSVXVGqu1L9_SioyUO
469
469
  mxcubecore/utils/qt_import.py,sha256=0lPmqok_oYQZ059kJCq7RWdg490T8YKyRvoZGyWDy4M,14486
470
470
  mxcubecore/utils/tango.py,sha256=lAl7Su_GgyXFEEKZ1yu_2gU18wXHVaBbGR8RYcIOVYk,2100
471
471
  mxcubecore/utils/units.py,sha256=Gh7ovTUN00XBMUoyDG5W7akCx1pROL-M6pK2z1ouemg,1361
472
- mxcubecore-1.371.0.dist-info/COPYING,sha256=u-Mc8zCecwyo4YoP8UulmzCiZZ_MmCLROd_NBtOcRj0,35148
473
- mxcubecore-1.371.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
474
- mxcubecore-1.371.0.dist-info/METADATA,sha256=SEfNqG9qGU8a1gpATN1JSPTUmcSULyVhnM3ed9SfCAQ,4259
475
- mxcubecore-1.371.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
476
- mxcubecore-1.371.0.dist-info/RECORD,,
472
+ mxcubecore-1.373.0.dist-info/COPYING,sha256=u-Mc8zCecwyo4YoP8UulmzCiZZ_MmCLROd_NBtOcRj0,35148
473
+ mxcubecore-1.373.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
474
+ mxcubecore-1.373.0.dist-info/METADATA,sha256=RxlY3zEk1cyD3sj9-jwKNlZvic6m6yEchwnJxsRWlhg,4259
475
+ mxcubecore-1.373.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
476
+ mxcubecore-1.373.0.dist-info/RECORD,,