itkdb-gtk 0.14.4__py3-none-any.whl → 0.15.0__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 +32 -6
- itkdb_gtk/__init__.py +1 -1
- {itkdb_gtk-0.14.4.dist-info → itkdb_gtk-0.15.0.dist-info}/METADATA +1 -1
- {itkdb_gtk-0.14.4.dist-info → itkdb_gtk-0.15.0.dist-info}/RECORD +7 -7
- {itkdb_gtk-0.14.4.dist-info → itkdb_gtk-0.15.0.dist-info}/WHEEL +1 -1
- {itkdb_gtk-0.14.4.dist-info → itkdb_gtk-0.15.0.dist-info}/entry_points.txt +0 -0
- {itkdb_gtk-0.14.4.dist-info → itkdb_gtk-0.15.0.dist-info}/top_level.txt +0 -0
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
|
-
|
|
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": {'
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
|
itkdb_gtk/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: itkdb_gtk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
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,7 +4,7 @@ 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=
|
|
7
|
+
itkdb_gtk/ITkDButils.py,sha256=7naTbz_nBjUniKzATm0MdfBdlXziilv_iU9nWUTeTRE,21444
|
|
8
8
|
itkdb_gtk/PanelVisualInspection.py,sha256=ktAcYbdLBS7Zbxq9XsxB_AWTgAfFLa42NFTEsxnBn98,20531
|
|
9
9
|
itkdb_gtk/SensorUtils.py,sha256=fYWF9TeutAbore53dLWNlZnVn9P3OsKYcFLNGOs8cnI,15426
|
|
10
10
|
itkdb_gtk/ShowAttachments.py,sha256=KExxPCdbcb04XS8JSUkg5xF1McvlB8e9btwctDCKNXU,8498
|
|
@@ -15,13 +15,13 @@ itkdb_gtk/UploadMultipleTests.py,sha256=ZT5aStkBL62_VUj41dGKN0eN95cGizYS_CLOEEFR
|
|
|
15
15
|
itkdb_gtk/UploadTest.py,sha256=ukgJ5-IG12bqa1QIp3bXIV8hkdXCv5UDxh1lQswN_ko,16832
|
|
16
16
|
itkdb_gtk/VisualInspection.py,sha256=W1DNgJH6uiTWqt2pSlrEPD98EOgrx5mu2s1PJF2yHiY,9900
|
|
17
17
|
itkdb_gtk/WireBondGui.py,sha256=WFTLOw4l5JxSbvh4vZMxcF65fqlwvNw0fOyEru9ijqQ,39850
|
|
18
|
-
itkdb_gtk/__init__.py,sha256=
|
|
18
|
+
itkdb_gtk/__init__.py,sha256=pvjAVSF-ZDPPiJxQEnbLpbcqcsx0s1dKx-0tAVaUg0k,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.
|
|
24
|
-
itkdb_gtk-0.
|
|
25
|
-
itkdb_gtk-0.
|
|
26
|
-
itkdb_gtk-0.
|
|
27
|
-
itkdb_gtk-0.
|
|
23
|
+
itkdb_gtk-0.15.0.dist-info/METADATA,sha256=1hajTF5Cb5v3FTPFKSYeDkBX-kConiREEt__4GupflY,3149
|
|
24
|
+
itkdb_gtk-0.15.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
itkdb_gtk-0.15.0.dist-info/entry_points.txt,sha256=pKg7qpsrZh1GUQ-n3aFsSxmTVm0h4Qdb_6nsNO_PsFw,437
|
|
26
|
+
itkdb_gtk-0.15.0.dist-info/top_level.txt,sha256=KVRrH4OS8ovzNR9bvADE0ABn5bNpSk987tuH0jCfkbU,10
|
|
27
|
+
itkdb_gtk-0.15.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|