-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add cat vrs pydantic models #4
Conversation
Note for myself. This is up-to-date with current submodules. Just want to test in MetaKB first. |
@DanielPuthawala it would be nice once things are more stable to create a test suite of valid and invalid catvars. |
@korikuzma , are you intending to include the maturity status (draft, trial-use, normalized, deprecated) in these models? |
CopyChange(v.code.root) | ||
except ValueError as e: | ||
err_msg = f"copyChange, {v.code.root}, not one of {[cc.value for cc in CopyChange]}" | ||
raise ValueError(err_msg) from e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@korikuzma Do you represent the EFO codes enum anywhere? I may be missing it, but I don't see it in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanielPuthawala these are imported from VRS-Python : https://github.com/ga4gh/vrs-python/blob/main/src/ga4gh/vrs/models.py#L171-L181
from pydantic import BaseModel, Field, field_validator | ||
|
||
|
||
class CatVrsType(str, Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is less of a problem and more of a thin got keep in mind for later, there are an astronomically large number of possible CatVar types. What we represent in recipes
is only a very small subset of that, and do not constitute limits on valid CatVars, they just serve to define common useful CatVar classes of particular interest to the implementors.
@DanielPuthawala Since VRS-Python does not currently, I was not going to. However, in my Pydantic --> JSON Schema / RST I did include this. Can we do this in a separate issue? |
close #2