itkdb-gtk 0.14.4.dev1__py3-none-any.whl → 0.15.1__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/ITkDButils.py CHANGED
@@ -112,7 +112,7 @@ def set_petal_core_batch(session, petal_core):
112
112
  tp = petal_core["type"]
113
113
  else:
114
114
  tp = petal_core["type"]["code"]
115
-
115
+
116
116
  if tp != "CORE_AVS":
117
117
  return
118
118
 
@@ -128,7 +128,8 @@ def set_petal_core_batch(session, petal_core):
128
128
  rc = session.post("addBatchComponent", json={"id":batch_list[batch_code], "component": petal_core["id"]})
129
129
  return rc
130
130
 
131
- def registerPetalCore(client, SN, alias, HC_id=None):
131
+
132
+ def registerPetalCore(client, SN, alias, HC_id=None, petal_core=None):
132
133
  """Register a Petal Core in the DB.
133
134
 
134
135
  Args:
@@ -148,19 +149,44 @@ def registerPetalCore(client, SN, alias, HC_id=None):
148
149
  "componentType": "CORE_PETAL",
149
150
  "type": "CORE_AVS",
150
151
  "serialNumber": SN,
151
- "properties": {'DESY_ID': alias}
152
+ "properties": {'PRODUCTION_ID': alias}
152
153
  }
153
154
  if HC_id is not None:
154
155
  dto["properties"]["HC_ID"] = HC_id
155
156
 
157
+ the_component = None
158
+
156
159
  try:
157
- db_response = client.post('registerComponent', json=dto)
158
- set_petal_core_batch(client, db_response["component"])
159
- return db_response['component']
160
+ if petal_core is None:
161
+ db_response = client.post('registerComponent', json=dto)
162
+ petal_core = db_response['component']
163
+
164
+ else:
165
+ # WE set the alternative ID and the HC_ID
166
+ the_component = SN
167
+ if petal_core["alternativeIdentifier"] is None:
168
+ dto = {
169
+ "component": SN,
170
+ "code": "PRODUCTION_ID",
171
+ "value": alias
172
+ }
173
+ db_response = client.post("setComponentProperty", json=dto)
174
+
175
+ if HC_id is not None:
176
+ dto = {
177
+ "component": SN,
178
+ "code": "HC_ID",
179
+ "value": HC_id
180
+ }
181
+ db_response = client.post("setComponentProperty", json=dto)
182
+
183
+ set_petal_core_batch(client, petal_core)
184
+ return petal_core
160
185
 
161
186
  except KeyError:
162
187
  return None
163
188
 
189
+
164
190
  def create_component_attachment(client, SN, file_path, title=None, description="", item_type="component"):
165
191
  """Create an attachment to the given component.
166
192
 
@@ -440,7 +440,7 @@ class PanelVisualInspection(dbGtkUtils.ITkDBWindow):
440
440
  elif "USET" in SN:
441
441
  # Hybrid test panel
442
442
  component_type = "HYBRID_TEST_PANEL"
443
- test_code = "VISUAL_INSPECTION_RECEPTION"
443
+ test_code = "VISUAL_INSPECTION"
444
444
 
445
445
  if not SN[6].isdigit or int(SN[6])>5:
446
446
  dbGtkUtils.complain("Not a Hybrid Test Panel",
@@ -535,7 +535,7 @@ class PanelVisualInspection(dbGtkUtils.ITkDBWindow):
535
535
  payload["testType"]), msg)
536
536
  self.write_message(msg+'\n')
537
537
 
538
- elif payload["testType"] == "VISUAL_INSPECTION_RECEPTION":
538
+ elif payload["testType"] == "VISUAL_INSPECTION":
539
539
  rc = ITkDButils.create_test_run_comment(self.session,
540
540
  ITkDButils.uploaded_test_runs[0],
541
541
  ["Link to global image:\n {}".format(global_link)])
@@ -131,6 +131,7 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
131
131
  self.tests = []
132
132
  self.data = None
133
133
  self.tree = None
134
+ self.is_retroactive = False
134
135
  self.def_color = None
135
136
 
136
137
  self.init_window()
@@ -177,6 +178,11 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
177
178
  btn.connect("clicked", self.on_select_folder)
178
179
  grid.attach(btn, 2, 0, 1, 1)
179
180
 
181
+ # toggle = Gtk.ToggleButton("RetroActive")
182
+ # toggle.set_tooltip_text("Toggle to make all uploads retroactive.")
183
+ # toggle.connect("toggled", self.on_toggle_retroactive)
184
+ # grid.attach(toggle, 3, 0, 1, 1)
185
+
180
186
  # Paned object
