Skip to content

Commit

Permalink
fix setup.cfg to not pollute top level namespace in site-packages wit…
Browse files Browse the repository at this point in the history
…h generic data folder
  • Loading branch information
janosh committed Apr 6, 2021
1 parent 1ab0d29 commit 10c8589
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions ml_matrics/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def count_elements(formulas: list) -> pd.Series:

# ensure all elements are present in returned Series (with count zero if they
# weren't in formulas)
ptable = pd.read_csv(f"{ROOT}/data/periodic_table.csv")
ptable = pd.read_csv(f"{ROOT}/ml_matrics/elements.csv")
# fill_value=0 required as max(NaN, any int) = NaN
srs = srs.combine(pd.Series(0, index=ptable.symbol), max, fill_value=0)
return srs
Expand Down Expand Up @@ -67,7 +67,7 @@ def ptable_elemental_prevalence(
if formulas is not None:
elem_counts = count_elements(formulas)

ptable = pd.read_csv(f"{ROOT}/data/periodic_table.csv")
ptable = pd.read_csv(f"{ROOT}/ml_matrics/elements.csv")
cmap = get_cmap(cmap)

n_rows = ptable.row.max()
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ml-matrics
version = 0.1.0
version = 0.1.1
description = Metrics and visualizations for model performance in data-driven materials discovery
long_description = file: readme.md
long_description_content_type = text/markdown
Expand Down Expand Up @@ -32,7 +32,7 @@ install_requires=
scikit_learn >= 0.24

[options.package_data]
* = ../data/periodic_table.csv
ml_matrics = elements.csv

[options.packages.find]
exclude =
Expand Down

0 comments on commit 10c8589

Please sign in to comment.