itkdb-gtk 0.0.18__py3-none-any.whl → 0.9.1.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/{SendShipments.py → CreateShipments.py} +2 -3
- itkdb_gtk/GetShipments.py +2 -3
- itkdb_gtk/GlueWeight.py +7 -16
- itkdb_gtk/ITkDB.svg +11 -3
- itkdb_gtk/ITkDBlogin.py +0 -1
- itkdb_gtk/ITkDButils.py +5 -17
- itkdb_gtk/{GroundVITests.py → PetalReceptionTests.py} +5 -5
- itkdb_gtk/SensorUtils.py +490 -0
- itkdb_gtk/UploadModuleIV.py +207 -498
- itkdb_gtk/UploadMultipleTests.py +4 -8
- itkdb_gtk/UploadPetalInformation.py +8 -9
- itkdb_gtk/UploadTest.py +6 -7
- itkdb_gtk/WireBondGui.py +2 -1
- itkdb_gtk/__init__.py +12 -5
- itkdb_gtk/dashBoard.py +15 -14
- itkdb_gtk/dbGtkUtils.py +27 -20
- itkdb_gtk/readAVSdata.py +0 -7
- itkdb_gtk/readGoogleSheet.py +0 -1
- itkdb_gtk/untrash_component.py +1 -1
- {itkdb_gtk-0.0.18.dist-info → itkdb_gtk-0.9.1.dev1.dist-info}/METADATA +2 -2
- itkdb_gtk-0.9.1.dev1.dist-info/RECORD +28 -0
- {itkdb_gtk-0.0.18.dist-info → itkdb_gtk-0.9.1.dev1.dist-info}/entry_points.txt +3 -2
- itkdb_gtk-0.0.18.dist-info/RECORD +0 -27
- {itkdb_gtk-0.0.18.dist-info → itkdb_gtk-0.9.1.dev1.dist-info}/WHEEL +0 -0
- {itkdb_gtk-0.0.18.dist-info → itkdb_gtk-0.9.1.dev1.dist-info}/top_level.txt +0 -0
itkdb_gtk/UploadMultipleTests.py
CHANGED
|
@@ -39,14 +39,12 @@ def all_files(root, patterns='*', single_level=False, yield_folders=False):
|
|
|
39
39
|
"""A generator that reruns all files in the given folder.
|
|
40
40
|
|
|
41
41
|
Args:
|
|
42
|
-
----
|
|
43
42
|
root (file path): The folder
|
|
44
43
|
patterns (str, optional): The pattern of the files. Defaults to '*'.
|
|
45
44
|
single_level (bool, optional): If true, do not go into sub folders. Defaults to False.
|
|
46
45
|
yield_folders (bool, optional): If True, return folders as well. Defaults to False.
|
|
47
46
|
|
|
48
|
-
Yields
|
|
49
|
-
------
|
|
47
|
+
Yields:
|
|
50
48
|
str: file path name
|
|
51
49
|
|
|
52
50
|
"""
|
|
@@ -74,10 +72,9 @@ def check_data(data):
|
|
|
74
72
|
"""Checks validity of JSon data.
|
|
75
73
|
|
|
76
74
|
Args:
|
|
77
|
-
----
|
|
78
75
|
data (): The json data
|
|
79
76
|
|
|
80
|
-
Returns
|
|
77
|
+
Returns:
|
|
81
78
|
-------
|
|
82
79
|
boolean: True if valid, False otherwise.
|
|
83
80
|
|
|
@@ -106,15 +103,14 @@ def check_data(data):
|
|
|
106
103
|
class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
|
|
107
104
|
"""Collects information to upload a test and its attachments."""
|
|
108
105
|
|
|
109
|
-
def __init__(self, session):
|
|
106
|
+
def __init__(self, session, help=help):
|
|
110
107
|
"""Initialization.
|
|
111
108
|
|
|
112
109
|
Args:
|
|
113
|
-
----
|
|
114
110
|
session: ITkDB session
|
|
115
111
|
|
|
116
112
|
"""
|
|
117
|
-
super().__init__(session=session, title="Upload Tests", gtk_runs=gtk_runs)
|
|
113
|
+
super().__init__(session=session, title="Upload Tests", gtk_runs=gtk_runs, help=help)
|
|
118
114
|
self.tests = []
|
|
119
115
|
|
|
120
116
|
self.init_window()
|
|
@@ -14,7 +14,7 @@ from gi.repository import Gtk, Gio
|
|
|
14
14
|
|
|
15
15
|
try:
|
|
16
16
|
import itkdb_gtk
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
except ImportError:
|
|
19
19
|
from pathlib import Path
|
|
20
20
|
cwd = Path(sys.argv[0]).parent.parent
|
|
@@ -44,11 +44,9 @@ def get_type(child):
|
|
|
44
44
|
"""Return object type
|
|
45
45
|
|
|
46
46
|
Args:
|
|
47
|
-
-----
|
|
48
47
|
child (): object
|
|
49
48
|
|
|
50
|
-
Returns
|
|
51
|
-
-------
|
|
49
|
+
Returns:
|
|
52
50
|
str: object type
|
|
53
51
|
|
|
54
52
|
"""
|
|
@@ -229,13 +227,11 @@ class AVSPanel(Gtk.Window):
|
|
|
229
227
|
"""Create the dialog for a DB test and add it to the notebook.
|
|
230
228
|
|
|
231
229
|
Args:
|
|
232
|
-
----
|
|
233
230
|
test_json: The JSon-like dict with the values
|
|
234
231
|
test_name: The name of the test for internal indexing
|
|
235
232
|
label: The label for the Notebook
|
|
236
233
|
|
|
237
|
-
|
|
238
|
-
------
|
|
234
|
+
Returns:
|
|
239
235
|
The box containing the data.
|
|
240
236
|
|
|
241
237
|
"""
|
|
@@ -264,7 +260,6 @@ class AVSPanel(Gtk.Window):
|
|
|
264
260
|
"""Register petal core in DB.
|
|
265
261
|
|
|
266
262
|
Args:
|
|
267
|
-
----
|
|
268
263
|
SN: The petal Serial Number.
|
|
269
264
|
|
|
270
265
|
"""
|
|
@@ -610,7 +605,8 @@ class AVSPanel(Gtk.Window):
|
|
|
610
605
|
complain("Could not upload test {}".format(values["testType"]), res)
|
|
611
606
|
|
|
612
607
|
|
|
613
|
-
|
|
608
|
+
def main():
|
|
609
|
+
"""The main entry."""
|
|
614
610
|
# Parse command line options
|
|
615
611
|
parser = ArgumentParser()
|
|
616
612
|
parser.add_argument('files', nargs='*', help="Input files")
|
|
@@ -640,3 +636,6 @@ if __name__ == "__main__":
|
|
|
640
636
|
print("Bye !!")
|
|
641
637
|
dlg.die()
|
|
642
638
|
sys.exit()
|
|
639
|
+
|
|
640
|
+
if __name__ == "__main__":
|
|
641
|
+
main()
|
itkdb_gtk/UploadTest.py
CHANGED
|
@@ -48,11 +48,9 @@ def check_data(data):
|
|
|
48
48
|
"""Checks validity of JSon data.
|
|
49
49
|
|
|
50
50
|
Args:
|
|
51
|
-
----
|
|
52
51
|
data (): The json data
|
|
53
52
|
|
|
54
|
-
Returns
|
|
55
|
-
-------
|
|
53
|
+
Returns:
|
|
56
54
|
boolean: True if valid, False otherwise.
|
|
57
55
|
|
|
58
56
|
"""
|
|
@@ -80,11 +78,10 @@ def check_data(data):
|
|
|
80
78
|
class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
81
79
|
"""Collects information to upload a test and its attachments."""
|
|
82
80
|
|
|
83
|
-
def __init__(self, session, payload=None, attachment=None):
|
|
81
|
+
def __init__(self, session, payload=None, attachment=None, help=None):
|
|
84
82
|
"""Initialization.
|
|
85
83
|
|
|
86
84
|
Args:
|
|
87
|
-
----
|
|
88
85
|
session: ITkDB session
|
|
89
86
|
payload: path of test file
|
|
90
87
|
attachment: an Attachment object or list of attachments.
|
|
@@ -110,7 +107,7 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
110
107
|
|
|
111
108
|
global gtk_runs
|
|
112
109
|
if gtk_runs:
|
|
113
|
-
super().__init__(session=session, title="Upload Test", gtk_runs=gtk_runs)
|
|
110
|
+
super().__init__(session=session, title="Upload Test", gtk_runs=gtk_runs, help=help)
|
|
114
111
|
self.init_window()
|
|
115
112
|
|
|
116
113
|
def init_window(self):
|
|
@@ -356,7 +353,9 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
356
353
|
|
|
357
354
|
def find_attachments(self):
|
|
358
355
|
"""Find Attachments in payload."""
|
|
359
|
-
|
|
356
|
+
# We used to clean the attachmetns, but this would remove the ones given
|
|
357
|
+
# in the contructor.
|
|
358
|
+
# self.attachments = []
|
|
360
359
|
if "attachments" in self.data:
|
|
361
360
|
for A in self.data["attachments"]:
|
|
362
361
|
if not Path(A["path"]).exists():
|
itkdb_gtk/WireBondGui.py
CHANGED
itkdb_gtk/__init__.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
""" itkdb-gtk python module
|
|
2
|
+
"""
|
|
3
|
+
__version__ = "0.9.1.dev1"
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
def dash_board():
|
|
@@ -19,15 +21,15 @@ def glueWeight():
|
|
|
19
21
|
main()
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
def
|
|
24
|
+
def petalReceptionTests():
|
|
23
25
|
"""GND/VI tests."""
|
|
24
|
-
from .
|
|
26
|
+
from .PetalReceptionTests import main
|
|
25
27
|
main()
|
|
26
28
|
|
|
27
29
|
|
|
28
|
-
def
|
|
30
|
+
def createShipments():
|
|
29
31
|
"""Send items."""
|
|
30
|
-
from .
|
|
32
|
+
from .CreateShipments import main
|
|
31
33
|
main()
|
|
32
34
|
|
|
33
35
|
def uploadTest():
|
|
@@ -50,3 +52,8 @@ def wirebondTest():
|
|
|
50
52
|
"""Inputs data and eventually upload wirebod test."""
|
|
51
53
|
from .WireBondGui import main
|
|
52
54
|
main()
|
|
55
|
+
|
|
56
|
+
def uploadPetalInformation():
|
|
57
|
+
"""Read files from AVS nd create Petal core in PDB."""
|
|
58
|
+
from .UploadPetalInformation import main
|
|
59
|
+
main()
|
itkdb_gtk/dashBoard.py
CHANGED
|
@@ -13,9 +13,9 @@ except ImportError:
|
|
|
13
13
|
|
|
14
14
|
from itkdb_gtk import dbGtkUtils
|
|
15
15
|
from itkdb_gtk import GetShipments
|
|
16
|
-
from itkdb_gtk import
|
|
16
|
+
from itkdb_gtk import PetalReceptionTests
|
|
17
17
|
from itkdb_gtk import ITkDBlogin
|
|
18
|
-
from itkdb_gtk import
|
|
18
|
+
from itkdb_gtk import CreateShipments
|
|
19
19
|
from itkdb_gtk import UploadTest
|
|
20
20
|
from itkdb_gtk import UploadMultipleTests
|
|
21
21
|
from itkdb_gtk import GlueWeight
|
|
@@ -27,6 +27,7 @@ import gi
|
|
|
27
27
|
gi.require_version("Gtk", "3.0")
|
|
28
28
|
from gi.repository import Gtk
|
|
29
29
|
|
|
30
|
+
HELP_LINK="https://itkdb-gtk.docs.cern.ch"
|
|
30
31
|
|
|
31
32
|
class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
32
33
|
"""Dashboard class."""
|
|
@@ -41,7 +42,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
41
42
|
|
|
42
43
|
def __init__(self, session):
|
|
43
44
|
"""Initialization."""
|
|
44
|
-
super().__init__(title="ITkDB Dashboard", session=session)
|
|
45
|
+
super().__init__(title="ITkDB Dashboard", session=session, help=HELP_LINK)
|
|
45
46
|
self.mask = 0
|
|
46
47
|
|
|
47
48
|
# set border width
|
|
@@ -71,7 +72,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
71
72
|
grid.attach(btnTest, 1, irow, 1, 1)
|
|
72
73
|
|
|
73
74
|
irow += 1
|
|
74
|
-
btnGnd = Gtk.Button(label="Petal
|
|
75
|
+
btnGnd = Gtk.Button(label="Petal Reception")
|
|
75
76
|
btnGnd.connect("clicked", self.petal_gnd)
|
|
76
77
|
grid.attach(btnGnd, 0, irow, 1, 1)
|
|
77
78
|
|
|
@@ -80,7 +81,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
80
81
|
grid.attach(btnWeight, 1, irow, 1, 1)
|
|
81
82
|
|
|
82
83
|
irow += 1
|
|
83
|
-
btnModIV = Gtk.Button(label="Module IV")
|
|
84
|
+
btnModIV = Gtk.Button(label="Sensor/Module IV")
|
|
84
85
|
btnModIV.connect("clicked", self.module_IV)
|
|
85
86
|
grid.attach(btnModIV, 0, irow, 1, 1)
|
|
86
87
|
|
|
@@ -120,7 +121,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
120
121
|
return
|
|
121
122
|
|
|
122
123
|
self.mask |= bt
|
|
123
|
-
W = UploadTest.UploadTest(self.session)
|
|
124
|
+
W = UploadTest.UploadTest(self.session, help=HELP_LINK)
|
|
124
125
|
W.connect("destroy", self.app_closed, bitn)
|
|
125
126
|
|
|
126
127
|
def upload_multiple_tests(self, *args):
|
|
@@ -131,18 +132,18 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
131
132
|
return
|
|
132
133
|
|
|
133
134
|
self.mask |= bt
|
|
134
|
-
W = UploadMultipleTests.UploadMultipleTests(self.session)
|
|
135
|
+
W = UploadMultipleTests.UploadMultipleTests(self.session, help=HELP_LINK)
|
|
135
136
|
W.connect("destroy", self.app_closed, bitn)
|
|
136
137
|
|
|
137
138
|
def create_shipment(self, *args):
|
|
138
|
-
"""Launch
|
|
139
|
+
"""Launch createShipment."""
|
|
139
140
|
bitn = DashWindow.CREATE_SHIPMNT
|
|
140
141
|
bt = 1 << bitn
|
|
141
142
|
if self.mask & bt:
|
|
142
143
|
return
|
|
143
144
|
|
|
144
145
|
self.mask |= bt
|
|
145
|
-
W =
|
|
146
|
+
W = CreateShipments.CreateShipments(self.session, help=HELP_LINK)
|
|
146
147
|
W.connect("destroy", self.app_closed, bitn)
|
|
147
148
|
|
|
148
149
|
def receive_shipment(self, *args):
|
|
@@ -153,7 +154,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
153
154
|
return
|
|
154
155
|
|
|
155
156
|
self.mask |= bt
|
|
156
|
-
W = GetShipments.ReceiveShipments(self.session)
|
|
157
|
+
W = GetShipments.ReceiveShipments(self.session, help=HELP_LINK)
|
|
157
158
|
W.connect("destroy", self.app_closed, bitn)
|
|
158
159
|
|
|
159
160
|
def petal_gnd(self, *args):
|
|
@@ -164,7 +165,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
164
165
|
return
|
|
165
166
|
|
|
166
167
|
self.mask |= bt
|
|
167
|
-
W =
|
|
168
|
+
W = PetalReceptionTests.PetalReceptionTests(self.session, help=HELP_LINK)
|
|
168
169
|
W.connect("destroy", self.app_closed, bitn)
|
|
169
170
|
|
|
170
171
|
def glue_weight(self, *args):
|
|
@@ -175,7 +176,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
175
176
|
return
|
|
176
177
|
|
|
177
178
|
self.mask |= bt
|
|
178
|
-
W = GlueWeight.GlueWeight(self.session)
|
|
179
|
+
W = GlueWeight.GlueWeight(self.session, help=HELP_LINK)
|
|
179
180
|
W.connect("destroy", self.app_closed, bitn)
|
|
180
181
|
|
|
181
182
|
def module_IV(self, *args):
|
|
@@ -186,7 +187,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
186
187
|
return
|
|
187
188
|
|
|
188
189
|
self.mask |= bt
|
|
189
|
-
W = UploadModuleIV.IVwindow(self.session)
|
|
190
|
+
W = UploadModuleIV.IVwindow(self.session, help=HELP_LINK)
|
|
190
191
|
W.connect("destroy", self.app_closed, bitn)
|
|
191
192
|
|
|
192
193
|
def wire_bond(self, *args):
|
|
@@ -197,7 +198,7 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
197
198
|
return
|
|
198
199
|
|
|
199
200
|
self.mask |= bt
|
|
200
|
-
W = WireBondGui.WireBond(session=self.session, title="Wirebond")
|
|
201
|
+
W = WireBondGui.WireBond(session=self.session, title="Wirebond", help=HELP_LINK)
|
|
201
202
|
W.connect("destroy", self.app_closed, bitn)
|
|
202
203
|
|
|
203
204
|
def app_closed(self, *args):
|
itkdb_gtk/dbGtkUtils.py
CHANGED
|
@@ -4,12 +4,13 @@ import time
|
|
|
4
4
|
from collections.abc import Iterable
|
|
5
5
|
from copy import deepcopy
|
|
6
6
|
from datetime import datetime
|
|
7
|
+
import webbrowser
|
|
7
8
|
|
|
8
9
|
import dateutil.parser
|
|
9
|
-
import gi
|
|
10
10
|
import numpy as np
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
import gi
|
|
13
14
|
gi.require_version("Gtk", "3.0")
|
|
14
15
|
from gi.repository import Gtk, GObject, Gio, GLib
|
|
15
16
|
|
|
@@ -20,6 +21,7 @@ def parse_date(txt):
|
|
|
20
21
|
|
|
21
22
|
except Exception:
|
|
22
23
|
return None
|
|
24
|
+
|
|
23
25
|
def parse_date_as_string(txt):
|
|
24
26
|
"""Parse data and return DB compatible string."""
|
|
25
27
|
D = parse_date(txt)
|
|
@@ -108,7 +110,6 @@ def empty_container(container):
|
|
|
108
110
|
"""Remove all children from a container.
|
|
109
111
|
|
|
110
112
|
Args:
|
|
111
|
-
----
|
|
112
113
|
container: The container.
|
|
113
114
|
|
|
114
115
|
"""
|
|
@@ -121,7 +122,6 @@ def replace_in_container(container, child):
|
|
|
121
122
|
"""Replace a child from a single-child container.
|
|
122
123
|
|
|
123
124
|
Args:
|
|
124
|
-
----
|
|
125
125
|
container: the container
|
|
126
126
|
child: the new child to be added
|
|
127
127
|
|
|
@@ -138,7 +138,6 @@ def complain(main_title, second_text="", parent=None):
|
|
|
138
138
|
"""Open an error dialog.
|
|
139
139
|
|
|
140
140
|
Args:
|
|
141
|
-
----
|
|
142
141
|
main_title: Main text in window
|
|
143
142
|
second_text: Second text
|
|
144
143
|
parent: dialog parent
|
|
@@ -160,13 +159,11 @@ def ask_for_confirmation(main_title, second_text, parent=None):
|
|
|
160
159
|
"""Ask for action cofirmation.
|
|
161
160
|
|
|
162
161
|
Args:
|
|
163
|
-
----
|
|
164
162
|
main_title: Main title in the message window
|
|
165
163
|
second_text: Secondary text in the message widow
|
|
166
164
|
parent (optional): The parent window. Defaults to None.
|
|
167
165
|
|
|
168
166
|
Return:
|
|
169
|
-
------
|
|
170
167
|
OK: True if OK button clicked.
|
|
171
168
|
|
|
172
169
|
"""
|
|
@@ -254,14 +251,12 @@ def get_a_value(main_title, second_text=None, is_tv=False, parent=None):
|
|
|
254
251
|
"""Open a dialog to get a value.
|
|
255
252
|
|
|
256
253
|
Args:
|
|
257
|
-
----
|
|
258
254
|
main_title: Main title in the message window
|
|
259
255
|
is_tv: If true show a text view rathar than an entry.
|
|
260
256
|
second_text: Secondary text in the message widow
|
|
261
257
|
parent (optional): The parent window. Defaults to None.
|
|
262
258
|
|
|
263
259
|
Return:
|
|
264
|
-
------
|
|
265
260
|
value: The value in the entry
|
|
266
261
|
|
|
267
262
|
"""
|
|
@@ -299,15 +294,13 @@ def get_a_list_of_values(main_title, labels, defaults=None, second_text=None, pa
|
|
|
299
294
|
"""Get a list of values.
|
|
300
295
|
|
|
301
296
|
Args:
|
|
302
|
-
----
|
|
303
297
|
main_title: Main title for window
|
|
304
298
|
labels: List of labes to get the values. If the label ends with /v
|
|
305
299
|
then a TextView will be shown instead of a TextEntry.
|
|
306
300
|
defaults (optional): default values-
|
|
307
301
|
second_text (optional): Second title for window-. Defaults to None.
|
|
308
302
|
|
|
309
|
-
Returns
|
|
310
|
-
-------
|
|
303
|
+
Returns:
|
|
311
304
|
list with values
|
|
312
305
|
|
|
313
306
|
"""
|
|
@@ -369,7 +362,6 @@ def add_button_to_container(box, label, tooltip=None, callback=None):
|
|
|
369
362
|
"""Creates a buttons and adds to container.
|
|
370
363
|
|
|
371
364
|
Args:
|
|
372
|
-
----
|
|
373
365
|
box: The container.
|
|
374
366
|
label: The button label
|
|
375
367
|
tooltip (optional): Tooltip message. Defaults to None.
|
|
@@ -407,7 +399,7 @@ class MessagePanel(object):
|
|
|
407
399
|
Args:
|
|
408
400
|
size: size of the panel
|
|
409
401
|
|
|
410
|
-
Returns
|
|
402
|
+
Returns:
|
|
411
403
|
Gtk.TextBuffer, Gtk.Frame
|
|
412
404
|
"""
|
|
413
405
|
frame = Gtk.Frame()
|
|
@@ -449,11 +441,10 @@ class MessagePanel(object):
|
|
|
449
441
|
class ITkDBWindow(Gtk.Window):
|
|
450
442
|
"""Base class for GUI main windows."""
|
|
451
443
|
|
|
452
|
-
def __init__(self, title="", session=None, show_search=None, gtk_runs=True, panel_size=100):
|
|
444
|
+
def __init__(self, title="", session=None, show_search=None, help=None, gtk_runs=True, panel_size=100):
|
|
453
445
|
"""Initialization.
|
|
454
446
|
|
|
455
447
|
Args:
|
|
456
|
-
----
|
|
457
448
|
title: The title of the window.
|
|
458
449
|
session: ITkDB session.
|
|
459
450
|
show_search: tooltip for search button in header (calls to query_db).
|
|
@@ -466,6 +457,7 @@ class ITkDBWindow(Gtk.Window):
|
|
|
466
457
|
self.inst2code = {}
|
|
467
458
|
self.code2inst = {}
|
|
468
459
|
self.message_panel = None
|
|
460
|
+
self.help = help
|
|
469
461
|
|
|
470
462
|
if gtk_runs:
|
|
471
463
|
super().__init__(title=title)
|
|
@@ -493,6 +485,15 @@ class ITkDBWindow(Gtk.Window):
|
|
|
493
485
|
button.set_tooltip_text(show_search)
|
|
494
486
|
button.connect("clicked", self.query_db)
|
|
495
487
|
self.hb.pack_end(button)
|
|
488
|
+
|
|
489
|
+
if self.help:
|
|
490
|
+
button = Gtk.Button()
|
|
491
|
+
icon = Gio.ThemedIcon(name="help-browser-symbolic")
|
|
492
|
+
image = Gtk.Image.new_from_gicon(icon, Gtk.IconSize.BUTTON)
|
|
493
|
+
button.add(image)
|
|
494
|
+
button.connect("clicked", self.show_help)
|
|
495
|
+
self.hb.pack_end(button)
|
|
496
|
+
|
|
496
497
|
|
|
497
498
|
# Create main content box
|
|
498
499
|
self.mainBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
|
@@ -518,6 +519,10 @@ class ITkDBWindow(Gtk.Window):
|
|
|
518
519
|
self.hide()
|
|
519
520
|
self.destroy()
|
|
520
521
|
|
|
522
|
+
def show_help(self, *args):
|
|
523
|
+
"""Show help"""
|
|
524
|
+
webbrowser.open(self.help)
|
|
525
|
+
|
|
521
526
|
def query_db(self, *args):
|
|
522
527
|
"""Search button clicked."""
|
|
523
528
|
pass
|
|
@@ -527,7 +532,9 @@ class ITkDBWindow(Gtk.Window):
|
|
|
527
532
|
if msg == "<OK>":
|
|
528
533
|
if hasattr(self.session, "user_gui"):
|
|
529
534
|
self.session = self.session.user_gui.get_client()
|
|
530
|
-
|
|
535
|
+
|
|
536
|
+
if self.userLabel.get_child():
|
|
537
|
+
self.userLabel.get_child().set_text(self.session.user.name)
|
|
531
538
|
|
|
532
539
|
else:
|
|
533
540
|
self.write_message("Could not login.\n{}".format(msg))
|
|
@@ -610,7 +617,6 @@ class DictDialog(Gtk.Grid):
|
|
|
610
617
|
"""Create the Gtk.Grid.
|
|
611
618
|
|
|
612
619
|
Args:
|
|
613
|
-
----
|
|
614
620
|
values: A dict (JSon-like)
|
|
615
621
|
hidden_keys: keys tha twill not be shown.
|
|
616
622
|
|
|
@@ -730,7 +736,6 @@ class DictDialog(Gtk.Grid):
|
|
|
730
736
|
"""Show the keys and values of a dictionary (JSON).
|
|
731
737
|
|
|
732
738
|
Args:
|
|
733
|
-
----
|
|
734
739
|
values: The dictionary object
|
|
735
740
|
|
|
736
741
|
"""
|
|
@@ -764,8 +769,10 @@ class DictDialog(Gtk.Grid):
|
|
|
764
769
|
def create_scrolled_dictdialog(the_dict, hidden=("component", "testType")):
|
|
765
770
|
"""Create a DictDialog within a scrolled window.
|
|
766
771
|
|
|
767
|
-
|
|
768
|
-
|
|
772
|
+
Args:
|
|
773
|
+
the_dict: the input dictionary with values.
|
|
774
|
+
|
|
775
|
+
Returns:
|
|
769
776
|
scrolled: the scrolled window
|
|
770
777
|
gM: the DictDialog
|
|
771
778
|
|
itkdb_gtk/readAVSdata.py
CHANGED
|
@@ -37,7 +37,6 @@ def create_weight(session, SN, the_date=None, manager="", passed=True, problems=
|
|
|
37
37
|
"""Creates the dictionary for a WEIGHT test.
|
|
38
38
|
|
|
39
39
|
Args:
|
|
40
|
-
----
|
|
41
40
|
session: the DB session
|
|
42
41
|
SN: Serial Number
|
|
43
42
|
the_date: the date of the test
|
|
@@ -62,7 +61,6 @@ def create_manufacturing(session, SN, the_date=None, manager="", passed=True, pr
|
|
|
62
61
|
"""Create the dictionary or the MANUFACTURING test.
|
|
63
62
|
|
|
64
63
|
Args:
|
|
65
|
-
----
|
|
66
64
|
session: the DB session
|
|
67
65
|
SN: Serial Number
|
|
68
66
|
the_date: the date of the test
|
|
@@ -102,7 +100,6 @@ def create_delamination_test(session, SN, the_date=None, operator="", passed=Tru
|
|
|
102
100
|
"""Create the delamination test JSON.
|
|
103
101
|
|
|
104
102
|
Args:
|
|
105
|
-
----
|
|
106
103
|
session: the DB session
|
|
107
104
|
SN: Serial Number
|
|
108
105
|
the_date: the date of the test
|
|
@@ -128,7 +125,6 @@ def create_grounding_test(session, SN, the_date=None, operator="", passed=True,
|
|
|
128
125
|
"""Create grounding test.
|
|
129
126
|
|
|
130
127
|
Args:
|
|
131
|
-
----
|
|
132
128
|
session: the DB session
|
|
133
129
|
SN: Serial Number
|
|
134
130
|
the_date: the date of the test
|
|
@@ -154,7 +150,6 @@ def create_metrology_test(session, SN, the_date=None, operator="", passed=True,
|
|
|
154
150
|
"""Metrology test.
|
|
155
151
|
|
|
156
152
|
Args:
|
|
157
|
-
----
|
|
158
153
|
session: the DB session
|
|
159
154
|
SN: Serial Number
|
|
160
155
|
the_date: the date of the test
|
|
@@ -316,7 +311,6 @@ def readFATfile(session, fnam, SN=None):
|
|
|
316
311
|
"""Read data from FAT excel file.
|
|
317
312
|
|
|
318
313
|
Args:
|
|
319
|
-
----
|
|
320
314
|
session: the DB session
|
|
321
315
|
fnam: File path
|
|
322
316
|
SN: COre serial number
|
|
@@ -463,7 +457,6 @@ def readProductionSheet(session, fnam, SN):
|
|
|
463
457
|
"""Read data fro AVS PS.
|
|
464
458
|
|
|
465
459
|
Args:
|
|
466
|
-
----
|
|
467
460
|
session: the DB session
|
|
468
461
|
fnam: path of input file
|
|
469
462
|
SN: The serial number
|
itkdb_gtk/readGoogleSheet.py
CHANGED
itkdb_gtk/untrash_component.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: itkdb_gtk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.1.dev1
|
|
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
|
|
@@ -57,7 +57,7 @@ Find all shipments to be received at a given site and list them. It handles a
|
|
|
57
57
|
barcode reader that helps identifying the items actually received for the
|
|
58
58
|
reception. It will finally make the DB aware of the items receptioned.
|
|
59
59
|
|
|
60
|
-
##
|
|
60
|
+
## CreateShipments.py
|
|
61
61
|
Create a new shipment. Allows to add items with the QR reader as well as from a
|
|
62
62
|
GUI dialog. One can add comments and attachments to the shipment.
|
|
63
63
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
itkdb_gtk/CreateShipments.py,sha256=-XG3ayobzVW2pg0hV7cMHTyCjakQOoDTxbCC1YIU43c,13159
|
|
2
|
+
itkdb_gtk/GetShipments.py,sha256=ZHt4kACp6kH5hUL9NAU3cDpDqHw32u4k2VUg08j06FI,18761
|
|
3
|
+
itkdb_gtk/GlueWeight.py,sha256=a6TKCpkkBfH8MNfHFRflnpzUrCOjpNs2kEVXBMkLIgM,12272
|
|
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=ciBGBweCKHv31wcEP5DVfdioq_6BcdIs4FPUC0JNF5k,9916
|
|
7
|
+
itkdb_gtk/ITkDButils.py,sha256=holUxg0b-alZXvMl6CiMCCwzvFPg0egMA9ICoph5m40,14861
|
|
8
|
+
itkdb_gtk/PetalReceptionTests.py,sha256=DL1F8rxEdzidMgNIR-gI0qYm6D4NrSCSTRvNg1R4e6w,9273
|
|
9
|
+
itkdb_gtk/SensorUtils.py,sha256=S2Mc-Z1webACisj6waJcMqiqzoGSE7TYScVfxHSD700,15458
|
|
10
|
+
itkdb_gtk/ShowAttachments.py,sha256=Cbvb_N4AxVv5nb8vQLZ4arYRy_06W3Lw9pScOLVo8W4,8407
|
|
11
|
+
itkdb_gtk/ShowComments.py,sha256=e5ywWuK-reFt5bCJ9gqyQdImN8Fue_ch4eWnfjXH3lw,3154
|
|
12
|
+
itkdb_gtk/ShowDefects.py,sha256=tVT5wNe9XI80wnWwUXnKQLHIibgtC8d6C4B4tCDrfJ4,3533
|
|
13
|
+
itkdb_gtk/UploadModuleIV.py,sha256=ixx8DEVi46-71Guyqb3XVQ90nYbvZf3k_-YvD7nBFyE,17749
|
|
14
|
+
itkdb_gtk/UploadMultipleTests.py,sha256=PK0G1eWNYQP56WM2GN6-lmLUuS8TARW1pylo1jZweKs,22142
|
|
15
|
+
itkdb_gtk/UploadPetalInformation.py,sha256=D2Hq-Kesz9vU3fMi7yDuHNUONMRbpVCyxJ1s_81bI-o,22194
|
|
16
|
+
itkdb_gtk/UploadTest.py,sha256=Wohj3d8HyxatMIXNscc7ayvrKUpMR77h6kIw2Or0bFU,16645
|
|
17
|
+
itkdb_gtk/WireBondGui.py,sha256=RM5TrQ3Xvcu18W8DuQJ8oBavau0O7XZOQqExhnoHWCE,25761
|
|
18
|
+
itkdb_gtk/__init__.py,sha256=q1OXLovFhZ9-SkOpYuKH8mrGziMXoQYLnKozZ7TzjcU,1155
|
|
19
|
+
itkdb_gtk/dashBoard.py,sha256=Zsood9ObGJUsr-DOa6QvPkqhoskOVjiMtyHYlREn8mM,6536
|
|
20
|
+
itkdb_gtk/dbGtkUtils.py,sha256=9QCArjREvxSb87dg_zfaz8wS6UaSXG9ClYn2EMeAK8s,25629
|
|
21
|
+
itkdb_gtk/readAVSdata.py,sha256=XJmLpemvOj1B81Jzr-WHZJw4UQphb8LwmZXD82qTWu4,19394
|
|
22
|
+
itkdb_gtk/readGoogleSheet.py,sha256=Lzm_oPWwDqZZzKoBUgsp277F9-wCfr_BA0X4VD2Eolo,2673
|
|
23
|
+
itkdb_gtk/untrash_component.py,sha256=VrN46-f-kF7voOxtoh7OL-bZSWAaIFb7-Xbx6_WT7K8,757
|
|
24
|
+
itkdb_gtk-0.9.1.dev1.dist-info/METADATA,sha256=tmD3TCgr2ldjX6NlMci4OzkBw5B3V-2lSj1D9HgooIk,3154
|
|
25
|
+
itkdb_gtk-0.9.1.dev1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
26
|
+
itkdb_gtk-0.9.1.dev1.dist-info/entry_points.txt,sha256=p7hiZPp4EPyRNzRdu6NqYlDmfflZGGDiDjIJGOcwfig,445
|
|
27
|
+
itkdb_gtk-0.9.1.dev1.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
|
|
28
|
+
itkdb_gtk-0.9.1.dev1.dist-info/RECORD,,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
[gui_scripts]
|
|
2
|
+
createShipments = itkdb_gtk:createShipments
|
|
2
3
|
getShipments = itkdb_gtk:getShipments
|
|
3
4
|
glueWeight = itkdb_gtk:glueWeight
|
|
4
|
-
groundVITests = itkdb_gtk:groundVITests
|
|
5
5
|
itkdb_dashBoard = itkdb_gtk:dash_board
|
|
6
|
-
|
|
6
|
+
petalReceptionTests = itkdb_gtk:petalReceptionTests
|
|
7
7
|
uploadModuleIV = itkdb_gtk:uploadModuleIV
|
|
8
8
|
uploadMultipleTests = itkdb_gtk:uploadMultipleTests
|
|
9
|
+
uploadPetalInformation = itkdb_gtk:uploadPetalInformation
|
|
9
10
|
uploadTest = itkdb_gtk:uploadTest
|
|
10
11
|
wirebondTest = itkdb_gtk:wirebondTest
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
itkdb_gtk/GetShipments.py,sha256=H9QIr-cmpYK7KK7BfK-COWQEqWBuXD9Xmq_Er2ZF5gs,18752
|
|
2
|
-
itkdb_gtk/GlueWeight.py,sha256=es2YrqeCj7o3_AITQP1DYDAsgSgeqNSlhJ9H_rQPYG0,12350
|
|
3
|
-
itkdb_gtk/GroundVITests.py,sha256=qXLCHrRbuemUcKOldpvsW9zpObyr2Hn9eQARFRPNU7M,9227
|
|
4
|
-
itkdb_gtk/ITkDB.desktop,sha256=v_K4mHsDxb912J1XGo6mOlbW2TkHvYNGrKmiOnsBQqM,172
|
|
5
|
-
itkdb_gtk/ITkDB.svg,sha256=Rb1DyhhGj504-h3vi-H6BF_Gm-OUciIXWOmzZbjGns4,23991
|
|
6
|
-
itkdb_gtk/ITkDBlogin.py,sha256=lYuTz8FghvqUYRpua9lGaE_dJk_AOmzZhBk2VZH5bKc,9929
|
|
7
|
-
itkdb_gtk/ITkDButils.py,sha256=I88VFnJMdcdWpu2c3VKoGlhMzh3LkfWuZxkSCoXaJh0,14943
|
|
8
|
-
itkdb_gtk/SendShipments.py,sha256=f2I94sKNX_5u9I0TV84dJ31ndPuHLDZI00ekik5Fd7g,13168
|
|
9
|
-
itkdb_gtk/ShowAttachments.py,sha256=Cbvb_N4AxVv5nb8vQLZ4arYRy_06W3Lw9pScOLVo8W4,8407
|
|
10
|
-
itkdb_gtk/ShowComments.py,sha256=e5ywWuK-reFt5bCJ9gqyQdImN8Fue_ch4eWnfjXH3lw,3154
|
|
11
|
-
itkdb_gtk/ShowDefects.py,sha256=tVT5wNe9XI80wnWwUXnKQLHIibgtC8d6C4B4tCDrfJ4,3533
|
|
12
|
-
itkdb_gtk/UploadModuleIV.py,sha256=JSvfQSjMxCEy_9KtcydIjpSSCBJ6xJbCwo24-xszabk,28134
|
|
13
|
-
itkdb_gtk/UploadMultipleTests.py,sha256=qTJGMVZ6njnFp0T8VLDWDY9Wd1cMNZR0K7w2WQocwvs,22160
|
|
14
|
-
itkdb_gtk/UploadPetalInformation.py,sha256=IsZGa_i6jW8lEUnJOhPFmq-GCemLg_nhlHuQlJQMbjc,22210
|
|
15
|
-
itkdb_gtk/UploadTest.py,sha256=yVR_KmdJmN8Y4Bv27u0gqZU2UpKv7OysvWbnQc1lr2E,16544
|
|
16
|
-
itkdb_gtk/WireBondGui.py,sha256=v9oWHIBCU2tbnje2T_3fystPNlks366Dk269pmX9dds,25747
|
|
17
|
-
itkdb_gtk/__init__.py,sha256=9KRYW3cnCzS5C7AE-yQJgNhph2bGnCdcgcX0RcRGyQU,957
|
|
18
|
-
itkdb_gtk/dashBoard.py,sha256=Koc9KfJrrT1ETHNNHmBVb6IYrEJHfkuvYQm9BG6cppc,6313
|
|
19
|
-
itkdb_gtk/dbGtkUtils.py,sha256=yfgXopSYPcfWZI6CQm8S9eUPsVch72BnS009V1QV2_U,25144
|
|
20
|
-
itkdb_gtk/readAVSdata.py,sha256=SvHWFoqvlrEDGKeVaQEPGxsjcNY21KItMSVuWE5q05E,19457
|
|
21
|
-
itkdb_gtk/readGoogleSheet.py,sha256=UCSfFCQncc0pWxqfCKTaa0K4HkQmwOI07eErepOMlGU,2682
|
|
22
|
-
itkdb_gtk/untrash_component.py,sha256=fZWanuPww1RLJ-Fduso4EqfLlcBsd5ryJymr1xJZEUM,756
|
|
23
|
-
itkdb_gtk-0.0.18.dist-info/METADATA,sha256=ucx_fYuU-wK_qGij2YDnS6V3KOwrPh15qbji7Pa6VxM,3148
|
|
24
|
-
itkdb_gtk-0.0.18.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
25
|
-
itkdb_gtk-0.0.18.dist-info/entry_points.txt,sha256=FuSmtQZK5jEzNomHiJqdFZAJZoRueejwoWMg53aZSu0,371
|
|
26
|
-
itkdb_gtk-0.0.18.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
|
|
27
|
-
itkdb_gtk-0.0.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|