Closed jmmshn closed 1 month ago
Thanks for patch, I believe you still have write access so please merge when ready!
Thanks, @mkhorton, will merge once I figure out the tests. It's been a while since I looked at this code and some things have changed quite a bit.
It looks like my test failures are related to the dash_duo
setup which I'm pretty unfamiliar with.
@janosh can you direct me where how to fix this?
=========================== short test summary info ============================
FAILED crystal_toolkit/apps/examples/tests/test_bandstructure.py::test_bs - AssertionError: Unexpected browser logs=None
assert None == []
FAILED crystal_toolkit/apps/examples/tests/test_basic.py::test_hello_scientist - AssertionError: Unexpected browser logs=None
assert None == []
FAILED crystal_toolkit/apps/examples/tests/test_basic.py::test_hello_structure - AssertionError: Unexpected browser logs=None
assert None == []
FAILED crystal_toolkit/apps/examples/tests/test_basic.py::test_hello_structure_interactive - AssertionError: Unexpected browser logs=None
assert None == []
FAILED crystal_toolkit/apps/examples/tests/test_diffraction.py::test_diffraction - AssertionError: Unexpected browser logs=None
assert None == []
FAILED crystal_toolkit/apps/examples/tests/test_fermi_surface.py::test_diffraction - AssertionError: Unexpected browser logs=None
assert None == []
FAILED crystal_toolkit/apps/examples/tests/test_structure.py::test_structure - AssertionError: Unexpected browser logs=None
assert None == []
============================== 7 failed in 40.18s ==============================
Error: Process completed with exit code 1.
nvm it's just due to some drift in behavior of dash things I guess. This brings up another question: do we need to lock down versions of dependencies for testing?
Minor fixes
Scene._repr_mimebundle_
callsself.as_dict
. SinceScene
is notMSONable
this breaks the code.Allow
display_color
to be set on a subset of atoms. If thedisplay_color
is set only on a subset of atoms, pymatgen will set the rest toNone
, in those cases we should still use the defaults.Display
MSONables
. There were a couple of typo bugs in the Jupyter code for MSONables.if self.get_scene
->hasattr(self, "get_scene")
as_dict
results need to be jsantized before rendering.Local installations can run into weird issues since we are supporting so many different codes. Namely installing IFermi on Mac is sometimes problematic due to FFTW package. Moving the imports inside the test allows you to avoid these imports easily using
pytest -k
Moved unused tests into the
root/tests
directory and updated them to work with the current code.Added test for the interaction between the patched MSONable objects and Ipython