Skip to content

Commit 7bd3963

Browse files
authored
Bump scheduler version, match add cal_targets keys (#28)
* bump scheduler version, match add cal_targets keys * remove order from sorted cal_target dict
1 parent da45d52 commit 7bd3963

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ python-dotenv
88
requests
99
socs
1010
sorunlib
11-
git+https://github.com/simonsobs/scheduler.git@d10137a5326cc48822212ae118fdb75bcf9d34ef
11+
git+https://github.com/simonsobs/scheduler.git@b603ec94acaa9893fdab7319ddec87e4b5552f51

src/scheduler_server/handler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def rest_handler(t0, t1, policy_config={}):
8080
config = {"schedule": config}
8181

8282
# add cal targets from linked table
83-
cal_keys = ['boresight', 'elevation', 'focus', 'allow_partial', 'az_speed', 'az_accel', 'order']
83+
cal_keys = ['boresight', 'elevation', 'focus', 'allow_partial', 'drift',
84+
'az_branch', 'az_speed', 'az_accel', 'source_direction', 'order']
8485
# don't overwrite any cal targets passed in the config
8586
if 'cal_targets' not in config:
8687
config['cal_targets'] = []
@@ -99,6 +100,8 @@ def rest_handler(t0, t1, policy_config={}):
99100
cal_targets.append(cal_target)
100101
# sort based on order
101102
cal_targets_sorted = sorted(cal_targets, key=lambda x: x["order"])
103+
# remove order
104+
cal_targets_sorted = [{k: v for k, v in item.items() if k != "order"} for item in cal_targets_sorted]
102105
# add into config
103106
config['cal_targets'] = config['cal_targets'] + cal_targets_sorted
104107
logger.info(f"Best plan cal targets: {config['cal_targets']}")

0 commit comments

Comments
 (0)