Skip to content

Commit d5c8d39

Browse files
committed
add deprecation
1 parent 7e1d215 commit d5c8d39

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

janus_core/cli/phonons.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
Summary,
2727
Tracker,
2828
)
29-
from janus_core.cli.utils import yaml_converter_callback
29+
from janus_core.cli.utils import deprecated_option, yaml_converter_callback
3030

3131
app = Typer()
3232

@@ -110,11 +110,20 @@ def phonons(
110110
),
111111
] = 0.1,
112112
minimize_kwargs: MinimizeKwargs = None,
113-
hdf5: Annotated[
113+
force_consts_to_hdf5: Annotated[
114114
bool,
115115
Option(
116116
help="Whether to save force constants in hdf5.",
117117
rich_help_panel="Calculation",
118+
callback=deprecated_option,
119+
hidden=True,
120+
),
121+
] = True,
122+
hdf5: Annotated[
123+
bool,
124+
Option(
125+
help="Whether to save force constants and bands in hdf5.",
126+
rich_help_panel="Calculation",
118127
),
119128
] = True,
120129
plot_to_file: Annotated[
@@ -228,8 +237,11 @@ def phonons(
228237
Default is 0.1.
229238
minimize_kwargs
230239
Other keyword arguments to pass to geometry optimizer. Default is {}.
240+
force_consts_to_hdf5
241+
Deprecated. Please use `hdf5`.
231242
hdf5
232-
Whether to save force constants in hdf5 format. Default is True.
243+
Whether to save force constants and bands in hdf5 format.
244+
Default is True.
233245
plot_to_file
234246
Whether to plot. Default is False.
235247
write_full

0 commit comments

Comments
 (0)