Skip to content

Commit f931b7e

Browse files
committed
list all args in get_site_scene() doc str
1 parent f31d9a0 commit f931b7e

File tree

6 files changed

+32
-23
lines changed

6 files changed

+32
-23
lines changed

crystal_toolkit/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2023.02.28.1"
1+
__version__ = "2023.02.28.1"

crystal_toolkit/components/phonon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ def get_ph_bandstructure_traces(bs, freq_range):
281281
bands = []
282282
for band_num in range(bs.nb_bands):
283283
for segment in bs_data["frequency"]:
284-
if any([v <= freq_range[1] for v in segment[band_num]]) and any(
285-
[v >= freq_range[0] for v in segment[band_num]]
284+
if any(v <= freq_range[1] for v in segment[band_num]) and any(
285+
v >= freq_range[0] for v in segment[band_num]
286286
):
287287
bands.append(band_num)
288288

crystal_toolkit/renderables/site.py

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,31 @@ def get_site_scene(
4646
magmom_scale: float = 1.0,
4747
legend: Legend | None = None,
4848
) -> Scene:
49-
"""Args:
50-
connected_sites:
51-
connected_sites_not_drawn:
52-
hide_incomplete_edges:
53-
site_idx:
54-
incomplete_edge_length_scale:
55-
connected_sites_colors:
56-
connected_sites_not_drawn_colors:
57-
origin: x,y,z fractional coordinates of the origin
58-
explicitly_calculate_polyhedra_hull:
59-
legend:
49+
"""Get a Scene object for a Site.
50+
51+
Args:
52+
connected_sites (list[ConnectedSite], optional): Defaults to None.
53+
connected_sites_not_drawn (list[ConnectedSite], optional): Defaults to None.
54+
hide_incomplete_edges (bool, optional): Defaults to False.
55+
site_idx (int | None, optional): Defaults to 0.
56+
incomplete_edge_length_scale (float | None, optional): Defaults to 1.0.
57+
connected_sites_colors (list[str] | None, optional): Defaults to None.
58+
connected_sites_not_drawn_colors (list[str] | None, optional): Defaults to None.
59+
origin (Sequence[float] | None, optional): Defaults to None.
60+
draw_polyhedra (bool, optional): Defaults to True.
61+
explicitly_calculate_polyhedra_hull (bool, optional): Defaults to False.
62+
bond_radius (float, optional): Defaults to 0.1.
63+
draw_magmoms (bool, optional): Defaults to True.
64+
show_atom_idx (bool, optional): Defaults to False.
65+
show_atom_coord (bool, optional): Defaults to True.
66+
show_bond_order (bool, optional): Defaults to True.
67+
show_bond_length (bool, optional): Defaults to False.
68+
visualize_bond_orders (bool, optional): Defaults to False.
69+
magmom_scale (float, optional): Defaults to 1.0.
70+
legend (Legend | None, optional): Defaults to None.
71+
6072
Returns:
73+
Scene: The scene object containing atoms, bonds, polyhedra, magmoms.
6174
"""
6275
atoms = []
6376
bonds = []

jupyterlab-extension/crystaltoolkit-extension/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__all__ = ["__version__"]
22

33

4-
def _fetchVersion():
4+
def _fetch_version():
55
import json
66
import os
77

@@ -17,4 +17,4 @@ def _fetchVersion():
1717
raise FileNotFoundError(f"Could not find package.json under dir {HERE}")
1818

1919

20-
__version__ = _fetchVersion()
20+
__version__ = _fetch_version()

jupyterlab-extension/setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
crystaltoolkit-extension setup
3-
"""
1+
"""crystaltoolkit-extension setup."""
42
import json
53
import os
64

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ exclude = ["docs_rst"]
5656

5757
[tool.setuptools_scm]
5858
write_to = "crystal_toolkit/_version.py"
59-
write_to_template = '__version__ = "{version}"'
59+
write_to_template = '__version__ = "{version}"\n'
6060
local_scheme = "no-local-version"
6161

6262
[build-system]
@@ -96,14 +96,12 @@ ignore = [
9696
"SIM115", # Use context handler for opening files
9797
]
9898
pydocstyle.convention = "google"
99-
isort.known-third-party = ["wandb"]
10099

101100
[tool.ruff.per-file-ignores]
102101
"**/tests/*" = ["D"]
103-
"jupyterlab-extension/setup.py" = ["D"]
104102
"__init__.py" = ["F401"]
105103
# future annotations incompatible with pydantic BaseModel schemas below py 3.10
106-
# TODO remove once py 3.10 is the minimum supported version
104+
# TODO remove once python 3.10 is the minimum supported version
107105
"crystal_toolkit/settings.py" = ["UP007"]
108106
# TODO fix all undefined variables in bandstructure.py
109107
"crystal_toolkit/components/bandstructure.py" = ["F821"]

0 commit comments

Comments
 (0)