diff --git a/config.toml b/config.toml index 83d3c19fc227d10bb6d153f12fe18621a0b8e7b9..5b22c5835f42067e1af05b0760d034f39a0f47ab 100644 --- a/config.toml +++ b/config.toml @@ -27,7 +27,7 @@ CREATOR = "Jacques.Grelet@ird.fr" [ctd] # extract profile/station number from fileName -#station = 'fr29(\d{3})' +station = 'fr29(\d{3})' titleSummary = "CTD profiles processed during PIRATA-FR29 cruise" typeInstrument = "SBE911+" instrumentNumber = "09P1263" @@ -165,7 +165,7 @@ comment = "Extract from .edf files" [xbt.header] endHeader = '^Depth\s*\(m\)' - #station = 'Sequence\s*#\s*:\s*(\d*)' + station = 'Sequence\s*#\s*:\s*(\d*)' TIME = 'Time of Launch\s*[:=]\s*(\d+):(\d+):(\d+)' DATE = 'Date of Launch\s*[:=]\s*(\d+)/(\d+)/(\d+)' DATETIME = 'System UpLoad Time\s*=\s*(\w+)\s+(\d+)\s+(\d+)\s+(\d+):(\d+):(\d+)' diff --git a/tests/test_config.py b/tests/test_config.py index 302c1450919072db78ac3bcb3c80ab370651207d..9d1b456377b8e65e88bf806fe3638c07f69b4684 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -38,8 +38,7 @@ class testConfig(unittest.TestCase): 'PI': 'BOURLES', 'CREATOR': 'Jacques.Grelet@ird.fr'} - self.ctd = {'cruisePrefix': 'fr29', - 'stationPrefixLength': 3, + self.ctd = {'station': 'fr29(\d{3})', 'titleSummary': 'CTD profiles processed during PIRATA-FR29 cruise', 'typeInstrument': 'SBE911+', 'instrumentNumber': '09P1263', @@ -58,8 +57,7 @@ class testConfig(unittest.TestCase): 'operator': 'Operator\s*:\s*(.*)', 'type': 'Type\s*:\s*(.*)'} - self.xbt = {'cruisePrefix': "fr29", - 'stationPrefixLength': 3, + self.xbt = {'station': '[CT]\d+_(\d{5})', 'typeInstrument': "SIPPICAN+", 'instrumentNumber': "N/A", 'acquisitionSoftware': "WinMK21", @@ -155,7 +153,7 @@ class testConfig(unittest.TestCase): def test_split_xbt(self): """ Test if all value in block [split.xbt] are correct """ - d = self.cfg['split']['xbt'] + d = self.cfg['xbt']['split'] for k in d.keys(): self.assertEqual(d[k], self.splitXbt[k])