Skip to content

Commit

Permalink
Merge pull request #18 from NASA-IMPACT/fix/rasterio_versioning
Browse files Browse the repository at this point in the history
Fix id_str arg parsing short value and doc string.
  • Loading branch information
sharkinsspatial authored Jun 24, 2024
2 parents 008838d + bddb9d0 commit 9e8d4de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hls_vi/generate_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <input_dir> -o <output_dir>"
help_text = f"usage: {command} -i <input_dir> -o <output_dir> -s <id_string>"

argv = sys.argv[1:]

Expand All @@ -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:
Expand Down

0 comments on commit 9e8d4de

Please sign in to comment.