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

Port pydantic v1 models to pydantic v2 #224

Merged
merged 20 commits into from
Aug 11, 2024

Conversation

abhinavk454
Copy link
Contributor

@abhinavk454 abhinavk454 commented Jun 17, 2024

Closes #219

TODO:

  • Change fields which start with model_*, especially model_config - this may or may not be a breaking change
  • Verify if prisma store is still able to function correctly

@chiragjn chiragjn requested review from S1LV3RJ1NX and chiragjn June 18, 2024 14:24
backend/settings.py Outdated Show resolved Hide resolved
backend/settings.py Outdated Show resolved Hide resolved
@chiragjn
Copy link
Member

Apologies for the delay here, we had some improvements planned which took higher priority.
I'll pick this up now and resolve the conflicts

@chiragjn chiragjn changed the title Port pydantic v1 models to pydantic v2 [WIP] Port pydantic v1 models to pydantic v2 Jun 24, 2024
@chiragjn chiragjn marked this pull request as draft June 24, 2024 22:57
@chiragjn chiragjn changed the title [WIP] Port pydantic v1 models to pydantic v2 Port pydantic v1 models to pydantic v2 Jul 31, 2024
@chiragjn chiragjn marked this pull request as ready for review July 31, 2024 12:07
Copy link
Contributor

@S1LV3RJ1NX S1LV3RJ1NX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered few of your questions.

backend/types.py Outdated Show resolved Hide resolved
backend/types.py Outdated Show resolved Hide resolved
backend/types.py Outdated Show resolved Hide resolved
backend/types.py Outdated Show resolved Hide resolved
backend/types.py Outdated Show resolved Hide resolved
@S1LV3RJ1NX S1LV3RJ1NX requested a review from chiragjn August 10, 2024 15:07
@chiragjn chiragjn merged commit 3f0a8c1 into truefoundry:main Aug 11, 2024
1 check passed
S1LV3RJ1NX added a commit that referenced this pull request Nov 29, 2024
* Port pydantic v1 models to pydantic v2

* fad

* Port pydantic v1 models to pydantic v2

* Port pydantic v1 models to pydantic v2

* update default values, type annotations, validators

* Fixes on top of merging main

* More typing refactor for consistency

* Add todo for fields to fix

* Add exception if pydantic v2 sends us obj instead of dict when validating

* Fix regex type constraint and rename model_config to embedding_model_config

* Refactor primsa store to work with pydantic v2

* resolved conflicts

* Fixed pydantic

* Removed model_serializer, replaced with model_dump, added enum_values

* Fix enum values config and separate model type and module type

* Fix frontend types to match up with backend types

---------

Co-authored-by: Chirag Jain <[email protected]>
Co-authored-by: Prathamesh <[email protected]>
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.

Port pydantic v1 models to pydantic v2
3 participants