Support for type=spin/repoint/thruster/kernels for the spice-query api - #1552
Open
leowerneck wants to merge 6 commits into
Open
Support for type=spin/repoint/thruster/kernels for the spice-query api#1552leowerneck wants to merge 6 commits into
leowerneck wants to merge 6 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a slight rewrite of #1250 by @vineetbansal, which splits some of the new tests for better granularity and introduces a helper function to ensure consistent formatting of the response output.
Change Summary
Fixes issue #911
Added support to query non-SPICE tables (spin/repoint/thruster) using the
/spice-queryendpoint.The
typeparameter decides which table to query -kernelssearches through the spice table. Other possible values arespin,thruster, orrepoint, which delegate to the existing lambda innon_spice_table_api.py.When the
typeparameter is not set, it is assumed to bekernels, preserving legacy behavior. Atypeparameter set to a specific kernel type likespacecraft_clockstill works as before.Parameters like
file_name,start_timeandend_timethat the SPICE api already supports are now mapped to the non-SPICE API, so the caller has to go through minimal changes to start using these.File changes
spice_query_api.pythat internally callsnon_spice_tables_api.spice_metakernel_api.pyto where it is used to get around a circular import issue (spice_utilities.pyimportsspice_metakernel_apiandspice_metakernel_api.pyimportsspice_utilities).Testing
test_spice_query_api.pyto ensure thattypeparameter is interpreted correctly for SPICE tables.test_spin_api.pyto ensure that calls made throughspice_query.apireturn expected responses. Existing tests left intact, so the old API endpoints work as well.