diff --git a/obztak/scheduler.py b/obztak/scheduler.py index d0c0b9c..c3951d5 100644 --- a/obztak/scheduler.py +++ b/obztak/scheduler.py @@ -145,7 +145,7 @@ def load_completed_fields(self, completed_fields=None): self.completed_fields = self.completed_fields + new_fields return self.completed_fields - def create_tactician(self,mode=None): + def create_tactician(self, mode=None): return tactician_factory(cls=mode,mode=mode) def select_field(self, date, mode=None): diff --git a/obztak/tactician.py b/obztak/tactician.py index 2c1c1fe..2dee267 100644 --- a/obztak/tactician.py +++ b/obztak/tactician.py @@ -18,6 +18,7 @@ from obztak.utils.date import datestring CONDITIONS = odict([ + (None, [0.0, 2.0]), #default ('great', [1.6, 2.0]), ('good', [0.0, 2.0]), ('complete',[0.0, 2.0]), @@ -215,6 +216,7 @@ def select_fields(self): class CoverageTactician(Tactician): name = 'coverage' + mode = None @property def weight(self): diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index 94bd678..5238c4b 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -24,7 +24,8 @@ def test_schedule_field(): check_dict(value,out[index]) def test_schedule_chunk(): - kwargs = dict(utc='2017-02-22T06:00:00',chunk=60,outfile='chunk_test.json',complete='None') + kwargs = dict(utc='2017-02-22T06:00:00',chunk=60,outfile='chunk_test.json', + complete='None',mode='coverage') opts = make_options(kwargs) cmd = 'env OBZTAK_SURVEY="maglites" schedule_chunk %s'%opts call(cmd,shell=True) @@ -37,7 +38,8 @@ def test_schedule_chunk(): check_dict(value,out[index]) def test_schedule_night(): - kwargs = dict(nite='20160211',outfile='night_test/night_test.json',complete='None') + kwargs = dict(nite='20160211',outfile='night_test/night_test.json',complete='None', + mode='coverage') opts = make_options(kwargs) cmd = 'env OBZTAK_SURVEY="maglites" schedule_night %s'%opts call(cmd,shell=True)