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 to Pydantic v2 #567

Merged
merged 42 commits into from
Oct 14, 2023
Merged

Update to Pydantic v2 #567

merged 42 commits into from
Oct 14, 2023

Conversation

hrushikesh-s
Copy link
Collaborator

@hrushikesh-s hrushikesh-s commented Oct 12, 2023

Final step in the MP ecosystem migration to pydantic v2! 🎉

utf and others added 30 commits October 2, 2023 09:36
for population
Also, as per the pydantic documentation, @field_validator cannot be applied to an instance method and can only be applied to a class method. That's why changing the first argument of remove_unnecessary & cleanup_dft from self to cls
we are now down to 10 failed, 125 passed, 2 skipped, 31 warnings
Changing the assertion criterion from approx(-10.8454, rel=1e-4) to approx(-10.8, abs=0.2)
Fix failing tests from Pydantic v2 migration
refactor VaspInputGenerator.get_nelect()

rename single-latter var
@hrushikesh-s
Copy link
Collaborator Author

@Zhuoying & @janosh , it seems like starting a PR to main branch also results in just 1 failed test

@hrushikesh-s hrushikesh-s changed the title fixing pydantic2 errors [WIP] fixing pydantic2 errors Oct 13, 2023
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #567 (3976532) into main (70f1ad6) will decrease coverage by 0.23%.
The diff coverage is 91.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #567      +/-   ##
==========================================
- Coverage   75.59%   75.36%   -0.23%     
==========================================
  Files          77       77              
  Lines        6674     6677       +3     
  Branches      986      986              
==========================================
- Hits         5045     5032      -13     
- Misses       1323     1340      +17     
+ Partials      306      305       -1     
Files Coverage Δ
src/atomate2/common/flows/defect.py 81.57% <100.00%> (+0.24%) ⬆️
src/atomate2/common/jobs/defect.py 81.60% <100.00%> (-4.00%) ⬇️
src/atomate2/common/jobs/phonons.py 84.70% <ø> (ø)
src/atomate2/common/jobs/utils.py 45.45% <ø> (-33.34%) ⬇️
src/atomate2/common/schemas/cclib.py 77.55% <100.00%> (ø)
src/atomate2/common/schemas/defects.py 87.91% <100.00%> (ø)
src/atomate2/common/schemas/elastic.py 88.65% <100.00%> (ø)
src/atomate2/common/schemas/phonons.py 97.12% <100.00%> (ø)
src/atomate2/cp2k/schemas/task.py 82.56% <100.00%> (ø)
src/atomate2/forcefields/schemas.py 91.66% <100.00%> (ø)
... and 8 more

@Zhuoying Zhuoying mentioned this pull request Oct 14, 2023
@janosh janosh changed the title [WIP] fixing pydantic2 errors Update to Pydantic v2 Oct 14, 2023
@janosh janosh added dependencies Pull requests that update a dependency file ecosystem Issues concerning the larger MP ecosystem pkg Package health and distribution related stuff labels Oct 14, 2023
@janosh janosh merged commit 88e85e0 into materialsproject:main Oct 14, 2023
7 checks passed
@Zhuoying Zhuoying mentioned this pull request Oct 17, 2023
9 tasks
@utf utf added the enhancement Improvements to existing features label Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ecosystem Issues concerning the larger MP ecosystem enhancement Improvements to existing features pkg Package health and distribution related stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants