Skip to content
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

Adds new endpoint for getting target metadata and spectrum #8

Merged
merged 13 commits into from
Dec 14, 2023

Conversation

havok2063
Copy link
Contributor

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, since apogee_drp does not include the sdss_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.

@havok2063 havok2063 added the enhancement New feature or request label Dec 8, 2023
@havok2063 havok2063 self-assigned this Dec 8, 2023
@havok2063 havok2063 merged commit 26ebc6b into main Dec 14, 2023
2 checks passed
@havok2063 havok2063 deleted the targetmeta branch March 1, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant