Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/url-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3

- name: Check for broken links
uses: lycheeverse/lychee-action@v2.0.2
uses: lycheeverse/lychee-action@v2
with:
# --exclude-loopback ensures we don't check localhost URLs
args: --exclude-loopback './**/*.md' './**/*.rst'
12 changes: 10 additions & 2 deletions crystal_toolkit/components/fermi_surface.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import typing
from importlib import import_module

import matplotlib.pyplot as plt
from dash import Input, Output
Expand All @@ -14,6 +13,11 @@
from ifermi.surface import FermiSurface
from plotly.graph_objects import Figure

try:
import ifermi.plot as fermi_module
except ImportError:
fermi_module = None


class FermiSurfaceComponent(MPComponent):
"""Component to display FermiSurface objects generated from ifermi.
Expand All @@ -31,6 +35,11 @@ def __init__(
id: str | None = None,
**kwargs,
) -> None:
if fermi_module is None:
raise ImportError(
"`ifermi` must be installed to use the Fermi "
"surface `crystal_toolkit` component."
)
super().__init__(id=id, default_data=fermi_surface, **kwargs)

@staticmethod
Expand All @@ -44,7 +53,6 @@ def get_figure(fermi_surface: FermiSurface, **kwargs) -> Figure:
Returns:
A plotly Figure object.
"""
fermi_module = import_module("ifermi.plot")
plotter = fermi_module.FermiSurfacePlotter(fermi_surface)
fig = plotter.get_plot(plot_type="plotly", **kwargs)

Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [{ name = "Matt Horton", email = "mkhorton@lbl.gov" }]