181
187
  paned = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
182
188
  paned.set_size_request(-1, 200)
@@ -317,6 +323,11 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
317
323
 
318
324
  menu.popup_at_pointer(event)
319
325
 
326
+ def on_toggle_retroactive(self, toggle, *args):
327
+ """Called when retroactive button is toggled."""
328
+ self.is_retroactive = toggle.get_active()
329
+ print("Is retroactive", self.is_retroactive)
330
+
320
331
  def on_show_json(self, item, data):
321
332
  """Test JSon."""
322
333
  model, lv_iter, val = data
@@ -413,7 +424,7 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
413
424
  SN = val[TestList.SN]
414
425
  combo, _ = self.get_component_stages(SN)
415
426
 
416
- dlg = Gtk.Dialog(title="Add Attachment")
427
+ dlg = Gtk.Dialog(title="Set object stage")
417
428
 
418
429
  dlg.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
419
430
  Gtk.STOCK_OK, Gtk.ResponseType.OK)
@@ -423,6 +434,9 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
423
434
 
424
435
  box.pack_start(Gtk.Label(label="Select Stage"), False, True, 0)
425
436
  box.pack_start(combo, False, True, 0)
437
+ toggle = Gtk.ToggleButton("Retroactive")
438
+ box.pack_start(toggle, False, True, 0)
439
+
426
440
  dlg.show_all()
427
441
 
428
442
  rc = dlg.run()
@@ -430,13 +444,18 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
430
444
  new_stage = combo.get_active_text()
431
445
  model[lv_iter][TestList.Stage] = new_stage
432
446
  data = model[lv_iter][TestList.Json]
433
- changed = (new_stage != model[lv_iter][TestList.currentStage])
434
- data["isRetroactive"] = changed
435
- if changed:
447
+ if toggle.get_active():
448
+ data["isRetroactive"] = True
436
449
  data["stage"] = new_stage
450
+
437
451
  else:
438
- if "stage" in data:
439
- del data["stage"]
452
+ changed = (new_stage != model[lv_iter][TestList.currentStage])
453
+ data["isRetroactive"] = changed
454
+ if changed:
455
+ data["stage"] = new_stage
456
+ else:
457
+ if "stage" in data:
458
+ del data["stage"]
440
459
 
441
460
  model[lv_iter][TestList.Json] = data
442
461
 
@@ -689,7 +708,7 @@ class UploadMultipleTests(dbGtkUtils.ITkDBWindow):
689
708
 
690
709
 
691
710
  def main():
692
- """Main entry."""
711
+ """Main entry."""
693
712
  HELP_LINK="https://itkdb-gtk.docs.cern.ch/uploadMultipleTests.html"
694
713
  # DB login
695
714
  dlg = ITkDBlogin.ITkDBlogin()
@@ -248,7 +248,6 @@ class ModuleVisualInspection(dbGtkUtils.ITkDBWindow):
248
248
 
249
249
  else:
250
250
  if self.reception.get_active():
251
- #test_type = "VISUAL_INSPECTION_RECEPTION"
252
251
  test_type = "VISUAL_INSPECTION"
253
252
 
