Skip to content

Commit 84283b1

Browse files
committed
fix broken imports for Scene, Surface, Arrows in tests/test_chgcar.py
were pulled from import crystal_toolkit.components as ctc but actually live in import crystal_toolkit.core.scene as cts
1 parent b589099 commit 84283b1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/test_chgcar.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import dash
2-
import dash_html_components as html
32
import numpy as np
43
from pymatgen.io.vasp import Chgcar
54
from skimage import measure
65

76
import crystal_toolkit.components as ctc
7+
import crystal_toolkit.core.scene as cts
88

99
app = dash.Dash(__name__)
1010

@@ -39,11 +39,11 @@ def get_mesh(chgcar, data_tag="total", isolvl=2.0, step_size=3):
3939
pos = [vert for triangle in vertices[faces].tolist() for vert in triangle]
4040

4141
add_comp = [
42-
ctc.Scene(
42+
cts.Scene(
4343
"test",
4444
contents=[
45-
ctc.Surface(positions=pos),
46-
ctc.Arrows(positionPairs=[[[0, 0, 0], [1, 1, 1]]]),
45+
cts.Surface(positions=pos),
46+
cts.Arrows(positionPairs=[[[0, 0, 0], [1, 1, 1]]]),
4747
],
4848
)
4949
]
@@ -57,9 +57,10 @@ def get_mesh(chgcar, data_tag="total", isolvl=2.0, step_size=3):
5757

5858
# for a custom-sized component, use `struct_component.struct_layout` and put
5959
# it inside a Div of the required size
60-
app.layout = html.Div(
60+
app.layout = dash.html.Div(
6161
[
62-
ctc.MPComponent.all_app_stores(), # not required in this minimal example, but usually necessary for interactivity
62+
# not required in this minimal example but usually necessary for interactivity
63+
ctc.MPComponent.all_app_stores(),
6364
struct_component.standard_layout,
6465
]
6566
)

0 commit comments

Comments
 (0)