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

Update PyDantic to V2 #79

Merged
merged 14 commits into from
Dec 17, 2024
Merged

Update PyDantic to V2 #79

merged 14 commits into from
Dec 17, 2024

Conversation

kratman
Copy link
Collaborator

@kratman kratman commented Dec 16, 2024

Updates to pydantic v2, and builds on #51

This was intended to be part of my review of #51, by moving some of the code back to the original location

Fixes #38

@kratman
Copy link
Collaborator Author

kratman commented Dec 16, 2024

This is not intended to be merged directly, using it to test the fixes for the merge conflicts. The branch failed tests locally for me

@kratman kratman marked this pull request as draft December 16, 2024 18:40
@kratman
Copy link
Collaborator Author

kratman commented Dec 16, 2024

This works locally. I am doing further testing using PyBaMM

@kratman kratman changed the title Fix pydantic merge conflicts Update PyDantic to V2 Dec 16, 2024
@kratman kratman marked this pull request as ready for review December 16, 2024 20:44
bpx/schema.py Outdated Show resolved Hide resolved
@kratman
Copy link
Collaborator Author

kratman commented Dec 16, 2024

@rtimms There are still a lot of changes that did not need to be in here, but this covers most of my findings

@kratman
Copy link
Collaborator Author

kratman commented Dec 16, 2024

Changes from @chuckliu1979's PR:

  • Moved functions back to validators.py and parsers.py
  • Moved the BaseExtraModel class to a new file to resolve a cyclic dependency
  • Misc static analysis fixes
  • Switched made the lowest python version 3.9
  • Fixed a type annotation that was incorrect

@rtimms rtimms merged commit 48c9c9b into FaradayInstitution:main Dec 17, 2024
9 checks passed
@kratman kratman deleted the fix/bpxMerge branch December 17, 2024 13:56
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.

Migrate to Pydantic>2
2 participants