Closed rkingsbury closed 1 year ago
@jmunro tests seem to be failing due to a missing API KEY in the CI. The test in question is marked with pytest.skipif
and should not run when there's no API key, but I guess that isn't working?
E mp_api.client.core.client.MPRestError: REST query returned with error status code 401 on URL https://api.materialsproject.org/materials/bonds/?_all_fields=True&material_ids=mp-149&_limit=1 with message: E Response { E "message":"No API key found in request" E }
Let me know if there's something I can do to help resolve - I'd like to get this bugfix merged soon to prevent subtle mistakes or confusion when people use the Pourbaix tools.
Yup, planned to get back to this after making some other changes. Happy to merge now! Thanks for the reminder.
MPRester.get_ion_reference_data_for_chemsys()
does not always correctly return data when a chemsys is supplied as astr
. The problem occurs because some element symbols are a subset of others, e.g.B
is a subset ofBi
. The code for this method currently tests whether any of the major elements associated with an ion are inchemsys
:Which causes problems because "B" is
in
"Bi`. For example:Passing the elements as a list is OK
This PR should fix the problem by convert
str
chemsys
intolist
always