itkdb-gtk 0.10.9.dev1__py3-none-any.whl → 0.10.9.dev2__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 itkdb-gtk might be problematic. Click here for more details.

itkdb_gtk/GetShipments.py CHANGED
@@ -22,6 +22,27 @@ from gi.repository import Gtk, Gio, GLib
22
22
  gtk_runs, gtk_args = Gtk.init_check()
23
23
 
24
24
 
25
+ def find_vtrx(client, SN):
26
+ """Searches VTRx."""
27
+ payload = {
28
+ "filterMap": {
29
+ "project": "CE",
30
+ "componentType": ["VTRX"],
31
+ "propertyFilter": [{"code": "PACKAGE_SN", "operator": "=", "value": SN}],
32
+ }
33
+ }
34
+ out = client.get("listComponentsByProperty", json=payload)
35
+ vtrx = None
36
+ int nitem = 0
37
+ for item in out:
38
+ vtrx = item["serialNumber"]
39
+ nitem += 1
40
+
41
+ if nitem > 1:
42
+ raise ValueError("Too many VTRx with same device SN.")
43
+
44
+ return vtrx
45
+
25
46
  class ReceiveShipments(dbGtkUtils.ITkDBWindow):
26
47
  """Find shipments related to given recipient."""
27
48
 
@@ -159,6 +180,13 @@ class ReceiveShipments(dbGtkUtils.ITkDBWindow):
159
180
  txt = dbGtkUtils.scanner_get_line(reader)
160
181
  self.write_message("{}\n".format(txt))
161
182
 
183
+ if txt.find("J-SD") == 0:
184
+ try:
185
+ txt = find_vtrx(self.session, txt)
186
+ except ValueError as e:
187
+ self.write_message("Error: {}".format(e))
188
+ return
189
+
162
190
  # search code in the list
163
191
  if self.store:
164
192
  iter = self.store.get_iter_first()
itkdb_gtk/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """ itkdb-gtk python module
2
2
  """
3
- __version__ = "0.10.9.dev1"
3
+ __version__ = "0.10.9.dev2"
4
4
 
5
5
 
6
6
  def dash_board():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: itkdb_gtk
3
- Version: 0.10.9.dev1
3
+ Version: 0.10.9.dev2
4
4
  Summary: A collection of Gtk based GUI to access ITkDB.
5
5
  Author-email: Carlos Lacasta <carlos.lacasta@cern.ch>
6
6
  Project-URL: Homepage, https://gitlab.cern.ch/atlas-itk/sw/db/itk-pdb-gtk-gui-utils
@@ -1,5 +1,5 @@
1
1
  itkdb_gtk/CreateShipments.py,sha256=c9TZVidWULQeZgVymGELcqrBrjtWGhj2DU59cagZOIc,13006
2
- itkdb_gtk/GetShipments.py,sha256=Bj46Y-Q1O9yxLd5ZvQF6uoLRIU4hAhPmBfjQGmqqF0I,18123
2
+ itkdb_gtk/GetShipments.py,sha256=Z9jqFAVJ2P7aSq-P-a4TnLd28PbzRCY2aa9YGXWySa4,18889
3
3
  itkdb_gtk/GlueWeight.py,sha256=4oZOinyHPqG0Pk6AmEVKd_dFDZWPoLrx7ywCmhodveE,12258
4
4
  itkdb_gtk/ITkDB.desktop,sha256=v_K4mHsDxb912J1XGo6mOlbW2TkHvYNGrKmiOnsBQqM,172
5
5
  itkdb_gtk/ITkDB.svg,sha256=Ry702zrUkxvG61SqThbUNfXySyiLMqalwYpcM-b_KWo,24242
@@ -16,14 +16,14 @@ itkdb_gtk/UploadMultipleTests.py,sha256=3cwEqq2CmWf-kEHxoXMv98tg4BXztqW-BWD9iyyt
16
16
  itkdb_gtk/UploadPetalInformation.py,sha256=No7gQEUoO5HJP3Ch3t_j99_xCD9BWrb-PWsDUo7sU6M,24746
17
17
  itkdb_gtk/UploadTest.py,sha256=NyNX2itqbMvp4g7XZp5QvXKYZ-ILJrwzcLckLmSDuPw,16570
18
18
  itkdb_gtk/WireBondGui.py,sha256=e0asNrZUNmDKjqIXR3qcEsinSzX-Z7q71sIV2abcg2g,27179
19
- itkdb_gtk/__init__.py,sha256=tEKI2Bgk2luSbW1DPnWrj9e7799uKZW2BP7hJaxxoS4,1291
19
+ itkdb_gtk/__init__.py,sha256=Wqa58ySSVHvPRtJ8R3djwaqHbCDGCxVAlV0obqPtKSw,1291
20
20
  itkdb_gtk/dashBoard.py,sha256=2V-AWb4AaqqoX0J9QmamlXXwqdZTSY2lFkXSmY8biIE,8974
21
21
  itkdb_gtk/dbGtkUtils.py,sha256=cJhlf8EZaQWOItVLfEHauN_Fb6WPep2vsmnU3pJirSc,28878
22
22
  itkdb_gtk/readAVSdata.py,sha256=Sc_pXrzYkGDIF5-0pHYLATQQoRb8gbHmi9jz64v267Y,23439
23
23
  itkdb_gtk/readGoogleSheet.py,sha256=Lzm_oPWwDqZZzKoBUgsp277F9-wCfr_BA0X4VD2Eolo,2673
24
24
  itkdb_gtk/untrash_component.py,sha256=VrN46-f-kF7voOxtoh7OL-bZSWAaIFb7-Xbx6_WT7K8,757
25
- itkdb_gtk-0.10.9.dev1.dist-info/METADATA,sha256=B1abk8-sB6o-7HI0E3n59oOZMPiC1mWYLCs8dRG2tec,3155
26
- itkdb_gtk-0.10.9.dev1.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
27
- itkdb_gtk-0.10.9.dev1.dist-info/entry_points.txt,sha256=Xf_DDU3QlT2zogRFMOJdO4BdVuAKyAwmb2jHZ5KbBxE,501
28
- itkdb_gtk-0.10.9.dev1.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
29
- itkdb_gtk-0.10.9.dev1.dist-info/RECORD,,
25
+ itkdb_gtk-0.10.9.dev2.dist-info/METADATA,sha256=_6iigfKFXqfzA61l_u0FCDrteXCZnwFfffAX1H2LGbo,3155
26
+ itkdb_gtk-0.10.9.dev2.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
27
+ itkdb_gtk-0.10.9.dev2.dist-info/entry_points.txt,sha256=Xf_DDU3QlT2zogRFMOJdO4BdVuAKyAwmb2jHZ5KbBxE,501
28
+ itkdb_gtk-0.10.9.dev2.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
29
+ itkdb_gtk-0.10.9.dev2.dist-info/RECORD,,