From 68a63781c60d209e1c24f4ae777f85397f256be9 Mon Sep 17 00:00:00 2001 From: naik-aakash Date: Wed, 31 Jul 2024 09:34:35 +0530 Subject: [PATCH 1/3] fix checks for DOSCAR.LSO.lobster files --- src/lobsterpy/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lobsterpy/cli.py b/src/lobsterpy/cli.py index f2033cee..604d76e5 100644 --- a/src/lobsterpy/cli.py +++ b/src/lobsterpy/cli.py @@ -1075,7 +1075,7 @@ def run(args): ) else: dos_files = get_file_paths( - path_to_lobster_calc=Path(os.getcwd()), requested_files=["vasprun", "doscar"] + path_to_lobster_calc=Path(os.getcwd()), requested_files=["vasprun", "doscar"], use_lso_dos=False ) for arg_name in dos_files: setattr(args, arg_name, dos_files[arg_name]) From a35b9e96128886abcc0e0a5c95d21323541a8251 Mon Sep 17 00:00:00 2001 From: naik-aakash Date: Wed, 31 Jul 2024 09:39:16 +0530 Subject: [PATCH 2/3] remove redundant tab spacing in doc-string --- src/lobsterpy/plotting/layout_dicts.py | 98 +++++++++++++------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/src/lobsterpy/plotting/layout_dicts.py b/src/lobsterpy/plotting/layout_dicts.py index 197670c6..1bdf73e9 100644 --- a/src/lobsterpy/plotting/layout_dicts.py +++ b/src/lobsterpy/plotting/layout_dicts.py @@ -23,15 +23,15 @@ } """ - General layout of Plotly figure. - - :param dict titlefont: Line style dictionary. - :param bool showlegend: Legend hide or show. - :param float title_x: x axis title size. - :param float title_y: y axis title size. - :param str hovermode: hover behaviour. - :param str paper_bgcolor: background color. - :param str plot_bgcolor: plot background color. +General layout of Plotly figure. + +:param dict titlefont: Line style dictionary. +:param bool showlegend: Legend hide or show. +:param float title_x: x axis title size. +:param float title_y: y axis title size. +:param str hovermode: hover behaviour. +:param str paper_bgcolor: background color. +:param str plot_bgcolor: plot background color. """ cohp_axis_style_dict = { @@ -50,20 +50,20 @@ } """ - COXX axis style. - - :param dict titlefont: axis title font style. - :param dict tickfont: axis tick font style. - :param str ticks: ticks style. - :param float tickwidth: width of ticks. - :param bool showgrid: show or hide axis grid. - :param bool showline: show or hide axis. - :param bool zeroline: show or hide zero line. - :param str zerolinecolor: color of zero line. - :param float zerolinewidth: width of zero line. - :param bool mirror: mirror axis. - :param float linewidth: width of axis line. - :param str linecolor: color of axis line. +COXX axis style. + +:param dict titlefont: axis title font style. +:param dict tickfont: axis tick font style. +:param str ticks: ticks style. +:param float tickwidth: width of ticks. +:param bool showgrid: show or hide axis grid. +:param bool showline: show or hide axis. +:param bool zeroline: show or hide zero line. +:param str zerolinecolor: color of zero line. +:param float zerolinewidth: width of zero line. +:param bool mirror: mirror axis. +:param float linewidth: width of axis line. +:param str linecolor: color of axis line. """ energy_axis_style_dict = { @@ -82,20 +82,20 @@ } """ - Energy axis style. - - :param dict titlefont: axis title font style. - :param dict tickfont: axis tick font style. - :param str ticks: ticks style. - :param float tickwidth: width of ticks. - :param bool showgrid: show or hide axis grid. - :param bool showline: show or hide axis. - :param bool zeroline: show or hide zero line. - :param str zerolinecolor: color of zero line. - :param float zerolinewidth: width of zero line. - :param bool mirror: mirror axis. - :param float linewidth: width of axis line. - :param str linecolor: color of axis line. +Energy axis style. + +:param dict titlefont: axis title font style. +:param dict tickfont: axis tick font style. +:param str ticks: ticks style. +:param float tickwidth: width of ticks. +:param bool showgrid: show or hide axis grid. +:param bool showline: show or hide axis. +:param bool zeroline: show or hide zero line. +:param str zerolinecolor: color of zero line. +:param float zerolinewidth: width of zero line. +:param bool mirror: mirror axis. +:param float linewidth: width of axis line. +:param str linecolor: color of axis line. """ spin_up_trace_style_dict = { @@ -105,11 +105,11 @@ } """ - Line style for Spin.up traces. +Line style for Spin.up traces. - :param dict line: Line style dictionary. - :param str mode: Plotly mode. - :param str visible: Trace visibility. +:param dict line: Line style dictionary. +:param str mode: Plotly mode. +:param str visible: Trace visibility. """ spin_down_trace_style_dict = { @@ -119,11 +119,11 @@ } """ - Line style for Spin.down traces. +Line style for Spin.down traces. - :param dict line: Line style dictionary. - :param str mode: Plotly mode. - :param str visible: Trace visibility. +:param dict line: Line style dictionary. +:param str mode: Plotly mode. +:param str visible: Trace visibility. """ legend_style_dict = { @@ -133,9 +133,9 @@ } """ - Legend style. +Legend style. - :param str bordercolor: border color of legend. - :param int borderwidth: width of border. - :param str traceorder: order of trace. +:param str bordercolor: border color of legend. +:param int borderwidth: width of border. +:param str traceorder: order of trace. """ From b571c20547cbe6d3c797a014e1849af0b612ffbc Mon Sep 17 00:00:00 2001 From: naik-aakash Date: Wed, 31 Jul 2024 09:55:14 +0530 Subject: [PATCH 3/3] fix tests using DOSCAR.lobster --- tests/cli/test_cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py index 420478fe..a6d05dd6 100644 --- a/tests/cli/test_cli.py +++ b/tests/cli/test_cli.py @@ -357,6 +357,8 @@ def test_calc_quality_summary_nacl(self, tmp_path): "description-quality", "--potcar-symbols", "Na_pv Cl", + "--file-doscar", + "DOSCAR.LSO.lobster", "--bvacomp", "--doscomp", "--erange", @@ -591,6 +593,8 @@ def test_cli_exceptions(self): args = [ "description-quality", "--doscomp", + "-fdos", + "DOSCAR.LSO.lobster", ] test = get_parser().parse_args(args) @@ -602,6 +606,8 @@ def test_cli_exceptions(self): os.chdir(TestDir / "test_data/CsH") args = [ "plot-dos", + "-fdos", + "DOSCAR.LSO.lobster", ] test = get_parser().parse_args(args)