Commit 903b3728 authored by Javier Vegas-Regidor's avatar Javier Vegas-Regidor
Browse files

Remove exrex dependency

parent 8d0474d3
......@@ -604,7 +604,6 @@ class ExperimentConfig(object):
def _parse_startdates(self, parser):
startdates = parser.get_list_option("EXPERIMENT", "STARTDATES")
import exrex
self.startdates = []
for startdate_pattern in startdates:
......@@ -614,9 +613,7 @@ class ExperimentConfig(object):
if startdate_pattern[0] == "{" and startdate_pattern[-1] == "}":
self._read_startdates(startdate_pattern[1:-1])
else:
for startdate in exrex.generate(startdate_pattern):
startdate = startdate.strip()
self.startdates.append(startdate)
self.startdates.append(startdate_pattern)
def _parse_members(self):
members = []
......
......@@ -25,7 +25,6 @@ REQUIREMENTS = {
"cfgrib",
"dask[array]",
"diagonals",
"exrex",
"netCDF4",
"nco>=0.0.3",
"numba",
......
......@@ -492,34 +492,6 @@ class TestExperimentConfig(TestCase):
config.parse_ini(self.mock_parser)
self.assertEqual(config.startdates, ["20001101", "20011101"])
self.mock_parser.add_value("EXPERIMENT", "STARTDATES", "200(0|1)1101")
config = ExperimentConfig()
config.parse_ini(self.mock_parser)
self.assertEqual(config.startdates, ["20001101", "20011101"])
self.mock_parser.add_value(
"EXPERIMENT", "STARTDATES", "200[0-2](02|05|08|11)01"
)
config = ExperimentConfig()
config.parse_ini(self.mock_parser)
self.assertEqual(
config.startdates,
[
u"20000201",
u"20000501",
u"20000801",
u"20001101",
u"20010201",
u"20010501",
u"20010801",
u"20011101",
u"20020201",
u"20020501",
u"20020801",
u"20021101",
],
)
def test_auto_startdates(self):
"""
Test parsing startdates using the automatic generation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment