pritykinlab / guidescanpy

0 stars 0 forks source link

support for region/orderby/asc/start/limit query params for job_query result endpoint #34

Closed vineetbansal closed 1 year ago

vineetbansal commented 1 year ago

This PR adds support to get selected results for a job id, instead of all of them.

For a job id, say a6fd2841-199c-49b1-9be1-039c0648339d:

This PR will allow you to visit the above link with additional arguments like (all arguments optional):

to get results of the CDC28 region with optional ordering and filtering.

DataTables requires that you return json data in exactly the format it wants with exactly the keys it wants. To make this work with DataTables, you'll likely want to merge this PR into your branch (merging to main first is also okay since it only adds to the behavior), write a helper function that utilizes the return value of the result function modified here, and then adds whatever keys etc. DataTables wants. That way we can keep this filtering generic enough, and document it independently of how we're using it for DataTables.

A more ambitious idea is to make all results we return anywhere support this kind of filtering and pagination, but I think that's best deferred till we investigate FastAPI in the future which may well have much better ways of doing this.

vineetbansal commented 1 year ago

closing this since PR #42 supersedes this.