mxcubecore 1.404.0__py3-none-any.whl → 1.406.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.

File without changes
File without changes
File without changes
File without changes
@@ -59,6 +59,9 @@ class ICATLIMS(AbstractLims):
59
59
  Lims(name="DRAC", description="Data Repository for Advancing open sCience"),
60
60
  ]
61
61
 
62
+ def _create_icat_session(self, user_name: str, password: str):
63
+ self.icat_session: ICATSession = self.icatClient.do_log_in(password)
64
+
62
65
  def login(
63
66
  self,
64
67
  user_name: str,
@@ -68,7 +71,7 @@ class ICATLIMS(AbstractLims):
68
71
  msg = f"authenticate {user_name}"
69
72
  logger.debug(msg)
70
73
 
71
- self.icat_session: ICATSession = self.icatClient.do_log_in(password)
74
+ self._create_icat_session(user_name=user_name, password=password)
72
75
 
73
76
  if self.icatClient is None or self.icatClient is None:
74
77
  msg = "Error initializing icatClient: "
@@ -0,0 +1,45 @@
1
+ """
2
+ A client for ISPyB Webservices.
3
+ """
4
+
5
+ from pyicat_plus.client.main import IcatClient
6
+
7
+ from mxcubecore.HardwareObjects.ICATLIMS import ICATLIMS
8
+
9
+
10
+ class LNLSLIMS(ICATLIMS):
11
+ def init(self):
12
+ self.url = self.get_property("ws_root")
13
+ self.ingesters = self.get_property("queue_urls")
14
+ self.investigations = []
15
+ self.samples = []
16
+
17
+ self.icatClient = IcatClient(
18
+ icatplus_restricted_url="https://icat-plus.cnpem.br"
19
+ )
20
+
21
+ def is_single_session_available(self):
22
+ """
23
+ True if there is no active session and there is
24
+ a single session available
25
+ """
26
+ return (
27
+ self.session_manager.active_session is None
28
+ and len(self.session_manager.sessions) == 1
29
+ )
30
+
31
+ def _create_icat_session(self, user_name: str, password: str):
32
+ self.icat_session = self.icatClient.do_log_in(user_name, password)
33
+
34
+ def login(self, user_name, token, is_local_host):
35
+ self.is_local_host = is_local_host
36
+ session_manager, lims_username, sessions = super().login(
37
+ user_name, token, self.session_manager
38
+ )
39
+ self.session_manager = session_manager
40
+ self.add_user_and_shared_sessions(lims_username, sessions)
41
+ if self.is_single_session_available():
42
+ single_session = self.session_manager.sessions[0]
43
+ self.set_active_session_by_id(single_session.session_id)
44
+
45
+ return session_manager
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mxcubecore
3
- Version: 1.404.0
3
+ Version: 1.406.0
4
4
  Summary: Core libraries for the MXCuBE application
5
5
  License: LGPL-3.0-or-later
6
6
  Keywords: mxcube,mxcube3,mxcubecore
@@ -196,8 +196,9 @@ mxcubecore/HardwareObjects/GrobMotor.py,sha256=l5A9Us_ceLXlhEF6RNwyXQsI56fJiobWh
196
196
  mxcubecore/HardwareObjects/GrobSampleChanger.py,sha256=LMetcL45fWrwP4C8rtENrEDNydelLpJ77SD1JC5C3go,8113
197
197
  mxcubecore/HardwareObjects/Harvester.py,sha256=0TYUXmz-Pmfd7Dhz7ToUGHzJRuJmnga8-4BK4B0KGQA,26524
198
198
  mxcubecore/HardwareObjects/HarvesterMaintenance.py,sha256=8s4yHDEFG-C1WYyW_RlwrFPSpc8o5hGi14aQuFQFrHs,9405
199
- mxcubecore/HardwareObjects/ICATLIMS.py,sha256=rrFwvYbBQovZtwfGZTS8GvHsbzAHbdIpVS2fGUxKLQA,54545
199
+ mxcubecore/HardwareObjects/ICATLIMS.py,sha256=YbYmeHKYxDqgN4I7a2SRA7e-Io5YPgzYAAeXEE4Im-s,54687
200
200
  mxcubecore/HardwareObjects/ISARAMaint.py,sha256=I8LHXK6wCfzixsxWmmcqWlrdaL3AOX91XmVeAwT7GPk,8959
201
+ mxcubecore/HardwareObjects/LNLS/LNLSLIMS.py,sha256=oen9r3Furo_z7YSxo_wAwgXwaON9dWuZP5ob9tvnMO0,1462
201
202
  mxcubecore/HardwareObjects/LNLS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
202
203
  mxcubecore/HardwareObjects/LdapAuthenticator.py,sha256=UgK7c4_CisP3T7o1KhW9seRsWR8-5Phhhw_PSqTkwB4,6262
203
204
  mxcubecore/HardwareObjects/Lima2Detector.py,sha256=oe_y3jRNXa4Nks7iNCwpRsQZ4GssSR43NMezBqV7z6k,21057
@@ -451,8 +452,8 @@ mxcubecore/utils/conversion.py,sha256=G1bk2Mi2ZwGbZa5pEeiFaKWxhSVXVGqu1L9_SioyUO
451
452
  mxcubecore/utils/qt_import.py,sha256=DobjYIAhrixXoOH9oaus1-PsW5hSAI4nIyPp06Izw4U,14719
452
453
  mxcubecore/utils/tango.py,sha256=vwEVrIrWKEFaeaJUz3xbaC7XWHY8ZeJ-pfcSrTfZPIE,2114
453
454
  mxcubecore/utils/units.py,sha256=Gh7ovTUN00XBMUoyDG5W7akCx1pROL-M6pK2z1ouemg,1361
454
- mxcubecore-1.404.0.dist-info/COPYING,sha256=u-Mc8zCecwyo4YoP8UulmzCiZZ_MmCLROd_NBtOcRj0,35148
455
- mxcubecore-1.404.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
456
- mxcubecore-1.404.0.dist-info/METADATA,sha256=0oYKOfPbqd6xkcSQSfKS2Iy12xaPEj5VKWsBpUOrMLo,4259
457
- mxcubecore-1.404.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
458
- mxcubecore-1.404.0.dist-info/RECORD,,
455
+ mxcubecore-1.406.0.dist-info/COPYING,sha256=u-Mc8zCecwyo4YoP8UulmzCiZZ_MmCLROd_NBtOcRj0,35148
456
+ mxcubecore-1.406.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
457
+ mxcubecore-1.406.0.dist-info/METADATA,sha256=Hdye6IiaivvKjlzHpUtZazB4WT5kqx4eyDz4W8Geewc,4259
458
+ mxcubecore-1.406.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
459
+ mxcubecore-1.406.0.dist-info/RECORD,,