itkdb-gtk 0.0.16.dev20__tar.gz → 0.0.18__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.0.16.dev20 → itkdb_gtk-0.0.18}/PKG-INFO +1 -1
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/UploadMultipleTests.py +75 -5
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/UploadTest.py +96 -7
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/__init__.py +1 -1
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/dashBoard.py +30 -13
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/dbGtkUtils.py +4 -4
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk.egg-info/PKG-INFO +1 -1
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/pyproject.toml +1 -1
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/README.md +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/GetShipments.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/GlueWeight.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/GroundVITests.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/ITkDB.desktop +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/ITkDB.svg +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/ITkDBlogin.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/ITkDButils.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/SendShipments.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/ShowAttachments.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/ShowComments.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/ShowDefects.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/UploadModuleIV.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/UploadPetalInformation.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/WireBondGui.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/readAVSdata.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/readGoogleSheet.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk/untrash_component.py +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk.egg-info/SOURCES.txt +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk.egg-info/dependency_links.txt +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk.egg-info/entry_points.txt +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk.egg-info/requires.txt +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/itkdb_gtk.egg-info/top_level.txt +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/setup.cfg +0 -0
- {itkdb_gtk-0.0.16.dev20 → itkdb_gtk-0.0.18}/test/test_holes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: itkdb_gtk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.18
|
|
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
|
|
@@ -9,7 +9,7 @@ from pathlib import Path
|
|
|
9
9
|
|
|
10
10
|
try:
|
|
11
11
|
import itkdb_gtk
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
except ImportError:
|
|
14
14
|
from pathlib import Path
|
|
15
15
|
cwd = Path(sys.argv[0]).parent.parent
|
|
@@ -67,7 +67,7 @@ def all_files(root, patterns='*', single_level=False, yield_folders=False):
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
class TestList(object):
|
|
70
|
-
SN, TestType, RunNumber, Date, Institute, Path, Json, Nattch, Attachments, Ncomm, Comments, Ndef, Defects, ALL = range(
|
|
70
|
+
SN, TestType, RunNumber, Date, Institute, Stage, currentStage, Path, Json, Nattch, Attachments, Ncomm, Comments, Ndef, Defects, ALL = range(16)
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
def check_data(data):
|
|
@@ -177,7 +177,7 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
|
|
|
177
177
|
|
|
178
178
|
def create_tree_view(self, size=150):
|
|
179
179
|
"""Creates the tree vew with the attachments."""
|
|
180
|
-
model = Gtk.ListStore(str, str, str, str, str, str, object, int, object, int, object, int, object)
|
|
180
|
+
model = Gtk.ListStore(str, str, str, str, str, str, str, str, object, int, object, int, object, int, object)
|
|
181
181
|
self.tree = Gtk.TreeView(model=model)
|
|
182
182
|
self.tree.connect("button-press-event", self.button_pressed)
|
|
183
183
|
scrolled = Gtk.ScrolledWindow()
|
|
@@ -201,6 +201,10 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
|
|
|
201
201
|
column = Gtk.TreeViewColumn("Institute", renderer, text=TestList.Institute)
|
|
202
202
|
self.tree.append_column(column)
|
|
203
203
|
|
|
204
|
+
renderer = Gtk.CellRendererText()
|
|
205
|
+
column = Gtk.TreeViewColumn("Stage", renderer, text=TestList.Stage)
|
|
206
|
+
self.tree.append_column(column)
|
|
207
|
+
|
|
204
208
|
renderer = Gtk.CellRendererText()
|
|
205
209
|
column = Gtk.TreeViewColumn("N. att.", renderer, text=TestList.Nattch)
|
|
206
210
|
self.tree.append_column(column)
|
|
@@ -257,6 +261,10 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
|
|
|
257
261
|
item_show.connect("activate", self.on_show_json, (model, iter, values))
|
|
258
262
|
menu.append(item_show)
|
|
259
263
|
|
|
264
|
+
item_set_stage = Gtk.MenuItem(label="Set Stage")
|
|
265
|
+
item_set_stage.connect("activate", self.on_set_stage, (model, iter, values))
|
|
266
|
+
menu.append(item_set_stage)
|
|
267
|
+
|
|
260
268
|
item_show_att = Gtk.MenuItem(label="Edit Attachments")
|
|
261
269
|
item_show_att.connect("activate", self.on_show_attachments, (model, iter, values))
|
|
262
270
|
menu.append(item_show_att)
|
|
@@ -289,7 +297,7 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
|
|
|
289
297
|
model.set_value(iter, TestList.RunNumber, payload["runNumber"])
|
|
290
298
|
model.set_value(iter, TestList.Date, handle_test_date(payload["date"]))
|
|
291
299
|
model.set_value(iter, TestList.Institute, handle_test_date(payload["institution"]))
|
|
292
|
-
|
|
300
|
+
|
|
293
301
|
|
|
294
302
|
dlg.hide()
|
|
295
303
|
dlg.destroy()
|
|
@@ -367,6 +375,66 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
|
|
|
367
375
|
dlg.destroy()
|
|
368
376
|
return out, use_default
|
|
369
377
|
|
|
378
|
+
def on_set_stage(self, item, data):
|
|
379
|
+
"""Set the test stage."""
|
|
380
|
+
model, iter, val = data
|
|
381
|
+
SN = val[TestList.SN]
|
|
382
|
+
combo, currentStage = self.get_component_stages(SN)
|
|
383
|
+
|
|
384
|
+
dlg = Gtk.Dialog(title="Add Attachment")
|
|
385
|
+
|
|
386
|
+
dlg.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
|
|
387
|
+
Gtk.STOCK_OK, Gtk.ResponseType.OK)
|
|
388
|
+
area = dlg.get_content_area()
|
|
389
|
+
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
|
390
|
+
area.add(box)
|
|
391
|
+
|
|
392
|
+
box.pack_start(Gtk.Label(label="Select Stage"), False, True, 0)
|
|
393
|
+
box.pack_start(combo, False, True, 0)
|
|
394
|
+
dlg.show_all()
|
|
395
|
+
|
|
396
|
+
rc = dlg.run()
|
|
397
|
+
if rc == Gtk.ResponseType.OK:
|
|
398
|
+
new_stage = combo.get_active_text()
|
|
399
|
+
model[iter][TestList.Stage] = new_stage
|
|
400
|
+
data = model[iter][TestList.Json]
|
|
401
|
+
changed = (new_stage != model[iter][TestList.currentStage])
|
|
402
|
+
data["isRetroactive"] = changed
|
|
403
|
+
if changed:
|
|
404
|
+
data["stage"] = new_stage
|
|
405
|
+
else:
|
|
406
|
+
if "stage" in data:
|
|
407
|
+
del data["stage"]
|
|
408
|
+
|
|
409
|
+
model[iter][TestList.Json] = data
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
dlg.hide()
|
|
413
|
+
dlg.destroy()
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
def get_component_stages(self, SN):
|
|
417
|
+
"""Create a combo with the stages."""
|
|
418
|
+
try:
|
|
419
|
+
obj = ITkDButils.get_DB_component(self.session, SN)
|
|
420
|
+
currentStage = obj["currentStage"]["code"]
|
|
421
|
+
|
|
422
|
+
combo = Gtk.ComboBoxText.new_with_entry()
|
|
423
|
+
combo.remove_all()
|
|
424
|
+
indx = 0
|
|
425
|
+
for i, stg in enumerate(obj["stages"]):
|
|
426
|
+
S = stg["code"]
|
|
427
|
+
combo.append_text(S)
|
|
428
|
+
if S == currentStage:
|
|
429
|
+
indx = i
|
|
430
|
+
|
|
431
|
+
combo.set_active(indx)
|
|
432
|
+
return combo, currentStage
|
|
433
|
+
|
|
434
|
+
except Exception:
|
|
435
|
+
self.write_message("Something went wring with the stages")
|
|
436
|
+
return [None, None]
|
|
437
|
+
|
|
370
438
|
def add_tests_to_view(self, files):
|
|
371
439
|
"""Add the input fiels to the treeview."""
|
|
372
440
|
default_site = None
|
|
@@ -419,8 +487,10 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
|
|
|
419
487
|
comments = data.get("comments", [])
|
|
420
488
|
defects = data.get("defects", [])
|
|
421
489
|
the_date = handle_test_date(data["date"])
|
|
490
|
+
combo, currentStage = self.get_component_stages(data["component"])
|
|
422
491
|
model.append([data["component"], data["testType"], data["runNumber"], the_date,
|
|
423
|
-
data["institution"],
|
|
492
|
+
data["institution"], currentStage, currentStage,
|
|
493
|
+
ifile, data, len(attachments), attachments,
|
|
424
494
|
len(comments), comments, len(defects), defects])
|
|
425
495
|
|
|
426
496
|
except Exception as E:
|
|
@@ -92,6 +92,7 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
92
92
|
"""
|
|
93
93
|
self.payload = payload
|
|
94
94
|
self.data = None
|
|
95
|
+
self.folder = None
|
|
95
96
|
self.attachments = []
|
|
96
97
|
self.comments = []
|
|
97
98
|
self.defects = []
|
|
@@ -169,6 +170,19 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
169
170
|
self.entryTest = Gtk.Entry()
|
|
170
171
|
grid.attach(self.entryTest, 1, 2, 1, 1)
|
|
171
172
|
|
|
173
|
+
# Object Stage
|
|
174
|
+
lbl = Gtk.Label(label="Object Stage")
|
|
175
|
+
lbl.set_xalign(0)
|
|
176
|
+
grid.attach(lbl, 0, 3, 1, 1)
|
|
177
|
+
|
|
178
|
+
self.objStage = Gtk.ComboBoxText.new()
|
|
179
|
+
self.objStage.connect("changed", self.on_new_stage)
|
|
180
|
+
grid.attach(self.objStage, 1, 3, 1, 1)
|
|
181
|
+
|
|
182
|
+
self.isRetroactive = Gtk.ToggleButton.new_with_label("RetroActive")
|
|
183
|
+
grid.attach(self.isRetroactive, 2, 3, 1, 1)
|
|
184
|
+
|
|
185
|
+
|
|
172
186
|
# The "Add attachment" button.
|
|
173
187
|
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
|
|
174
188
|
self.mainBox.pack_start(box, False, False, 0)
|
|
@@ -204,16 +218,11 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
204
218
|
|
|
205
219
|
else:
|
|
206
220
|
print("Input file does not exists: {}".format(self.payload))
|
|
207
|
-
|
|
221
|
+
|
|
208
222
|
except TypeError:
|
|
209
223
|
self.load_payload(self.payload)
|
|
210
224
|
self.write_message("Loaded memory payload.")
|
|
211
225
|
|
|
212
|
-
#if len(self.attachments):
|
|
213
|
-
# dC = [A for A in self.attachments]
|
|
214
|
-
# self.attachments.clear()
|
|
215
|
-
# for A in dC:
|
|
216
|
-
# self.append_attachment_to_view(A)
|
|
217
226
|
if len(self.attachments) > 0:
|
|
218
227
|
self.btn_attch.set_label("Attachments ({})".format(len(self.attachments)))
|
|
219
228
|
|
|
@@ -250,20 +259,57 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
250
259
|
return out
|
|
251
260
|
|
|
252
261
|
def load_payload(self, data):
|
|
253
|
-
"""
|
|
262
|
+
"""Payload is given as a dict."""
|
|
254
263
|
self.data = data
|
|
255
264
|
errors, missing = check_data(self.data)
|
|
256
265
|
self.complete_missing(missing, errors)
|
|
266
|
+
self.set_stages()
|
|
267
|
+
|
|
268
|
+
def on_new_stage(self, *args):
|
|
269
|
+
"""New stage selected."""
|
|
270
|
+
stg = self.objStage.get_active_text()
|
|
271
|
+
changed = (stg != self.currentStage)
|
|
272
|
+
self.isRetroactive.set_active(changed)
|
|
273
|
+
self.data["isRetroactive"] = changed
|
|
274
|
+
if changed:
|
|
275
|
+
self.data["stage"] = stg
|
|
276
|
+
else:
|
|
277
|
+
if "stage" in self.data:
|
|
278
|
+
del self.data["stage"]
|
|
279
|
+
|
|
280
|
+
def set_stages(self):
|
|
281
|
+
"""Prepare the stages combo."""
|
|
282
|
+
# Check the object stage
|
|
283
|
+
SN = self.data["component"]
|
|
284
|
+
try:
|
|
285
|
+
obj = ITkDButils.get_DB_component(self.session, SN)
|
|
286
|
+
self.currentStage = obj["currentStage"]["code"]
|
|
287
|
+
|
|
288
|
+
self.objStage.remove_all()
|
|
289
|
+
indx = 0
|
|
290
|
+
for i, stg in enumerate(obj["stages"]):
|
|
291
|
+
S = stg["code"]
|
|
292
|
+
self.objStage.append_text(S)
|
|
293
|
+
if S == self.currentStage:
|
|
294
|
+
indx = i
|
|
295
|
+
|
|
296
|
+
self.objStage.set_active(indx)
|
|
297
|
+
|
|
298
|
+
except Exception:
|
|
299
|
+
self.write_message("Something went wring with the stages")
|
|
300
|
+
|
|
257
301
|
|
|
258
302
|
def on_test_file(self, fdlg):
|
|
259
303
|
"""Test file browser clicked."""
|
|
260
304
|
fnam = fdlg.get_filename()
|
|
305
|
+
self.folder = Path(fnam).parent
|
|
261
306
|
|
|
262
307
|
# The file exists by definition
|
|
263
308
|
try:
|
|
264
309
|
self.data = json.loads(open(fnam).read())
|
|
265
310
|
errors, missing = check_data(self.data)
|
|
266
311
|
self.complete_missing(missing, errors)
|
|
312
|
+
self.set_stages()
|
|
267
313
|
|
|
268
314
|
except Exception as E:
|
|
269
315
|
self.data = None
|
|
@@ -285,6 +331,10 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
285
331
|
else:
|
|
286
332
|
dbGtkUtils.complain("Invalid JSON data".format('\n'.join(errors)))
|
|
287
333
|
|
|
334
|
+
self.find_attachments()
|
|
335
|
+
self.find_comments()
|
|
336
|
+
self.find_defects()
|
|
337
|
+
|
|
288
338
|
self.entrySN.set_text(self.data["component"] if self.data["component"] else "")
|
|
289
339
|
self.entryTest.set_text(self.data["testType"])
|
|
290
340
|
self.comments = self.data.get("comments", [])
|
|
@@ -304,6 +354,24 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
304
354
|
dlg.hide()
|
|
305
355
|
dlg.destroy()
|
|
306
356
|
|
|
357
|
+
def find_attachments(self):
|
|
358
|
+
"""Find Attachments in payload."""
|
|
359
|
+
self.attachments = []
|
|
360
|
+
if "attachments" in self.data:
|
|
361
|
+
for A in self.data["attachments"]:
|
|
362
|
+
if not Path(A["path"]).exists():
|
|
363
|
+
if self.folder:
|
|
364
|
+
the_path = self.folder.joinpath(A["path"])
|
|
365
|
+
else:
|
|
366
|
+
continue
|
|
367
|
+
else:
|
|
368
|
+
the_path = Path(A["path"]).expanduser().resolve()
|
|
369
|
+
|
|
370
|
+
self.attachments.append(ITkDButils.Attachment(the_path, A["title"], A["description"]))
|
|
371
|
+
|
|
372
|
+
if len(self.attachments) > 0:
|
|
373
|
+
self.btn_attch.set_label("Attachments ({})".format(len(self.attachments)))
|
|
374
|
+
|
|
307
375
|
def edit_attachments(self, *args):
|
|
308
376
|
"""Edit test attachmetns."""
|
|
309
377
|
SA = ShowAttachments("Test Attachments", self.session, self.attachments, parent=self)
|
|
@@ -317,6 +385,15 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
317
385
|
if len(self.attachments) > 0:
|
|
318
386
|
self.btn_attch.set_label("Attachments ({})".format(len(self.attachments)))
|
|
319
387
|
|
|
388
|
+
def find_comments(self):
|
|
389
|
+
"""Find comments in payload"""
|
|
390
|
+
self.comments = []
|
|
391
|
+
if "comments" in self.data:
|
|
392
|
+
for C in self.data["comments"]:
|
|
393
|
+
self.comments.append(C)
|
|
394
|
+
|
|
395
|
+
if len(self.comments) > 0:
|
|
396
|
+
self.btn_comments.set_label("Comments ({})".format(len(self.comments)))
|
|
320
397
|
|
|
321
398
|
def edit_comments(self, *args):
|
|
322
399
|
"""Edit test comments."""
|
|
@@ -331,6 +408,17 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
331
408
|
if len(self.comments) > 0:
|
|
332
409
|
self.btn_comments.set_label("Comments ({})".format(len(self.comments)))
|
|
333
410
|
|
|
411
|
+
|
|
412
|
+
def find_defects(self):
|
|
413
|
+
"""Find defects in payload."""
|
|
414
|
+
self.defects = []
|
|
415
|
+
if "defects" in self.data:
|
|
416
|
+
for D in self.data["defects"]:
|
|
417
|
+
self.defects.append(D)
|
|
418
|
+
|
|
419
|
+
if len(self.defects) > 0:
|
|
420
|
+
self.btn_defects.set_label("Defects ({})".format(len(self.defects)))
|
|
421
|
+
|
|
334
422
|
def edit_defects(self, *args):
|
|
335
423
|
"""Edit test defects."""
|
|
336
424
|
SD = ShowDefects("Test Defects", self.defects, self)
|
|
@@ -356,6 +444,7 @@ class UploadTest(dbGtkUtils.ITkDBWindow):
|
|
|
356
444
|
|
|
357
445
|
self.data["comments"] = self.comments
|
|
358
446
|
self.data["defects"] = self.defects
|
|
447
|
+
|
|
359
448
|
rc = ITkDButils.upload_test(self.session, self.data, self.attachments)
|
|
360
449
|
if rc:
|
|
361
450
|
ipos = rc.find("The following details may help:")
|
|
@@ -16,6 +16,7 @@ from itkdb_gtk import GetShipments
|
|
|
16
16
|
from itkdb_gtk import GroundVITests
|
|
17
17
|
from itkdb_gtk import ITkDBlogin
|
|
18
18
|
from itkdb_gtk import SendShipments
|
|
19
|
+
from itkdb_gtk import UploadTest
|
|
19
20
|
from itkdb_gtk import UploadMultipleTests
|
|
20
21
|
from itkdb_gtk import GlueWeight
|
|
21
22
|
from itkdb_gtk import UploadModuleIV
|
|
@@ -30,12 +31,13 @@ from gi.repository import Gtk
|
|
|
30
31
|
class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
31
32
|
"""Dashboard class."""
|
|
32
33
|
UPLOAD_TEST = 1
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
UPLOAD_MANY_TESTS = 2
|
|
35
|
+
CREATE_SHIPMNT = 3
|
|
36
|
+
RECV_SHIPMNT = 4
|
|
37
|
+
PETAL_GND = 5
|
|
38
|
+
GLUE_WEIGHT = 6
|
|
39
|
+
MOD_IV = 7
|
|
40
|
+
WIRE_BOND = 8
|
|
39
41
|
|
|
40
42
|
def __init__(self, session):
|
|
41
43
|
"""Initialization."""
|
|
@@ -60,27 +62,31 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
60
62
|
grid.attach(lbl, 0, irow, 1, 1)
|
|
61
63
|
|
|
62
64
|
irow += 1
|
|
63
|
-
btnTest = Gtk.Button(label="Upload
|
|
65
|
+
btnTest = Gtk.Button(label="Upload Single Test")
|
|
64
66
|
btnTest.connect("clicked", self.upload_test)
|
|
65
67
|
grid.attach(btnTest, 0, irow, 1, 1)
|
|
66
68
|
|
|
69
|
+
btnTest = Gtk.Button(label="Upload Multiple Tests")
|
|
70
|
+
btnTest.connect("clicked", self.upload_multiple_tests)
|
|
71
|
+
grid.attach(btnTest, 1, irow, 1, 1)
|
|
72
|
+
|
|
73
|
+
irow += 1
|
|
67
74
|
btnGnd = Gtk.Button(label="Petal VI/GND")
|
|
68
75
|
btnGnd.connect("clicked", self.petal_gnd)
|
|
69
|
-
grid.attach(btnGnd,
|
|
76
|
+
grid.attach(btnGnd, 0, irow, 1, 1)
|
|
70
77
|
|
|
71
|
-
irow += 1
|
|
72
78
|
btnWeight = Gtk.Button(label="GlueWeight")
|
|
73
79
|
btnWeight.connect("clicked", self.glue_weight)
|
|
74
|
-
grid.attach(btnWeight,
|
|
80
|
+
grid.attach(btnWeight, 1, irow, 1, 1)
|
|
75
81
|
|
|
82
|
+
irow += 1
|
|
76
83
|
btnModIV = Gtk.Button(label="Module IV")
|
|
77
84
|
btnModIV.connect("clicked", self.module_IV)
|
|
78
|
-
grid.attach(btnModIV,
|
|
85
|
+
grid.attach(btnModIV, 0, irow, 1, 1)
|
|
79
86
|
|
|
80
|
-
irow +=1
|
|
81
87
|
btnWireBond = Gtk.Button(label="Wire Bond")
|
|
82
88
|
btnWireBond.connect("clicked", self.wire_bond)
|
|
83
|
-
grid.attach(btnWireBond,
|
|
89
|
+
grid.attach(btnWireBond, 1, irow, 1, 1)
|
|
84
90
|
|
|
85
91
|
|
|
86
92
|
|
|
@@ -113,6 +119,17 @@ class DashWindow(dbGtkUtils.ITkDBWindow):
|
|
|
113
119
|
if self.mask & bt:
|
|
114
120
|
return
|
|
115
121
|
|
|
122
|
+
self.mask |= bt
|
|
123
|
+
W = UploadTest.UploadTest(self.session)
|
|
124
|
+
W.connect("destroy", self.app_closed, bitn)
|
|
125
|
+
|
|
126
|
+
def upload_multiple_tests(self, *args):
|
|
127
|
+
"""Launch upload multiple test."""
|
|
128
|
+
bitn = DashWindow.UPLOAD_MANY_TESTS
|
|
129
|
+
bt = 1 << bitn
|
|
130
|
+
if self.mask & bt:
|
|
131
|
+
return
|
|
132
|
+
|
|
116
133
|
self.mask |= bt
|
|
117
134
|
W = UploadMultipleTests.UploadMultipleTests(self.session)
|
|
118
135
|
W.connect("destroy", self.app_closed, bitn)
|
|
@@ -274,9 +274,9 @@ def get_a_value(main_title, second_text=None, is_tv=False, parent=None):
|
|
|
274
274
|
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
|
275
275
|
area.add(box)
|
|
276
276
|
|
|
277
|
-
box.pack_start(Gtk.Label(main_title), False, True, 0)
|
|
277
|
+
box.pack_start(Gtk.Label(label=main_title), False, True, 0)
|
|
278
278
|
if second_text and len(second_text):
|
|
279
|
-
box.pack_start(Gtk.Label(second_text), False, True, 0)
|
|
279
|
+
box.pack_start(Gtk.Label(label=second_text), False, True, 0)
|
|
280
280
|
|
|
281
281
|
entry = TextEntry(3 if is_tv else -1)
|
|
282
282
|
|
|
@@ -325,7 +325,7 @@ def get_a_list_of_values(main_title, labels, defaults=None, second_text=None, pa
|
|
|
325
325
|
lbl.set_markup("<b>{}</b>".format(main_title))
|
|
326
326
|
box.pack_start(lbl, False, True, 5)
|
|
327
327
|
if second_text and len(second_text):
|
|
328
|
-
box.pack_start(Gtk.Label(second_text), False, True, 0)
|
|
328
|
+
box.pack_start(Gtk.Label(label=second_text), False, True, 0)
|
|
329
329
|
|
|
330
330
|
entries = []
|
|
331
331
|
values = []
|
|
@@ -341,7 +341,7 @@ def get_a_list_of_values(main_title, labels, defaults=None, second_text=None, pa
|
|
|
341
341
|
else:
|
|
342
342
|
is_text_view.append(False)
|
|
343
343
|
|
|
344
|
-
lbl = Gtk.Label(txt)
|
|
344
|
+
lbl = Gtk.Label(label=txt)
|
|
345
345
|
lbl.set_justify(Gtk.Justification.LEFT)
|
|
346
346
|
vbox.pack_start(lbl, False, False, 0)
|
|
347
347
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: itkdb_gtk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.18
|
|
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
|