Repository: janosh/pymatviz (language: python)

Issue:
Rename ml-matrics to pymatviz
Not entirely happy with the name `ml-matrics` anymore. Thinking of changing it to `mainvis` for **ma**terials **in**formatics **vis**ualizations. Not sure if it's really better but at least seems to more correctly represent the current focus of this package.

Let me know if you think the new name is terrible @CompRhys @sgbaird. Otherwise will change the name next week maybe.


Discussion / hints:
Seems like a good shift. In terms of Google searches, it looks like it mostly pulls up people with the last name of mainvis. Doesn't seem to have name conflicts or confusions in materials informatics or on GitHub. I hadn't thought of using main as an abbreviation for materials informatics. Something about MaInVis (with the capital letters) strikes me as odd, so all lowercase seems better as you have it. Maybe because the i can be mistaken as an l, and In looks like Indium. MainVis doesn't seem necessary since main and vis read pretty separately in mainvis.

matVis pulls up as a MATLAB package. vismat seems to be a software file extension. vismi or vizmi (i.e. visualizations for materials informatics) would be competing with visme (infographics website) to some extent, but sounds a bit catchy.

Overall I think `mainvis` is nice, and as a side note I'll be considering the use of "main" for "materials informatics" in other packages; I don't have much claim to package naming creativity 😅
pymatvis or pymatviz also come to mind, but if pymatgen isn't a dependency (EDIT: looks like it is) or people can't use e.g. Composition or esp. Structure objects, then people might get confused.
What about being more explicit with`Matinfovis`? I appreciate my package names are completely opaque but 'main' has too many uses for me to associate with materials informatics easily.
Lots of good points! Thanks guys.

> vismi or vizmi (i.e. visualizations for materials informatics) would be competing with visme (infographics website) to some extent, but sounds a bit catchy.

Maybe catchy but sounds cool. 😄

> pymatvis or pymatviz also come to mind, but if pymatgen isn't a dependency (EDIT: looks like it is) or people can't use e.g. Composition or esp. Structure objects, then people might get confused.

It's definitely meant to be part of the pymatgen ecosystem. I considered `pymatviz` too a while back but thought it too copy-cat. But considering it signals very clearly the goal of being compatible and a useful addon, maybe the unoriginal name is fine.

> I don't have much claim to package naming creativity 😅

Me neither. 😄

> as a side note I'll be considering the use of "main" for "materials informatics" in other packages; 

All yours!
> What about being more explicit with `Matinfovis`?

I'm usually for being more explicit but `Matinfovis` doesn't really roll off the tongue. Maybe has to grow on me.

Fix patch:
diff --git a/ml_matrics/__init__.py b/pymatviz/__init__.py
similarity index 100%
rename from ml_matrics/__init__.py
rename to pymatviz/__init__.py
diff --git a/ml_matrics/correlation.py b/pymatviz/correlation.py
similarity index 98%
rename from ml_matrics/correlation.py
rename to pymatviz/correlation.py
index e548082e..1db77e4c 100644
--- a/ml_matrics/correlation.py
+++ b/pymatviz/correlation.py
@@ -2,7 +2,7 @@
 from matplotlib import pyplot as plt
 from matplotlib.axes import Axes
 
-from ml_matrics.utils import NumArray
+from pymatviz.utils import NumArray
 
 
 def marchenko_pastur_pdf(x: float, gamma: float, sigma: float = 1) -> float:
diff --git a/ml_matrics/cumulative.py b/pymatviz/cumulative.py
similarity index 98%
rename from ml_matrics/cumulative.py
rename to pymatviz/cumulative.py
index 91a6a3eb..d44c595a 100644
--- a/ml_matrics/cumulative.py
+++ b/pymatviz/cumulative.py
@@ -2,7 +2,7 @@
 import numpy as np
 from matplotlib.axes import Axes
 
-from ml_matrics.utils import NumArray
+from pymatviz.utils import NumArray
 
 
 def add_dropdown(ax: Axes, percentile: int, err: NumArray) -> None:
diff --git a/ml_matrics/elements.csv b/pymatviz/elements.csv
similarity index 100%
rename from ml_matrics/elements.csv
rename to pymatviz/elements.csv
diff --git a/ml_matrics/elements.py b/pymatviz/elements.py
similarity index 99%
rename from ml_matrics/elements.py
rename to pymatviz/elements.py
index cb245034..fc35e938 100644
--- a/ml_matrics/elements.py
+++ b/pymatviz/elements.py
@@ -14,7 +14,7 @@
 from plotly.graph_objects import Figure
 from pymatgen.core import Composition
 
-from ml_matrics.utils import ROOT, annotate_bar_heights
+from pymatviz.utils import ROOT, annotate_bar_heights
 
 
 if TYPE_CHECKING:
@@ -22,7 +22,7 @@
 
     ElemValues: TypeAlias = dict[str | int, int | float] | pd.Series | Sequence[str]
 
-df_ptable = pd.read_csv(f"{ROOT}/ml_matrics/elements.csv").set_index("symbol")
+df_ptable = pd.read_csv(f"{ROOT}/pymatviz/elements.csv").set_index("symbol")
 
 
 def count_elements(elem_values: ElemValues) -> pd.Series:
diff --git a/ml_matrics/histograms.py b/pymatviz/histograms.py
similarity index 99%
rename from ml_matrics/histograms.py
rename to pymatviz/histograms.py
index 172fe6d1..2e56163e 100644
--- a/ml_matrics/histograms.py
+++ b/pymatviz/histograms.py
@@ -10,7 +10,7 @@
 from matplotlib.ticker import FixedLocator, FormatStrFormatter
 from scipy.stats import gaussian_kde
 
-from ml_matrics.utils import NumArray
+from pymatviz.utils import NumArray
 
 
 def residual_hist(
diff --git a/ml_matrics/parity.py b/pymatviz/parity.py
similarity index 99%
rename from ml_matrics/parity.py
rename to pymatviz/parity.py
index d1105fe2..56e350b5 100644
--- a/ml_matrics/parity.py
+++ b/pymatviz/parity.py
@@ -10,7 +10,7 @@
 from mpl_toolkits.axes_grid1.inset_locator import inset_axes
 from scipy.interpolate import interpn
 
-from ml_matrics.utils import NumArray, add_mae_r2_box, with_hist
+from pymatviz.utils import NumArray, add_mae_r2_box, with_hist
 
 
 def hist_density(
diff --git a/ml_matrics/quantile.py b/pymatviz/quantile.py
similarity index 98%
rename from ml_matrics/quantile.py
rename to pymatviz/quantile.py
index b4ba9b4d..11bae70d 100644
--- a/ml_matrics/quantile.py
+++ b/pymatviz/quantile.py
@@ -5,7 +5,7 @@
 from matplotlib.axes import Axes
 from scipy.stats import norm
 
-from ml_matrics.utils import NumArray
+from pymatviz.utils import NumArray
 
 
 def qq_gaussian(
diff --git a/ml_matrics/ranking.py b/pymatviz/ranking.py
similarity index 99%
rename from ml_matrics/ranking.py
rename to pymatviz/ranking.py
index 015a4604..15062f84 100644
--- a/ml_matrics/ranking.py
+++ b/pymatviz/ranking.py
@@ -4,7 +4,7 @@
 import numpy as np
 from matplotlib.pyplot import Axes
 
-from ml_matrics.utils import NumArray
+from pymatviz.utils import NumArray
 
 
 def get_err_decay(
diff --git a/ml_matrics/relevance.py b/pymatviz/relevance.py
similarity index 98%
rename from ml_matrics/relevance.py
rename to pymatviz/relevance.py
index 4739eac8..f5cfcb6d 100644
--- a/ml_matrics/relevance.py
+++ b/pymatviz/relevance.py
@@ -4,7 +4,7 @@
 import sklearn.metrics as skm
 from matplotlib.axes import Axes
 
-from ml_matrics.utils import NumArray
+from pymatviz.utils import NumArray
 
 
 def roc_curve(
diff --git a/ml_matrics/struct_vis.py b/pymatviz/struct_vis.py
similarity index 99%
rename from ml_matrics/struct_vis.py
rename to pymatviz/struct_vis.py
index 032ed4d1..14a99e7b 100644
--- a/ml_matrics/struct_vis.py
+++ b/pymatviz/struct_vis.py
@@ -10,7 +10,7 @@
 from matplotlib.path import Path
 from pymatgen.core import Structure
 
-from ml_matrics.utils import NumArray, covalent_radii, jmol_colors
+from pymatviz.utils import NumArray, covalent_radii, jmol_colors
 
 
 # plot_structure_2d() and its helphers get_rot_matrix() and unit_cell_to_lines() were
diff --git a/ml_matrics/sunburst.py b/pymatviz/sunburst.py
similarity index 97%
rename from ml_matrics/sunburst.py
rename to pymatviz/sunburst.py
index d6f92ff0..525be6a9 100644
--- a/ml_matrics/sunburst.py
+++ b/pymatviz/sunburst.py
@@ -6,7 +6,7 @@
 import plotly.express as px
 from plotly.graph_objects import Figure
 
-from ml_matrics.utils import get_crystal_sys
+from pymatviz.utils import get_crystal_sys
 
 
 def spacegroup_sunburst(
diff --git a/ml_matrics/utils.py b/pymatviz/utils.py
similarity index 98%
rename from ml_matrics/utils.py
rename to pymatviz/utils.py
index ec04ffbe..4011e8e2 100644
--- a/ml_matrics/utils.py
+++ b/pymatviz/utils.py
@@ -18,7 +18,7 @@
 
 NumArray = NDArray[Union[np.float64, np.int_]]
 
-df_elem = pd.read_csv(f"{ROOT}/ml_matrics/elements.csv").set_index("symbol")
+df_elem = pd.read_csv(f"{ROOT}/pymatviz/elements.csv").set_index("symbol")
 
 # http://jmol.sourceforge.net/jscolors
 jmol_colors = df_elem.jmol_color.dropna().apply(ast.literal_eval)
diff --git a/readme.md b/readme.md
index dc9d04c3..e22eb62b 100644
--- a/readme.md
+++ b/readme.md
@@ -1,166 +1,161 @@
-<h1 align="center">ML Matrics</h1>
+<h1 align="center">pymatviz</h1>
 
 <h4 align="center">
 
 A toolkit of metrics and visualizations for model performance in data-driven materials discovery.
 
-[![Tests](https://github.com/janosh/ml-matrics/actions/workflows/test.yml/badge.svg)](https://github.com/janosh/ml-matrics/actions/workflows/test.yml)
-[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/janosh/ml-matrics/main.svg)](https://results.pre-commit.ci/latest/github/janosh/ml-matrics/main)
+[![Tests](https://github.com/janosh/pymatviz/actions/workflows/test.yml/badge.svg)](https://github.com/janosh/pymatviz/actions/workflows/test.yml)
+[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/janosh/pymatviz/main.svg)](https://results.pre-commit.ci/latest/github/janosh/pymatviz/main)
 [![This project supports Python 3.8+](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://python.org/downloads)
-[![PyPI](https://img.shields.io/pypi/v/ml-matrics)](https://pypi.org/project/ml-matrics)
-[![PyPI Downloads](https://img.shields.io/pypi/dm/ml-matrics)](https://pypistats.org/packages/ml-matrics)
+[![PyPI](https://img.shields.io/pypi/v/pymatviz)](https://pypi.org/project/pymatviz)
+[![PyPI Downloads](https://img.shields.io/pypi/dm/pymatviz)](https://pypistats.org/packages/pymatviz)
 
 </h4>
 
 ## Installation
 
 ```sh
-pip install ml-matrics
-```
-
-For a locally editable install, use
-
-```sh
-git clone https://github.com/janosh/ml-matrics && pip install -e ml-matrics
+pip install pymatviz
 ```
 
 ## Elements
 
-See [`ml_matrics/elements.py`](ml_matrics/elements.py).
+See [`pymatviz/elements.py`](pymatviz/elements.py).
 
-|      [`ptable_heatmap(compositions)`](ml_matrics/elements.py)       |                [`ptable_heatmap(compositions, log=True)`](ml_matrics/elements.py)                 |
-| :-----------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------: |
-|                          ![ptable_heatmap]                          |                                       ![ptable_heatmap_log]                                       |
-| [`ptable_heatmap_ratio(comps_a, comps_b)`](ml_matrics/elements.py)  |           [`ptable_heatmap_ratio(comps_b, comps_a, log=True)`](ml_matrics/elements.py)            |
-|                       ![ptable_heatmap_ratio]                       |                                  ![ptable_heatmap_ratio_inverse]                                  |
-| [`hist_elemental_prevalence(compositions)`](ml_matrics/elements.py) | [`hist_elemental_prevalence(compositions, log=True, bar_values='count')`](ml_matrics/elements.py) |
-|                    ![hist_elemental_prevalence]                     |                              ![hist_elemental_prevalence_log_count]                               |
+|      [`ptable_heatmap(compositions)`](pymatviz/elements.py)       |                [`ptable_heatmap(compositions, log=True)`](pymatviz/elements.py)                 |
+| :---------------------------------------------------------------: | :---------------------------------------------------------------------------------------------: |
+|                         ![ptable_heatmap]                         |                                      ![ptable_heatmap_log]                                      |
+| [`ptable_heatmap_ratio(comps_a, comps_b)`](pymatviz/elements.py)  |           [`ptable_heatmap_ratio(comps_b, comps_a, log=True)`](pymatviz/elements.py)            |
+|                      ![ptable_heatmap_ratio]                      |                                 ![ptable_heatmap_ratio_inverse]                                 |
+| [`hist_elemental_prevalence(compositions)`](pymatviz/elements.py) | [`hist_elemental_prevalence(compositions, log=True, bar_values='count')`](pymatviz/elements.py) |
+|                   ![hist_elemental_prevalence]                    |                             ![hist_elemental_prevalence_log_count]                              |
 
 ## Sunburst
 
-See [`ml_matrics/sunburst.py`](ml_matrics/sunburst.py).
+See [`pymatviz/sunburst.py`](pymatviz/sunburst.py).
 
-| [`spacegroup_sunburst([65, 134, 225, ...])`](ml_matrics/sunburst.py) | [`spacegroup_sunburst([65, 134, 225, ...], show_values="percent")`](ml_matrics/sunburst.py) |
-| :------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
-|                        ![spacegroup_sunburst]                        |                               ![spacegroup_sunburst_percent]                                |
+| [`spacegroup_sunburst([65, 134, 225, ...])`](pymatviz/sunburst.py) | [`spacegroup_sunburst([65, 134, 225, ...], show_values="percent")`](pymatviz/sunburst.py) |
+| :----------------------------------------------------------------: | :---------------------------------------------------------------------------------------: |
+|                       ![spacegroup_sunburst]                       |                              ![spacegroup_sunburst_percent]                               |
 
 ## Structure
 
-See [`ml_matrics/struct_vis.py`](ml_matrics/struct_vis.py).
+See [`pymatviz/struct_vis.py`](pymatviz/struct_vis.py).
 
-| [`plot_structure_2d(pmg_struct)`](ml_matrics/struct_vis.py) | [`plot_structure_2d(pmg_struct, show_unit_cell=False, site_labels=False)`](ml_matrics/struct_vis.py) |
-| :---------------------------------------------------------: | :--------------------------------------------------------------------------------------------------: |
-|              ![struct-2d-mp-19017-disordered]               |                                        ![struct-2d-mp-12712]                                         |
+| [`plot_structure_2d(pmg_struct)`](pymatviz/struct_vis.py) | [`plot_structure_2d(pmg_struct, show_unit_cell=False, site_labels=False)`](pymatviz/struct_vis.py) |
+| :-------------------------------------------------------: | :------------------------------------------------------------------------------------------------: |
+|             ![struct-2d-mp-19017-disordered]              |                                       ![struct-2d-mp-12712]                                        |
 
 ![mp-structures-2d]
 
 ## Histograms
 
-See [`ml_matrics/histograms.py`](ml_matrics/histograms.py).
+See [`pymatviz/histograms.py`](pymatviz/histograms.py).
 
-| [`spacegroup_hist([65, 134, 225, ...])`](ml_matrics/histograms.py) | [`spacegroup_hist([65, 134, 225, ...], show_counts=False)`](ml_matrics/histograms.py) |
-| :----------------------------------------------------------------: | :-----------------------------------------------------------------------------------: |
-|                         ![spacegroup_hist]                         |                             ![spacegroup_hist_no_counts]                              |
-|    [`residual_hist(y_true, y_pred)`](ml_matrics/histograms.py)     |          [`true_pred_hist(y_true, y_pred, y_std)`](ml_matrics/histograms.py)          |
-|                          ![residual_hist]                          |                                   ![true_pred_hist]                                   |
+| [`spacegroup_hist([65, 134, 225, ...])`](pymatviz/histograms.py) | [`spacegroup_hist([65, 134, 225, ...], show_counts=False)`](pymatviz/histograms.py) |
+| :--------------------------------------------------------------: | :---------------------------------------------------------------------------------: |
+|                        ![spacegroup_hist]                        |                            ![spacegroup_hist_no_counts]                             |
+|    [`residual_hist(y_true, y_pred)`](pymatviz/histograms.py)     |          [`true_pred_hist(y_true, y_pred, y_std)`](pymatviz/histograms.py)          |
+|                         ![residual_hist]                         |                                  ![true_pred_hist]                                  |
 
 ## Parity Plots
 
-See [`ml_matrics/parity.py`](ml_matrics/parity.py).
+See [`pymatviz/parity.py`](pymatviz/parity.py).
 
-|      [`density_scatter(xs, ys, ...)`](ml_matrics/parity.py)       | [`density_scatter_with_hist(xs, ys, ...)`](ml_matrics/parity.py)  |
-| :---------------------------------------------------------------: | :---------------------------------------------------------------: |
-|                        ![density_scatter]                         |                   ![density_scatter_with_hist]                    |
-|       [`density_hexbin(xs, ys, ...)`](ml_matrics/parity.py)       |  [`density_hexbin_with_hist(xs, ys, ...)`](ml_matrics/parity.py)  |
-|                         ![density_hexbin]                         |                    ![density_hexbin_with_hist]                    |
-| [`scatter_with_err_bar(xs, ys, yerr, ...)`](ml_matrics/parity.py) | [`residual_vs_actual(y_true, y_pred, ...)`](ml_matrics/parity.py) |
-|                      ![scatter_with_err_bar]                      |                       ![residual_vs_actual]                       |
+|      [`density_scatter(xs, ys, ...)`](pymatviz/parity.py)       | [`density_scatter_with_hist(xs, ys, ...)`](pymatviz/parity.py)  |
+| :-------------------------------------------------------------: | :-------------------------------------------------------------: |
+|                       ![density_scatter]                        |                  ![density_scatter_with_hist]                   |
+|       [`density_hexbin(xs, ys, ...)`](pymatviz/parity.py)       |  [`density_hexbin_with_hist(xs, ys, ...)`](pymatviz/parity.py)  |
+|                        ![density_hexbin]                        |                   ![density_hexbin_with_hist]                   |
+| [`scatter_with_err_bar(xs, ys, yerr, ...)`](pymatviz/parity.py) | [`residual_vs_actual(y_true, y_pred, ...)`](pymatviz/parity.py) |
+|                     ![scatter_with_err_bar]                     |                      ![residual_vs_actual]                      |
 
 ## Uncertainty Calibration
 
-See [`ml_matrics/quantile.py`](ml_matrics/quantile.py).
+See [`pymatviz/quantile.py`](pymatviz/quantile.py).
 
-| [`qq_gaussian(y_true, y_pred, y_std)`](ml_matrics/quantile.py) | [`qq_gaussian(y_true, y_pred, y_std: dict)`](ml_matrics/quantile.py) |
-| :------------------------------------------------------------: | :------------------------------------------------------------------: |
-|                      ![normal_prob_plot]                       |                     ![normal_prob_plot_multiple]                     |
+| [`qq_gaussian(y_true, y_pred, y_std)`](pymatviz/quantile.py) | [`qq_gaussian(y_true, y_pred, y_std: dict)`](pymatviz/quantile.py) |
+| :----------------------------------------------------------: | :----------------------------------------------------------------: |
+|                     ![normal_prob_plot]                      |                    ![normal_prob_plot_multiple]                    |
 
 ## Ranking
 
-See [`ml_matrics/ranking.py`](ml_matrics/ranking.py).
+See [`pymatviz/ranking.py`](pymatviz/ranking.py).
 
-| [`err_decay(y_true, y_pred, y_std)`](ml_matrics/ranking.py) | [`err_decay(y_true, y_pred, y_std: dict)`](ml_matrics/ranking.py) |
-| :---------------------------------------------------------: | :---------------------------------------------------------------: |
-|                        ![err_decay]                         |                       ![err_decay_multiple]                       |
+| [`err_decay(y_true, y_pred, y_std)`](pymatviz/ranking.py) | [`err_decay(y_true, y_pred, y_std: dict)`](pymatviz/ranking.py) |
+| :-------------------------------------------------------: | :-------------------------------------------------------------: |
+|                       ![err_decay]                        |                      ![err_decay_multiple]                      |
 
 ## Cumulative Error and Residual
 
-See [`ml_matrics/cumulative.py`](ml_matrics/cumulative.py).
+See [`pymatviz/cumulative.py`](pymatviz/cumulative.py).
 
-| [`cum_err(preds, targets)`](ml_matrics/cumulative.py) | [`cum_res(preds, targets)`](ml_matrics/cumulative.py) |
-| :---------------------------------------------------: | :---------------------------------------------------: |
-|                  ![cumulative_error]                  |                ![cumulative_residual]                 |
+| [`cum_err(preds, targets)`](pymatviz/cumulative.py) | [`cum_res(preds, targets)`](pymatviz/cumulative.py) |
+| :-------------------------------------------------: | :-------------------------------------------------: |
+|                 ![cumulative_error]                 |               ![cumulative_residual]                |
 
 ## Classification Metrics
 
-See [`ml_matrics/relevance.py`](ml_matrics/relevance.py).
+See [`pymatviz/relevance.py`](pymatviz/relevance.py).
 
-| [`roc_curve(targets, proba_pos)`](ml_matrics/relevance.py) | [`precision_recall_curve(targets, proba_pos)`](ml_matrics/relevance.py) |
-| :--------------------------------------------------------: | :---------------------------------------------------------------------: |
-|                        ![roc_curve]                        |                        ![precision_recall_curve]                        |
+| [`roc_curve(targets, proba_pos)`](pymatviz/relevance.py) | [`precision_recall_curve(targets, proba_pos)`](pymatviz/relevance.py) |
+| :------------------------------------------------------: | :-------------------------------------------------------------------: |
+|                       ![roc_curve]                       |                       ![precision_recall_curve]                       |
 
 ## Correlation
 
-See [`ml_matrics/correlation.py`](ml_matrics/correlation.py).
+See [`pymatviz/correlation.py`](pymatviz/correlation.py).
 
-| [`marchenko_pastur(corr_mat, gamma=ncols/nrows)`](ml_matrics/correlation.py) | [`marchenko_pastur(corr_mat_significant_eval, gamma=ncols/nrows)`](ml_matrics/correlation.py) |
-| :--------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: |
-|                             ![marchenko_pastur]                              |                             ![marchenko_pastur_significant_eval]                              |
+| [`marchenko_pastur(corr_mat, gamma=ncols/nrows)`](pymatviz/correlation.py) | [`marchenko_pastur(corr_mat_significant_eval, gamma=ncols/nrows)`](pymatviz/correlation.py) |
+| :------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
+|                            ![marchenko_pastur]                             |                            ![marchenko_pastur_significant_eval]                             |
 
-## Testing
+## Migrating from `ml-matrics` to `pymatviz`
 
-This project uses `pytest` ([docs](https://docs.pytest.org/en/stable/usage.html)). To run tests, use:
+This library was renamed from `ml-matrics` to `pymatviz` between versions 0.3.0 and 0.4.0. To update existing Python files that import `ml-matrics` in place, run the following commands. On Linux:
 
 ```sh
-pytest # full test suite
-pytest tests/test_cumulative.py # single file
-pytest **/test_*_metrics.py # multiple files
-pytest -k test_precision_recall_curve # -k takes regex matching test names
+find . -name '*.py' | xargs sed -i 's/^from ml_matrics import/from pymatviz import/g'
+find . -name '*.py' | xargs sed -i 's/^from ml_matrics./from pymatviz./g'
+find . -name '*.py' | xargs sed -i 's/^import ml_matrics/import pymatviz/g'
 ```
 
+On Mac, replace `sed -i` with `sed -i ""`.
+
 ## Glossary
 
 1. **Residual** `y_res = y_true - y_pred`: The difference between ground truth target and model prediction.
 2. **Error** `y_err = abs(y_true - y_pred)`: Absolute error between target and model prediction.
 3. **Uncertainty** `y_std`: The model's estimate for its error, i.e. how much the model thinks its prediction can be trusted. (`std` for standard deviation.)
 
-[cumulative_error]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/cumulative_error.svg
-[cumulative_residual]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/cumulative_residual.svg
-[density_hexbin_with_hist]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/density_hexbin_with_hist.svg
-[density_hexbin]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/density_hexbin.svg
-[density_scatter_with_hist]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/density_scatter_with_hist.svg
-[density_scatter]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/density_scatter.svg
-[err_decay_multiple]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/err_decay_multiple.svg
-[err_decay]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/err_decay.svg
-[hist_elemental_prevalence_log_count]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/hist_elemental_prevalence_log_count.svg
-[hist_elemental_prevalence]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/hist_elemental_prevalence.svg
-[marchenko_pastur_significant_eval]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/marchenko_pastur_significant_eval.svg
-[marchenko_pastur]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/marchenko_pastur.svg
-[mp-structures-2d]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/mp-structures-2d.svg
-[normal_prob_plot_multiple]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/normal_prob_plot_multiple.svg
-[normal_prob_plot]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/normal_prob_plot.svg
-[precision_recall_curve]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/precision_recall_curve.svg
-[ptable_heatmap_log]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/ptable_heatmap_log.svg
-[ptable_heatmap_ratio_inverse]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/ptable_heatmap_ratio_inverse.svg
-[ptable_heatmap_ratio]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/ptable_heatmap_ratio.svg
-[ptable_heatmap]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/ptable_heatmap.svg
-[residual_hist]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/residual_hist.svg
-[residual_vs_actual]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/residual_vs_actual.svg
-[roc_curve]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/roc_curve.svg
-[scatter_with_err_bar]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/scatter_with_err_bar.svg
-[spacegroup_hist_no_counts]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/spacegroup_hist_no_counts.svg
-[spacegroup_hist]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/spacegroup_hist.svg
-[spacegroup_sunburst_percent]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/spacegroup_sunburst_percent.svg
-[spacegroup_sunburst]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/spacegroup_sunburst.svg
-[struct-2d-mp-12712]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/struct-2d-mp-12712.svg
-[struct-2d-mp-19017-disordered]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/struct-2d-mp-19017-disordered.svg
-[true_pred_hist]: https://raw.githubusercontent.com/janosh/ml-matrics/main/assets/true_pred_hist.svg
+[cumulative_error]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/cumulative_error.svg
+[cumulative_residual]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/cumulative_residual.svg
+[density_hexbin_with_hist]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/density_hexbin_with_hist.svg
+[density_hexbin]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/density_hexbin.svg
+[density_scatter_with_hist]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/density_scatter_with_hist.svg
+[density_scatter]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/density_scatter.svg
+[err_decay_multiple]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/err_decay_multiple.svg
+[err_decay]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/err_decay.svg
+[hist_elemental_prevalence_log_count]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/hist_elemental_prevalence_log_count.svg
+[hist_elemental_prevalence]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/hist_elemental_prevalence.svg
+[marchenko_pastur_significant_eval]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/marchenko_pastur_significant_eval.svg
+[marchenko_pastur]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/marchenko_pastur.svg
+[mp-structures-2d]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/mp-structures-2d.svg
+[normal_prob_plot_multiple]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/normal_prob_plot_multiple.svg
+[normal_prob_plot]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/normal_prob_plot.svg
+[precision_recall_curve]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/precision_recall_curve.svg
+[ptable_heatmap_log]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/ptable_heatmap_log.svg
+[ptable_heatmap_ratio_inverse]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/ptable_heatmap_ratio_inverse.svg
+[ptable_heatmap_ratio]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/ptable_heatmap_ratio.svg
+[ptable_heatmap]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/ptable_heatmap.svg
+[residual_hist]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/residual_hist.svg
+[residual_vs_actual]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/residual_vs_actual.svg
+[roc_curve]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/roc_curve.svg
+[scatter_with_err_bar]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/scatter_with_err_bar.svg
+[spacegroup_hist_no_counts]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/spacegroup_hist_no_counts.svg
+[spacegroup_hist]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/spacegroup_hist.svg
+[spacegroup_sunburst_percent]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/spacegroup_sunburst_percent.svg
+[spacegroup_sunburst]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/spacegroup_sunburst.svg
+[struct-2d-mp-12712]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/struct-2d-mp-12712.svg
+[struct-2d-mp-19017-disordered]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/struct-2d-mp-19017-disordered.svg
+[true_pred_hist]: https://raw.githubusercontent.com/janosh/pymatviz/main/assets/true_pred_hist.svg
diff --git a/scripts/fetch_mp_data.py b/scripts/fetch_mp_data.py
index b1d415f8..710b1536 100644
--- a/scripts/fetch_mp_data.py
+++ b/scripts/fetch_mp_data.py
@@ -4,7 +4,7 @@
 from pymatgen.core import Structure
 from pymatgen.ext.matproj import MPRester
 
-from ml_matrics import ROOT
+from pymatviz import ROOT
 
 
 # %%
diff --git a/scripts/generate_assets.py b/scripts/generate_assets.py
index 51c6b672..3657f920 100644
--- a/scripts/generate_assets.py
+++ b/scripts/generate_assets.py
@@ -10,16 +10,16 @@
 from plotly.graph_objects import Figure
 from pymatgen.core import Structure
 
-from ml_matrics.correlation import marchenko_pastur
-from ml_matrics.cumulative import cum_err, cum_res
-from ml_matrics.elements import (
+from pymatviz.correlation import marchenko_pastur
+from pymatviz.cumulative import cum_err, cum_res
+from pymatviz.elements import (
     hist_elemental_prevalence,
     ptable_heatmap,
     ptable_heatmap_plotly,
     ptable_heatmap_ratio,
 )
-from ml_matrics.histograms import residual_hist, spacegroup_hist, true_pred_hist
-from ml_matrics.parity import (
+from pymatviz.histograms import residual_hist, spacegroup_hist, true_pred_hist
+from pymatviz.parity import (
     density_hexbin,
     density_hexbin_with_hist,
     density_scatter,
@@ -27,12 +27,12 @@
     residual_vs_actual,
     scatter_with_err_bar,
 )
-from ml_matrics.quantile import qq_gaussian
-from ml_matrics.ranking import err_decay
-from ml_matrics.relevance import precision_recall_curve, roc_curve
-from ml_matrics.struct_vis import plot_structure_2d
-from ml_matrics.sunburst import spacegroup_sunburst
-from ml_matrics.utils import ROOT
+from pymatviz.quantile import qq_gaussian
+from pymatviz.ranking import err_decay
+from pymatviz.relevance import precision_recall_curve, roc_curve
+from pymatviz.struct_vis import plot_structure_2d
+from pymatviz.sunburst import spacegroup_sunburst
+from pymatviz.utils import ROOT
 
 
 plt.rcParams.update({"font.size": 20})
@@ -130,7 +130,7 @@ def save_compress_plotly(fig: Figure, filename: str) -> None:
 # %% Elemental Plots
 mp_formulas = pd.read_csv(f"{ROOT}/data/mp-elements.csv").formula
 roost_formulas = pd.read_csv(f"{ROOT}/data/ex-ensemble-roost.csv").composition
-df_ptable = pd.read_csv(f"{ROOT}/ml_matrics/elements.csv").set_index("symbol")
+df_ptable = pd.read_csv(f"{ROOT}/pymatviz/elements.csv").set_index("symbol")
 
 
 ptable_heatmap(mp_formulas)
diff --git a/scripts/generate_rand_data.py b/scripts/generate_rand_data.py
index 344f3dd4..de629373 100644
--- a/scripts/generate_rand_data.py
+++ b/scripts/generate_rand_data.py
@@ -1,7 +1,7 @@
 import numpy as np
 import pandas as pd
 
-from ml_matrics import ROOT
+from pymatviz import ROOT
 
 
 xs = np.random.rand(100)
diff --git a/setup.cfg b/setup.cfg
index 72446955..a62cbf14 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,10 +1,10 @@
 [metadata]
-name = ml-matrics
+name = pymatviz
 version = 0.3.0
 description = Metrics and visualizations for model performance in data-driven materials discovery
 long_description = file: readme.md
 long_description_content_type = text/markdown
-url = https://github.com/janosh/ml-matrics
+url = https://github.com/janosh/pymatviz
 author = Janosh Riebesell
 author_email = janosh.riebesell@gmail.com
 license = MIT
@@ -36,7 +36,7 @@ test = pytest; pytest-cov
 
 # map from package dir to data files that need to be included in wheel
 [options.package_data]
-ml_matrics = elements.csv
+pymatviz = elements.csv
 
 [options.packages.find]
 exclude =


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 50ce6458..f60af1bf 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -3,10 +3,8 @@ name: Tests
 on:
   push:
     branches: [main]
-    paths: ['**/*.py', '.github/workflows/test.yml']
   pull_request:
     branches: [main]
-    paths: ['**/*.py', '.github/workflows/test.yml']
 
 jobs:
   pytest:
@@ -28,4 +26,4 @@ jobs:
         run: pip install .[test]
 
       - name: Run tests
-        run: pytest --durations 0 --cov ml_matrics
+        run: pytest --durations 0 --cov pymatviz
diff --git a/tests/_helpers.py b/tests/_helpers.py
index ec2ee1a7..86f92d91 100644
--- a/tests/_helpers.py
+++ b/tests/_helpers.py
@@ -5,7 +5,7 @@
 import pandas as pd
 import pytest
 
-from ml_matrics import ROOT
+from pymatviz import ROOT
 
 
 @pytest.fixture(autouse=True)
diff --git a/tests/test_correlation.py b/tests/test_correlation.py
index e3d6bc7b..5fdf3208 100644
--- a/tests/test_correlation.py
+++ b/tests/test_correlation.py
@@ -1,6 +1,6 @@
 import numpy as np
 
-from ml_matrics import marchenko_pastur
+from pymatviz import marchenko_pastur
 
 
 def test_marchenko_pastur():
diff --git a/tests/test_cumulative.py b/tests/test_cumulative.py
index d058420a..16a523f8 100644
--- a/tests/test_cumulative.py
+++ b/tests/test_cumulative.py
@@ -1,4 +1,4 @@
-from ml_matrics import cum_err, cum_res
+from pymatviz import cum_err, cum_res
 
 from ._helpers import y_pred, y_true
 
diff --git a/tests/test_elements.py b/tests/test_elements.py
index 104c9ec0..6687cad5 100644
--- a/tests/test_elements.py
+++ b/tests/test_elements.py
@@ -3,7 +3,7 @@
 from matplotlib.axes import Axes
 from plotly.graph_objects import Figure
 
-from ml_matrics import (
+from pymatviz import (
     ROOT,
     count_elements,
     hist_elemental_prevalence,
@@ -15,7 +15,7 @@
 
 formulas_1 = pd.read_csv(f"{ROOT}/data/mp-elements.csv").formula
 formulas_2 = pd.read_csv(f"{ROOT}/data/ex-ensemble-roost.csv").composition
-df_ptable = pd.read_csv(f"{ROOT}/ml_matrics/elements.csv").set_index("symbol")
+df_ptable = pd.read_csv(f"{ROOT}/pymatviz/elements.csv").set_index("symbol")
 
 
 elem_counts_1 = count_elements(formulas_1)
diff --git a/tests/test_histograms.py b/tests/test_histograms.py
index 7e76ad9d..1314e9d1 100644
--- a/tests/test_histograms.py
+++ b/tests/test_histograms.py
@@ -1,4 +1,4 @@
-from ml_matrics import residual_hist, spacegroup_hist, true_pred_hist
+from pymatviz import residual_hist, spacegroup_hist, true_pred_hist
 
 from ._helpers import y_pred, y_true
 
diff --git a/tests/test_parity.py b/tests/test_parity.py
index aacc78bc..54f98ebe 100644
--- a/tests/test_parity.py
+++ b/tests/test_parity.py
@@ -1,4 +1,4 @@
-from ml_matrics import (
+from pymatviz import (
     density_hexbin,
     density_hexbin_with_hist,
     density_scatter,
diff --git a/tests/test_quantile.py b/tests/test_quantile.py
index df412f82..c2e622fc 100644
--- a/tests/test_quantile.py
+++ b/tests/test_quantile.py
@@ -1,4 +1,4 @@
-from ml_matrics import qq_gaussian
+from pymatviz import qq_gaussian
 
 from ._helpers import xs, y_pred
 
diff --git a/tests/test_ranking.py b/tests/test_ranking.py
index 2721888b..38526c80 100644
--- a/tests/test_ranking.py
+++ b/tests/test_ranking.py
@@ -1,6 +1,6 @@
 from matplotlib.pyplot import Axes
 
-from ml_matrics import err_decay
+from pymatviz import err_decay
 
 from ._helpers import y_pred, y_true
 
diff --git a/tests/test_relevance.py b/tests/test_relevance.py
index 70438ad4..22df2376 100644
--- a/tests/test_relevance.py
+++ b/tests/test_relevance.py
@@ -1,6 +1,6 @@
 from matplotlib.axes import Axes
 
-from ml_matrics import precision_recall_curve, roc_curve
+from pymatviz import precision_recall_curve, roc_curve
 
 from ._helpers import y_binary, y_proba
 
diff --git a/tests/test_struct_vis.py b/tests/test_struct_vis.py
index a3ffe4cc..3394f6e2 100644
--- a/tests/test_struct_vis.py
+++ b/tests/test_struct_vis.py
@@ -6,7 +6,7 @@
 from pymatgen.core import Lattice, Structure
 from pymatgen.transformations.standard_transformations import SubstitutionTransformation
 
-from ml_matrics.struct_vis import plot_structure_2d
+from pymatviz.struct_vis import plot_structure_2d
 
 from ._helpers import save_fixture
 
diff --git a/tests/test_sunburst.py b/tests/test_sunburst.py
index 45381e3f..65957dac 100644
--- a/tests/test_sunburst.py
+++ b/tests/test_sunburst.py
@@ -1,7 +1,7 @@
 import pandas as pd
 from plotly.graph_objects import Figure
 
-from ml_matrics import ROOT, spacegroup_sunburst
+from pymatviz import ROOT, spacegroup_sunburst
 
 
 phonons = pd.read_csv(f"{ROOT}/data/matbench-phonons.csv")
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 877e9fb2..4035c0c5 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -1,7 +1,7 @@
 import pytest
 from matplotlib.offsetbox import AnchoredText
 
-from ml_matrics.utils import add_mae_r2_box, get_crystal_sys
+from pymatviz.utils import add_mae_r2_box, get_crystal_sys
 
 from ._helpers import y_pred, y_true