Skip to content

Commit

Permalink
add optional dep seekpath under new dep group 'brillouin'
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Nov 29, 2024
1 parent 15c2642 commit 1f00492
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pymatviz/brillouin.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ def brillouin_zone_3d(
x_coords += [coords[0]]
y_coords += [coords[1]]
z_coords += [coords[2]]
pretty_label = label.replace("\\Gamma", "Γ").replace("GAMMA", "Γ")
for text, repl in [("\\Gamma", "Γ"), ("GAMMA", "Γ"), ("DELTA", "Δ")]:
label = label.replace(text, repl) # noqa: PLW2901
# use <sub> for subscripts
pretty_label = re.sub(r"_(\d+)", r"<sub>\1</sub>", pretty_label)
pretty_label = re.sub(r"_(\d+)", r"<sub>\1</sub>", label)
point_labels += [pretty_label]

fig.add_scatter3d(
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ test = [
"pytest-split>=0.9",
"pytest>=8",
]
brillouin = ["seekpath>=2.1"]

[tool.setuptools.packages.find]
include = ["pymatviz*"]
Expand Down

0 comments on commit 1f00492

Please sign in to comment.