itkdb-gtk 0.10.9.dev2__py3-none-any.whl → 0.10.9.dev4__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/CreateShipments.py +22 -21
- itkdb_gtk/GetShipments.py +28 -29
- itkdb_gtk/GlueWeight.py +2 -2
- itkdb_gtk/ITkDButils.py +114 -17
- itkdb_gtk/PanelVisualInspection.py +249 -69
- itkdb_gtk/PetalReceptionTests.py +4 -4
- itkdb_gtk/SensorUtils.py +16 -14
- itkdb_gtk/ShowAttachments.py +3 -1
- itkdb_gtk/UploadModuleIV.py +8 -8
- itkdb_gtk/UploadMultipleTests.py +53 -50
- itkdb_gtk/UploadPetalInformation.py +8 -9
- itkdb_gtk/UploadTest.py +7 -7
- itkdb_gtk/WireBondGui.py +78 -29
- itkdb_gtk/__init__.py +2 -2
- itkdb_gtk/dashBoard.py +15 -14
- itkdb_gtk/dbGtkUtils.py +21 -10
- {itkdb_gtk-0.10.9.dev2.dist-info → itkdb_gtk-0.10.9.dev4.dist-info}/METADATA +1 -1
- itkdb_gtk-0.10.9.dev4.dist-info/RECORD +29 -0
- {itkdb_gtk-0.10.9.dev2.dist-info → itkdb_gtk-0.10.9.dev4.dist-info}/WHEEL +1 -1
- itkdb_gtk-0.10.9.dev2.dist-info/RECORD +0 -29
- {itkdb_gtk-0.10.9.dev2.dist-info → itkdb_gtk-0.10.9.dev4.dist-info}/entry_points.txt +0 -0
- {itkdb_gtk-0.10.9.dev2.dist-info → itkdb_gtk-0.10.9.dev4.dist-info}/top_level.txt +0 -0
itkdb_gtk/WireBondGui.py
CHANGED
|
@@ -6,7 +6,7 @@ import json
|
|
|
6
6
|
import gi
|
|
7
7
|
|
|
8
8
|
gi.require_version("Gtk", "3.0")
|
|
9
|
-
from gi.repository import Gtk, Gio,
|
|
9
|
+
from gi.repository import Gtk, Gio, Gdk
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
import itkdb_gtk
|
|
@@ -16,7 +16,7 @@ except ImportError:
|
|
|
16
16
|
cwd = Path(__file__).parent.parent
|
|
17
17
|
sys.path.append(cwd.as_posix())
|
|
18
18
|
import itkdb_gtk
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
__HELP_LINK__="https://itkdb-gtk.docs.cern.ch/wirebondTest.html"
|
|
21
21
|
|
|
22
22
|
from itkdb_gtk import dbGtkUtils
|
|
@@ -173,7 +173,7 @@ class HybridHoles:
|
|
|
173
173
|
|
|
174
174
|
Returns:
|
|
175
175
|
True if added, False otherwise.
|
|
176
|
-
|
|
176
|
+
|
|
177
177
|
"""
|
|
178
178
|
first_chan = self.param[irow][0]
|
|
179
179
|
last_chan = self.param[irow][1]
|
|
@@ -310,13 +310,13 @@ class SensorHoles:
|
|
|
310
310
|
|
|
311
311
|
def get_sensor_holes(self):
|
|
312
312
|
"""Return holes sensor.
|
|
313
|
-
|
|
313
|
+
|
|
314
314
|
Return a list of [sensor, hybrid, segment, ichan, width]
|
|
315
315
|
"""
|
|
316
316
|
holes = []
|
|
317
317
|
for hyb in self.hybrids:
|
|
318
318
|
H = hyb.get_sensor_holes()
|
|
319
|
-
for _, ih, isegment, ichan, width in H:
|
|
319
|
+
for _, ih, isegment, ichan, width in H:
|
|
320
320
|
holes.append([self.id, ih, isegment, ichan, width])
|
|
321
321
|
|
|
322
322
|
return holes
|
|
@@ -360,7 +360,7 @@ class ModuleHoles:
|
|
|
360
360
|
"""
|
|
361
361
|
holes = []
|
|
362
362
|
for S in self.sensors:
|
|
363
|
-
for _, ihyb, isegment, ichan, width in S.get_sensor_holes():
|
|
363
|
+
for _, ihyb, isegment, ichan, width in S.get_sensor_holes():
|
|
364
364
|
holes.append([S.id, ihyb, isegment, ichan, width])
|
|
365
365
|
|
|
366
366
|
return holes
|
|
@@ -416,9 +416,9 @@ def get_module_param(SN):
|
|
|
416
416
|
class WireBond(dbGtkUtils.ITkDBWindow):
|
|
417
417
|
"""Main window."""
|
|
418
418
|
|
|
419
|
-
def __init__(self, session, title="",
|
|
419
|
+
def __init__(self, session, title="", help_link=__HELP_LINK__):
|
|
420
420
|
"""Initialization."""
|
|
421
|
-
super().__init__(title=title, session=session,
|
|
421
|
+
super().__init__(title=title, session=session, help_link=help_link)
|
|
422
422
|
self.pdb = None
|
|
423
423
|
self.models = {}
|
|
424
424
|
self.holes = {}
|
|
@@ -426,6 +426,8 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
426
426
|
self.inst_combo = None
|
|
427
427
|
self.module_SN = None
|
|
428
428
|
self.alternativeID = None
|
|
429
|
+
self.combo = None
|
|
430
|
+
self.tree = None
|
|
429
431
|
self.init_window()
|
|
430
432
|
|
|
431
433
|
def init_window(self):
|
|
@@ -460,7 +462,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
460
462
|
|
|
461
463
|
# Data panel
|
|
462
464
|
grid = Gtk.Grid(column_spacing=5, row_spacing=1)
|
|
463
|
-
|
|
465
|
+
|
|
464
466
|
# The shipment receiver
|
|
465
467
|
institute = self.create_institute_combo()
|
|
466
468
|
institute.connect("changed", self.on_institute)
|
|
@@ -469,8 +471,8 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
469
471
|
grid.attach(Gtk.Label(label="Institute"), 0, 0, 1, 1)
|
|
470
472
|
grid.attach(institute, 1, 0, 1, 1)
|
|
471
473
|
self.inst_combo = institute
|
|
472
|
-
|
|
473
|
-
|
|
474
|
+
|
|
475
|
+
|
|
474
476
|
for i, tit in enumerate(["Operator", "Bond Machine", "Wire Batch", "SN", "Date"]):
|
|
475
477
|
lbl = Gtk.Label(label=tit)
|
|
476
478
|
lbl.set_xalign(0)
|
|
@@ -480,11 +482,11 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
480
482
|
self.machine = dbGtkUtils.new_small_text_entry()
|
|
481
483
|
self.batch = dbGtkUtils.new_small_text_entry()
|
|
482
484
|
#self.SN = dbGtkUtils.new_small_text_entry()
|
|
483
|
-
|
|
485
|
+
|
|
484
486
|
self.SN = itkdb_gtk.dbGtkUtils.TextEntry(small=True)
|
|
485
487
|
self.SN.connect("text-changed", self.on_SN_changed)
|
|
486
488
|
|
|
487
|
-
|
|
489
|
+
|
|
488
490
|
self.date = dbGtkUtils.TextEntry(small=True)
|
|
489
491
|
self.date.entry.set_text(ITkDButils.get_db_date())
|
|
490
492
|
self.date.connect("text_changed", self.new_date)
|
|
@@ -511,10 +513,14 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
511
513
|
|
|
512
514
|
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
|
|
513
515
|
self.mainBox.pack_start(box, False, False, 0)
|
|
514
|
-
dbGtkUtils.add_button_to_container(box, "Add
|
|
515
|
-
"Click to add a new
|
|
516
|
+
dbGtkUtils.add_button_to_container(box, "Add Bond",
|
|
517
|
+
"Click to add a new bond.",
|
|
516
518
|
self.add_item)
|
|
517
519
|
|
|
520
|
+
dbGtkUtils.add_button_to_container(box, "Remove Bond",
|
|
521
|
+
"Click to remove selected bond.",
|
|
522
|
+
self.remove_item)
|
|
523
|
+
|
|
518
524
|
#
|
|
519
525
|
# The text view and buffer
|
|
520
526
|
#
|
|
@@ -526,7 +532,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
526
532
|
name = self.get_institute_from_combo(combo)
|
|
527
533
|
if name:
|
|
528
534
|
self.institute = name
|
|
529
|
-
|
|
535
|
+
|
|
530
536
|
def on_SN_changed(self, entry, value):
|
|
531
537
|
"""New SN given. Ask in PDB,"""
|
|
532
538
|
if len(value) <= 0:
|
|
@@ -630,9 +636,52 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
630
636
|
if d is not None:
|
|
631
637
|
self.date.set_text(d)
|
|
632
638
|
|
|
633
|
-
def button_pressed(self,
|
|
639
|
+
def button_pressed(self, tree, event):
|
|
634
640
|
"""Button pressed."""
|
|
635
|
-
|
|
641
|
+
# double click shows attachments
|
|
642
|
+
if event.button == 1 and event.type == Gdk.EventType.DOUBLE_BUTTON_PRESS:
|
|
643
|
+
#self.write_message("This is a double click.\n")
|
|
644
|
+
return
|
|
645
|
+
|
|
646
|
+
if event.button != 3:
|
|
647
|
+
return
|
|
648
|
+
|
|
649
|
+
# Create popup menu
|
|
650
|
+
select = self.tree.get_selection()
|
|
651
|
+
model, lv_iter = select.get_selected()
|
|
652
|
+
values = None
|
|
653
|
+
if lv_iter:
|
|
654
|
+
values = model[lv_iter]
|
|
655
|
+
|
|
656
|
+
else:
|
|
657
|
+
P = tree.get_path_at_pos(event.x, event.y)
|
|
658
|
+
if P:
|
|
659
|
+
lv_iter = model.get_iter(P[0])
|
|
660
|
+
values = model[lv_iter]
|
|
661
|
+
|
|
662
|
+
if not values:
|
|
663
|
+
return
|
|
664
|
+
|
|
665
|
+
menu = Gtk.Menu()
|
|
666
|
+
|
|
667
|
+
item_show = Gtk.MenuItem(label="Delete")
|
|
668
|
+
item_show.connect("activate", self.on_delete_item, (model, lv_iter, values))
|
|
669
|
+
menu.append(item_show)
|
|
670
|
+
|
|
671
|
+
menu.show_all()
|
|
672
|
+
menu.popup_at_pointer(event)
|
|
673
|
+
|
|
674
|
+
def on_delete_item(self, item, data):
|
|
675
|
+
"""Delete bond in list view."""
|
|
676
|
+
model, lv_iter, _ = data
|
|
677
|
+
model.remove(lv_iter)
|
|
678
|
+
|
|
679
|
+
def remove_item(self, *args):
|
|
680
|
+
"""REmoves selected bond."""
|
|
681
|
+
select = self.tree.get_selection()
|
|
682
|
+
model, lv_iter = select.get_selected()
|
|
683
|
+
if lv_iter:
|
|
684
|
+
model.remove(lv_iter)
|
|
636
685
|
|
|
637
686
|
def add_item(self, *args):
|
|
638
687
|
"""Adds a new item in the current model."""
|
|
@@ -656,7 +705,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
656
705
|
param = get_module_param(self.SN.get_text())
|
|
657
706
|
except ValueError as E:
|
|
658
707
|
dbGtkUtils.complain("Wrong SN number", str(E))
|
|
659
|
-
|
|
708
|
+
|
|
660
709
|
M = ModuleHoles(param=param)
|
|
661
710
|
|
|
662
711
|
for test in test_parameters.values():
|
|
@@ -701,10 +750,10 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
701
750
|
self.write_message("{}\n".format(str(H)))
|
|
702
751
|
if H[-1] > mxW:
|
|
703
752
|
mxW = H[-1]
|
|
704
|
-
|
|
753
|
+
|
|
705
754
|
if mxW > 0:
|
|
706
755
|
self.write_message("Max width: {}". format(mxW))
|
|
707
|
-
|
|
756
|
+
|
|
708
757
|
out["MAX_UNCON_SENSOR_CHAN"] = mxW
|
|
709
758
|
nstrips = 0
|
|
710
759
|
for v in unconnected:
|
|
@@ -755,7 +804,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
755
804
|
dbGtkUtils.set_combo_iter(self.inst_combo, data["institution"])
|
|
756
805
|
except KeyError:
|
|
757
806
|
self.write_message("institution value is not in the loaded file.")
|
|
758
|
-
|
|
807
|
+
|
|
759
808
|
self.operator.set_text(data["properties"]["OPERATOR"])
|
|
760
809
|
self.machine.set_text(data["properties"]["BOND_MACHINE"])
|
|
761
810
|
self.batch.set_text(data["properties"]["BONDWIRE_BATCH"])
|
|
@@ -772,14 +821,14 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
772
821
|
def get_list_of_channels(self, data):
|
|
773
822
|
"""Creates the lists of channels."""
|
|
774
823
|
for key, model in self.models.items():
|
|
775
|
-
|
|
824
|
+
lv_iter = model.get_iter_first()
|
|
776
825
|
out = {}
|
|
777
|
-
while
|
|
778
|
-
chan, comm = model[
|
|
826
|
+
while lv_iter:
|
|
827
|
+
chan, comm = model[lv_iter]
|
|
779
828
|
if len(chan) > 0:
|
|
780
829
|
out[chan] = comm
|
|
781
830
|
|
|
782
|
-
|
|
831
|
+
lv_iter = model.iter_next(lv_iter)
|
|
783
832
|
|
|
784
833
|
data["results"][key] = out
|
|
785
834
|
|
|
@@ -852,7 +901,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
852
901
|
data["institution"] = self.institute
|
|
853
902
|
if data["runNumber"] == "-1":
|
|
854
903
|
data["runNumber"] = "1"
|
|
855
|
-
|
|
904
|
+
|
|
856
905
|
data["date"] = self.date.get_text()
|
|
857
906
|
|
|
858
907
|
|
|
@@ -895,7 +944,7 @@ def main():
|
|
|
895
944
|
|
|
896
945
|
client.user_gui = dlg
|
|
897
946
|
|
|
898
|
-
|
|
947
|
+
|
|
899
948
|
win = WireBond(client, title="WireBond")
|
|
900
949
|
win.connect("destroy", Gtk.main_quit)
|
|
901
950
|
win.show_all()
|
|
@@ -906,6 +955,6 @@ def main():
|
|
|
906
955
|
print("Arrrgggg!!!")
|
|
907
956
|
|
|
908
957
|
dlg.die()
|
|
909
|
-
|
|
958
|
+
|
|
910
959
|
if __name__ == "__main__":
|
|
911
960
|
main()
|
itkdb_gtk/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
""" itkdb-gtk python module
|
|
2
2
|
"""
|
|
3
|
-
__version__ = "0.10.9.
|
|
3
|
+
__version__ = "0.10.9.dev4"
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
def dash_board():
|
|
@@ -60,5 +60,5 @@ def uploadPetalInformation():
|
|
|
60
60
|
|
|
61
61
|
def panelVisualInspection():
|
|
62
62
|
"""Visual inspection of PWB or HYB panels."""
|
|
63
|
-
from .
|
|
63
|
+
from .PanelVisualInspection import main
|
|
64
64
|
main()
|
itkdb_gtk/dashBoard.py
CHANGED
|
@@ -55,11 +55,11 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
55
55
|
PANEL_VI = 9
|
|
56
56
|
PETAL_CORE_METRO = 10
|
|
57
57
|
PETAL_CORE_THERMAL = 11
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
|
|
60
60
|
def __init__(self, session):
|
|
61
61
|
"""Initialization."""
|
|
62
|
-
super().__init__(title="ITkDB Dashboard", session=session,
|
|
62
|
+
super().__init__(title="ITkDB Dashboard", session=session, help_link=HELP_LINK)
|
|
63
63
|
self.mask = 0
|
|
64
64
|
|
|
65
65
|
# set border width
|
|
@@ -105,7 +105,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
105
105
|
btnWireBond = Gtk.Button(label="Wire Bond")
|
|
106
106
|
btnWireBond.connect("clicked", self.wire_bond)
|
|
107
107
|
grid.attach(btnWireBond, 1, irow, 1, 1)
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
irow += 1
|
|
110
110
|
btnModIV = Gtk.Button(label="Panel Visual Insp.")
|
|
111
111
|
btnModIV.connect("clicked", self.panel_VI)
|
|
@@ -117,11 +117,11 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
117
117
|
btnPetalMetrology = Gtk.Button(label="Petal Core Metrology")
|
|
118
118
|
btnPetalMetrology.connect("clicked", self.petal_metrology)
|
|
119
119
|
grid.attach(btnPetalMetrology, 0, irow, 1, 1)
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
btnPetalThermal = Gtk.Button(label="Petal Core Thermal")
|
|
122
122
|
btnPetalThermal.connect("clicked", self.petal_thermal)
|
|
123
123
|
grid.attach(btnPetalThermal, 1, irow, 1, 1)
|
|
124
|
-
|
|
124
|
+
|
|
125
125
|
|
|
126
126
|
irow += 1
|
|
127
127
|
grid.attach(Gtk.Label(), 0, irow, 1, 1)
|
|
@@ -153,7 +153,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
153
153
|
return
|
|
154
154
|
|
|
155
155
|
self.mask |= bt
|
|
156
|
-
W = UploadTest.UploadTest(self.session,
|
|
156
|
+
W = UploadTest.UploadTest(self.session, help_link=HELP_LINK)
|
|
157
157
|
W.connect("destroy", self.app_closed, bitn)
|
|
158
158
|
|
|
159
159
|
def upload_multiple_tests(self, *args):
|
|
@@ -164,7 +164,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
164
164
|
return
|
|
165
165
|
|
|
166
166
|
self.mask |= bt
|
|
167
|
-
W = UploadMultipleTests.UploadMultipleTests(self.session,
|
|
167
|
+
W = UploadMultipleTests.UploadMultipleTests(self.session, help_link=HELP_LINK)
|
|
168
168
|
W.connect("destroy", self.app_closed, bitn)
|
|
169
169
|
|
|
170
170
|
def create_shipment(self, *args):
|
|
@@ -175,7 +175,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
175
175
|
return
|
|
176
176
|
|
|
177
177
|
self.mask |= bt
|
|
178
|
-
W = CreateShipments.CreateShipments(self.session,
|
|
178
|
+
W = CreateShipments.CreateShipments(self.session, help_link=HELP_LINK)
|
|
179
179
|
W.connect("destroy", self.app_closed, bitn)
|
|
180
180
|
|
|
181
181
|
def receive_shipment(self, *args):
|
|
@@ -186,7 +186,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
186
186
|
return
|
|
187
187
|
|
|
188
188
|
self.mask |= bt
|
|
189
|
-
W = GetShipments.ReceiveShipments(self.session,
|
|
189
|
+
W = GetShipments.ReceiveShipments(self.session, help_link=HELP_LINK)
|
|
190
190
|
W.connect("destroy", self.app_closed, bitn)
|
|
191
191
|
|
|
192
192
|
def petal_gnd(self, *args):
|
|
@@ -197,7 +197,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
197
197
|
return
|
|
198
198
|
|
|
199
199
|
self.mask |= bt
|
|
200
|
-
W = PetalReceptionTests.PetalReceptionTests(self.session,
|
|
200
|
+
W = PetalReceptionTests.PetalReceptionTests(self.session, help_link=HELP_LINK)
|
|
201
201
|
W.connect("destroy", self.app_closed, bitn)
|
|
202
202
|
|
|
203
203
|
def glue_weight(self, *args):
|
|
@@ -208,7 +208,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
208
208
|
return
|
|
209
209
|
|
|
210
210
|
self.mask |= bt
|
|
211
|
-
W = GlueWeight.GlueWeight(self.session,
|
|
211
|
+
W = GlueWeight.GlueWeight(self.session, help_link=HELP_LINK)
|
|
212
212
|
W.connect("destroy", self.app_closed, bitn)
|
|
213
213
|
|
|
214
214
|
def module_IV(self, *args):
|
|
@@ -219,7 +219,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
219
219
|
return
|
|
220
220
|
|
|
221
221
|
self.mask |= bt
|
|
222
|
-
W = UploadModuleIV.IVwindow(self.session,
|
|
222
|
+
W = UploadModuleIV.IVwindow(self.session, help_link=HELP_LINK)
|
|
223
223
|
W.connect("destroy", self.app_closed, bitn)
|
|
224
224
|
|
|
225
225
|
def wire_bond(self, *args):
|
|
@@ -230,7 +230,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
230
230
|
return
|
|
231
231
|
|
|
232
232
|
self.mask |= bt
|
|
233
|
-
W = WireBondGui.WireBond(session=self.session, title="Wirebond",
|
|
233
|
+
W = WireBondGui.WireBond(session=self.session, title="Wirebond", help_link=HELP_LINK)
|
|
234
234
|
W.connect("destroy", self.app_closed, bitn)
|
|
235
235
|
W.show_all()
|
|
236
236
|
|
|
@@ -242,7 +242,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
242
242
|
return
|
|
243
243
|
|
|
244
244
|
self.mask |= bt
|
|
245
|
-
W = PanelVisualInspection.PanelVisualInspection(session=self.session, title="Panel Visual Inspection",
|
|
245
|
+
W = PanelVisualInspection.PanelVisualInspection(session=self.session, title="Panel Visual Inspection", help_link=HELP_LINK)
|
|
246
246
|
W.connect("destroy", self.app_closed, bitn)
|
|
247
247
|
W.show_all()
|
|
248
248
|
|
|
@@ -291,6 +291,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
291
291
|
|
|
292
292
|
|
|
293
293
|
def main():
|
|
294
|
+
"""main entry."""
|
|
294
295
|
# DB login
|
|
295
296
|
dlg = ITkDBlogin.ITkDBlogin()
|
|
296
297
|
client = dlg.get_client()
|
itkdb_gtk/dbGtkUtils.py
CHANGED
|
@@ -111,14 +111,14 @@ def set_button_color(btn, bg_color, fg_color="white"):
|
|
|
111
111
|
def set_combo_iter(combo, txt, col=0):
|
|
112
112
|
"""Set scombo active iter to that containing txt in column col."""
|
|
113
113
|
model = combo.get_model()
|
|
114
|
-
|
|
115
|
-
while
|
|
116
|
-
val = model.get_value(
|
|
114
|
+
lv_iter = model.get_iter_first()
|
|
115
|
+
while lv_iter:
|
|
116
|
+
val = model.get_value(lv_iter, col)
|
|
117
117
|
if val == txt:
|
|
118
|
-
combo.set_active_iter(
|
|
118
|
+
combo.set_active_iter(lv_iter)
|
|
119
119
|
break
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
lv_iter = model.iter_next(lv_iter)
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
def is_iterable(obj):
|
|
@@ -493,7 +493,7 @@ class MessagePanel(object):
|
|
|
493
493
|
class ITkDBWindow(Gtk.Window):
|
|
494
494
|
"""Base class for GUI main windows."""
|
|
495
495
|
|
|
496
|
-
def __init__(self, title="", session=None, show_search=None,
|
|
496
|
+
def __init__(self, title="", session=None, show_search=None, help_link=None, gtk_runs=True, panel_size=100):
|
|
497
497
|
"""Initialization.
|
|
498
498
|
|
|
499
499
|
Args:
|
|
@@ -509,13 +509,13 @@ class ITkDBWindow(Gtk.Window):
|
|
|
509
509
|
self.inst2code = {}
|
|
510
510
|
self.code2inst = {}
|
|
511
511
|
self.message_panel = None
|
|
512
|
-
self.help =
|
|
512
|
+
self.help = help_link
|
|
513
513
|
|
|
514
514
|
if gtk_runs:
|
|
515
515
|
super().__init__(title=title)
|
|
516
|
-
self.prepare_window(show_search, panel_size)
|
|
516
|
+
self.prepare_window(title, show_search, panel_size)
|
|
517
517
|
|
|
518
|
-
def prepare_window(self, show_search, panel_size):
|
|
518
|
+
def prepare_window(self, title, show_search, panel_size):
|
|
519
519
|
"""Inititalizes GUI."""
|
|
520
520
|
# Prepare HeaderBar
|
|
521
521
|
self.hb = Gtk.HeaderBar()
|
|
@@ -552,6 +552,13 @@ class ITkDBWindow(Gtk.Window):
|
|
|
552
552
|
self.mainBox.set_property("margin-left", 6)
|
|
553
553
|
self.mainBox.set_property("margin-right", 6)
|
|
554
554
|
|
|
555
|
+
if len(title)>0:
|
|
556
|
+
lbl = Gtk.Label()
|
|
557
|
+
lbl.set_markup("<big><b>{}\n</b></big>".format(title))
|
|
558
|
+
lbl.set_xalign(0.5)
|
|
559
|
+
self.mainBox.pack_start(lbl, True, True, 2)
|
|
560
|
+
|
|
561
|
+
|
|
555
562
|
self.add(self.mainBox)
|
|
556
563
|
|
|
557
564
|
# The text view and buffer
|
|
@@ -884,7 +891,8 @@ def create_scrolled_dictdialog(the_dict, hidden=("component", "testType")):
|
|
|
884
891
|
return scrolled, gM
|
|
885
892
|
|
|
886
893
|
|
|
887
|
-
|
|
894
|
+
def main():
|
|
895
|
+
"""Main entry."""
|
|
888
896
|
result = {
|
|
889
897
|
"component": "the_serial_nukber",
|
|
890
898
|
"testType": "METROLOGY_AVS",
|
|
@@ -946,3 +954,6 @@ if __name__ == "__main__":
|
|
|
946
954
|
|
|
947
955
|
win.show_all()
|
|
948
956
|
Gtk.main()
|
|
957
|
+
|
|
958
|
+
if __name__ == "__main__":
|
|
959
|
+
main()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: itkdb_gtk
|
|
3
|
-
Version: 0.10.9.
|
|
3
|
+
Version: 0.10.9.dev4
|
|
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
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
itkdb_gtk/CreateShipments.py,sha256=BC87vSINAgzCFkeisBn54NMUPm-jN0ysOA0JBj6m1Uo,13102
|
|
2
|
+
itkdb_gtk/GetShipments.py,sha256=gMB72YUiYy6l3S_VYqLZcvgs0EUr-vjflqz0iOUOB64,18930
|
|
3
|
+
itkdb_gtk/GlueWeight.py,sha256=tyF5-EAc6QkOLo9ZRp807Xx6zK6yYBGElvfmpUYeuUA,12284
|
|
4
|
+
itkdb_gtk/ITkDB.desktop,sha256=v_K4mHsDxb912J1XGo6mOlbW2TkHvYNGrKmiOnsBQqM,172
|
|
5
|
+
itkdb_gtk/ITkDB.svg,sha256=Ry702zrUkxvG61SqThbUNfXySyiLMqalwYpcM-b_KWo,24242
|
|
6
|
+
itkdb_gtk/ITkDBlogin.py,sha256=b1xALIdGE2BIUMYbwpaUqBZmCXQcO4hNhnMMwIkpIwo,9947
|
|
7
|
+
itkdb_gtk/ITkDButils.py,sha256=TiThtwdpQZnkko296oqjozx7dvLk_9OCBp4C-UKH9vo,18791
|
|
8
|
+
itkdb_gtk/PanelVisualInspection.py,sha256=1qV8v2Rwnz6ib_7tgjuJva2w6DLa1E4waGxO7Ek-dNg,20175
|
|
9
|
+
itkdb_gtk/PetalReceptionTests.py,sha256=c2jskboYuQLYO488lyl3UdJNJIZ4G90GskZwhwqKZTE,9675
|
|
10
|
+
itkdb_gtk/SensorUtils.py,sha256=fYWF9TeutAbore53dLWNlZnVn9P3OsKYcFLNGOs8cnI,15426
|
|
11
|
+
itkdb_gtk/ShowAttachments.py,sha256=KExxPCdbcb04XS8JSUkg5xF1McvlB8e9btwctDCKNXU,8498
|
|
12
|
+
itkdb_gtk/ShowComments.py,sha256=OiMTFLnhGbbKRj5x61D517BYHAt-qY5Y1lvR3EQz3c0,3151
|
|
13
|
+
itkdb_gtk/ShowDefects.py,sha256=aVAHeaE5IztmAPEuHwhi06KWo_pi9xX2J1fTLhKyAPI,3530
|
|
14
|
+
itkdb_gtk/UploadModuleIV.py,sha256=sqh52bSxANBwlmVWZlDqFXpqRGf0rV0QsjJWC-tY_qI,17792
|
|
15
|
+
itkdb_gtk/UploadMultipleTests.py,sha256=U94u9WJLeHPgBKT2lPOCxTaXf1Rv19mb5VzLq6bYPwA,22531
|
|
16
|
+
itkdb_gtk/UploadPetalInformation.py,sha256=S1V4vY3oSKXhHM9K00-oUsWxoeOBnRM2Ci7ijie-ppQ,24672
|
|
17
|
+
itkdb_gtk/UploadTest.py,sha256=9-xdW9h_cHUHSnFzfwfm4HXaqIXnw68mu-E34J6ICgw,16639
|
|
18
|
+
itkdb_gtk/WireBondGui.py,sha256=uXSojhj1DQhPxBFU5paFfCy7APM7SSvOwV8lCUk4i8E,28587
|
|
19
|
+
itkdb_gtk/__init__.py,sha256=Z3esnCgzFcY2hfSm38QnaV-hCsEbEoI65aLxRUYzuPM,1291
|
|
20
|
+
itkdb_gtk/dashBoard.py,sha256=FOmp0hwToN5Lo3cHf1a5RZv6fP9EsIs462PJErtz7Pw,9010
|
|
21
|
+
itkdb_gtk/dbGtkUtils.py,sha256=8pvZrfucUzSNxLYVA8IfcpQkJbP8VjQyYDjoJClpGJw,29178
|
|
22
|
+
itkdb_gtk/readAVSdata.py,sha256=Sc_pXrzYkGDIF5-0pHYLATQQoRb8gbHmi9jz64v267Y,23439
|
|
23
|
+
itkdb_gtk/readGoogleSheet.py,sha256=Lzm_oPWwDqZZzKoBUgsp277F9-wCfr_BA0X4VD2Eolo,2673
|
|
24
|
+
itkdb_gtk/untrash_component.py,sha256=VrN46-f-kF7voOxtoh7OL-bZSWAaIFb7-Xbx6_WT7K8,757
|
|
25
|
+
itkdb_gtk-0.10.9.dev4.dist-info/METADATA,sha256=JR-ruoOUB16y2f6NfevxkKT0dUZBNQWQi7twkNQJLMs,3155
|
|
26
|
+
itkdb_gtk-0.10.9.dev4.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
|
27
|
+
itkdb_gtk-0.10.9.dev4.dist-info/entry_points.txt,sha256=Xf_DDU3QlT2zogRFMOJdO4BdVuAKyAwmb2jHZ5KbBxE,501
|
|
28
|
+
itkdb_gtk-0.10.9.dev4.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
|
|
29
|
+
itkdb_gtk-0.10.9.dev4.dist-info/RECORD,,
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
itkdb_gtk/CreateShipments.py,sha256=c9TZVidWULQeZgVymGELcqrBrjtWGhj2DU59cagZOIc,13006
|
|
2
|
-
itkdb_gtk/GetShipments.py,sha256=Z9jqFAVJ2P7aSq-P-a4TnLd28PbzRCY2aa9YGXWySa4,18889
|
|
3
|
-
itkdb_gtk/GlueWeight.py,sha256=4oZOinyHPqG0Pk6AmEVKd_dFDZWPoLrx7ywCmhodveE,12258
|
|
4
|
-
itkdb_gtk/ITkDB.desktop,sha256=v_K4mHsDxb912J1XGo6mOlbW2TkHvYNGrKmiOnsBQqM,172
|
|
5
|
-
itkdb_gtk/ITkDB.svg,sha256=Ry702zrUkxvG61SqThbUNfXySyiLMqalwYpcM-b_KWo,24242
|
|
6
|
-
itkdb_gtk/ITkDBlogin.py,sha256=b1xALIdGE2BIUMYbwpaUqBZmCXQcO4hNhnMMwIkpIwo,9947
|
|
7
|
-
itkdb_gtk/ITkDButils.py,sha256=mvlo5F01_B0CZX-GZMkUHRzZSNR1A8IWrGtMRRwGFq4,15635
|
|
8
|
-
itkdb_gtk/PanelVisualInspection.py,sha256=KYMrlIoXpHx2z9YMCBLtqheVDJQyyIYykUFpRnWLGeo,13159
|
|
9
|
-
itkdb_gtk/PetalReceptionTests.py,sha256=y15sTg_ZnW8IYPPHCZyiPWIYPoGzevemsA8Kor5i0TE,9622
|
|
10
|
-
itkdb_gtk/SensorUtils.py,sha256=S2Mc-Z1webACisj6waJcMqiqzoGSE7TYScVfxHSD700,15458
|
|
11
|
-
itkdb_gtk/ShowAttachments.py,sha256=1pZo3P_yZwD0IyhbNyeqOE71mXkwuFYAK5bsBy2P-cI,8404
|
|
12
|
-
itkdb_gtk/ShowComments.py,sha256=OiMTFLnhGbbKRj5x61D517BYHAt-qY5Y1lvR3EQz3c0,3151
|
|
13
|
-
itkdb_gtk/ShowDefects.py,sha256=aVAHeaE5IztmAPEuHwhi06KWo_pi9xX2J1fTLhKyAPI,3530
|
|
14
|
-
itkdb_gtk/UploadModuleIV.py,sha256=L5hndmkRf6cho5ZaBVLaczbPm5DzkmLKwI3IpirVv5U,17749
|
|
15
|
-
itkdb_gtk/UploadMultipleTests.py,sha256=3cwEqq2CmWf-kEHxoXMv98tg4BXztqW-BWD9iyytl2k,22144
|
|
16
|
-
itkdb_gtk/UploadPetalInformation.py,sha256=No7gQEUoO5HJP3Ch3t_j99_xCD9BWrb-PWsDUo7sU6M,24746
|
|
17
|
-
itkdb_gtk/UploadTest.py,sha256=NyNX2itqbMvp4g7XZp5QvXKYZ-ILJrwzcLckLmSDuPw,16570
|
|
18
|
-
itkdb_gtk/WireBondGui.py,sha256=e0asNrZUNmDKjqIXR3qcEsinSzX-Z7q71sIV2abcg2g,27179
|
|
19
|
-
itkdb_gtk/__init__.py,sha256=Wqa58ySSVHvPRtJ8R3djwaqHbCDGCxVAlV0obqPtKSw,1291
|
|
20
|
-
itkdb_gtk/dashBoard.py,sha256=2V-AWb4AaqqoX0J9QmamlXXwqdZTSY2lFkXSmY8biIE,8974
|
|
21
|
-
itkdb_gtk/dbGtkUtils.py,sha256=cJhlf8EZaQWOItVLfEHauN_Fb6WPep2vsmnU3pJirSc,28878
|
|
22
|
-
itkdb_gtk/readAVSdata.py,sha256=Sc_pXrzYkGDIF5-0pHYLATQQoRb8gbHmi9jz64v267Y,23439
|
|
23
|
-
itkdb_gtk/readGoogleSheet.py,sha256=Lzm_oPWwDqZZzKoBUgsp277F9-wCfr_BA0X4VD2Eolo,2673
|
|
24
|
-
itkdb_gtk/untrash_component.py,sha256=VrN46-f-kF7voOxtoh7OL-bZSWAaIFb7-Xbx6_WT7K8,757
|
|
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,,
|
|
File without changes
|
|
File without changes
|