You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Where and how to define the data_proxy interface #390
2.0-alphaIssues related to VRS 2.0-alpha branchtechnical debtA feature/requirement implemented in a sub-optimal way & must be re-written. Contrast to "cleanup"
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?
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)
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.
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.
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.
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.
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?
2.0-alphaIssues related to VRS 2.0-alpha branchtechnical debtA feature/requirement implemented in a sub-optimal way & must be re-written. Contrast to "cleanup"
Activity
jsstevenson commentedon May 6, 2024
Didn't think much of it at the time, but the new
derive_refget_accessionmethod 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)theferrit32 commentedon Apr 7, 2025
Just ran into this again. We should solve this. It's a usability issue.
jsstevenson commentedon Apr 7, 2025
Yeah I see this one constantly.
ga4gh.vrs.dataproxy.DataProxyand descendants.coreordefaultdependency group. This would entail moving some stuff around within SeqRepo.theferrit32 commentedon Apr 18, 2025
I'm looking through
biocommons.seqrepoand I don't think_DataProxy,SeqRepoDataProxy, orSeqRepoRESTDataProxyare used within the library. The main functionality of the library is theSeqRepoclass (and everything under it). Neither dataproxy class is used withinseqrepo-rest-serviceeither. I would almost lean towards deleting those dataproxy classes frombiocommons.seqreposo 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
SeqRepoDataProxywould be in the vrs-python source tree but not referred to specifically, but usable if you install e.g. theseqrepooptional dependencies.theferrit32 commentedon Apr 18, 2025
Of course that would be inconvenient to current users of
biocommons.seqrepowho are using theSeqRepoDataProxyrather thanSeqRepodirectly.jsstevenson commentedon Apr 18, 2025
I mean, I think it makes sense for
biocommons.seqrepoto 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 installga4gh.vrs, which includes some specific Pydantic constraints, and so on. It also risks a circular dependency withbiocommons.hgvs, if I'm not mistaken.korikuzma commentedon Nov 11, 2026
With #624 (PR #692), we’re migrating away from
biocommons.seqrepo’s_DataProxyinterface 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.
korikuzma commentedon Nov 11, 2026
If people agree, I think we can probably close this?
theferrit32 commentedon Nov 11, 2026
I'm okay with resolving this as "we'll do whatever makes sense for our use case"