sdss / valis

the SDSS API
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Search on Carton or Program #6

Closed imedan closed 11 months ago

imedan commented 11 months ago

Here is the initial draft that implements search on carton or program. This is implemented in valis.routes.query.QueryRoutes.carton_program: https://github.com/sdss/valis/blob/1522c91ae5b49e9c3d138e25a7aa941835e9f670/python/valis/routes/query.py#L98-L103

I have also added the relevant queries to return the full list of cartons or programs in targetdb. I created an endpoint as well that returns this list: https://github.com/sdss/valis/blob/1522c91ae5b49e9c3d138e25a7aa941835e9f670/python/valis/routes/query.py#L88-L94 The main issue is having the list outputted from this function act as an input for the main query function.

Other than that, the main queries seem to work from my testing.

havok2063 commented 11 months ago

@imedan I recently merged a PR (https://github.com/sdss/valis/pull/5) that refactored things due to core depedency changes. Can you merge the latest main in, and update your PR? It might require a tiny bit of reworking of your code but I don't think much.

imedan commented 11 months ago

Ok, I have done the merge and updated my initial comment with the correct lines post-merge.