dependencies = [
"dash-mp-components>=0.5.1rc5,<0.5.2",
"dash>=2.11.0",
"dash>=2.11.0,<4.0.0",
"flask-caching",
"frozendict",
"mp-api",
Expand All @@ -23,14 +23,17 @@ dependencies = [
"shapely",
"webcolors",
"ipython",
"boltztrap2<25.11.1", # compilation issue when installing via pip
]

[project.optional-dependencies]
server = ["dash-extensions", "gunicorn[gevent]", "habanero", "hiphive", "redis"]
robocrys = ["robocrys"]
temdiff = ["py4DSTEM>=0.13.11"]
fermi = ["ifermi", "pyfftw"]
fermi = [
"ifermi",
"pyfftw",
"boltztrap2<25.11.1", # compilation issue when installing via pip
]
phonon = ["phonopy"]
vtk = ["dash-vtk"]
localenv = ["dscribe"]
Expand Down
93 changes: 32 additions & 61 deletions requirements/ubuntu-latest_py3.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,69 +6,59 @@
#
annotated-types==0.7.0
# via pydantic
ase==3.27.0
# via boltztrap2
asttokens==3.0.1
# via stack-data
bibtexparser==1.4.3
bibtexparser==1.4.4
# via pymatgen
blake3==1.0.8
# via emmet-core
blinker==1.9.0
# via flask
boltztrap2==25.3.1
# via crystal_toolkit (pyproject.toml)
boto3==1.42.33
boto3==1.42.68
# via mp-api
botocore==1.42.33
botocore==1.42.68
# via
# boto3
# s3transfer
cachelib==0.13.0
# via flask-caching
certifi==2026.1.4
# via
# netcdf4
# requests
cftime==1.6.5
# via netcdf4
charset-normalizer==3.4.4
certifi==2026.2.25
# via requests
charset-normalizer==3.4.5
# via requests
click==8.3.1
# via flask
contourpy==1.3.3
# via matplotlib
cycler==0.12.1
# via matplotlib
cython==3.2.4
# via boltztrap2
dash==3.4.0
# via crystal_toolkit (pyproject.toml)
dash-mp-components==0.5.1rc5
# via crystal_toolkit (pyproject.toml)
decorator==5.2.1
# via ipython
emmet-core==0.86.2
emmet-core==0.86.3
# via mp-api
executing==2.2.1
# via stack-data
flask==3.1.2
flask==3.1.3
# via
# dash
# flask-caching
flask-caching==2.3.1
# via crystal_toolkit (pyproject.toml)
fonttools==4.61.1
fonttools==4.62.1
# via matplotlib
frozendict==2.4.7
# via crystal_toolkit (pyproject.toml)
idna==3.11
# via requests
imageio==2.37.2
imageio==2.37.3
# via scikit-image
importlib-metadata==8.7.1
# via dash
ipython==9.9.0
ipython==9.10.0
# via crystal_toolkit (pyproject.toml)
ipython-pygments-lexers==1.1.1
# via ipython
Expand All @@ -86,55 +76,44 @@ joblib==1.5.3
# via
# pymatgen
# scikit-learn
kiwisolver==1.4.9
kiwisolver==1.5.0
# via matplotlib
latexcodec==3.0.1
# via pybtex
lazy-loader==0.4
lazy-loader==0.5
# via scikit-image
markupsafe==3.0.3
# via
# flask
# jinja2
# werkzeug
matplotlib==3.10.8
# via
# ase
# boltztrap2
# pymatgen
# via pymatgen
matplotlib-inline==0.2.1
# via ipython
monty==2025.3.3
monty==2026.2.18
# via
# emmet-core
# mp-api
# pymatgen
mp-api==0.45.15
mp-api==0.46.0
# via crystal_toolkit (pyproject.toml)
mpmath==1.3.0
# via sympy
msgpack==1.1.2
# via mp-api
narwhals==2.15.0
narwhals==2.18.0
# via plotly
nest-asyncio==1.6.0
# via dash
netcdf4==1.7.4
# via boltztrap2
networkx==3.6.1
# via
# pymatgen
# scikit-image
numpy==2.4.1
numpy==2.4.3
# via
# ase
# boltztrap2
# cftime
# contourpy
# imageio
# matplotlib
# monty
# netcdf4
# pandas
# pymatgen
# pymatgen-io-validation
Expand All @@ -144,7 +123,7 @@ numpy==2.4.1
# shapely
# spglib
# tifffile
orjson==3.11.5
orjson==3.11.7
# via
# mp-api
# pymatgen
Expand All @@ -156,18 +135,18 @@ packaging==26.0
# scikit-image
palettable==3.3.3
# via pymatgen
pandas==3.0.0
pandas==3.0.1
# via pymatgen
parso==0.8.5
parso==0.8.6
# via jedi
pexpect==4.9.0
# via ipython
pillow==12.1.0
pillow==12.1.1
# via
# imageio
# matplotlib
# scikit-image
plotly==6.5.2
plotly==6.6.0
# via
# dash
# pymatgen
Expand All @@ -186,7 +165,7 @@ pydantic==2.12.5
# pymatgen-io-validation
pydantic-core==2.41.5
# via pydantic
pydantic-settings==2.12.0
pydantic-settings==2.13.1
# via
# crystal_toolkit (pyproject.toml)
# emmet-core
Expand All @@ -212,7 +191,7 @@ python-dateutil==2.9.0.post0
# botocore
# matplotlib
# pandas
python-dotenv==1.2.1
python-dotenv==1.2.2
# via pydantic-settings
pyyaml==6.0.3
# via pybtex
Expand All @@ -234,34 +213,28 @@ scikit-image==0.26.0
# via crystal_toolkit (pyproject.toml)
scikit-learn==1.8.0
# via crystal_toolkit (pyproject.toml)
scipy==1.17.0
scipy==1.17.1
# via
# ase
# boltztrap2
# pymatgen
# scikit-image
# scikit-learn
shapely==2.1.2
# via crystal_toolkit (pyproject.toml)
six==1.17.0
# via python-dateutil
smart-open==7.5.0
# via mp-api
spglib==2.7.0
# via
# boltztrap2
# pymatgen
# via pymatgen
stack-data==0.6.3
# via ipython
sympy==1.14.0
# via pymatgen
tabulate==0.9.0
tabulate==0.10.0
# via pymatgen
threadpoolctl==3.6.0
# via scikit-learn
tifffile==2026.1.14
tifffile==2026.3.3
# via scikit-image
tqdm==4.67.1
tqdm==4.67.3
# via pymatgen
traitlets==5.14.3
# via
Expand All @@ -288,16 +261,14 @@ urllib3==2.6.3
# via
# botocore
# requests
wcwidth==0.3.1
wcwidth==0.6.0
# via prompt-toolkit
webcolors==25.10.0
# via crystal_toolkit (pyproject.toml)
werkzeug==3.1.5
werkzeug==3.1.6
# via
# dash
# flask
wrapt==2.0.1
# via smart-open
zipp==3.23.0
# via importlib-metadata

Expand Down
Loading
Loading