Skip to content

Fix EnergyAdjustment.__repr__ - #3207

Merged
janosh merged 4 commits into
masterfrom
fix-energy_adjustment_repr
Aug 3, 2023
Merged

janosh merged 4 commits into
masterfrom
fix-energy_adjustment_repr

Conversation

@janosh

@janosh janosh commented Aug 3, 2023

Copy link
Copy Markdown
Member

e0768d5 test_computed_entries.py rename single-letter vars
b4f4e7c google-style doc str
c199bb9 fix EnergyAdjustment.repr when used by mp-api MPRester
c8e2f34 add test_energy_adjustment_repr()

Fixes

print(entries['R2SCAN'].energy_adjustments)
  File "pymatgen/pymatgen/entries/computed_entries.py", line 107, in __repr__
    f"  Generated by: {self.cls.get('@class')}",
                       ^^^^^^^^^^^^
AttributeError: 'MaterialsProjectDFTMixingScheme' object has no attribute 'get'

Thanks for reporting @esoteric-ephemera! CC @munrojm

@janosh janosh added tests Issues with or changes to the pymatgen test suite fix Bug fix PRs mixing-schemes About mixing energies from different DFT functionals labels Aug 3, 2023
@janosh
janosh merged commit 925395f into master Aug 3, 2023
@janosh
janosh deleted the fix-energy_adjustment_repr branch August 3, 2023 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix PRs mixing-schemes About mixing energies from different DFT functionals tests Issues with or changes to the pymatgen test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant