roc-film 1.14.7__py3-none-any.whl → 1.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.
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.14.7",
10
- "date": "2025-03-21",
9
+ "version": "1.15.1",
10
+ "date": "2025-06-02",
11
11
  "author": "Xavier Bonnin <xavier.bonnin@obspm.fr>, ROC Team <roc.support@sympa.obspm.fr>",
12
- "modification": "Hotfix in db_to_anc_bia_sweep_table.py",
12
+ "modification": "Hotfix in merge_tcreport",
13
13
  "url": "https://gitlab.obspm.fr/ROC/Pipelines/Plugins/FILM"
14
14
  },
15
15
  "tasks": [
@@ -310,12 +310,12 @@ class CdfPostPro(Task):
310
310
 
311
311
  # Build command to run cdfconvert with subprocess.run
312
312
  cmd = list([self.cdfconvert, cdf_file, cdf_file])
313
- # overwrite existing file
313
+ # overwrite the existing file
314
314
  cmd.append("-delete")
315
315
  # Force some CDF features
316
316
  cmd.append("-network")
317
317
  cmd.append("-single")
318
- cmd.append("-compression \"var:'Epoch':none\"")
318
+ cmd.append("-compressnonepoch")
319
319
  cmd.append("-checksum md5")
320
320
  cmd = " ".join(cmd)
321
321
 
@@ -6,6 +6,7 @@
6
6
  import os
7
7
  import shutil
8
8
  import uuid
9
+ from pathlib import Path
9
10
 
10
11
  from poppy.core.logger import logger
11
12
  from poppy.core.task import Task
@@ -50,8 +51,8 @@ class MoveToProdDir(Task):
50
51
  # shall be moved
51
52
  products_dir = get_products_dir(self.pipeline)
52
53
 
53
- # Ignore possible lock file in the output directory
54
- ignore_patterns = ["*.lock"]
54
+ # Ignore possible items in the output directory
55
+ ignore_patterns = []
55
56
 
56
57
  if not products_dir:
57
58
  logger.debug(
@@ -63,6 +64,10 @@ class MoveToProdDir(Task):
63
64
  logger.debug(f"Moving {output_dir} into {products_dir}")
64
65
  if safe_move(output_dir, target_dir, ignore_patterns=ignore_patterns):
65
66
  logger.info(f"{output_dir} moved into {products_dir}")
67
+ # Finally remove any lock file from target_dir
68
+ for current_lock in Path(target_dir).glob("*.lock"):
69
+ current_lock.unlink(missing_ok=True)
70
+ logger.debug(f"{current_lock} deleted")
66
71
 
67
72
  logger.debug(f"Task {self.job_id} completed")
68
73
 
@@ -92,7 +97,7 @@ class MoveFailedFiles(Task):
92
97
  logger.debug(f"Task {self.job_id} is starting")
93
98
  try:
94
99
  self.setup_inputs()
95
- except Exception:
100
+ except Exception: # noqa
96
101
  logger.exception(f"Initializing inputs has failed for {self.job_id}!")
97
102
  self.pipeline.exit()
98
103
  return
@@ -239,7 +239,7 @@ class MergeTcReport(Task):
239
239
  # Make sure that returned output_tcreport_list is a list
240
240
  # (If only one PktTcReportListElement is found in the XML
241
241
  # the xml_to_dict method returns a collections.OrderedDict() instance).
242
- if isinstance(output_tcreport_list, collections.OrderedDict):
242
+ if type(output_tcreport_list) is not list:
243
243
  output_tcreport_list = [output_tcreport_list]
244
244
 
245
245
  # return output as a dictionary of packet execution date keywords
@@ -249,7 +249,7 @@ class MergeTcReport(Task):
249
249
  key = datetime.strptime(
250
250
  current_tcreport["ExecutionTime"], TIME_ISO_STRFORMAT
251
251
  ).date()
252
- except Exception as e:
252
+ except (KeyError, TypeError, ValueError) as e:
253
253
  logger.warning(f"Cannot get ExecutionTime for {current_tcreport}")
254
254
  logger.debug(e)
255
255
  if current_tcreport not in self.failed_tcreport:
roc/film/tests/tests.py CHANGED
@@ -1054,9 +1054,9 @@ class TestFilmFileProd(CommandTestCase):
1054
1054
  dirs_cmp.report()
1055
1055
 
1056
1056
  # ensure that we have the same files in both directories
1057
- assert (len(dirs_cmp.left_only) == 0) and (
1058
- len(dirs_cmp.right_only) == 0
1059
- ), "Different files in expected and generated output directories!"
1057
+ assert (len(dirs_cmp.left_only) == 0) and (len(dirs_cmp.right_only) == 0), (
1058
+ "Different files in expected and generated output directories!"
1059
+ )
1060
1060
 
1061
1061
  for filename in self.get_diff_files(dirs_cmp):
1062
1062
  # compare only cdf files with differences
@@ -1083,9 +1083,9 @@ class TestFilmFileProd(CommandTestCase):
1083
1083
  result = {}
1084
1084
 
1085
1085
  # compare the difference dict with the expected one
1086
- assert (
1087
- result == {}
1088
- ), f"Differences between expected output and the command output: {pformat(result)}"
1086
+ assert result == {}, (
1087
+ f"Differences between expected output and the command output: {pformat(result)}"
1088
+ )
1089
1089
 
1090
1090
  @pytest.mark.parametrize(
1091
1091
  "idb_source,idb_version",
@@ -1185,9 +1185,9 @@ class TestFilmFileProd(CommandTestCase):
1185
1185
  dirs_cmp.report()
1186
1186
 
1187
1187
  # ensure that we have the same files in both directories
1188
- assert (len(dirs_cmp.left_only) == 0) and (
1189
- len(dirs_cmp.right_only) == 0
1190
- ), "Different files in expected and generated output directories!"
1188
+ assert (len(dirs_cmp.left_only) == 0) and (len(dirs_cmp.right_only) == 0), (
1189
+ "Different files in expected and generated output directories!"
1190
+ )
1191
1191
 
1192
1192
  for filename in self.get_diff_files(dirs_cmp):
1193
1193
  # compare only cdf files with differences
@@ -1214,9 +1214,9 @@ class TestFilmFileProd(CommandTestCase):
1214
1214
  result = {}
1215
1215
 
1216
1216
  # compare the difference dict with the expected one
1217
- assert (
1218
- result == {}
1219
- ), f"Differences between expected output and the command output: {pformat(result)}"
1217
+ assert result == {}, (
1218
+ f"Differences between expected output and the command output: {pformat(result)}"
1219
+ )
1220
1220
 
1221
1221
  @pytest.mark.parametrize(
1222
1222
  "idb_source,idb_version",
@@ -1299,9 +1299,9 @@ class TestFilmFileProd(CommandTestCase):
1299
1299
  dirs_cmp.report()
1300
1300
 
1301
1301
  # ensure that we have the same files in both directories
1302
- assert (len(dirs_cmp.left_only) == 0) and (
1303
- len(dirs_cmp.right_only) == 0
1304
- ), "Different files in expected and generated output directories!"
1302
+ assert (len(dirs_cmp.left_only) == 0) and (len(dirs_cmp.right_only) == 0), (
1303
+ "Different files in expected and generated output directories!"
1304
+ )
1305
1305
 
1306
1306
  for filename in self.get_diff_files(dirs_cmp):
1307
1307
  # compare only cdf files with differences
@@ -1328,6 +1328,6 @@ class TestFilmFileProd(CommandTestCase):
1328
1328
  result = {}
1329
1329
 
1330
1330
  # compare the difference dict with the expected one
1331
- assert (
1332
- result == {}
1333
- ), f"Differences between expected output and the command output: {pformat(result)}"
1331
+ assert result == {}, (
1332
+ f"Differences between expected output and the command output: {pformat(result)}"
1333
+ )
@@ -55,6 +55,7 @@ __all__ = [
55
55
  "get_l0_file",
56
56
  "get_l0_files",
57
57
  "get_output_dir",
58
+ "get_products_dir",
58
59
  "get_master_cdf_dir",
59
60
  "is_output_dir",
60
61
  "get_files_datetime",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: roc-film
3
- Version: 1.14.7
3
+ Version: 1.15.1
4
4
  Summary: RPW FILe Maker (FILM): Plugin to make RPW L0, L1 and HK data files
5
5
  License: CECILL-2.1
6
6
  Author: Xavier Bonnin
@@ -3,23 +3,23 @@ roc/film/__init__.py,sha256=XBPsnRsgcUjJnutv_tkgNViw2TqnA5ozO-bNO2HY-mg,143
3
3
  roc/film/commands.py,sha256=xzyARalgWc6mPfN5nUvDtqTzaovP2_Xbi6wCDsS4tVY,37019
4
4
  roc/film/config/__init__.py,sha256=Yh8cG85CwN7OIAndtBs213LZn5NwEjPjFYKpMnagJuc,68
5
5
  roc/film/constants.py,sha256=wDM0-UbKxNvs03uoabi0oHhOHNNNp8oPnBeRMkjXefc,4278
6
- roc/film/descriptor.json,sha256=9PdRwYmNRwEtavMeygopNTJgemW7rRanlNklEjcCp-0,33506
6
+ roc/film/descriptor.json,sha256=Cc580LCZs_aeo9qK0B7DGt09RYlWkZ8F0n6GBE4JrNk,33492
7
7
  roc/film/exceptions.py,sha256=kGWP9VR_DjDdyZYC5gDixtvV7xAv7qEx5srzS4_8TlU,5177
8
8
  roc/film/tasks/__init__.py,sha256=GNuQAi7E9nOApSSUUg4DEKlY0OlOzVaJexFKK0h9A2c,961
9
9
  roc/film/tasks/cat_solo_hk.py,sha256=PX3HkyJCgFHrw_wwa44r_tWcXQ7jCbd6oiZGS8KRXfI,11227
10
- roc/film/tasks/cdf_postpro.py,sha256=55zrk4hVZCWBpIRIlq7s6W8qWAbPzQmmdemqhfN-jI8,25948
10
+ roc/film/tasks/cdf_postpro.py,sha256=2SglpnexkgIarDNXcDCfi7Ypij6yh0fEWnBpFSqNAh8,25936
11
11
  roc/film/tasks/check_dds.py,sha256=pb0YZGu_cqPL2-Vi5aUaXAFJy86R2rOLVVaXnTLArug,3734
12
12
  roc/film/tasks/db_to_anc_bia_sweep_table.py,sha256=2_YYK39E9u5pR57Dkjz4jx6Wkyb2E4jCsep3F0EJ1aw,12789
13
13
  roc/film/tasks/dds_to_l0.py,sha256=nhsBESTlkEqiKAVVKek2oXe5neLFet1nTVsTiGTm1zY,22120
14
14
  roc/film/tasks/export_solo_coord.py,sha256=iuUfyQo3-vkdEdDsp2ZscFxsDVvdZJXxF0K-5IRQitw,5753
15
- roc/film/tasks/file_handler.py,sha256=T_zEVLMFpqCqmNsLQSMqLWQIYlQH3-ZBDgbl7yCJKWc,11121
15
+ roc/film/tasks/file_handler.py,sha256=VtApUrSJu7zBSjJI_nXewGKtEA5B2OJzG4v3dAIDQaM,11391
16
16
  roc/film/tasks/l0_to_hk.py,sha256=bn9hYHmxGJWBuj_uYovkI9lnonQeplsr4_apxkK1YuA,11001
17
17
  roc/film/tasks/l0_to_l1_bia_current.py,sha256=GS6GvukagltY1CUW__b2CX-nBAYjOxxaatfppP5gmVg,2564
18
18
  roc/film/tasks/l0_to_l1_bia_sweep.py,sha256=VYjD_ml2M0K7WA7I4UKsmrm4cvxArYRBazmzuNs7_vs,34980
19
19
  roc/film/tasks/l0_to_l1_sbm.py,sha256=OjgMdCk7ldhs4mTlAxLVER_Cud6ILlBkW88a7P46ZSI,19219
20
20
  roc/film/tasks/l0_to_l1_surv.py,sha256=-n78s2r9aEAGw5U0LRd7NyiwdEehHufg5K4lEY4vR-k,15522
21
21
  roc/film/tasks/make_daily_tm.py,sha256=MX71TVmHOoIq-hD90BY_HCkRBQXXX2hSgbYLVa1e4cg,4453
22
- roc/film/tasks/merge_tcreport.py,sha256=olyc5wOgGqoWlbOJyuM0x_LMvRm5qfR11HPOIZYzplI,9723
22
+ roc/film/tasks/merge_tcreport.py,sha256=Z8SpfC9BRE1k1V7UtWLy9FzbwQl-s0Y69GFaRT7c1zE,9728
23
23
  roc/film/tasks/merge_tmraw.py,sha256=leFLccWuw6ntQH0GwnsLfbISEIy7GftHoMtSdTyASgQ,12343
24
24
  roc/film/tasks/parse_dds_xml.py,sha256=UNhxURLPezdgip4wyPOVxFspMRV6ObNNRuer19H53kI,2114
25
25
  roc/film/tasks/set_l0_utc.py,sha256=6wAfoAsJLwyNrmh7YW0H9YwNps7hN69o20sqwxf1KLg,6054
@@ -35,16 +35,16 @@ roc/film/tests/test_l0_to_l1_bia.py,sha256=z1HIr3l2Aa75WmgfBObwUzyFMm5N34CJ2TiQ_
35
35
  roc/film/tests/test_l0_to_l1_sbm.py,sha256=fWhL9Z0DvJXrGrt7s7rWH7GYb8JvS75hqqMDEC2lbj0,4368
36
36
  roc/film/tests/test_l0_to_l1_surv.py,sha256=1zFIAnZrl-13jzQ3YOOcsiWpyINHZvkcZEI2HIpqda0,5101
37
37
  roc/film/tests/test_metadata.py,sha256=1nl5or5RPMsIgMqtvYz28qdZXVgjYw6olphMm6y8Wew,2508
38
- roc/film/tests/tests.py,sha256=boEPC42mZYQfinYE3jyol-7O34ttU5p_Ei0a_9YUHM4,44273
38
+ roc/film/tests/tests.py,sha256=561F00VR6IhMmp5rIW2gsCHlg3gh4hIsf4NPkN2nlLc,44279
39
39
  roc/film/tools/__init__.py,sha256=dkYmLgy3b_B1T3ZZ6s_rv7NyDjLF0yOJPerjLEKAFlA,303
40
40
  roc/film/tools/dataset_tasks.py,sha256=CI9UIYchLwXfcjJoD8PsaFIcNX8akAsXz4RQ4hqhJeU,2825
41
- roc/film/tools/file_helpers.py,sha256=frCBNdIp9AOYnmVbhk9VE9hkDa1l9IGM7sQuhzjqf_U,31898
41
+ roc/film/tools/file_helpers.py,sha256=x_KxZlQjarSwBmuIGq5OQIrY7ePtCUVuvik-6r3fzzo,31922
42
42
  roc/film/tools/l0.py,sha256=a5xxk3BYxtwOeZp36AoDPtF07VZpXfyKrpIYcC83u6w,46657
43
43
  roc/film/tools/metadata.py,sha256=gYFoo_VinBFoJOVIBwDfSqq0WvYTdDaS3NjEDtYREUM,12409
44
44
  roc/film/tools/skeleton.py,sha256=aTe6VWvy5Y79FuA3aKieTQ91m26PEvJ3MnzC4ZZqMvc,10765
45
45
  roc/film/tools/tools.py,sha256=b273WwDvxdowH9d8BqJX9REI3TpI7lzFsTviO23hzv4,18252
46
46
  roc/film/tools/xlsx2skt.py,sha256=sHmFLGuL1pT1N4V4Nk8i7yoHM2lveXphuvUUN28MvJs,19599
47
- roc_film-1.14.7.dist-info/LICENSE,sha256=TqI0k3vHsKpSR-Q2aQ0euTJIdbx1kOzeUL79OONRkKU,21778
48
- roc_film-1.14.7.dist-info/METADATA,sha256=b8UIsB0__iZsrttzY2Ga9NgD78awDXXnfELwjXGNB8c,1805
49
- roc_film-1.14.7.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
50
- roc_film-1.14.7.dist-info/RECORD,,
47
+ roc_film-1.15.1.dist-info/LICENSE,sha256=TqI0k3vHsKpSR-Q2aQ0euTJIdbx1kOzeUL79OONRkKU,21778
48
+ roc_film-1.15.1.dist-info/METADATA,sha256=xRBvBvDHkh0_tV6C-uhAvow9yBU6Jq_xKk40rWqu1NA,1805
49
+ roc_film-1.15.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
50
+ roc_film-1.15.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any