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

feat: Allow Pydantic V2+ #109

Merged
merged 3 commits into from
Jan 18, 2024
Merged

feat: Allow Pydantic V2+ #109

merged 3 commits into from
Jan 18, 2024

Conversation

kdcokenny
Copy link
Contributor

For this, I followed this Pydantic Migration Guide and it showed me a quick and easy way to temporarily (though probably not best practice) to allow me and others to use pydantic 2+ with semantic router.

It passes all tests so I assume it would work well while we wait for a more official pydantic v2 migration.

Lmk what you all think.

@kdcokenny
Copy link
Contributor Author

kdcokenny commented Jan 16, 2024

This wouldn't necessarily close #77 but is related to it.

Also, for some reason the pytests passed but it couldn't upload it to codecov (which caused the check to fail). I've never used that service so I have no idea how to fix that, but keep that in mind.

@jamescalam jamescalam changed the title Allow Pydantic V2+ feat: Allow Pydantic V2+ Jan 16, 2024
@simjak
Copy link
Member

simjak commented Jan 16, 2024

Thanks @kdcokenny we will take a look at both pydantic compatibility with v1 and v2, and codecov issue

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2fa3eb3) 91.25% compared to head (bc195ad) 91.25%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #109   +/-   ##
=======================================
  Coverage   91.25%   91.25%           
=======================================
  Files          25       25           
  Lines        1086     1086           
=======================================
  Hits          991      991           
  Misses         95       95           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamescalam
Copy link
Member

jamescalam commented Jan 18, 2024

@kdcokenny thanks for another pr! Tests seem to be passing, but I'm seeing ValidationError when trying to run myself
image

Copy link
Member

@jamescalam jamescalam left a comment

Choose a reason for hiding this comment

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

noted above

edit: testing further, may be an issue with my env, will update soon

@jamescalam jamescalam self-requested a review January 18, 2024 01:26
Copy link
Member

@jamescalam jamescalam left a comment

Choose a reason for hiding this comment

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

@kdcokenny I triple checked — all looks great, thanks for the awesome PR!

@jamescalam jamescalam merged commit c607aed into aurelio-labs:main Jan 18, 2024
8 checks passed
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.

3 participants