From 00f44d6c0b7200388fdbc25a9b587c5ed299846c Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 26 Apr 2024 16:57:23 +0200 Subject: [PATCH] Fix help page of the collectwavecoeffs script --- .../src/sktools/scripts/collectwavecoeffs.py | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/sktools/src/sktools/scripts/collectwavecoeffs.py b/sktools/src/sktools/scripts/collectwavecoeffs.py index 37039f99..fe62e3d4 100644 --- a/sktools/src/sktools/scripts/collectwavecoeffs.py +++ b/sktools/src/sktools/scripts/collectwavecoeffs.py @@ -6,11 +6,12 @@ import os +import argparse import sktools.common as sc from sktools.skgen import compression -from sktools.scripts.skgen import get_parser_and_subparser_container, \ - get_onecnt_common_parser, setup_parser_wavecomp, \ +from sktools.scripts.skgen import get_onecnt_common_parser, \ + setup_parser_wavecomp, \ parse_command_line_and_run_subcommand, \ convert_argument_to_elements, merge_skdefs from sktools import PACKAGE_VERSION @@ -20,7 +21,7 @@ SCRIPTNAME = sc.get_script_name() -USAGE = USAGE = \ +USAGE = \ '''Collects coefficient information for Waveplot. It iterates over the elements defined in skdef.hsd and collects the wavefunction coefficients and other information necessary for Waveplot. The homonuclear SK-files as @@ -150,6 +151,19 @@ def setup_parser_main(parser): help='Logging level (default: info)') +def get_parser_and_subparser_container(): + '''Instantiates parser and subparser for the collectwavecoeffs script. + + Returns: + parser (ArgumentParser): parser instance + subparser (ArgumentParser): subparser instance + ''' + parser = argparse.ArgumentParser(description=USAGE) + subparsers = parser.add_subparsers( + title='available subcommands', help='') + return parser, subparsers + + def setup_logger(loglevel): global logger logger = sc.get_script_logger(loglevel, SCRIPTNAME)