Repository navigation
Return None rather than KeyError, for property_data without a thermo doc in get_entries_in_chemsys - #1144
Open
kavanase wants to merge 1 commit into
Conversation
…doc in get_entries_in_chemsys
Collaborator
|
Thanks for bringing all these PRs/issues up @kavanase! will try to get through reviewing them as soon as I can |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(My last PR/issue now! 😅 Was doing some stress testing of the latest MP database with our
dopedchemical potentials analysis, which flagged these issues)Summary
Problem:
With an older
db_version, the pre-built phase diagram is read from that version on S3, butproperty_dataisattached from
thermo.search, which the REST API answers from the current version. Materials removed since then have no thermo doc there, so the lookup raises. From the S3 tables, 11 materials in the v2026.04.13 mixed (GGA_GGA+U_R2SCAN) phase diagrams have no v2026.09.28 thermo doc (mp-19849, mp-541843, mp-687301, mp-771003, mp-804341, mp-1073663, mp-1103281, mp-1223474, mp-1237669, mp-1275385, mp-1276506), and they appear in 3,643 of the 117,162 diagrams.Fix: Entries without a doc get
Nonefor each requested field, and one warning names them.test_get_entries_in_chemsys_decorated_served_pd_missing_docstests this behaviour using the Co-O case above: the same call raisesKeyError: 'mp-1275385'onmain, and the test passes with this change.Checklist
ruff.mypy.duecredit@due.dcitedecorators to reference relevant papers by DOI (example)