itkdb-gtk 0.10.10.dev1__tar.gz → 0.10.10.dev2__tar.gz
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-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/PKG-INFO +1 -1
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/CreateShipments.py +5 -2
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/GetShipments.py +16 -5
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/PanelVisualInspection.py +1 -1
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/PetalReceptionTests.py +1 -1
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/WireBondGui.py +43 -25
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/__init__.py +1 -1
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/dbGtkUtils.py +7 -2
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk.egg-info/PKG-INFO +1 -1
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/pyproject.toml +1 -1
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/README.md +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/GlueWeight.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/ITkDB.desktop +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/ITkDB.svg +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/ITkDBlogin.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/ITkDButils.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/SensorUtils.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/ShowAttachments.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/ShowComments.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/ShowDefects.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/UploadModuleIV.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/UploadMultipleTests.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/UploadPetalInformation.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/UploadTest.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/dashBoard.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/readAVSdata.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/readGoogleSheet.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk/untrash_component.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk.egg-info/SOURCES.txt +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk.egg-info/dependency_links.txt +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk.egg-info/entry_points.txt +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk.egg-info/requires.txt +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/itkdb_gtk.egg-info/top_level.txt +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/setup.cfg +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/test/testAnimated.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/test/testBatch.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/test/testComponent.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/test/test_attachment.py +0 -0
- {itkdb_gtk-0.10.10.dev1 → itkdb_gtk-0.10.10.dev2}/test/test_holes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: itkdb_gtk
|
|
3
|
-
Version: 0.10.10.
|
|
3
|
+
Version: 0.10.10.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
|
|
@@ -19,7 +19,7 @@ from itkdb_gtk import dbGtkUtils, ITkDBlogin, ITkDButils
|
|
|
19
19
|
|
|
20
20
|
import gi
|
|
21
21
|
gi.require_version("Gtk", "3.0")
|
|
22
|
-
from gi.repository import Gtk, Gio
|
|
22
|
+
from gi.repository import Gtk, Gio
|
|
23
23
|
|
|
24
24
|
# Check if Gtk can be open
|
|
25
25
|
gtk_runs, gtk_args = Gtk.init_check()
|
|
@@ -181,6 +181,9 @@ class CreateShipments(dbGtkUtils.ITkDBWindow):
|
|
|
181
181
|
# For the later we get the SN in the argument list.
|
|
182
182
|
if isinstance(args[0], Gtk.Button):
|
|
183
183
|
txt = dbGtkUtils.get_a_value("Enter item SN", is_tv=True)
|
|
184
|
+
if txt is None:
|
|
185
|
+
return
|
|
186
|
+
|
|
184
187
|
tmp = re.split(';|,| |\n|\t', txt)
|
|
185
188
|
SNlist = [s.strip() for s in tmp if len(s.strip())>0]
|
|
186
189
|
else:
|
|
@@ -346,7 +349,7 @@ class CreateShipments(dbGtkUtils.ITkDBWindow):
|
|
|
346
349
|
self.tree.set_model(model)
|
|
347
350
|
self.comments.set_text("")
|
|
348
351
|
self.name.set_text("")
|
|
349
|
-
self.
|
|
352
|
+
self.attachment = None
|
|
350
353
|
|
|
351
354
|
else:
|
|
352
355
|
self.write_message("Empty list of items when creating shipment.")
|
|
@@ -96,7 +96,7 @@ class ReceiveShipments(dbGtkUtils.ITkDBWindow):
|
|
|
96
96
|
self.mainBox.pack_start(grid, False, True, 0)
|
|
97
97
|
|
|
98
98
|
# The shipment receiver
|
|
99
|
-
receiver = self.create_institute_combo()
|
|
99
|
+
receiver = self.create_institute_combo(only_user=True)
|
|
100
100
|
receiver.connect("changed", self.on_receiver)
|
|
101
101
|
receiver.set_tooltip_text("Select the Institute receiving the items.")
|
|
102
102
|
dbGtkUtils.set_combo_iter(receiver, self.recipient)
|
|
@@ -256,7 +256,7 @@ class ReceiveShipments(dbGtkUtils.ITkDBWindow):
|
|
|
256
256
|
|
|
257
257
|
def query_db(self, *args):
|
|
258
258
|
"""Query for shipments in DB."""
|
|
259
|
-
if self.
|
|
259
|
+
if self.state == "":
|
|
260
260
|
return
|
|
261
261
|
|
|
262
262
|
payload = {
|
|
@@ -272,7 +272,11 @@ class ReceiveShipments(dbGtkUtils.ITkDBWindow):
|
|
|
272
272
|
# the tree view.
|
|
273
273
|
cmb_store = Gtk.ListStore(str, str)
|
|
274
274
|
for s in shpmts:
|
|
275
|
-
|
|
275
|
+
valid_sender = True
|
|
276
|
+
if self.institute is not None:
|
|
277
|
+
valid_sender = s['sender']['code'] == self.institute
|
|
278
|
+
|
|
279
|
+
if s["recipient"]["code"] == self.recipient and valid_sender:
|
|
276
280
|
store = self.get_tree_view_model()
|
|
277
281
|
cmb_store.append([s['name'], s['id']])
|
|
278
282
|
items = self.session.get("listShipmentItems", json={"shipment": s["id"]})
|
|
@@ -290,8 +294,15 @@ class ReceiveShipments(dbGtkUtils.ITkDBWindow):
|
|
|
290
294
|
self.write_message("Could not find any shipment in DB.\n")
|
|
291
295
|
|
|
292
296
|
self.cmb_shipment.set_model(cmb_store)
|
|
293
|
-
|
|
294
|
-
|
|
297
|
+
if len(cmb_store)>0:
|
|
298
|
+
self.cmb_shipment.set_entry_text_column(0)
|
|
299
|
+
self.cmb_shipment.set_active(0)
|
|
300
|
+
else:
|
|
301
|
+
self.cmb_shipment.set_active(-1)
|
|
302
|
+
self.cmb_shipment.get_child().set_text("")
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
self.tree.set_model(Gtk.ListStore(str, str, str, bool))
|
|
295
306
|
|
|
296
307
|
def receive_items(self, *args):
|
|
297
308
|
"""Receive shipment items."""
|
|
@@ -64,7 +64,7 @@ class PanelVisualInspection(dbGtkUtils.ITkDBWindow):
|
|
|
64
64
|
self.mainBox.pack_start(grid, False, False, 5)
|
|
65
65
|
|
|
66
66
|
irow = 0
|
|
67
|
-
receiver = self.create_institute_combo()
|
|
67
|
+
receiver = self.create_institute_combo(only_user=True)
|
|
68
68
|
receiver.connect("changed", self.on_institute)
|
|
69
69
|
receiver.set_tooltip_text("Select the Institute making the test.")
|
|
70
70
|
dbGtkUtils.set_combo_iter(receiver, self.institute)
|
|
@@ -84,7 +84,7 @@ class PetalReceptionTests(dbGtkUtils.ITkDBWindow):
|
|
|
84
84
|
grid.attach(lbl, 0, 1, 1, 1)
|
|
85
85
|
|
|
86
86
|
self.institute = self.pdb_user["institutions"][0]["code"]
|
|
87
|
-
inst = self.create_institute_combo()
|
|
87
|
+
inst = self.create_institute_combo(only_user=True)
|
|
88
88
|
inst.connect("changed", self.new_institute)
|
|
89
89
|
inst.set_tooltip_text("Select the Institute.")
|
|
90
90
|
grid.attach(inst, 1, 1, 1, 1)
|
|
@@ -15,7 +15,6 @@ try:
|
|
|
15
15
|
import itkdb_gtk
|
|
16
16
|
|
|
17
17
|
except ImportError:
|
|
18
|
-
from pathlib import Path
|
|
19
18
|
cwd = Path(__file__).parent.parent
|
|
20
19
|
sys.path.append(cwd.as_posix())
|
|
21
20
|
import itkdb_gtk
|
|
@@ -33,7 +32,7 @@ def range_to_list(V):
|
|
|
33
32
|
"""Convert a range (ch1-ch2) to a list."""
|
|
34
33
|
if '-' not in V:
|
|
35
34
|
return [V]
|
|
36
|
-
|
|
35
|
+
|
|
37
36
|
out = []
|
|
38
37
|
endpoints = list(map(int, V.split('-')))
|
|
39
38
|
endpoints.sort()
|
|
@@ -449,6 +448,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
449
448
|
self.combo = None
|
|
450
449
|
self.tree = None
|
|
451
450
|
self.lut = {}
|
|
451
|
+
self.module_type = None
|
|
452
452
|
self.init_window()
|
|
453
453
|
|
|
454
454
|
def init_window(self):
|
|
@@ -571,54 +571,65 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
571
571
|
dbGtkUtils.complain("Cannot open Luukup Table.",
|
|
572
572
|
"File {} does not exist.".format(fnam))
|
|
573
573
|
return
|
|
574
|
-
|
|
574
|
+
|
|
575
575
|
lut = {}
|
|
576
|
+
module_map = {}
|
|
577
|
+
section = None
|
|
576
578
|
with open(fnam, 'r', encoding="UTF-8") as fin:
|
|
577
579
|
for line in fin:
|
|
578
580
|
line = line.strip()
|
|
579
|
-
|
|
580
|
-
if len(line) == 0:
|
|
581
|
-
continue
|
|
582
|
-
|
|
581
|
+
|
|
583
582
|
# Remove comments.
|
|
584
|
-
if line[0]=='#':
|
|
585
|
-
continue
|
|
586
|
-
|
|
587
583
|
ipos = line.find('#')
|
|
588
584
|
if ipos >= 0:
|
|
589
585
|
line = line[:ipos].strip()
|
|
590
|
-
|
|
586
|
+
|
|
591
587
|
if len(line) == 0:
|
|
592
588
|
continue
|
|
593
|
-
|
|
589
|
+
|
|
590
|
+
# Check for new section
|
|
591
|
+
ipos = line.find(':')
|
|
592
|
+
if ipos >= 0:
|
|
593
|
+
section = line[:ipos].strip().upper()
|
|
594
|
+
if section in module_map:
|
|
595
|
+
dbGtkUtils.complain("Section {} already in map.".format(section), "Stop parsing bond Lookup table.")
|
|
596
|
+
return
|
|
597
|
+
|
|
598
|
+
lut = {}
|
|
599
|
+
module_map[section] = lut
|
|
600
|
+
continue
|
|
601
|
+
|
|
602
|
+
if section is None:
|
|
603
|
+
continue
|
|
604
|
+
|
|
594
605
|
values = list(map(str.strip, line.split(',')))
|
|
595
606
|
if len(values)!=2:
|
|
596
607
|
dbGtkUtils.complain("Cannot read Lookup table.", "Wrong line format: {}".format(line))
|
|
597
608
|
return
|
|
598
|
-
|
|
609
|
+
|
|
599
610
|
v_local = range_to_list(values[0])
|
|
600
611
|
v_std = range_to_list(values[1])
|
|
601
|
-
|
|
612
|
+
|
|
602
613
|
if len(v_local) != len(v_std):
|
|
603
|
-
dbGtkUtils.complain("Wrong Lookup table.",
|
|
614
|
+
dbGtkUtils.complain("Wrong Lookup table.",
|
|
604
615
|
"Ranges have different length: {}".format(line))
|
|
605
616
|
return
|
|
606
|
-
|
|
617
|
+
|
|
607
618
|
for L, S in zip(v_local, v_std):
|
|
608
619
|
lut[L] = S
|
|
609
|
-
|
|
610
|
-
self.lut =
|
|
620
|
+
|
|
621
|
+
self.lut = module_map
|
|
611
622
|
|
|
612
623
|
def convert_channel(self, C):
|
|
613
624
|
"""Convert channel according to LUT
|
|
614
625
|
|
|
615
626
|
Args:
|
|
616
627
|
C (str): channel number
|
|
617
|
-
|
|
628
|
+
|
|
618
629
|
"""
|
|
619
630
|
try:
|
|
620
|
-
return self.lut[C]
|
|
621
|
-
|
|
631
|
+
return self.lut[self.module_type][C]
|
|
632
|
+
|
|
622
633
|
except KeyError:
|
|
623
634
|
return C
|
|
624
635
|
|
|
@@ -631,13 +642,20 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
631
642
|
def on_SN_changed(self, entry, value):
|
|
632
643
|
"""New SN given. Ask in PDB,"""
|
|
633
644
|
if len(value) <= 0:
|
|
634
|
-
return
|
|
635
|
-
|
|
645
|
+
return
|
|
636
646
|
|
|
637
647
|
obj = itkdb_gtk.ITkDButils.get_DB_component(self.session, value)
|
|
638
648
|
if obj is not None and obj["serialNumber"] is not None:
|
|
639
649
|
entry.set_text(obj["serialNumber"])
|
|
640
|
-
|
|
650
|
+
alternativeID = obj["alternativeIdentifier"]
|
|
651
|
+
module_SN = obj["serialNumber"]
|
|
652
|
+
if len(module_SN) == 14 and module_SN.startswith("20USEM"):
|
|
653
|
+
self.module_SN = module_SN
|
|
654
|
+
self.alternativeID = alternativeID
|
|
655
|
+
self.module_type = module_SN[5:7]
|
|
656
|
+
|
|
657
|
+
else:
|
|
658
|
+
itkdb_gtk.dbGtkUtils.complain("Invalid SN: {}".format(module_SN), "Not a Ring module")
|
|
641
659
|
|
|
642
660
|
else:
|
|
643
661
|
itkdb_gtk.dbGtkUtils.complain("Invalid SN", value)
|
|
@@ -948,7 +966,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
948
966
|
values = list(map(str.strip, key.split(',')))
|
|
949
967
|
if ',' in key or '-' in key:
|
|
950
968
|
range_items.append(key)
|
|
951
|
-
|
|
969
|
+
|
|
952
970
|
else:
|
|
953
971
|
continue
|
|
954
972
|
|
|
@@ -246,6 +246,7 @@ class TextEntry(GObject.GObject):
|
|
|
246
246
|
GObject.GObject.__init__(self)
|
|
247
247
|
self.tmp_txt = ""
|
|
248
248
|
self.nlines = n_lines
|
|
249
|
+
self.do_emit = True
|
|
249
250
|
if self.nlines > 1:
|
|
250
251
|
self.widget = Gtk.Frame()
|
|
251
252
|
scrolled = Gtk.ScrolledWindow()
|
|
@@ -265,7 +266,6 @@ class TextEntry(GObject.GObject):
|
|
|
265
266
|
|
|
266
267
|
self.widget.connect("focus-in-event", self.on_enter)
|
|
267
268
|
self.widget.connect("focus-out-event", self.on_leave)
|
|
268
|
-
|
|
269
269
|
self.entry = self.widget
|
|
270
270
|
|
|
271
271
|
def do_my_signal(self, *args):
|
|
@@ -281,7 +281,9 @@ class TextEntry(GObject.GObject):
|
|
|
281
281
|
"""On leave."""
|
|
282
282
|
val = self.widget.get_text().strip()
|
|
283
283
|
if val != self.tmp_txt:
|
|
284
|
+
self.do_emit = False
|
|
284
285
|
self.emit("text_changed", val)
|
|
286
|
+
self.do_emit = True
|
|
285
287
|
|
|
286
288
|
def get_text(self):
|
|
287
289
|
"""Return the text."""
|
|
@@ -303,7 +305,10 @@ class TextEntry(GObject.GObject):
|
|
|
303
305
|
self.entry.get_buffer().set_text(text)
|
|
304
306
|
else:
|
|
305
307
|
self.entry.set_text(text)
|
|
306
|
-
|
|
308
|
+
if self.do_emit:
|
|
309
|
+
self.do_emit = False
|
|
310
|
+
self.emit("text_changed", text)
|
|
311
|
+
self.do_emit = True
|
|
307
312
|
|
|
308
313
|
def get_a_value(main_title, second_text=None, is_tv=False, parent=None):
|
|
309
314
|
"""Open a dialog to get a value.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: itkdb_gtk
|
|
3
|
-
Version: 0.10.10.
|
|
3
|
+
Version: 0.10.10.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|