254
253
  self.data = ITkDButils.get_test_skeleton(self.session,
itkdb_gtk/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """ itkdb-gtk python module
2
2
  """
3
- __version__ = "0.14.4.dev1"
3
+ __version__ = "0.15.1"
4
4
 
5
5
 
6
6
  def dash_board():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: itkdb_gtk
3
- Version: 0.14.4.dev1
3
+ Version: 0.15.1
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
@@ -4,24 +4,24 @@ itkdb_gtk/GlueWeight.py,sha256=IHgvbN2DlT8Ou-DMi-n3Z-3xSrPr0tlrkkEH10AshrA,11587
4
4
  itkdb_gtk/ITkDB.desktop,sha256=v_K4mHsDxb912J1XGo6mOlbW2TkHvYNGrKmiOnsBQqM,172
5
5
  itkdb_gtk/ITkDB.svg,sha256=Ry702zrUkxvG61SqThbUNfXySyiLMqalwYpcM-b_KWo,24242
6
6
  itkdb_gtk/ITkDBlogin.py,sha256=40tipm_j5eUS4dnZnBT8VyL6Bu_8csuqS9TPWKxvKSY,10038
7
- itkdb_gtk/ITkDButils.py,sha256=52jK1NmaackZ4Zfgv83pj6xPk5g7qbpU6KiHKAuBJC4,20685
8
- itkdb_gtk/PanelVisualInspection.py,sha256=ktAcYbdLBS7Zbxq9XsxB_AWTgAfFLa42NFTEsxnBn98,20531
7
+ itkdb_gtk/ITkDButils.py,sha256=7naTbz_nBjUniKzATm0MdfBdlXziilv_iU9nWUTeTRE,21444
8
+ itkdb_gtk/PanelVisualInspection.py,sha256=96_JMfJXfaqxN4vq2Y9rjdRY7pikuobOTGmrSOxHwV8,20511
9
9
  itkdb_gtk/SensorUtils.py,sha256=fYWF9TeutAbore53dLWNlZnVn9P3OsKYcFLNGOs8cnI,15426
10
10
  itkdb_gtk/ShowAttachments.py,sha256=KExxPCdbcb04XS8JSUkg5xF1McvlB8e9btwctDCKNXU,8498
11
11
  itkdb_gtk/ShowComments.py,sha256=OiMTFLnhGbbKRj5x61D517BYHAt-qY5Y1lvR3EQz3c0,3151
12
12
  itkdb_gtk/ShowDefects.py,sha256=aVAHeaE5IztmAPEuHwhi06KWo_pi9xX2J1fTLhKyAPI,3530
13
13
  itkdb_gtk/UploadModuleIV.py,sha256=sqh52bSxANBwlmVWZlDqFXpqRGf0rV0QsjJWC-tY_qI,17792
14
- itkdb_gtk/UploadMultipleTests.py,sha256=Qh3AvjorE1vqo20bPwZD8x_66ZPrlSHrKHgAh3ZNtXs,24437
14
+ itkdb_gtk/UploadMultipleTests.py,sha256=ZT5aStkBL62_VUj41dGKN0eN95cGizYS_CLOEEFRvuo,25186
15
15
  itkdb_gtk/UploadTest.py,sha256=ukgJ5-IG12bqa1QIp3bXIV8hkdXCv5UDxh1lQswN_ko,16832
16
- itkdb_gtk/VisualInspection.py,sha256=W1DNgJH6uiTWqt2pSlrEPD98EOgrx5mu2s1PJF2yHiY,9900
16
+ itkdb_gtk/VisualInspection.py,sha256=akKPWGbE9DxqTM1csCbov9SqnlTvW_RRKtpqWV64zG4,9841
17
17
  itkdb_gtk/WireBondGui.py,sha256=WFTLOw4l5JxSbvh4vZMxcF65fqlwvNw0fOyEru9ijqQ,39850
18
- itkdb_gtk/__init__.py,sha256=WowML46yh02KUCIp79mWF4jlwVu3hyb03P10CdYn1U4,1161
18
+ itkdb_gtk/__init__.py,sha256=yjpksFQlGaHYj9QybUAAgWV2dv289oL8NNuZTVLC5u4,1156
19
19
  itkdb_gtk/dashBoard.py,sha256=DHoCxqhCtOvh7s3lMDJIxFVKEVCVvlnlteEyOjmUgIk,11432
20
20
  itkdb_gtk/dbGtkUtils.py,sha256=THW-IT5UJB1YluvUVIfpy6oIY2faSHChNKGTpY5qzag,30480
21
21
  itkdb_gtk/readGoogleSheet.py,sha256=Lzm_oPWwDqZZzKoBUgsp277F9-wCfr_BA0X4VD2Eolo,2673
22
22
  itkdb_gtk/untrash_component.py,sha256=VrN46-f-kF7voOxtoh7OL-bZSWAaIFb7-Xbx6_WT7K8,757
23
- itkdb_gtk-0.14.4.dev1.dist-info/METADATA,sha256=7_tFWid7e8j9k1Rt3b9geVcVAZOU-LBqzgKi_iiao10,3154
24
- itkdb_gtk-0.14.4.dev1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
25
- itkdb_gtk-0.14.4.dev1.dist-info/entry_points.txt,sha256=pKg7qpsrZh1GUQ-n3aFsSxmTVm0h4Qdb_6nsNO_PsFw,437
26
- itkdb_gtk-0.14.4.dev1.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
27
- itkdb_gtk-0.14.4.dev1.dist-info/RECORD,,
23
+ itkdb_gtk-0.15.1.dist-info/METADATA,sha256=zKg_NdxLQiwTybdi6V8vhQfqxOVxNP7almNvRqdQpNw,3149
24
+ itkdb_gtk-0.15.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ itkdb_gtk-0.15.1.dist-info/entry_points.txt,sha256=pKg7qpsrZh1GUQ-n3aFsSxmTVm0h4Qdb_6nsNO_PsFw,437
26
+ itkdb_gtk-0.15.1.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
27
+ itkdb_gtk-0.15.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5