itkdb-gtk 0.10.9.dev3__py3-none-any.whl → 0.10.10.dev1__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 +37 -66
- itkdb_gtk/GlueWeight.py +2 -2
- itkdb_gtk/ITkDBlogin.py +6 -2
- itkdb_gtk/ITkDButils.py +133 -19
- itkdb_gtk/PanelVisualInspection.py +250 -70
- itkdb_gtk/PetalReceptionTests.py +14 -7
- 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 +49 -11
- itkdb_gtk/UploadTest.py +8 -8
- itkdb_gtk/WireBondGui.py +232 -36
- itkdb_gtk/__init__.py +2 -2
- itkdb_gtk/dashBoard.py +15 -14
- itkdb_gtk/dbGtkUtils.py +72 -23
- itkdb_gtk/readAVSdata.py +5 -5
- {itkdb_gtk-0.10.9.dev3.dist-info → itkdb_gtk-0.10.10.dev1.dist-info}/METADATA +1 -1
- itkdb_gtk-0.10.10.dev1.dist-info/RECORD +29 -0
- {itkdb_gtk-0.10.9.dev3.dist-info → itkdb_gtk-0.10.10.dev1.dist-info}/WHEEL +1 -1
- itkdb_gtk-0.10.9.dev3.dist-info/RECORD +0 -29
- {itkdb_gtk-0.10.9.dev3.dist-info → itkdb_gtk-0.10.10.dev1.dist-info}/entry_points.txt +0 -0
- {itkdb_gtk-0.10.9.dev3.dist-info → itkdb_gtk-0.10.10.dev1.dist-info}/top_level.txt +0 -0
itkdb_gtk/WireBondGui.py
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
"""Wirebonding GUI for PSB."""
|
|
3
3
|
|
|
4
4
|
import sys
|
|
5
|
+
import re
|
|
5
6
|
import json
|
|
7
|
+
import copy
|
|
8
|
+
from pathlib import Path
|
|
6
9
|
import gi
|
|
7
10
|
|
|
8
11
|
gi.require_version("Gtk", "3.0")
|
|
9
|
-
from gi.repository import Gtk, Gio,
|
|
12
|
+
from gi.repository import Gtk, Gio, Gdk
|
|
10
13
|
|
|
11
14
|
try:
|
|
12
15
|
import itkdb_gtk
|
|
@@ -16,12 +19,29 @@ except ImportError:
|
|
|
16
19
|
cwd = Path(__file__).parent.parent
|
|
17
20
|
sys.path.append(cwd.as_posix())
|
|
18
21
|
import itkdb_gtk
|
|
19
|
-
|
|
22
|
+
|
|
20
23
|
__HELP_LINK__="https://itkdb-gtk.docs.cern.ch/wirebondTest.html"
|
|
21
24
|
|
|
22
25
|
from itkdb_gtk import dbGtkUtils
|
|
23
26
|
from itkdb_gtk import ITkDBlogin, ITkDButils, UploadTest
|
|
24
27
|
|
|
28
|
+
|
|
29
|
+
#valid_channel = re.compile("(^[0-9]+)-([0-9]+)")
|
|
30
|
+
valid_channel = re.compile("^[0-9]+[\\s*\\,\\s,-[0-9]+]*")
|
|
31
|
+
|
|
32
|
+
def range_to_list(V):
|
|
33
|
+
"""Convert a range (ch1-ch2) to a list."""
|
|
34
|
+
if '-' not in V:
|
|
35
|
+
return [V]
|
|
36
|
+
|
|
37
|
+
out = []
|
|
38
|
+
endpoints = list(map(int, V.split('-')))
|
|
39
|
+
endpoints.sort()
|
|
40
|
+
for i in range(endpoints[0], endpoints[1]+1):
|
|
41
|
+
out.append(str(i))
|
|
42
|
+
|
|
43
|
+
return out
|
|
44
|
+
|
|
25
45
|
test_parameters = {
|
|
26
46
|
"Repaired Row 1": "REPAIRED_FRONTEND_ROW1",
|
|
27
47
|
"Failed Row 1": "FAILED_FRONTEND_ROW1",
|
|
@@ -173,7 +193,7 @@ class HybridHoles:
|
|
|
173
193
|
|
|
174
194
|
Returns:
|
|
175
195
|
True if added, False otherwise.
|
|
176
|
-
|
|
196
|
+
|
|
177
197
|
"""
|
|
178
198
|
first_chan = self.param[irow][0]
|
|
179
199
|
last_chan = self.param[irow][1]
|
|
@@ -310,13 +330,13 @@ class SensorHoles:
|
|
|
310
330
|
|
|
311
331
|
def get_sensor_holes(self):
|
|
312
332
|
"""Return holes sensor.
|
|
313
|
-
|
|
333
|
+
|
|
314
334
|
Return a list of [sensor, hybrid, segment, ichan, width]
|
|
315
335
|
"""
|
|
316
336
|
holes = []
|
|
317
337
|
for hyb in self.hybrids:
|
|
318
338
|
H = hyb.get_sensor_holes()
|
|
319
|
-
for _, ih, isegment, ichan, width in H:
|
|
339
|
+
for _, ih, isegment, ichan, width in H:
|
|
320
340
|
holes.append([self.id, ih, isegment, ichan, width])
|
|
321
341
|
|
|
322
342
|
return holes
|
|
@@ -360,7 +380,7 @@ class ModuleHoles:
|
|
|
360
380
|
"""
|
|
361
381
|
holes = []
|
|
362
382
|
for S in self.sensors:
|
|
363
|
-
for _, ihyb, isegment, ichan, width in S.get_sensor_holes():
|
|
383
|
+
for _, ihyb, isegment, ichan, width in S.get_sensor_holes():
|
|
364
384
|
holes.append([S.id, ihyb, isegment, ichan, width])
|
|
365
385
|
|
|
366
386
|
return holes
|
|
@@ -416,16 +436,19 @@ def get_module_param(SN):
|
|
|
416
436
|
class WireBond(dbGtkUtils.ITkDBWindow):
|
|
417
437
|
"""Main window."""
|
|
418
438
|
|
|
419
|
-
def __init__(self, session, title="",
|
|
439
|
+
def __init__(self, session, title="", help_link=__HELP_LINK__):
|
|
420
440
|
"""Initialization."""
|
|
421
|
-
super().__init__(title=title, session=session,
|
|
441
|
+
super().__init__(title=title, session=session, help_link=help_link)
|
|
422
442
|
self.pdb = None
|
|
423
443
|
self.models = {}
|
|
424
444
|
self.holes = {}
|
|
425
|
-
self.institute = "
|
|
445
|
+
self.institute = self.pdb_user["institutions"][0]["code"]
|
|
426
446
|
self.inst_combo = None
|
|
427
447
|
self.module_SN = None
|
|
428
448
|
self.alternativeID = None
|
|
449
|
+
self.combo = None
|
|
450
|
+
self.tree = None
|
|
451
|
+
self.lut = {}
|
|
429
452
|
self.init_window()
|
|
430
453
|
|
|
431
454
|
def init_window(self):
|
|
@@ -460,17 +483,33 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
460
483
|
|
|
461
484
|
# Data panel
|
|
462
485
|
grid = Gtk.Grid(column_spacing=5, row_spacing=1)
|
|
463
|
-
|
|
486
|
+
|
|
464
487
|
# The shipment receiver
|
|
465
|
-
institute = self.create_institute_combo()
|
|
488
|
+
institute = self.create_institute_combo(True)
|
|
466
489
|
institute.connect("changed", self.on_institute)
|
|
467
490
|
institute.set_tooltip_text("Select the Institute.")
|
|
468
491
|
dbGtkUtils.set_combo_iter(institute, self.institute)
|
|
469
|
-
|
|
492
|
+
|
|
493
|
+
lbl = Gtk.Label(label="Institute")
|
|
494
|
+
lbl.set_xalign(0)
|
|
495
|
+
grid.attach(lbl, 0, 0, 1, 1)
|
|
470
496
|
grid.attach(institute, 1, 0, 1, 1)
|
|
471
497
|
self.inst_combo = institute
|
|
472
|
-
|
|
473
|
-
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
# The lookup table
|
|
502
|
+
lbl = Gtk.Label(label="Lookup Table")
|
|
503
|
+
lbl.set_xalign(0)
|
|
504
|
+
grid.attach(lbl, 2, 0, 1, 1)
|
|
505
|
+
|
|
506
|
+
self.testF = Gtk.FileChooserButton()
|
|
507
|
+
self.testF.set_tooltip_text("Click to select Lookup table.")
|
|
508
|
+
|
|
509
|
+
grid.attach(self.testF, 3, 0, 1, 1)
|
|
510
|
+
self.testF.connect("file-set", self.on_lut)
|
|
511
|
+
|
|
512
|
+
|
|
474
513
|
for i, tit in enumerate(["Operator", "Bond Machine", "Wire Batch", "SN", "Date"]):
|
|
475
514
|
lbl = Gtk.Label(label=tit)
|
|
476
515
|
lbl.set_xalign(0)
|
|
@@ -480,11 +519,11 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
480
519
|
self.machine = dbGtkUtils.new_small_text_entry()
|
|
481
520
|
self.batch = dbGtkUtils.new_small_text_entry()
|
|
482
521
|
#self.SN = dbGtkUtils.new_small_text_entry()
|
|
483
|
-
|
|
522
|
+
|
|
484
523
|
self.SN = itkdb_gtk.dbGtkUtils.TextEntry(small=True)
|
|
485
524
|
self.SN.connect("text-changed", self.on_SN_changed)
|
|
486
525
|
|
|
487
|
-
|
|
526
|
+
|
|
488
527
|
self.date = dbGtkUtils.TextEntry(small=True)
|
|
489
528
|
self.date.entry.set_text(ITkDButils.get_db_date())
|
|
490
529
|
self.date.connect("text_changed", self.new_date)
|
|
@@ -511,22 +550,84 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
511
550
|
|
|
512
551
|
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
|
|
513
552
|
self.mainBox.pack_start(box, False, False, 0)
|
|
514
|
-
dbGtkUtils.add_button_to_container(box, "Add
|
|
515
|
-
"Click to add a new
|
|
553
|
+
dbGtkUtils.add_button_to_container(box, "Add Bond",
|
|
554
|
+
"Click to add a new bond or bond range.",
|
|
516
555
|
self.add_item)
|
|
517
556
|
|
|
557
|
+
dbGtkUtils.add_button_to_container(box, "Remove Bond",
|
|
558
|
+
"Click to remove selected bond.",
|
|
559
|
+
self.remove_item)
|
|
560
|
+
|
|
518
561
|
#
|
|
519
562
|
# The text view and buffer
|
|
520
563
|
#
|
|
521
564
|
self.mainBox.pack_start(self.message_panel.frame, True, True, 0)
|
|
522
565
|
self.write_message("wirebond GUI\n")
|
|
523
566
|
|
|
567
|
+
def on_lut(self, fdlg):
|
|
568
|
+
"""Get look-up table."""
|
|
569
|
+
fnam = Path(fdlg.get_filename())
|
|
570
|
+
if not fnam.exists():
|
|
571
|
+
dbGtkUtils.complain("Cannot open Luukup Table.",
|
|
572
|
+
"File {} does not exist.".format(fnam))
|
|
573
|
+
return
|
|
574
|
+
|
|
575
|
+
lut = {}
|
|
576
|
+
with open(fnam, 'r', encoding="UTF-8") as fin:
|
|
577
|
+
for line in fin:
|
|
578
|
+
line = line.strip()
|
|
579
|
+
|
|
580
|
+
if len(line) == 0:
|
|
581
|
+
continue
|
|
582
|
+
|
|
583
|
+
# Remove comments.
|
|
584
|
+
if line[0]=='#':
|
|
585
|
+
continue
|
|
586
|
+
|
|
587
|
+
ipos = line.find('#')
|
|
588
|
+
if ipos >= 0:
|
|
589
|
+
line = line[:ipos].strip()
|
|
590
|
+
|
|
591
|
+
if len(line) == 0:
|
|
592
|
+
continue
|
|
593
|
+
|
|
594
|
+
values = list(map(str.strip, line.split(',')))
|
|
595
|
+
if len(values)!=2:
|
|
596
|
+
dbGtkUtils.complain("Cannot read Lookup table.", "Wrong line format: {}".format(line))
|
|
597
|
+
return
|
|
598
|
+
|
|
599
|
+
v_local = range_to_list(values[0])
|
|
600
|
+
v_std = range_to_list(values[1])
|
|
601
|
+
|
|
602
|
+
if len(v_local) != len(v_std):
|
|
603
|
+
dbGtkUtils.complain("Wrong Lookup table.",
|
|
604
|
+
"Ranges have different length: {}".format(line))
|
|
605
|
+
return
|
|
606
|
+
|
|
607
|
+
for L, S in zip(v_local, v_std):
|
|
608
|
+
lut[L] = S
|
|
609
|
+
|
|
610
|
+
self.lut = lut
|
|
611
|
+
|
|
612
|
+
def convert_channel(self, C):
|
|
613
|
+
"""Convert channel according to LUT
|
|
614
|
+
|
|
615
|
+
Args:
|
|
616
|
+
C (str): channel number
|
|
617
|
+
|
|
618
|
+
"""
|
|
619
|
+
try:
|
|
620
|
+
return self.lut[C]
|
|
621
|
+
|
|
622
|
+
except KeyError:
|
|
623
|
+
return C
|
|
624
|
+
|
|
524
625
|
def on_institute(self, combo):
|
|
525
626
|
"""Institute changed."""
|
|
526
627
|
name = self.get_institute_from_combo(combo)
|
|
527
628
|
if name:
|
|
528
629
|
self.institute = name
|
|
529
|
-
|
|
630
|
+
|
|
530
631
|
def on_SN_changed(self, entry, value):
|
|
531
632
|
"""New SN given. Ask in PDB,"""
|
|
532
633
|
if len(value) <= 0:
|
|
@@ -534,7 +635,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
534
635
|
|
|
535
636
|
|
|
536
637
|
obj = itkdb_gtk.ITkDButils.get_DB_component(self.session, value)
|
|
537
|
-
if obj is not None:
|
|
638
|
+
if obj is not None and obj["serialNumber"] is not None:
|
|
538
639
|
entry.set_text(obj["serialNumber"])
|
|
539
640
|
self.alternativeID = obj["alternativeIdentifier"]
|
|
540
641
|
|
|
@@ -614,8 +715,9 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
614
715
|
def channel_edited(self, widget, path, text):
|
|
615
716
|
"""Handles edition in channel number cell."""
|
|
616
717
|
if not text.isnumeric():
|
|
617
|
-
|
|
618
|
-
|
|
718
|
+
if valid_channel.match(text) is None:
|
|
719
|
+
dbGtkUtils.complain("Wrong channel number", "Invalid channel number: {}".format(text))
|
|
720
|
+
return
|
|
619
721
|
|
|
620
722
|
self.text_edited(0, path, text)
|
|
621
723
|
|
|
@@ -630,9 +732,52 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
630
732
|
if d is not None:
|
|
631
733
|
self.date.set_text(d)
|
|
632
734
|
|
|
633
|
-
def button_pressed(self,
|
|
735
|
+
def button_pressed(self, tree, event):
|
|
634
736
|
"""Button pressed."""
|
|
635
|
-
|
|
737
|
+
# double click shows attachments
|
|
738
|
+
if event.button == 1 and event.type == Gdk.EventType.DOUBLE_BUTTON_PRESS:
|
|
739
|
+
#self.write_message("This is a double click.\n")
|
|
740
|
+
return
|
|
741
|
+
|
|
742
|
+
if event.button != 3:
|
|
743
|
+
return
|
|
744
|
+
|
|
745
|
+
# Create popup menu
|
|
746
|
+
select = self.tree.get_selection()
|
|
747
|
+
model, lv_iter = select.get_selected()
|
|
748
|
+
values = None
|
|
749
|
+
if lv_iter:
|
|
750
|
+
values = model[lv_iter]
|
|
751
|
+
|
|
752
|
+
else:
|
|
753
|
+
P = tree.get_path_at_pos(event.x, event.y)
|
|
754
|
+
if P:
|
|
755
|
+
lv_iter = model.get_iter(P[0])
|
|
756
|
+
values = model[lv_iter]
|
|
757
|
+
|
|
758
|
+
if not values:
|
|
759
|
+
return
|
|
760
|
+
|
|
761
|
+
menu = Gtk.Menu()
|
|
762
|
+
|
|
763
|
+
item_show = Gtk.MenuItem(label="Delete")
|
|
764
|
+
item_show.connect("activate", self.on_delete_item, (model, lv_iter, values))
|
|
765
|
+
menu.append(item_show)
|
|
766
|
+
|
|
767
|
+
menu.show_all()
|
|
768
|
+
menu.popup_at_pointer(event)
|
|
769
|
+
|
|
770
|
+
def on_delete_item(self, item, data):
|
|
771
|
+
"""Delete bond in list view."""
|
|
772
|
+
model, lv_iter, _ = data
|
|
773
|
+
model.remove(lv_iter)
|
|
774
|
+
|
|
775
|
+
def remove_item(self, *args):
|
|
776
|
+
"""REmoves selected bond."""
|
|
777
|
+
select = self.tree.get_selection()
|
|
778
|
+
model, lv_iter = select.get_selected()
|
|
779
|
+
if lv_iter:
|
|
780
|
+
model.remove(lv_iter)
|
|
636
781
|
|
|
637
782
|
def add_item(self, *args):
|
|
638
783
|
"""Adds a new item in the current model."""
|
|
@@ -656,7 +801,8 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
656
801
|
param = get_module_param(self.SN.get_text())
|
|
657
802
|
except ValueError as E:
|
|
658
803
|
dbGtkUtils.complain("Wrong SN number", str(E))
|
|
659
|
-
|
|
804
|
+
return None
|
|
805
|
+
|
|
660
806
|
M = ModuleHoles(param=param)
|
|
661
807
|
|
|
662
808
|
for test in test_parameters.values():
|
|
@@ -701,10 +847,10 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
701
847
|
self.write_message("{}\n".format(str(H)))
|
|
702
848
|
if H[-1] > mxW:
|
|
703
849
|
mxW = H[-1]
|
|
704
|
-
|
|
850
|
+
|
|
705
851
|
if mxW > 0:
|
|
706
852
|
self.write_message("Max width: {}". format(mxW))
|
|
707
|
-
|
|
853
|
+
|
|
708
854
|
out["MAX_UNCON_SENSOR_CHAN"] = mxW
|
|
709
855
|
nstrips = 0
|
|
710
856
|
for v in unconnected:
|
|
@@ -717,6 +863,9 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
717
863
|
def get_unconnected(self, skeleton):
|
|
718
864
|
"""Fill the test DTO with unconnected information."""
|
|
719
865
|
out = self.compute_unconnected()
|
|
866
|
+
if out is None:
|
|
867
|
+
raise ValueError("Wrong SN")
|
|
868
|
+
|
|
720
869
|
for key, val in out.items():
|
|
721
870
|
skeleton["results"][key] = val
|
|
722
871
|
|
|
@@ -755,7 +904,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
755
904
|
dbGtkUtils.set_combo_iter(self.inst_combo, data["institution"])
|
|
756
905
|
except KeyError:
|
|
757
906
|
self.write_message("institution value is not in the loaded file.")
|
|
758
|
-
|
|
907
|
+
|
|
759
908
|
self.operator.set_text(data["properties"]["OPERATOR"])
|
|
760
909
|
self.machine.set_text(data["properties"]["BOND_MACHINE"])
|
|
761
910
|
self.batch.set_text(data["properties"]["BONDWIRE_BATCH"])
|
|
@@ -772,17 +921,58 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
772
921
|
def get_list_of_channels(self, data):
|
|
773
922
|
"""Creates the lists of channels."""
|
|
774
923
|
for key, model in self.models.items():
|
|
775
|
-
|
|
924
|
+
lv_iter = model.get_iter_first()
|
|
776
925
|
out = {}
|
|
777
|
-
while
|
|
778
|
-
chan, comm = model[
|
|
926
|
+
while lv_iter:
|
|
927
|
+
chan, comm = model[lv_iter]
|
|
779
928
|
if len(chan) > 0:
|
|
780
929
|
out[chan] = comm
|
|
781
930
|
|
|
782
|
-
|
|
931
|
+
lv_iter = model.iter_next(lv_iter)
|
|
783
932
|
|
|
784
933
|
data["results"][key] = out
|
|
785
934
|
|
|
935
|
+
def fix_list_of_channels(self, data):
|
|
936
|
+
"""Expand ranges and, eventually, apply LUT.
|
|
937
|
+
|
|
938
|
+
Args:
|
|
939
|
+
data: The test payload.
|
|
940
|
+
"""
|
|
941
|
+
for tit, section in data["results"].items():
|
|
942
|
+
if not isinstance(section, dict):
|
|
943
|
+
continue
|
|
944
|
+
|
|
945
|
+
range_items = []
|
|
946
|
+
added_items = []
|
|
947
|
+
for key, comment in section.items():
|
|
948
|
+
values = list(map(str.strip, key.split(',')))
|
|
949
|
+
if ',' in key or '-' in key:
|
|
950
|
+
range_items.append(key)
|
|
951
|
+
|
|
952
|
+
else:
|
|
953
|
+
continue
|
|
954
|
+
|
|
955
|
+
for V in values:
|
|
956
|
+
if '-' in V:
|
|
957
|
+
for i in range_to_list(V):
|
|
958
|
+
added_items.append((str(i), comment))
|
|
959
|
+
|
|
960
|
+
elif len(V)>0:
|
|
961
|
+
added_items.append((V, comment))
|
|
962
|
+
|
|
963
|
+
for key in range_items:
|
|
964
|
+
section.pop(key)
|
|
965
|
+
|
|
966
|
+
for key, comm in added_items:
|
|
967
|
+
section[key] = comm
|
|
968
|
+
|
|
969
|
+
if len(self.lut)>0 and len(section)>0:
|
|
970
|
+
tmp = copy.deepcopy(section)
|
|
971
|
+
section.clear()
|
|
972
|
+
for key, val in tmp.items():
|
|
973
|
+
section[self.convert_channel(key)] = val
|
|
974
|
+
|
|
975
|
+
|
|
786
976
|
def save_test(self, *args):
|
|
787
977
|
"""Save Test file."""
|
|
788
978
|
dialog = Gtk.FileChooserDialog(
|
|
@@ -814,6 +1004,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
814
1004
|
data = {
|
|
815
1005
|
"institution": self.institute,
|
|
816
1006
|
"date": ITkDButils.get_db_date(),
|
|
1007
|
+
"runNumber": "1",
|
|
817
1008
|
"properties": {},
|
|
818
1009
|
"results": {},
|
|
819
1010
|
"comments": [],
|
|
@@ -852,7 +1043,7 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
852
1043
|
data["institution"] = self.institute
|
|
853
1044
|
if data["runNumber"] == "-1":
|
|
854
1045
|
data["runNumber"] = "1"
|
|
855
|
-
|
|
1046
|
+
|
|
856
1047
|
data["date"] = self.date.get_text()
|
|
857
1048
|
|
|
858
1049
|
|
|
@@ -878,7 +1069,12 @@ class WireBond(dbGtkUtils.ITkDBWindow):
|
|
|
878
1069
|
|
|
879
1070
|
self.get_test_header(skeleton)
|
|
880
1071
|
self.get_list_of_channels(skeleton)
|
|
881
|
-
self.
|
|
1072
|
+
self.fix_list_of_channels(skeleton)
|
|
1073
|
+
try:
|
|
1074
|
+
self.get_unconnected(skeleton)
|
|
1075
|
+
|
|
1076
|
+
except ValueError:
|
|
1077
|
+
return
|
|
882
1078
|
|
|
883
1079
|
uploadW = UploadTest.UploadTest(self.session, payload=skeleton)
|
|
884
1080
|
# uploadW.run()
|
|
@@ -895,7 +1091,7 @@ def main():
|
|
|
895
1091
|
|
|
896
1092
|
client.user_gui = dlg
|
|
897
1093
|
|
|
898
|
-
|
|
1094
|
+
|
|
899
1095
|
win = WireBond(client, title="WireBond")
|
|
900
1096
|
win.connect("destroy", Gtk.main_quit)
|
|
901
1097
|
win.show_all()
|
|
@@ -906,6 +1102,6 @@ def main():
|
|
|
906
1102
|
print("Arrrgggg!!!")
|
|
907
1103
|
|
|
908
1104
|
dlg.die()
|
|
909
|
-
|
|
1105
|
+
|
|
910
1106
|
if __name__ == "__main__":
|
|
911
1107
|
main()
|
itkdb_gtk/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
""" itkdb-gtk python module
|
|
2
2
|
"""
|
|
3
|
-
__version__ = "0.10.
|
|
3
|
+
__version__ = "0.10.10.dev1"
|
|
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()
|