Skip to content
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

add pydantic-v2 model #1404

Merged
merged 1 commit into from
Oct 20, 2023
Merged

add pydantic-v2 model #1404

merged 1 commit into from
Oct 20, 2023

Conversation

glass-ships
Copy link
Contributor

I'd like to start doing some testing and convert to Pydantic V2 in a number of @monarch-initiative projects, now that it's finally released, stable, and compatible with Python >=3.7.

  • Adds a Make target for pydantic-v2
  • Updates linkml to a more recent version which (I believe) includes changes to pydantic-generator to allow this

I did not however add any tests against the generated model, wasn't quite sure what that would look like

@glass-ships
Copy link
Contributor Author

As a side note, I considered making the v2 model just biolink.pydanticmodel and the v1 model biolink.pydanticmodel_v1 to keep with pydantic's own naming scheme, but it seems like that might be a breaking change for anyone currently expecting pydantic v1.

@sierra-moxon sierra-moxon merged commit e7797a8 into biolink:master Oct 20, 2023
4 checks passed
@glass-ships glass-ships deleted the pydantic-v2 branch November 30, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants