roc-film 1.13.3__py3-none-any.whl → 1.13.5__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.
- roc/film/descriptor.json +4 -4
- roc/film/tasks/dds_to_l0.py +27 -24
- roc/film/tasks/merge_tmraw.py +2 -2
- {roc_film-1.13.3.dist-info → roc_film-1.13.5.dist-info}/METADATA +1 -1
- {roc_film-1.13.3.dist-info → roc_film-1.13.5.dist-info}/RECORD +7 -7
- {roc_film-1.13.3.dist-info → roc_film-1.13.5.dist-info}/WHEEL +1 -1
- {roc_film-1.13.3.dist-info → roc_film-1.13.5.dist-info}/LICENSE +0 -0
roc/film/descriptor.json
CHANGED
@@ -6,10 +6,10 @@
|
|
6
6
|
"description": "RPW FILe Maker (FILM): Plugin to make RPW L0, L1 and HK data files"
|
7
7
|
},
|
8
8
|
"release": {
|
9
|
-
"version": "1.13.
|
10
|
-
"date": "2023-
|
9
|
+
"version": "1.13.5",
|
10
|
+
"date": "2023-09-07",
|
11
11
|
"author": "Xavier Bonnin <xavier.bonnin@obspm.fr>, ROC Team <roc.support@sympa.obspm.fr>",
|
12
|
-
"modification": "
|
12
|
+
"modification": "Hotfix https://gitlab.obspm.fr/ROC/Pipelines/Plugins/FILM/-/issues/40",
|
13
13
|
"url": "https://gitlab.obspm.fr/ROC/Pipelines/Plugins/FILM"
|
14
14
|
},
|
15
15
|
"tasks": [
|
@@ -790,4 +790,4 @@
|
|
790
790
|
}
|
791
791
|
}
|
792
792
|
]
|
793
|
-
}
|
793
|
+
}
|
roc/film/tasks/dds_to_l0.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
# -*- coding: utf-8 -*-
|
3
|
-
|
3
|
+
|
4
4
|
import os
|
5
5
|
from datetime import datetime
|
6
6
|
import uuid
|
@@ -188,7 +188,7 @@ class DdsToL0(Task):
|
|
188
188
|
try:
|
189
189
|
# Initialize task inputs
|
190
190
|
self.setup_inputs()
|
191
|
-
except:
|
191
|
+
except Exception:
|
192
192
|
logger.exception(f'Initializing inputs has failed for task {self.job_id}!')
|
193
193
|
self.pipeline.exit()
|
194
194
|
return
|
@@ -239,7 +239,6 @@ class DdsToL0(Task):
|
|
239
239
|
|
240
240
|
# Initialize some loop variables
|
241
241
|
parent_list = []
|
242
|
-
packet_count = 0
|
243
242
|
|
244
243
|
# Start loop over dds XML file
|
245
244
|
for i, dds_file in enumerate(self.dds_file_list):
|
@@ -247,7 +246,6 @@ class DdsToL0(Task):
|
|
247
246
|
# (Re)initialize loop variables
|
248
247
|
dds_data = None
|
249
248
|
packet_parser = None
|
250
|
-
valid_packet_parser = None
|
251
249
|
|
252
250
|
# Parse input RPW TM/TC DDS format file
|
253
251
|
logger.info(f'Parsing {dds_file}...')
|
@@ -270,7 +268,7 @@ class DdsToL0(Task):
|
|
270
268
|
try:
|
271
269
|
logger.info(f'Extracting {dds_packet_num_list[i]} packets from {dds_file}... [{self.job_id}]')
|
272
270
|
packet_parser = self._parse_packet(dds_data)
|
273
|
-
except:
|
271
|
+
except Exception:
|
274
272
|
logger.exception(f'Parsing current packet list has failed! [{self.job_id}]')
|
275
273
|
continue
|
276
274
|
|
@@ -290,7 +288,7 @@ class DdsToL0(Task):
|
|
290
288
|
logger.error(f'{n_invalid} invalid TM/TC packets found in {dds_file}! [{self.job_id}]')
|
291
289
|
try:
|
292
290
|
self.invalid_to_db(invalid_packets)
|
293
|
-
except:
|
291
|
+
except Exception:
|
294
292
|
logger.exception(f'Invalid packets cannot be inserted in the database! [{self.job_id}]')
|
295
293
|
raise L0ProdFailure
|
296
294
|
|
@@ -310,7 +308,7 @@ class DdsToL0(Task):
|
|
310
308
|
logger.exception('L0ProdFailure')
|
311
309
|
self.failed_files.append(l0_file)
|
312
310
|
break
|
313
|
-
except:
|
311
|
+
except Exception:
|
314
312
|
logger.exception(f'Error when parsing {dds_file}! [{self.job_id}]')
|
315
313
|
self.failed_dds_files.append(dds_file)
|
316
314
|
else:
|
@@ -344,16 +342,13 @@ class DdsToL0(Task):
|
|
344
342
|
|
345
343
|
output_list = []
|
346
344
|
|
347
|
-
dds_data = xml_to_dict(dds_file)['ns2:ResponsePart']
|
348
|
-
['Response']
|
345
|
+
dds_data = xml_to_dict(dds_file)['ns2:ResponsePart']['Response']
|
349
346
|
|
350
347
|
if 'PktRawResponse' in dds_data:
|
351
|
-
dds_data = dds_data['PktRawResponse']
|
352
|
-
['PktRawResponseElement']
|
348
|
+
dds_data = dds_data['PktRawResponse']['PktRawResponseElement']
|
353
349
|
dds_type = 'TM'
|
354
350
|
elif 'PktTcReportResponse' in dds_data:
|
355
|
-
dds_data = dds_data['PktTcReportResponse']
|
356
|
-
['PktTcReportList']['PktTcReportListElement']
|
351
|
+
dds_data = dds_data['PktTcReportResponse']['PktTcReportList']['PktTcReportListElement']
|
357
352
|
dds_type = 'TC'
|
358
353
|
else:
|
359
354
|
logger.warning(f'Invalid input dds file {dds_file}')
|
@@ -362,7 +357,7 @@ class DdsToL0(Task):
|
|
362
357
|
# Make sure that returned dds_data is a list
|
363
358
|
# (If only one XML element is found in the file
|
364
359
|
# the xml_to_dict method returns a collections.OrderedDict() instance).
|
365
|
-
if isinstance(dds_data,
|
360
|
+
if not isinstance(dds_data, list):
|
366
361
|
dds_data = [dds_data]
|
367
362
|
|
368
363
|
output_list = [self._build_packet_dict(current_packet, dds_type)
|
@@ -390,28 +385,36 @@ class DdsToL0(Task):
|
|
390
385
|
|
391
386
|
file_type = dds_file_type.upper()
|
392
387
|
|
388
|
+
if not isinstance(packet, dict):
|
389
|
+
logger.error(f'Problem with packet: {packet}')
|
390
|
+
return {}
|
391
|
+
|
393
392
|
if file_type == 'TC':
|
394
393
|
|
395
394
|
# Get packet SRDB id
|
396
395
|
srdb_id = packet.get('CommandName', None)
|
396
|
+
if srdb_id is None:
|
397
|
+
logger.error('CommandName not defined!')
|
398
|
+
return {}
|
397
399
|
|
398
400
|
# Get corresponding PALISADE ID
|
399
|
-
|
401
|
+
try:
|
400
402
|
palisade_id = self.palisade_metadata[srdb_id]['palisade_id']
|
401
|
-
|
402
|
-
palisade_id
|
403
|
+
except Exception:
|
404
|
+
logger.error(f'palisade_id not found for {srdb_id}')
|
405
|
+
return {}
|
403
406
|
|
404
407
|
# Get corresponding packet category
|
405
|
-
|
406
|
-
packet_category = self.palisade_metadata[
|
407
|
-
|
408
|
-
|
409
|
-
|
408
|
+
try:
|
409
|
+
packet_category = self.palisade_metadata[srdb_id]['packet_category']
|
410
|
+
except Exception:
|
411
|
+
logger.error(f'packet_category not found for {srdb_id}')
|
412
|
+
return {}
|
410
413
|
|
411
414
|
try:
|
412
415
|
utc_time = datetime.strptime(packet.get(
|
413
416
|
'ExecutionTime'), TIME_ISO_STRFORMAT)
|
414
|
-
except:
|
417
|
+
except Exception:
|
415
418
|
utc_time = INVALID_UTC_DATETIME
|
416
419
|
|
417
420
|
# Get ack execution completion status
|
@@ -434,7 +437,7 @@ class DdsToL0(Task):
|
|
434
437
|
if field['FieldName'] == 'uniqueID':
|
435
438
|
unique_id = packet['CustomField'][i]['Value']
|
436
439
|
break
|
437
|
-
except:
|
440
|
+
except Exception:
|
438
441
|
unique_id = 'UNKNOWN'
|
439
442
|
|
440
443
|
# Only keep "PASSED" and "FAILED" exe status in L0
|
roc/film/tasks/merge_tmraw.py
CHANGED
@@ -292,7 +292,7 @@ class MergeTmRaw(Task):
|
|
292
292
|
# Make sure that returned output_tmraw_list is a list
|
293
293
|
# (If only one Packet element is found in the XML
|
294
294
|
# the xml_to_dict method returns a collections.OrderedDict() instance).
|
295
|
-
if isinstance(output_packet_list,
|
295
|
+
if not isinstance(output_packet_list, list):
|
296
296
|
output_packet_list = [output_packet_list]
|
297
297
|
|
298
298
|
# Add packet date and time to output list
|
@@ -302,7 +302,7 @@ class MergeTmRaw(Task):
|
|
302
302
|
|
303
303
|
output_packet_list = list(set([
|
304
304
|
self._get_packet_time(current_packet['Packet'],
|
305
|
-
|
305
|
+
scos_header=scos_header)
|
306
306
|
for current_packet in output_packet_list
|
307
307
|
]))
|
308
308
|
|
@@ -3,13 +3,13 @@ roc/film/__init__.py,sha256=jUW739rZC4yDLTfWhspDjrNBYdPUhBvI8fjS_fLYls8,114
|
|
3
3
|
roc/film/commands.py,sha256=zG40YQKNrXR64ggOKTXUHyiV2zfaAg0WS01CDZU-IPc,36766
|
4
4
|
roc/film/config/__init__.py,sha256=GGK4JAwslXPWoB6cqM9L9MdH06Oadq09WyKHTY-Poaw,69
|
5
5
|
roc/film/constants.py,sha256=oF-DhusBcMaDjJ5mrp_Jb4AG1JH_ivQng5VlbmuDRHE,3545
|
6
|
-
roc/film/descriptor.json,sha256=
|
6
|
+
roc/film/descriptor.json,sha256=2vi9405cs6d3le0flsMYUqi8augWECZhRRCFho6_oZw,29965
|
7
7
|
roc/film/exceptions.py,sha256=HJ0Mwf1aFv6ZqlL46kl_Mcw4SAbh34idJAN5KeXM6Js,5267
|
8
8
|
roc/film/tasks/__init__.py,sha256=2gjcefCsrXrkp_Rb216h8nj0AsFVF_56qg51WR2vp34,737
|
9
9
|
roc/film/tasks/cat_solo_hk.py,sha256=HSxn14LLVVgd54zzCRrGnAAZ4HU-h3CFMnoxrgr6YvA,11328
|
10
10
|
roc/film/tasks/cdf_postpro.py,sha256=aoP6q9acyl8IOtC-j1ngG-DlysuZ4FTn1E6PLxli5-g,29343
|
11
11
|
roc/film/tasks/check_dds.py,sha256=zKvHF2q73BP7xLhhUnTgJpSLi197smrV8L2_h_nlbwo,3953
|
12
|
-
roc/film/tasks/dds_to_l0.py,sha256=
|
12
|
+
roc/film/tasks/dds_to_l0.py,sha256=hdf5FkbrjDyyd2LKtiapojUZNr83zK6K3AxWiC6rA_I,21880
|
13
13
|
roc/film/tasks/file_handler.py,sha256=-j4k-AScStO0-leNPRQ1mt40g1EU_7nHeKVfD_n9TFI,9018
|
14
14
|
roc/film/tasks/l0_to_anc_bia_sweep_table.py,sha256=FmcOSmz7pJF5Ml7O9TY9F6x-agYs4cWLb0DpMsOx4Tg,14015
|
15
15
|
roc/film/tasks/l0_to_hk.py,sha256=AIpcFhoWWehTwmOzuRO8Q-_ldlXwWFWr1dGOThwLjRU,10853
|
@@ -19,7 +19,7 @@ roc/film/tasks/l0_to_l1_sbm.py,sha256=riQpWlgV7s4na1JbPRcE3earUyiZkEA6jV0EzWU8RN
|
|
19
19
|
roc/film/tasks/l0_to_l1_surv.py,sha256=n0h5Mizo5mzYWW6Q1AdmMrF8TiOq9t2Glin9ai4ANeM,13886
|
20
20
|
roc/film/tasks/make_daily_tm.py,sha256=tLeNnvCVkB7DqU2_Sw6J8qetofVufBPu860Z0MOhOI8,4407
|
21
21
|
roc/film/tasks/merge_tcreport.py,sha256=4O14qqkSAQZRP0jCjgyGzovgWQr87cxoJEVAA189j8E,9770
|
22
|
-
roc/film/tasks/merge_tmraw.py,sha256=
|
22
|
+
roc/film/tasks/merge_tmraw.py,sha256=wBYaGTFmz-U-nOtNnIWbOdijx6ZrquNFAZrFXb4723w,12335
|
23
23
|
roc/film/tasks/parse_dds_xml.py,sha256=KWNC_bxzABdiz9V_TpNXm8_ktCicN8W-Ec2EZW1NN8s,2106
|
24
24
|
roc/film/tasks/set_l0_utc.py,sha256=kcZAM58FseL-IHTEpqckxlrY9FDXsJ3ccYBzCPrwxCQ,6147
|
25
25
|
roc/film/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -42,7 +42,7 @@ roc/film/tools/metadata.py,sha256=3NoW2gNID7_K8RSqIf8pMtDMLBUU-88r9miwrxJqN_4,12
|
|
42
42
|
roc/film/tools/skeleton.py,sha256=T4JN6W7GXhycHpqLmKE5gGlZm_vNwuTYMCV4HS3ik2k,10921
|
43
43
|
roc/film/tools/tools.py,sha256=FMBmgk_IF4obJPBBXb_eGdWMVajW7hw7x0XHiBhyZJ4,18132
|
44
44
|
roc/film/tools/xlsx2skt.py,sha256=LJcVDtEuGY55RvtKm92AZb8vV2fpugaXU3Ae-LP1uRU,19691
|
45
|
-
roc_film-1.13.
|
46
|
-
roc_film-1.13.
|
47
|
-
roc_film-1.13.
|
48
|
-
roc_film-1.13.
|
45
|
+
roc_film-1.13.5.dist-info/LICENSE,sha256=dukgTUfTdh4BFRSdIM5OWE6H4wfVR6m7A4wbLEilMTk,21863
|
46
|
+
roc_film-1.13.5.dist-info/METADATA,sha256=4bOMoQZnqqaCWOnM-F6E0LH3y4Q9g6Z21FHS3TjFJRA,3978
|
47
|
+
roc_film-1.13.5.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
48
|
+
roc_film-1.13.5.dist-info/RECORD,,
|
File without changes
|