-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add new error handlers, add tests for NonConvergingErrorHandler #313
Conversation
and compress tests/files/vasp.(p|ps)syevx(''->.gz)
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.
great stuff, esp. all the new tests! thanks @esoteric-ephemera! 👍
tests/files/nonconv/POTCAR
Outdated
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.
maybe gzip this?
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.
It's not needed for the tests, so I removed it. Think it's worth it to switch out the other POTCARs here for fake ones like in PMG?
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.
i think so. maybe not all of them are needed in the 1st place
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.
Done - last thing is to figure out why the pssyevx
test fails in CI but passes locally
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.
Temporarily unzipped these so the tests pass. Just seems like the *.gz
files aren't being properly found by pytest. Maybe a config thing?
@@ -1046,3 +1065,71 @@ def test_correct(self): | |||
incar = Incar.from_file("INCAR") | |||
assert incar.get("PREC") == "High" | |||
assert incar.get("ENAUG", 0) == incar.get("ENCUT", 2) * 2 | |||
|
|||
|
|||
class NonConvergingErrorHandlerTest(PymatgenTest): |
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.
yay! great to finally have test coverage for NonConvergingErrorHandler
!
@@ -564,18 +569,24 @@ def correct(self): | |||
else: | |||
actions.append({"dict": "INCAR", "action": {"_set": {"ISYM": 0}}}) | |||
|
|||
if "posmap" in self.errors: | |||
if symprec_errors := self.errors & {"posmap", "pricelv"}: |
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.
some fancy code here 👍 😄
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.
I learned from the best!
…scrambler.py, gzip all POTCARs with tests that permit gzipped output
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #313 +/- ##
==========================================
+ Coverage 61.15% 62.54% +1.38%
==========================================
Files 35 35
Lines 2994 3006 +12
==========================================
+ Hits 1831 1880 +49
+ Misses 1163 1126 -37 ☔ View full report in Codecov by Sentry. |
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.
yeah buddy! this repo feels light weight now with all those compressed POTCARs 😄
Add error handling for
NonConvergingErrorHandler
to close #300pymatgen.dev_scripts.potcar_scrambler.py