File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ def validate_api_key(api_key: str | None = None) -> str:
2525
2626 api_key = SETTINGS .get ("PMG_MAPI_KEY" )
2727
28- if not api_key or ( wrong_len := len (api_key ) != 32 ) :
29- addendum = " Valid API keys are 32 characters." if wrong_len else ""
28+ if not api_key or len (api_key ) != 32 :
29+ addendum = " Valid API keys are 32 characters." if api_key else ""
3030 raise ValueError (
3131 "Please obtain a valid API key from https://materialsproject.org/api "
3232 f"and export it as an environment variable `MP_API_KEY`.{ addendum } "
Original file line number Diff line number Diff line change 22from __future__ import annotations
33
44from datetime import datetime
5+ import json
56from typing import Literal
67
78import plotly .graph_objects as plotly_go
@@ -643,7 +644,7 @@ def get_material_data(
643644 efermi = efermi ,
644645 elastic_anisotropy = elastic_anisotropy ,
645646 elements = elements ,
646- energy_above_hull = energy_above_hull ,
647+ energy_above_hull = tuple ( float ( x ) for x in json . loads ( energy_above_hull )) ,
647648 equilibrium_reaction_energy = equilibrium_reaction_energy ,
648649 exclude_elements = exclude_elements ,
649650 formation_energy = formation_energy ,
You can’t perform that action at this time.
0 commit comments