-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use single date for agasc1p8 promotion #333
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -841,14 +841,14 @@ def test_get_starcats_each_year(year): | |
assert np.all(starcat["id"][ok] != -999) | ||
|
||
|
||
def test_get_starcat_agasc1p8_then_1p7(): | ||
def test_get_starcat_only_agasc1p7(): | ||
""" | ||
For obsid 2576, try AGASC 1.8 then fall back to 1.7 and show successful star | ||
For obsids 3829 and 2576, try AGASC 1.7 only and show successful star | ||
identification. | ||
""" | ||
with ( | ||
conf.set_temp("cache_starcats", False), | ||
conf.set_temp("date_start_agasc1p8_earliest", "1994:001"), | ||
conf.set_temp("date_start_agasc1p8", "2003:001"), | ||
): | ||
starcat = get_starcats( | ||
"2002:365:18:00:00", "2002:365:19:00:00", scenario="flight" | ||
|
@@ -865,10 +865,9 @@ def test_get_starcat_only_agasc1p8(): | |
""" | ||
with ( | ||
conf.set_temp("cache_starcats", False), | ||
conf.set_temp("date_start_agasc1p8_earliest", "1994:001"), | ||
conf.set_temp("date_start_agasc1p8_latest", "1994:002"), | ||
conf.set_temp("date_start_agasc1p8", "1994:001"), | ||
): | ||
# Force AGASC 1.7 and show that star identification fails | ||
# Force AGASC 1.8 and show that star identification fails | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since we are going back and forth with this test, @taldcroft, did you see this change in the comment? Just making sure I did not change it wrongly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I saw this and agreed. |
||
with ska_helpers.utils.set_log_level(kadi.logger, "CRITICAL"): | ||
starcats = get_starcats( | ||
"2002:365:16:00:00", "2002:365:19:00:00", scenario="flight" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the utility in moving the date start for agasc1p8 for this test anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test just verifies that the change took place. In other words: by setting an early date, the test will use 1p8, when in reality it used 1p7, and the test will fail.
We can rewrite the test and make it better, but somewhere we still need to check that the switch works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding "This test just verifies that the change took place." I don't see how the config set_temp to date_start_agasc1p8 for this test does that. I think, functionally, that is happening in
the other test, test_get_starcat_only_agasc1p8 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeanconn - since the requested time frame in the line below is just before
2003:001
, that means this is explicitly using AGASC 1.7 (as the test name implies).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but since the requested time frame is also before the standard config time for 1.8, the explicit set_temp doesn't show us anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shows us that the code is not doing something silly like adding one day before comparing to the transition time. This is similar to other testing we've done of using a value that is purposely close to a limit.
Yes, not the strongest test in the world but the code is correctly testing both cases (before and after the limit). I think it is all good!