Skip to content

Where and how to define the data_proxy interface #390

Closed as not planned
Closed as not planned

Description

@jsstevenson

https://github.com/ga4gh/vrs-python/blob/main/src/ga4gh/vrs/dataproxy.py (always a tell when the code references "VR" and not "VRS")

Most of this is copy-pasted from SeqRepo. This seems less than ideal, but I think we probably didn't want to depend on SeqRepo for the dataproxy if it could be avoided.

  • Is that still necessary? Can't we install SeqRepo and just use some of the API library, not the actual data?
  • What about refget? It looks... a lot like the dataproxy API, and it's a GA4GH thing. Can we just define a refget API? Seqrepo-rest-server already provides refget output IIRC from what I hear refget is missing something that we expect from the dataproxy regarding alias lookup
  • Can we just define it once in a central location and have both SeqRepo and VRS Python import it?

Activity

  1. added
    2.0-alpha
    priority:medium
    technical debt
    and removed
    priority:medium
    on Apr 10, 2024
  2. jsstevenson commented on May 6, 2024

    @jsstevenson
    ContributorAuthor

    Didn't think much of it at the time, but the new derive_refget_accession method that was added to the VRS DataProxy class does mean you have to be careful about how you're constructing it in cases where you need a singleton instance shared across multiple resources (e.g. Cool Seq Tool, Variation Normalizer, etc)

  3. theferrit32 commented on Apr 7, 2025

    @theferrit32
    Contributor

    Just ran into this again. We should solve this. It's a usability issue.

  4. jsstevenson commented on Apr 7, 2025

    @jsstevenson
    ContributorAuthor

    Yeah I see this one constantly.

    • Simple fix: just add the SeqRepo dependency and eat the extra install size for now. Move the changes made on the VRS side either into the original SeqRepo definition, or refactor to put them somewhere else in the call stack. Deprecate ga4gh.vrs.dataproxy.DataProxy and descendants.
    • More complicated fix: I believe we discussed on a biocommons call a proposal to move dataproxy into a base install level of SeqRepo, and then make the associated SeqRepo dependencies something like a core or default dependency group. This would entail moving some stuff around within SeqRepo.
  5. theferrit32 commented on Apr 18, 2025

    @theferrit32
    Contributor

    I'm looking through biocommons.seqrepo and I don't think _DataProxy, SeqRepoDataProxy, or SeqRepoRESTDataProxy are used within the library. The main functionality of the library is the SeqRepo class (and everything under it). Neither dataproxy class is used within seqrepo-rest-service either. I would almost lean towards deleting those dataproxy classes from biocommons.seqrepo so it doesn't need to be maintained there.

    Then the "DataProxy" is an abstract class/interface defined and maintained in vrs-python, with the minimal functions vrs-python needs to access aliases and sequence contents. Then implementations like SeqRepoDataProxy would be in the vrs-python source tree but not referred to specifically, but usable if you install e.g. the seqrepo optional dependencies.

  6. theferrit32 commented on Apr 18, 2025

    @theferrit32
    Contributor

    Of course that would be inconvenient to current users of biocommons.seqrepo who are using the SeqRepoDataProxy rather than SeqRepo directly.

  7. jsstevenson commented on Apr 18, 2025

    @jsstevenson
    ContributorAuthor

    I mean, I think it makes sense for biocommons.seqrepo to be the source of truth for the abstract seqrepo proxy interface, particularly in a more dependency-light context than it is now. Otherwise, like you say, anyone wanting to access SeqRepo in an abstract way needs to install ga4gh.vrs, which includes some specific Pydantic constraints, and so on. It also risks a circular dependency with biocommons.hgvs, if I'm not mistaken.

  8. self-assigned this
    on Nov 11, 2026
  9. moved this from Backlog to In progress in VRS-Python v3 releaseon Nov 11, 2026
  10. korikuzma commented on Nov 11, 2026

    @korikuzma
    Contributor

    With #624 (PR #692), we’re migrating away from biocommons.seqrepo’s _DataProxy interface to meet VRS-Python’s minimal requirements. We’ll also be adding a RefGet dp in #550 so people can choose their preferred data provider.

    If other implementers have a need for a shared interface, we should revisit this issue. But atm, I think we should focus on VRS-Python needs. Keeping it here also allows us to more easily make changes/releases as VRS-Python's requirements grow.

  11. korikuzma commented on Nov 11, 2026

    @korikuzma
    Contributor

    With #624 (PR #692), we’re migrating away from biocommons.seqrepo’s _DataProxy interface to meet VRS-Python’s minimal requirements. We’ll also be adding a RefGet dp in #550 so people can choose their preferred data provider.

    If other implementers have a need for a shared interface, we should revisit this issue. But atm, I think we should focus on VRS-Python needs. Keeping it here also allows us to more easily make changes/releases as VRS-Python's requirements grow.

    If people agree, I think we can probably close this?

  12. theferrit32 commented on Nov 11, 2026

    @theferrit32
    Contributor

    I'm okay with resolving this as "we'll do whatever makes sense for our use case"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

2.0-alphatechnical debt

Type

No type

Fields

Current Status

None yet

Status Note

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions