Skip to content
Snippets Groups Projects
Commit 1cec47cf authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

TMSS-250: add endpoint for target rise and set, and add sky constraint logic that uses it

parent 9f328b4d
No related branches found
No related tags found
1 merge request!291Resolve TMSS-250
...@@ -424,9 +424,7 @@ class TestDailyConstraints(TestCase): ...@@ -424,9 +424,7 @@ class TestDailyConstraints(TestCase):
def test_can_run_within_timewindow_with_daytime_constraint_returns_correct_value(self): def test_can_run_within_timewindow_with_daytime_constraint_returns_correct_value(self):
# todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked # todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked
# remove other constraints: # remove other constraints:
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_distance'] = {} self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {}
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_target_elevation'] = {}
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_calibrator_elevation'] = {}
# set constraint to test # set constraint to test
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['require_day'] = True self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['require_day'] = True
...@@ -560,9 +558,7 @@ class TestDailyConstraints(TestCase): ...@@ -560,9 +558,7 @@ class TestDailyConstraints(TestCase):
def test_can_run_within_timewindow_with_nighttime_constraint_returns_correct_value(self): def test_can_run_within_timewindow_with_nighttime_constraint_returns_correct_value(self):
# todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked # todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked
# remove other constraints: # remove other constraints:
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_distance'] = {} self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {}
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_target_elevation'] = {}
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_calibrator_elevation'] = {}
# set constraint to test # set constraint to test
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['require_night'] = True self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['require_night'] = True
...@@ -694,9 +690,7 @@ class TestDailyConstraints(TestCase): ...@@ -694,9 +690,7 @@ class TestDailyConstraints(TestCase):
def test_can_run_within_timewindow_with_twilight_constraint_returns_correct_value(self): def test_can_run_within_timewindow_with_twilight_constraint_returns_correct_value(self):
# todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked # todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked
# remove other constraints: # remove other constraints:
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_distance'] = {} self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {}
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_target_elevation'] = {}
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_calibrator_elevation'] = {}
# set constraint to test # set constraint to test
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['avoid_twilight'] = True self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['avoid_twilight'] = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment