-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove timelines / cmd_states.db3 from mica #279
Conversation
@jeanconn - I think I have addressed the comments. In addition I ran the unit tests on |
Also somewhat fundamentally, the obsid from kadi observations does not match starcheck obsids for the vehicle-only portions of schedules. I added a helper function to just make it work, but this is slower and uglier still. But since you started this as very much an incremental patch to mica to strip out timelines, maybe it makes sense. So let me know what you think makes sense for c052566 |
It might make more sense to use the kadi observations more directly as a time -> products mapping and avoid the double lookups. |
@jeanconn - I think the new function is good now and well-tested so let's go with that. From my perspective this PR is good to go so you just need to finish the review. |
)["obsid"] | ||
result = starcheck_db.fetchone( | ||
"SELECT starcheck_obs.obsid FROM starcheck_obs " | ||
"INNER JOIN starcheck_id " |
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.
Hah. I thought you never wanted to see (real / functional) sql in our code again @taldcroft or I'd have done this.
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.
Well if we're using SQL then it might as well be as efficient as possible. In truth for this particular application the SQL database is not a bad solution, especially if you really want every catalog including planned-never-approved-or-run ones.
If we were doing this today we might think about a shelf of Python dicts (with all the info) keyed by the MP_STARCAT date and maybe MP dir.
This works on flight.
|
I suppose technically I should have said that "doesn't throw an unhandled exception" on flight. I'm not sure if flight really has the right answer. It looks like maybe kadi observations use a masked starcat date for the gyro holds? That make sense. For this application maybe it makes sense to just use that obsid instead of the date to return an empty-ish starcheck entry? |
I noticed today this additional interface change, which I have put into the top description: The |
Description
This removes the
cmd_states.db3
(andtimelines
) dependence from mica.I'm not sure if any of these changes impact or break processing that is not covered in unit tests. This definitely needs close review by @jeanconn.
Interface impacts
status
fields have been reduced/simplified and might give different results from the previous version.catalog
column of the Table fromget_monitor_windows()
is now alwaysNone
while previously it contained the starcheck catalog dict (e.g. fromget_starcheck_catalog_at_date()
).Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
None but many new unit tests.