Commit c9c9c759 authored by Tara Evaz Zadeh's avatar Tara Evaz Zadeh
Browse files

Edited command line option names and default values

parent db7ad3b6
Pipeline #17668 passed with stage
in 1 minute and 25 seconds
......@@ -35,7 +35,7 @@ def get_exposure_per_tile(
cellIdSource_filepath,
exposure_type="cell",
interpolation_method="linear",
result_filepath="damage_result.gpkg",
result_filepath="damage_result.csv",
):
exposure = pd.read_csv(exposure_filepath)
......@@ -153,7 +153,7 @@ if __name__ == "__main__":
+ "exceeding a set of damage states, given an intensity measure level."
)
parser.add_argument(
"-m",
"-i",
"--interpolation-method",
required=False,
type=str,
......@@ -175,7 +175,7 @@ if __name__ == "__main__":
)
parser.add_argument(
"-f",
"--fragility-pathname",
"--fragilities",
required=True,
type=str,
help="path to the directory that includes all the fragility csv file functions "
......@@ -183,7 +183,7 @@ if __name__ == "__main__":
)
parser.add_argument(
"-t",
"--taxonomy-conversion-filepath",
"--taxonomy-map",
required=True,
type=str,
help="path to the file that includes the taxonomy names and their respective "
......@@ -191,7 +191,7 @@ if __name__ == "__main__":
)
parser.add_argument(
"-g",
"--shakemap-filepath",
"--ground-motion-field",
required=True,
type=str,
help="path to the ground-motion values file. This file should include all the "
......@@ -199,7 +199,7 @@ if __name__ == "__main__":
)
parser.add_argument(
"-c",
"--cellIdSource-filepath",
"--cell-ids",
required=True,
type=str,
help="path to the file that includes all the unique cell-ids you have in your "
......@@ -208,14 +208,14 @@ if __name__ == "__main__":
)
parser.add_argument(
"-e",
"--exposure-filepath",
"--exposure",
required=True,
type=str,
help="path to the file that includes the exposure assets (Required)",
)
parser.add_argument(
"-p",
"--polygonSource-filepath",
"--polygons",
required=True,
type=str,
help="path to the file that includes the origin-ids of either your tiles "
......@@ -226,16 +226,16 @@ if __name__ == "__main__":
)
parser.add_argument(
"-r",
"--result-filepath",
"--results",
required=False,
type=str,
default="damage_result.gpkg",
default="damage_result.csv",
help="path to the file that we want to write the results to (default set to"
+ "damage_result.gpkg) ",
+ "damage_result.csv) ",
)
parser.add_argument(
"-o",
"--overwrite-result-file",
"--overwrite",
required=False,
action="store_true",
help="to overwrite the existing result file if this option is mentioned in "
......@@ -246,20 +246,20 @@ if __name__ == "__main__":
# read arguments from command line
interpolation_method = args.interpolation_method
exposure_type = args.exposure_type
fragility_pathname = args.fragility_pathname
taxonomy_conversion_filepath = args.taxonomy_conversion_filepath
shakemap_filepath = args.shakemap_filepath
cellIdSource_filepath = args.cellIdSource_filepath
exposure_filepath = args.exposure_filepath
polygonSource_filepath = args.polygonSource_filepath
result_filepath = args.result_filepath
overwrite_result_file = args.overwrite_result_file
fragility_pathname = args.fragilities
taxonomy_conversion_filepath = args.taxonomy_map
shakemap_filepath = args.ground_motion_field
cellIdSource_filepath = args.cell_ids
exposure_filepath = args.exposure
polygonSource_filepath = args.polygons
result_filepath = args.results
overwrite_result_file = args.overwrite
if os.path.exists(result_filepath):
if not overwrite_result_file:
raise ValueError(
"result_filepath exists. Choose another name or use "
+ "--overwrite_result_file set to True if you want to "
+ "--overwrite set to True if you want to "
+ "overwrite the results."
)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment