Skip to content

Commit

Permalink
Merge pull request #20 from kjappelbaum/issue-18-issue-19
Browse files Browse the repository at this point in the history
chore: alias for electronegativity and fixed logger message
  • Loading branch information
kjappelbaum authored Oct 11, 2022
2 parents 8d7ddc1 + 89e0a79 commit fa6a025
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ prune notebooks
recursive-include docs/source *.py
recursive-include docs/source *.rst
recursive-include docs/source *.png
recursive-include src/ *.json
recursive-include src/*.json

global-exclude *.py[cod] __pycache__ *.so *.dylib .DS_Store *.gpickle

Expand Down
4 changes: 3 additions & 1 deletion src/element_coder/data/coding_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

CODING_FILES = {
"x": "x.json",
"electronegativity": "x.json",
"atomic": "atomic.json",
"atomic_radius_calculated": "atomic_radius_calculated.json",
"boiling_point": "boiling_point.json",
Expand Down Expand Up @@ -80,10 +81,11 @@ def get_coding_dict(key: str) -> dict:
Returns:
dict: property dictionary
"""
input_key = key
key = key.lower()
if not key in _PROPERTY_KEYS:
key = get_close_matches(key, _PROPERTY_KEYS, n=1)[0]
logger.warning(f"No matching key found for {key}. Falling back to closest match {key}.")
logger.warning(f"No matching key found for {input_key}. Falling back to closest match {key}.")
cd = _load_coding_data(key)
cd = _load_coding_data(key)

Expand Down

0 comments on commit fa6a025

Please sign in to comment.