Skip to content

Commit 255aefc

Browse files
authored
FIX: Small Forces File changed naming convention (#277)
The MOC does not have "sff" within the filename, only as the extension, so remove that from the filename matching.
1 parent 3c72410 commit 255aefc

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

imap_data_access/file_validation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,10 +596,9 @@ class SPICEFilePath(ImapFilePath):
596596
r"(imap)_"
597597
r"(?P<start_year_doy>[\d]{4}_[\d]{3})_"
598598
r"(?P<end_year_doy>[\d]{4}_[\d]{3})_"
599-
r"(?P<type>sff)_"
600599
r"([a-zA-Z0-9\-_]+)_"
601600
r"(?P<version>[\d]{2})\."
602-
r"(?P<extension>sff)"
601+
r"(?P<type>sff)"
603602
)
604603

605604
# Covers:

tests/test_file_validation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ def test_spice_file_path():
229229
"DATA_DIR"
230230
] / Path("imap/spice/mk/imap_sdc_metakernel_1000_v000.tm")
231231

232-
thruster_file = SPICEFilePath("imap_2026_267_2026_267_sff_hist_02.sff")
232+
thruster_file = SPICEFilePath("imap_2026_267_2026_267_hist_02.sff")
233233
assert thruster_file.construct_path() == imap_data_access.config["DATA_DIR"] / Path(
234-
"imap/spice/activities/imap_2026_267_2026_267_sff_hist_02.sff"
234+
"imap/spice/activities/imap_2026_267_2026_267_hist_02.sff"
235235
)
236236
assert thruster_file.spice_metadata["type"] == "thruster"
237237

0 commit comments

Comments
 (0)