itkdb-gtk 0.0.12__py3-none-any.whl → 0.0.16__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
- Name: itkdb-gtk
3
- Version: 0.0.12
2
+ Name: itkdb_gtk
3
+ Version: 0.0.16
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,9 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Operating System :: OS Independent
10
10
  Requires-Python: >=3.7
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: itkdb (>=0.4.0)
12
+ Requires-Dist: itkdb >=0.4.0
13
+ Requires-Dist: numpy
14
+ Requires-Dist: matplotlib
13
15
  Requires-Dist: openpyxl
14
16
  Requires-Dist: pyserial
15
17
  Requires-Dist: python-dateutil
@@ -41,29 +43,32 @@ Reads the AVS Production Sheet and FAT reports. With this information it creates
41
43
  the petal core in the DB, if not yet there, make the assembly of the components,
42
44
  and uploadas the test runs made at AVS.
43
45
 
44
- ## uploadTest.py
46
+ ## UploadTest.py
45
47
  A GUI to upload the JSON files corresponding to a test and, also, to add
46
48
  attachmetns.
47
49
 
48
- ## uploadMultipleTests.py
50
+ ## UploadMultipleTests.py
49
51
  This will allow to select various test files, or even scan a whole directory to
50
52
  find them, and assign comments, defects or attachments to each of the tests found.
51
53
 
52
- ## getShipments.py
54
+ ## GetShipments.py
53
55
  Find all shipments to be received at a given site and list them. It handles a
54
56
  barcode reader that helps identifying the items actually received for the
55
57
  reception. It will finally make the DB aware of the items receptioned.
56
58
 
57
- ## sendShipments.py
59
+ ## SendShipments.py
58
60
  Create a new shipment. Allows to add items with the QR reader as well as from a
59
61
  GUI dialog. One can add comments and attachments to the shipment.
60
62
 
61
- ## groundingTest.py
62
- Allows to enter valueos, comments and defects for those ot items in the gounding
63
+ ## GroundVITests.py
64
+ Allows to upload and enter valueos, comments and defects for those items in the gounding
63
65
  and visual instpections tests of the petal core.
64
66
 
67
+ ## UploadModuleIV.py
68
+ The idea behind this is that we messure the IV on a Ring module and on only one of the to Half modules. The IV of the remaining half modules is derived from the other 2. Eventually the IV test can be uploaded to the DB.
69
+
65
70
  ## dashBoard.py
66
71
  This is an launcher application from which we can start most of the other
67
72
  applications. It is a very good starting point. There is a Gnome desktop file (ITkDB.desktop)
68
- that needs to be copied to $HOME/.local/share/applications and an icon (ITkDB.svg) that
69
- needs to go to $HOME/.local/share/icons
73
+ that needs to be copied to `$HOME/.local/share/applications` and an icon (ITkDB.svg) that
74
+ needs to go to `$HOME/.local/share/icons`
@@ -0,0 +1,27 @@
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=hI-LK_WWFCoUI8AQTEfrjoHYdYCbOru9DuBUA-R2id4,19730
14
+ itkdb_gtk/UploadPetalInformation.py,sha256=IsZGa_i6jW8lEUnJOhPFmq-GCemLg_nhlHuQlJQMbjc,22210
15
+ itkdb_gtk/UploadTest.py,sha256=AwMHwuS2PzyuOGsinyoFcuHZ2m_ZsNktHudp2667_Q4,13590
16
+ itkdb_gtk/WireBondGui.py,sha256=v9oWHIBCU2tbnje2T_3fystPNlks366Dk269pmX9dds,25747
17
+ itkdb_gtk/__init__.py,sha256=DbbL2BMyl4cinO7yfMgqBn8wjCbJ4-umUHMXp-ATgKQ,957
18
+ itkdb_gtk/dashBoard.py,sha256=mguE5QXvCwD4wZgHx5PViRHrY3mgoJh4ijiyz1P2DfA,5760
19
+ itkdb_gtk/dbGtkUtils.py,sha256=xVqRgtg7F7tua41iqHVLFCjgqo4lRVaDD063409i8q0,25120
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.16.dist-info/METADATA,sha256=kBkineZ5VGTN5zpcav_J9yuT06Y-nyDTFslpOWHj8-A,3123
24
+ itkdb_gtk-0.0.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
25
+ itkdb_gtk-0.0.16.dist-info/entry_points.txt,sha256=FuSmtQZK5jEzNomHiJqdFZAJZoRueejwoWMg53aZSu0,371
26
+ itkdb_gtk-0.0.16.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
27
+ itkdb_gtk-0.0.16.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.40.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +1,10 @@
1
1
  [gui_scripts]
