Adds new endpoint for getting target metadata and spectrum #8
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.
Adds a new endpoint at
/valis/target/ids/{sdss_id}
for getting object pipeline metadata for an sdss_id. For now this works only for BHM until we can get the Astra ORM in sdssdb. Apogee can't yet be integrated until Astra, sinceapogee_drp
does not include thesdss_id
.This also adds a POC endpoint for getting a spectrum from a file on disk, given an sdss_id. Also only for BHM spec and spec-lite files.
Additionally includes some minor tweaks for readability, and a first pass at switching some of the Query, and Path parameters to the new, recommended,
Annotated
way. See https://fastapi.tiangolo.com/tutorial/query-params-str-validations/?h=#add-query-to-annotated-in-the-q-parameter and https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#better-with-annotated.@Sean-Morrison for the
BossSpectrum
response model, I just picked a few parameters to return from the entire model. I don't think we need to return everything here, but I'd like to return the most relevant ones. This information will be used to populate the initial object page in the front-end.