Skip to content

Commit 5a39e0c

Browse files
committed
update PAPI caller
1 parent a93640f commit 5a39e0c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

external_caller.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77

88
from papipyplug import parse_input, plugin_logger, print_results
99

10-
PLUGIN_PARAMS = {"required": ["bucket", "s3_prefix", "counties"], "optional": ["bucket"]}
10+
PLUGIN_PARAMS = {"required": ["in_prefix", "crs", "out_prefix"]}
1111

1212
if __name__ == "__main__":
1313
plugin_logger()
1414

1515
input_params = parse_input(sys.argv, PLUGIN_PARAMS)
1616

17-
in_path = input_params.get("in_path")
17+
in_prefix = input_params.get("in_prefix")
1818
crs = input_params.get("crs")
19-
out_path = input_params.get("out_path")
19+
out_prefix = input_params.get("out_prefix")
2020

21-
if in_path == "TEST":
22-
results = f"{crs} | {out_path}"
21+
if in_prefix == "TEST":
22+
results = f"{crs} | {out_prefix}"
2323
else:
24-
results = process_in_place_s3(in_path, crs, out_path)
24+
results = process_in_place_s3(in_prefix, crs, out_prefix)
2525
print_results(results)

ras_stac/ras1d/converter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@ def ras_to_stac(ras_dir: str, crs: str):
193193
converter.export_stac(str(Path(ras_dir) / "debugging.json"))
194194

195195

196-
def process_in_place_s3(in_dir: str, crs: str, out_dir: str):
196+
def process_in_place_s3(in_prefix: str, crs: str, out_prefix: str):
197197
"""Convert a HEC-RAS model to a STAC item and save to same directory."""
198-
converter = from_directory(in_dir, crs)
199-
thumb_path = out_dir + "Thumbnail.png"
198+
converter = from_directory(in_prefix, crs)
199+
thumb_path = out_prefix + "Thumbnail.png"
200200
converter.export_thumbnail(thumb_path)
201-
stac_path = out_dir + f"{converter.idx}.json"
201+
stac_path = out_prefix + f"{converter.idx}.json"
202202
converter.export_stac(stac_path)
203-
return {"in_path": in_dir, "crs": crs, "thumb_path": thumb_path, "stac_path": stac_path}
203+
return {"in_path": in_prefix, "crs": crs, "thumb_path": thumb_path, "stac_path": stac_path}
204204

205205

206206
if __name__ == "__main__":

0 commit comments

Comments
 (0)