2
2
  getShipments = itkdb_gtk:getShipments
3
3
  glueWeight = itkdb_gtk:glueWeight
4
- grougndVITests = itkdb_gtk:gndVITests
4
+ groundVITests = itkdb_gtk:groundVITests
5
5
  itkdb_dashBoard = itkdb_gtk:dash_board
6
6
  sendShipments = itkdb_gtk:sendShipments
7
+ uploadModuleIV = itkdb_gtk:uploadModuleIV
7
8
  uploadMultipleTests = itkdb_gtk:uploadMultipleTests
8
9
  uploadTest = itkdb_gtk:uploadTest
10
+ wirebondTest = itkdb_gtk:wirebondTest
@@ -1,151 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Check children of DB component."""
3
-
4
- try:
5
- import readAVSdata
6
- import ITkDBlogin
7
- import ITkDButils
8
-
9
- from dbGtkUtils import replace_in_container, DictDialog, ask_for_confirmation
10
-
11
- except ModuleNotFoundError:
12
- from itkdb_gtk import readAVSdata, ITkDBlogin, ITkDButils
13
- from itkdb_gtk.dbGtkUtils import replace_in_container, DictDialog, ask_for_confirmation
14
-
15
- import json
16
-
17
-
18
- def ascii_complain(main_msg, secondary_msg=None):
19
- """Prints an error message
20
-
21
- Args:
22
- -----
23
- main (): Main message
24
- secondary (): Seconday message
25
- """
26
- print("**Error\n{}".format(main_msg))
27
- if secondary_msg:
28
- msg = secondary_msg.replace("\n", "\n\t")
29
- print("\t{}".format(msg))
30
-
31
-
32
- def find_petal(session, SN, silent=False):
33
- """Finds petal with given SN."""
34
- try:
35
- petal_core = ITkDButils.get_DB_component(session, SN)
36
-
37
- except Exception as E:
38
- if not silent:
39
- ascii_complain("Could not find Petal Core in DB", str(E))
40
-
41
- petal_core = None
42
- return
43
-
44
- try:
45
- if petal_core["type"]["code"] != "CORE_AVS":
46
- ascii_complain("Wrong component type", "This is not an AVS petal core")
47
-
48
- # print(json.dumps(petal_core, indent=3))
49
-
50
- except KeyError:
51
- # Petal is not there
52
- petal_core = None
53
-
54
- return petal_core
55
-
56
-
57
- def get_type(child):
58
- """Return object type
59
-
60
- Args:
61
- -----
62
- child (): object
63
-
64
- Returns
65
- -------
66
- str: object type
67
-
68
- """
69
- if child["type"] is not None:
70
- ctype = child["type"]["code"]
71
- else:
72
- ctype = child["componentType"]["code"]
73
-
74
- return ctype
75
-
76
-
77
- def main():
78
- """Main entry point."""
79
- # ITk_PB authentication
80
- dlg = ITkDBlogin.ITkDBlogin()
81
- session = dlg.get_client()
82
-
83
- final_stage = {
84
- "BT_PETAL_FRONT": "COMPLETED",
85
- "BT_PETAL_BACK": "COMPLETED",
86
- "COOLING_LOOP_PETAL": "CLINCORE",
87
- "THERMALFOAMSET_PETAL": "IN_CORE"
88
- }
89
-
90
- # find all cores
91
- # Now all the objects
92
- payload = {
93
- "componentType": ["BT"],
94
- "componentType": ["CORE_PETAL"],
95
- "type": ["CORE_AVS"],
96
- }
97
- core_list = session.get("listComponents", json=payload)
98
-
99
- for obj in core_list:
100
- SN = obj["serialNumber"]
101
- id = obj['alternativeIdentifier']
102
- if "PPB" not in id:
103
- continue
104
-
105
- core = find_petal(session, SN)
106
- if core is None:
107
- print("SN: not a petal core.")
108
- continue
109
-
110
- location = core["currentLocation"]['code']
111
- stage = core["currentStage"]['code']
112
- if stage != "AT_QC_SITE":
113
- rc = ITkDButils.set_object_stage(session, SN, "AT_QC_SITE")
114
- if rc is not None:
115
- print("problems setting stage")
116
-
117
- if "children" not in core:
118
- ascii_complain("{}[{}]".format(SN, id), "Not assembled")
119
- continue
120
-
121
- print("Petal {} [{}] - {}. {}".format(SN, id, stage, location))
122
- clist = []
123
- for child in core["children"]:
124
- cstage = "Missing"
125
- if child["component"] is None:
126
- ctype = get_type(child)
127
- clist.append((ctype, cstage, None, None))
128
-
129
- else:
130
- SN = child["component"]["serialNumber"]
131
- ctype = get_type(child)
132
- cobj = ITkDButils.get_DB_component(session, SN)
133
- cstage = cobj["currentStage"]['code']
134
- if cstage != final_stage[ctype]:
135
- rc = ITkDButils.set_object_stage(session, SN, final_stage[ctype])
136
- if rc is not None:
137
- cstage = final_stage[ctype]
138
-
139
- clocation = cobj["currentLocation"]['code']
140
- clist.append((ctype, cstage, SN, clocation))
141
-
142
- for item in clist:
143
- print("\t{} [{}] - {} at {}".format(item[2], item[0], item[1], item[3]))
144
-
145
- print()
146
-
147
- dlg.die()
148
-
149
-
150
- if __name__ == "__main__":
151
- main()
itkdb_gtk/checkJSon.py DELETED
@@ -1,56 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Check tha a given JSon is valid."""
3
- from pathlib import Path
4
- import json
5
-
6
- try:
7
- import ITkDBlogin
8
- import ITkDButils
9
- except ModuleNotFoundError:
10
- from itkdb_gtk import ITkDBlogin, ITkDButils
11
-
12
-
13
- def checkJSOn(session, ifile):
14
- """Check teh validity of a JSon test file
15
-
16
- Args:
17
- fname (): File or data.
18
- """
19
- fnam = Path(ifile).expanduser().resolve()
20
- with open(fnam, 'r') as fin:
21
- user_file = json.load(fin)
22
-
23
- test_type = user_file["testType"]
24
- component = ITkDButils.get_DB_component(session, user_file["component"])
25
-
26
- skeleton = ITkDButils.get_test_skeleton(session,
27
- component["componentType"]["code"],
28
- test_type)
29
-
30
- for key in skeleton.keys():
31
- if key in ["comments", "defects"]:
32
- continue
33
-
34
- if key not in user_file:
35
- print("Missing key {}".format(key))
36
- if key == "institution":
37
- sites = session.get("listInstitutions", json={})
38
- print(sites)
39
-
40
-
41
- if __name__ == "__main__":
42
- import sys
43
- dlg = ITkDBlogin.ITkDBlogin()
44
- client = dlg.get_client()
45
- if client is None:
46
- print("Could not connect to DB with provided credentials.")
47
- dlg.die()
48
- sys.exit()
49
-
50
- try:
51
- checkJSOn(client, sys.argv[1])
52
-
53
- except Exception as ex:
54
- print(ex)
55
-
56
- dlg.die()
@@ -1,26 +0,0 @@
1
- itkdb_gtk/GlueWeight.py,sha256=1Ssu6m_KL1PAHHI76yn9bnqSLSqxbc--S-DtV2V1L4g,12294
2
- itkdb_gtk/ITkDB.desktop,sha256=v_K4mHsDxb912J1XGo6mOlbW2TkHvYNGrKmiOnsBQqM,172
3
- itkdb_gtk/ITkDB.svg,sha256=Rb1DyhhGj504-h3vi-H6BF_Gm-OUciIXWOmzZbjGns4,23991
4
- itkdb_gtk/ITkDBlogin.py,sha256=NgDoBoo8Le3Gfoo-w1casKs0mCD4fibZ7NG3esEBiQM,9902
5
- itkdb_gtk/ITkDButils.py,sha256=7FPUiUhunWUprpHhrD1uD2zAAD15ZYJhH_Tu-jNw30U,14850
6
- itkdb_gtk/ShowAttachments.py,sha256=yHa3W1_KtDEGBEcLjGsCONKDP0ntDJNggi3T1bc48Yg,4693
7
- itkdb_gtk/ShowComments.py,sha256=Poyx3bljWEMwhB2FDvBVMSRPcqv9aowlDtbbcs8JgYw,2989
8
- itkdb_gtk/ShowDefects.py,sha256=hnXZKfGshoTBJindbjrNgO6kKpVXwKO8Cu6Txn4cCXE,3329
9
- itkdb_gtk/__init__.py,sha256=Z1pERIIm95T9Df-IoSBMMHSrBvN--sZzVtIxOUIjBbM,686
10
- itkdb_gtk/checkComponent.py,sha256=bB6xvCDoLWXUT9eFDoI6tg_yQbKnzxtYRCYOA5IgSyM,3979
11
- itkdb_gtk/checkJSon.py,sha256=AqPy7Pq5kgZgnHMPa0fgM39RERHuI4uIlZ8qNRUaoFc,1432
12
- itkdb_gtk/dashBoard.py,sha256=PrF8F-7wiCVU-fquKcCqaTi4MX5g7-tHm__yo-oauNk,4412
13
- itkdb_gtk/dbGtkUtils.py,sha256=_93BlN5iy0YJG47FqeGXJQsQHN8DgvkJDVMoh_4cE_4,20713
14
- itkdb_gtk/getShipments.py,sha256=6xNTFAQ1Xon8M20U5BSRJkRc4P7vfNuG4liktoMTaa0,18718
15
- itkdb_gtk/gndVITests.py,sha256=nvTqj35hxypYWDF4sllwxgkQ9QEqqfqKBtxkjf4CMPA,8046
16
- itkdb_gtk/readAVSdata.py,sha256=VCoCece2tuhbd7yfaCCTXuRbGEFUUV2gCcJozQYhPRE,19379
17
- itkdb_gtk/readGoogleSheet.py,sha256=cQ_pVsS_nwUh0bnXl7AP4in9kQ3Q-p8BIvXvvrTRInc,2679
18
- itkdb_gtk/sendShipments.py,sha256=yaKQ30fMG7bt3Zk7Rkgmla04nqfboA8zg3a-rleG9-g,13133
19
- itkdb_gtk/uploadMultipleTests.py,sha256=anbn9_2AGmgfcNZozIowEvpBG---K36Kihx_M2j4J50,19892
20
- itkdb_gtk/uploadPetalInformation.py,sha256=zXcZEvDj9jzOUSUzzvyLoHvQURSCQ01C5gidHZb4ZP0,22252
21
- itkdb_gtk/uploadTest.py,sha256=O6PynyN8jNIo7YCB-TKpN8qfh7pcqE6lPA06CAMFtvY,12154
22
- itkdb_gtk-0.0.12.dist-info/METADATA,sha256=svtSC25f0fif_Lfql9gHsTJg5w2DaO_gKOi9Q05SZZs,2824
23
- itkdb_gtk-0.0.12.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
24
- itkdb_gtk-0.0.12.dist-info/entry_points.txt,sha256=BKe3-TsAnWjLgCJE8c_knkWcWHMFxyKCxheoPbkEtuk,289
25
- itkdb_gtk-0.0.12.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
26
- itkdb_gtk-0.0.12.dist-info/RECORD,,