databio / bedhost

API and UI for BEDbase
http://api.bedbase.org
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

bedhost select and retrieve on backend #75

Closed nsheff closed 8 months ago

nsheff commented 1 year ago
  1. should PipestatManager implement select_distinct and select methods, just as passthrough to the .backend object? Yes, but these should be retrieve and retrieve_distinct, and should be backend-agnostic.

  2. should bedhost change to interact using pm.backend.select() instead? NO because this is backend-specific

  3. bedhost should use .retrieve instead of .select

  4. create retrieve_distinct on abstract class

  5. have the dbbackend implement this (using select_distinct)

  6. have the file backend raise a NotImplementError() when this is called

  7. eventually have the file backend implement this (using a dict hash table)

  8. have bedhost use the pm.retrieve_distinct

  9. remember, avoid if at all possible using use any backend-specific functionality

nsheff commented 1 year ago

Related to: https://github.com/pepkit/pipestat/issues/70 where we started to move select to the abstract class, and realized that should be retrieve.

donaldcampbelljr commented 1 year ago

pipestat retrieve function can now take a list of record_identifiers and/or result_identifiers which will limit needing to use select as frequently. https://github.com/pepkit/pipestat/pull/101

However, to the best of my knowledge, there are still a couple of places where Bedhost must use select to utilize the filter parameters. @khoroshevskyi can you confirm that the places using select cannot be replaced with the new retrieve_multiple functionality?

nsheff commented 1 year ago

I think this was basically revisited with a new approach in pipestat, here: https://github.com/pepkit/pipestat/issues/103

The above suggestions are all basically changes for pipestat, which are superceded by that issue. So, I think once that is done, this is probably just to be closed...