Skip to content

Commit 82037a8

Browse files
committed
v0.1.5 (#44)
* bump prettier v3 * more descriptive var names * v0.1.5 * fix ruff PT011 * GH Pages npm install --force
1 parent c03d741 commit 82037a8

14 files changed

Lines changed: 50 additions & 47 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
with:
1414
python-version: "3.11"
1515
working-directory: site
16+
install-cmd: npm install --force
1617
pre-build: |
1718
pip install lazydocs
1819
# lazydocs needs package deps to be installed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default_install_hook_types: [pre-commit, commit-msg]
77

88
repos:
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.0.275
10+
rev: v0.0.277
1111
hooks:
1212
- id: ruff
1313
args: [--fix]
@@ -49,7 +49,7 @@ repos:
4949
args: [--ignore-words-list, "nd,te,fpr"]
5050

5151
- repo: https://github.com/pre-commit/mirrors-prettier
52-
rev: v3.0.0-alpha.9-for-vscode
52+
rev: v3.0.0
5353
hooks:
5454
- id: prettier
5555
args: [--write] # edit files in-place

changelog.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
44

5-
#### [v1.0.0](https://github.com/janosh/matbench-discovery/compare/v0.1.4...v1.0.0)
5+
#### [v0.1.5](https://github.com/janosh/matbench-discovery/compare/v0.1.4...v0.1.5)
66

7+
> 7 July 2023
8+
9+
- v0.1.5 [`#44`](https://github.com/janosh/matbench-discovery/pull/44)
10+
- [pre-commit.ci] pre-commit autoupdate [`#42`](https://github.com/janosh/matbench-discovery/pull/42)
711
- Update site to show ALIGNN results [`#38`](https://github.com/janosh/matbench-discovery/pull/38)
812
- ALIGNN test on WBM data [`#37`](https://github.com/janosh/matbench-discovery/pull/37)
913
- Add PDF versions of all SI figures [`#36`](https://github.com/janosh/matbench-discovery/pull/36)
@@ -18,6 +22,7 @@ All notable changes to this project will be documented in this file. Dates are d
1822
- Add `upload_to_figshare.py` and replace local data-loading with cached Figshare downloads [`#13`](https://github.com/janosh/matbench-discovery/pull/13)
1923
- DRY workflows [`#8`](https://github.com/janosh/matbench-discovery/pull/8)
2024
- Add `Files`, `DataFiles` and `PredFiles` classes in `matbench_discovery/data.py` [`#7`](https://github.com/janosh/matbench-discovery/pull/7)
25+
- fix path issues and using JSON pandas reader for CSV files in train_(cgcnn|wrenformer).py (closes #43) [`#43`](https://github.com/janosh/matbench-discovery/issues/43)
2126
- Fix KeyError('wyckoff_spglib') in `fetch_process_wbm_dataset.py` (#34) [`#32`](https://github.com/janosh/matbench-discovery/issues/32) [`#33`](https://github.com/janosh/matbench-discovery/issues/33)
2227
- Fix `compute_struct_fingerprints.py`: cannot insert `material_id`, already exists (#31) [`#30`](https://github.com/janosh/matbench-discovery/issues/30)
2328
- Fix `fetch_process_wbm_dataset.py` unnecessarily loading WBM initial structures from disk (#29) [`#28`](https://github.com/janosh/matbench-discovery/issues/28)
@@ -38,6 +43,7 @@ All notable changes to this project will be documented in this file. Dates are d
3843
- add scripts/compute_struct_fingerprints.py to generate matminer SiteStats fingerprints for all MP+WBM structures [`7946b5e`](https://github.com/janosh/matbench-discovery/commit/7946b5e433713ef8f46b839562f09d889331e63b)
3944
- split model run times into train and test contribs [`b8a18d8`](https://github.com/janosh/matbench-discovery/commit/b8a18d8fd357ea4ec77dae837fdb8317fe978b28)
4045
- add models/chgnet/{test_chgnet,join_m3gnet_results}.py [`da39074`](https://github.com/janosh/matbench-discovery/commit/da390741b0d0f03fbcca5bcbac725c2211a80427)
46+
- git surgery purging all large CSV files from repo history [`4a90dee`](https://github.com/janosh/matbench-discovery/commit/4a90dee85965aebbcfcd547353c548eeb19651ce)
4147
- add scripts/compute_projections.py [`eec1cb4`](https://github.com/janosh/matbench-discovery/commit/eec1cb4073c2db65cd238157f656af963582ffc5)
4248
- make horizontal versions of roc-models-2x4.pdf and model-run-times-bar.pdf [`551050e`](https://github.com/janosh/matbench-discovery/commit/551050e17cc98cf786707448fd304bb06177a914)
4349
- add changelog.md [`0621282`](https://github.com/janosh/matbench-discovery/commit/0621282b0ed6ca397b6293e8d6f2bcbaac736468)
@@ -73,12 +79,11 @@ All notable changes to this project will be documented in this file. Dates are d
7379
- tweak contributing guide [`b3ea8d3`](https://github.com/janosh/matbench-discovery/commit/b3ea8d3980d62032ed33ae75fb0c7539fafcebe3)
7480
- upload @pbenner's ALIGNN checkpoint to Figshare and link from models/alignn/readme.md [`da56377`](https://github.com/janosh/matbench-discovery/commit/da5637725e3f785cdf8bd82ff6a3be95858b2eae)
7581
- start preprint [`fd8355d`](https://github.com/janosh/matbench-discovery/commit/fd8355dca9fe87ef9196980c06907ef377fdcd97)
76-
- git surgery purging all large CSV files from repo history [`873fa75`](https://github.com/janosh/matbench-discovery/commit/873fa7559fab539f2f1fe8fe6557d5c530b5aabc)
7782
- rename pages /about-test-test-set to /about-the-data and /how-to-contribute to /contribute [`e41ca32`](https://github.com/janosh/matbench-discovery/commit/e41ca32e768ea06f404b216353521f89e6bee2e2)
7883

7984
#### v0.1.4
8085

81-
> 24 February 2023
86+
> 19 June 2023
8287
8388
- Add WBM element heatmap to site and data/wbm/readme.md [`#6`](https://github.com/janosh/matbench-discovery/pull/6)
8489
- doc: remove reference to alignn [`#4`](https://github.com/janosh/matbench-discovery/pull/4)

data/mp/get_mp_energies.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,20 @@
5858
# %%
5959
df_cse = pd.read_json(DATA_FILES.mp_computed_structure_entries).set_index("material_id")
6060

61-
df_cse["structure"] = [
62-
Structure.from_dict(cse["structure"]) for cse in tqdm(df_cse.entry)
61+
struct_col = "structure"
62+
df_cse[struct_col] = [
63+
Structure.from_dict(cse[struct_col]) for cse in tqdm(df_cse.entry)
6364
]
64-
wyk_col = "wyckoff_spglib"
65-
df_cse[wyk_col] = [
65+
wyckoff_col = "wyckoff_spglib"
66+
df_cse[wyckoff_col] = [
6667
get_aflow_label_from_spglib(struct, errors="ignore")
6768
for struct in tqdm(df_cse.structure)
6869
]
6970
# make sure symmetry detection succeeded for all structures
70-
assert df_cse[wyk_col].str.startswith("invalid").sum() == 0
71-
df[wyk_col] = df_cse[wyk_col]
71+
assert df_cse[wyckoff_col].str.startswith("invalid").sum() == 0
72+
df[wyckoff_col] = df_cse[wyckoff_col]
7273

73-
spg_nums = df[wyk_col].str.split("_").str[2].astype(int)
74+
spg_nums = df[wyckoff_col].str.split("_").str[2].astype(int)
7475
# make sure all our spacegroup numbers match MP's
7576
assert (spg_nums.sort_index() == df_spg["number"].sort_index()).all()
7677

data/wbm/eda.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@
235235

236236

237237
# %%
238-
wyk_col, spg_col = "wyckoff_spglib", "spacegroup"
239-
df_wbm[spg_col] = df_wbm[wyk_col].str.split("_").str[2].astype(int)
240-
df_mp[spg_col] = df_mp[wyk_col].str.split("_").str[2].astype(int)
238+
wyckoff_col, spg_col = "wyckoff_spglib", "spacegroup"
239+
df_wbm[spg_col] = df_wbm[wyckoff_col].str.split("_").str[2].astype(int)
240+
df_mp[spg_col] = df_mp[wyckoff_col].str.split("_").str[2].astype(int)
241241

242242

243243
# %%

models/cgcnn/train_cgcnn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
df_in = pd.read_csv(data_path).set_index(id_col)
6565

6666
df_cse = pd.read_json(DATA_FILES.mp_computed_structure_entries).set_index(id_col)
67-
df_in[input_col] = [Structure.from_dict(cse["structure"]) for cse in tqdm(df_cse.entry)]
67+
df_in[input_col] = [Structure.from_dict(cse[input_col]) for cse in tqdm(df_cse.entry)]
6868

6969
assert target_col in df_in
7070

models/wrenformer/analyze_wrenformer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
).index
2828

2929
spg_col = "spacegroup"
30-
wyk_col = "wyckoff_spglib"
31-
df_wbm[spg_col] = df_wbm[wyk_col].str.split("_").str[2].astype(int)
30+
wyckoff_col = "wyckoff_spglib"
31+
df_wbm[spg_col] = df_wbm[wyckoff_col].str.split("_").str[2].astype(int)
3232
df_bad = df_wbm.loc[bad_ids]
3333
title = f"{len(df_bad)} {model} preds<br>with {max_each_true=}, {min_each_pred=}"
3434

3535

3636
# %%
3737
df_mp = pd.read_csv(DATA_FILES.mp_energies).set_index("material_id")
38-
df_mp[spg_col] = df_mp[wyk_col].str.split("_").str[2].astype(int)
39-
df_mp["isopointal_proto_from_aflow"] = df_mp[wyk_col].map(
38+
df_mp[spg_col] = df_mp[wyckoff_col].str.split("_").str[2].astype(int)
39+
df_mp["isopointal_proto_from_aflow"] = df_mp[wyckoff_col].map(
4040
get_isopointal_proto_from_aflow
4141
)
4242
df_mp.isopointal_proto_from_aflow.value_counts().head(12)
@@ -51,7 +51,7 @@
5151
# %%
5252
proto_col = "Isopointal Prototypes"
5353
df_proto_counts = (
54-
df_bad[wyk_col].map(get_isopointal_proto_from_aflow).value_counts().to_frame()
54+
df_bad[wyckoff_col].map(get_isopointal_proto_from_aflow).value_counts().to_frame()
5555
)
5656

5757

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "matbench-discovery"
7-
version = "0.1.4"
7+
version = "0.1.5"
88
description = "A benchmark for machine learning energy models on inorganic crystal stability prediction from unrelaxed structures"
99
authors = [{ name = "Janosh Riebesell", email = "janosh@lbl.gov" }]
1010
readme = "readme.md"
@@ -124,7 +124,6 @@ ignore = [
124124
"PLR", # pylint refactor
125125
"PLW2901", # redefined-loop-name
126126
"PT006", # pytest-parametrize-names-wrong-type
127-
"PT011", # pytest-raises-too-broad
128127
"PT013", # pytest-incorrect-pytest-import
129128
]
130129
pydocstyle.convention = "google"

site/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@iconify/svelte": "^3.1.4",
2121
"@rollup/plugin-yaml": "^4.1.1",
2222
"@sveltejs/adapter-static": "^2.0.2",
23-
"@sveltejs/kit": "^1.21.0",
23+
"@sveltejs/kit": "^1.22.1",
2424
"@sveltejs/vite-plugin-svelte": "^2.4.2",
2525
"@typescript-eslint/eslint-plugin": "^5.61.0",
2626
"@typescript-eslint/parser": "^5.61.0",
@@ -32,22 +32,22 @@
3232
"js-yaml": "^4.1.0",
3333
"katex": "^0.16.8",
3434
"mdsvex": "^0.11.0",
35-
"prettier": "^2.8.8",
35+
"prettier": "^3.0.0",
3636
"prettier-plugin-svelte": "^2.10.1",
3737
"rehype-autolink-headings": "^6.1.1",
3838
"rehype-katex-svelte": "^1.2.0",
3939
"rehype-slug": "^5.1.0",
4040
"remark-math": "3.0.0",
41-
"svelte": "^4.0.3",
42-
"svelte-check": "^3.4.4",
41+
"svelte": "^4.0.5",
42+
"svelte-check": "^3.4.5",
4343
"svelte-multiselect": "^10.0.0",
4444
"svelte-preprocess": "^5.0.4",
4545
"svelte-toc": "^0.5.5",
4646
"svelte-zoo": "^0.4.8",
47-
"svelte2tsx": "^0.6.16",
47+
"svelte2tsx": "^0.6.19",
4848
"tslib": "^2.6.0",
4949
"typescript": "5.1.6",
50-
"vite": "^4.3.9"
50+
"vite": "^4.4.2"
5151
},
5252
"prettier": {
5353
"semi": false,

site/src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta name="author" content="Janosh Riebesell" />

0 commit comments

Comments
 (0)