Skip to content

Commit 3d08f81

Browse files
committed
make run commands in example files generic since most were using the wrong file path
1 parent 4d52865 commit 3d08f81

12 files changed

+15
-18
lines changed

crystal_toolkit/apps/examples/bandstructure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
ctc.register_crystal_toolkit(app, layout=my_layout)
4040

4141

42-
# allow app to be run using "python structure.py"
42+
# run this app with "python path/to/this/file.py"
4343
# in production, deploy behind gunicorn or similar
4444
# see Dash documentation for more information
4545
if __name__ == "__main__":

crystal_toolkit/apps/examples/basic_hello_world.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# create your layout
1010
app.layout = html.Span(["Hello scientist!"])
1111

12-
# allow app to be run using "python app.py"
12+
# run this app with "python path/to/this/file.py"
1313
# in production, deploy behind gunicorn or similar
1414
# see Dash documentation for more information
1515
if __name__ == "__main__":

crystal_toolkit/apps/examples/diffraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# as explained in "preamble" section in documentation
2828
ctc.register_crystal_toolkit(app=app, layout=my_layout)
2929

30-
# allow app to be run using "python structure.py"
30+
# run this app with "python path/to/this/file.py"
3131
# in production, deploy behind gunicorn or similar
3232
# see Dash documentation for more information
3333
if __name__ == "__main__":

crystal_toolkit/apps/examples/diffraction_dynamic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def load_structure(n_clicks: int) -> Structure:
2828
return structure
2929

3030

31-
# allow app to be run using "python structure.py"
31+
# run this app with "python path/to/this/file.py"
3232
# in production, deploy behind gunicorn or similar
3333
# see Dash documentation for more information
3434
if __name__ == "__main__":

crystal_toolkit/apps/examples/diffraction_empty.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import dash
22

3-
# create our crystal structure using pymatgen
4-
from pymatgen.core.lattice import Lattice
5-
from pymatgen.core.structure import Structure
6-
73
import crystal_toolkit.components as ctc
84
from crystal_toolkit.helpers.layouts import H1, Container
95
from crystal_toolkit.settings import SETTINGS
106

11-
app = dash.Dash(assets_folder=SETTINGS.ASSETS_PATH)
7+
# create our crystal structure using pymatgen
8+
129

13-
structure = Structure(Lattice.cubic(4.2), ["Na", "K"], [[0, 0, 0], [0.5, 0.5, 0.5]])
10+
app = dash.Dash(assets_folder=SETTINGS.ASSETS_PATH)
1411

1512
xrd_component = ctc.XRayDiffractionComponent()
1613

@@ -22,7 +19,7 @@
2219
# as explained in "preamble" section in documentation
2320
ctc.register_crystal_toolkit(app=app, layout=my_layout)
2421

25-
# allow app to be run using "python structure.py"
22+
# run this app with "python path/to/this/file.py"
2623
# in production, deploy behind gunicorn or similar
2724
# see Dash documentation for more information
2825
if __name__ == "__main__":

crystal_toolkit/apps/examples/kwarg_inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def add_inputs(n_clicks):
8888
# tell Crystal Toolkit about the app and layout we want to display
8989
ctc.register_crystal_toolkit(app=app, layout=my_layout, cache=None)
9090

91-
# allow app to be run using "python app.py"
91+
# run this app with "python path/to/this/file.py"
9292
# in production, deploy behind gunicorn or similar
9393
# see Dash documentation for more information
9494
if __name__ == "__main__":

crystal_toolkit/apps/examples/phase_diagram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
app.layout = ctc.crystal_toolkit_layout(my_layout)
5959

6060

61-
# allow app to be run using "python structure.py"
61+
# run this app with "python path/to/this/file.py"
6262
# in production, deploy behind gunicorn or similar
6363
# see Dash documentation for more information
6464
if __name__ == "__main__":

crystal_toolkit/apps/examples/pourbaix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
ctc.register_crystal_toolkit(app=app, layout=my_layout)
3434

35-
# allow app to be run using "python pourbaix.py"
35+
# run this app with "python path/to/this/file.py"
3636
# in production, deploy behind gunicorn or similar
3737
# see Dash documentation for more information
3838
if __name__ == "__main__":

crystal_toolkit/apps/examples/structure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# tell crystal toolkit about your app and layout
3737
ctc.register_crystal_toolkit(app, layout=my_layout)
3838

39-
# allow app to be run using "python structure.py"
39+
# run this app with "python path/to/this/file.py"
4040
# in production, deploy behind gunicorn or similar
4141
# see Dash documentation for more information
4242
if __name__ == "__main__":

crystal_toolkit/apps/examples/structure_magnetic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# tell crystal toolkit about your app and layout
4242
ctc.register_crystal_toolkit(app, layout=my_layout)
4343

44-
# allow app to be run using "python structure.py"
44+
# run this app with "python path/to/this/file.py"
4545
# in production, deploy behind gunicorn or similar
4646
# see Dash documentation for more information
4747
if __name__ == "__main__":

0 commit comments

Comments
 (0)