From bddb9d03712a1622710068f4493697d98470b269 Mon Sep 17 00:00:00 2001 From: sharkinsspatial Date: Mon, 24 Jun 2024 11:28:54 -0600 Subject: [PATCH] Fix id_str arg parsing short value and doc string. --- hls_vi/generate_indices.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hls_vi/generate_indices.py b/hls_vi/generate_indices.py index 064ce9c..65ac558 100644 --- a/hls_vi/generate_indices.py +++ b/hls_vi/generate_indices.py @@ -348,11 +348,11 @@ def __call__(self, data: BandData) -> np.ma.masked_array: return np.ma.round(scaled_index).astype(np.int16) -def parse_args() -> Tuple[Path, Path]: - short_options = "i:o:" - long_options = ["inputdir=", "outputdir="] +def parse_args() -> Tuple[Path, Path, str]: + short_options = "i:o:s:" + long_options = ["inputdir=", "outputdir=", "idstring="] command = os.path.basename(sys.argv[0]) - help_text = f"usage: {command} -i -o " + help_text = f"usage: {command} -i -o -s " argv = sys.argv[1:] @@ -369,7 +369,7 @@ def parse_args() -> Tuple[Path, Path]: input_dir = value elif option in ("-o", "--outputdir"): output_dir = value - elif option in ("-id", "--idstring"): + elif option in ("-s", "--idstring"): id_str = value if input_dir is None or output_dir is None: