ga4gh / ga4gh/vrs-python

Input type issues in using `Translator` to translate from VRS

Open
#489 2 comments 0 reactions 0 assignees View on GitHub
bug VRS translator
Dominant language
Python
Stars
62
Forks
42
Avg merge
1h 2m
Merged PRs (30d)
1

Description

This code here tries to subscript into `models`, which is a module, on line 132. This obviously leads to an error:

https://github.com/ga4gh/vrs-python/blob/f38cbca9a4bd7142280149eeea051ddc9c628934/src/ga4gh/vrs/extras/translator.py#L125-L135

I think a bigger problem is inconsistency about expected inputs. The other translators take variant expressions as strings, but translating from VRS seems to try to handle either dicts or Pydantic objects (realistically, probably actually PythonJsonSchemaObjects, not Pydantic). I think it'd be better to maybe expect input to be a JSON object serialized into a string, just to remain consistent and avoid these kinds of issues.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.