You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stable PyPI release needed: 2026.7.20 cannot display structures with current pymatgen and flask-caching #545
The latest stable release (2026.7.20) no longer displays any Structure or Molecule in Jupyter for a fresh install. I would like a stable PyPI release that fixes both of the problems below, so that my pymatgen and atomate2 tutorials can go back to a plain pip install crystal-toolkit.
Repro in a fresh environment (a fresh pip install crystal-toolkit jupyter today gives crystal-toolkit 2026.7.20, pymatgen 2026.9.24 / pymatgen-core 2026.9.23, flask-caching 2.5.1, dash 3.4.0; tested on Python 3.12 with JupyterLab 4.6.4):
importcrystal_toolkitfrompymatgen.coreimportLattice, StructureStructure(Lattice.cubic(3.9), ["Pb"], [[0, 0, 0]]) # last line of a notebook cell
crystal_toolkit/core/plugin.py: "simple" -> "SimpleCache", and "null" -> "NullCache" (the DEBUG_MODE path breaks the same way)
crystal_toolkit/apps/main.py: "null" -> "NullCache" and "redis" -> "RedisCache"
The class names also work on older flask-caching (Cache(config={"CACHE_TYPE": "SimpleCache"}) and "NullCache" initialize on 2.2.0 and 2.4.1), so no new minimum version is needed.
A release with only #542 still breaks every structure display because of (2).
For now the tutorials pin to the following, which works with pymatgen 2026.9.24 on Python 3.12 and 3.14:
The latest stable release (2026.7.20) no longer displays any
StructureorMoleculein Jupyter for a fresh install. I would like a stable PyPI release that fixes both of the problems below, so that my pymatgen and atomate2 tutorials can go back to a plainpip install crystal-toolkit.Repro in a fresh environment (a fresh
pip install crystal-toolkit jupytertoday gives crystal-toolkit 2026.7.20, pymatgen 2026.9.24 / pymatgen-core 2026.9.23, flask-caching 2.5.1, dash 3.4.0; tested on Python 3.12 with JupyterLab 4.6.4):pymatgen >= 2026.9.23 removed
StructureGraph.with_empty_graph/with_local_env_strategyand theMoleculeGraphequivalents ([Breaking] Remove deprecated function/class/methods whose deadlines are in 2025 pymatgen-core#103). This is fixed on main in Fix deprecated from pmg #542, but so far only in pre-releases (e.g. 2026.8.28rc4). Thefrom_*replacements already exist in pymatgen 2024.10.22, the current minimum in the requirements, so Fix deprecated from pmg #542 does not need a new pymatgen floor.flask-caching >= 2.5.0 (released 2026-08-24) removed the lowercase cache-type aliases. This is [Bug]: Flask-Caching compatibility issue: need explicit class name #544 and is not fixed yet, including in 2026.8.28rc4.
The fix is more than the one line in [Bug]: Flask-Caching compatibility issue: need explicit class name #544. Every lowercase
CACHE_TYPEneeds its class name:crystal_toolkit/core/plugin.py:"simple"->"SimpleCache", and"null"->"NullCache"(theDEBUG_MODEpath breaks the same way)crystal_toolkit/apps/main.py:"null"->"NullCache"and"redis"->"RedisCache"The class names also work on older flask-caching (
Cache(config={"CACHE_TYPE": "SimpleCache"})and"NullCache"initialize on 2.2.0 and 2.4.1), so no new minimum version is needed.A release with only #542 still breaks every structure display because of (2).
For now the tutorials pin to the following, which works with pymatgen 2026.9.24 on Python 3.12 and 3.14:
I tested this by executing the pymatgen tutorial notebooks (https://github.com/computron/pymatgen_tutorials, Parts 1, 4, and 5; all structure and molecule displays render) and the structure display cell in https://github.com/computron/atomate2_tutorials Part 1. Once there is a release, I will switch both back to an unpinned install.