-
Notifications
You must be signed in to change notification settings - Fork 17
switch to pydantic v2 #485
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
Conversation
| types: Optional[List[str]] = None | ||
| stages: Optional[List[str]] = None | ||
| enrichments: List[EnrichmentConfig] = Field(default_factory=list) | ||
| autoload_enrichments: bool = True |
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.
In pydantic v1, these fields were case-insensitive and converted to lowercase fields.
That is no longer possible (except for environment variables).
| return index.exists() and index.is_file() | ||
|
|
||
|
|
||
| def _set_location_init_source(init_source: InitSettingsSource): |
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.
All of the changes here and below is to support passing custom config file, which is no longer possible in pydantic-settings>=2.
Before, we were accessing CONFIG_FILE_NAME from settings instance which can no longer be accessed from the callbacks, so now we use a closure to get access to the filename.
793470e to
4a92497
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #485 +/- ##
==========================================
+ Coverage 85.38% 85.39% +0.01%
==========================================
Files 19 18 -1
Lines 2121 2102 -19
==========================================
- Hits 1811 1795 -16
+ Misses 310 307 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
cc @shcheklein for review. |
|
@skshetry thanks! are there any API breaking changes here? (besides your comments - I will take a look) |
I don't think so (besides one small change where There may be some APIs from pydantic that may have changed (eg: You could try running this in Studio and see if it passes. Other than that, it's hard to tell, I'm depending on the tests for this. I have also run tests from DVC and it passes. |
|
Okay, let's go forward release and check on the Studio side on the next update. Thanks @skshetry ! |
Closes #483.