diff --git a/watch/cli/smartflow/run_fixups.py b/watch/cli/smartflow/run_fixups.py index 1b66218c113302c01f14b3b3393e76f8c8d8b602..3d6a880c223f5e3e13f7a3493bb6610743f42b25 100755 --- a/watch/cli/smartflow/run_fixups.py +++ b/watch/cli/smartflow/run_fixups.py @@ -34,6 +34,11 @@ class FixupConfig(scfg.DataConfig): S3 Output directory for STAC item / asset egress ''')) + performer_suffix = scfg.Value('KIT', type=str, required=True, help=ub.paragraph( + ''' + Performer suffix for output files + ''')) + region_models_asset_name = scfg.Value('cropped_region_models_sc', type=str, required=False, help=ub.paragraph( ''' Which region model assets to ingress and fix up @@ -117,7 +122,8 @@ def main(): util_framework.ta2_collate_output(None, output_region_dpath, output_site_dpath, - config.ta2_s3_collation_bucket) + config.ta2_s3_collation_bucket, + performer_suffix=config.performer_suffix) if __name__ == '__main__': diff --git a/watch/utils/util_framework.py b/watch/utils/util_framework.py index fa516ab89ba69026084b1433a019b07397beacb0..a66406acae86b2eeb6016d34aeeaa0bc0d653df6 100644 --- a/watch/utils/util_framework.py +++ b/watch/utils/util_framework.py @@ -740,7 +740,10 @@ def ta2_collate_output(aws_base_command, local_region_dir, local_sites_dir, def _get_suffixed_basename(local_path): base, ext = os.path.splitext(os.path.basename(local_path)) - return "{}_{}{}".format(base, performer_suffix, ext) + if performer_suffix is not None and performer_suffix != '': + return "{}_{}{}".format(base, performer_suffix, ext) + else: + return "{}{}".format(base, ext) for region in glob(join(local_region_dir, '*.geojson')):