From 7a179c3a84e4cb47f90a3295d852eb2acaaec69a Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi Date: Fri, 16 Jun 2023 09:58:29 -0700 Subject: [PATCH] Checkpoint some quality-of-life fixes --- src/hipscat_import/catalog/arguments.py | 4 ++-- src/hipscat_import/catalog/run_import.py | 3 +++ src/hipscat_import/pipeline.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hipscat_import/catalog/arguments.py b/src/hipscat_import/catalog/arguments.py index 38b59c11..6d83c9f8 100644 --- a/src/hipscat_import/catalog/arguments.py +++ b/src/hipscat_import/catalog/arguments.py @@ -96,8 +96,8 @@ def _check_arguments(self): check_healpix_order_range( self.highest_healpix_order, "highest_healpix_order" ) - if not 100 <= self.pixel_threshold <= 10_000_000: - raise ValueError("pixel_threshold should be between 100 and 10,000,000") + if not 100 <= self.pixel_threshold <= 1_000_000_000: + raise ValueError("pixel_threshold should be between 100 and 1,000,000,000") self.mapping_healpix_order = self.highest_healpix_order if self.catalog_type not in ("source", "object"): diff --git a/src/hipscat_import/catalog/run_import.py b/src/hipscat_import/catalog/run_import.py index 8c5db1ad..7155c2e4 100644 --- a/src/hipscat_import/catalog/run_import.py +++ b/src/hipscat_import/catalog/run_import.py @@ -52,6 +52,7 @@ def _map_pixels(args, client): ): if future.status == "error": # pragma: no cover some_error = True + continue raw_histogram = np.add(raw_histogram, result) resume.write_mapping_start_key(args.tmp_path, future.key) resume.write_histogram(args.tmp_path, raw_histogram) @@ -100,6 +101,7 @@ def _split_pixels(args, alignment_future, client): ): if future.status == "error": # pragma: no cover some_error = True + continue resume.write_splitting_done_key(args.tmp_path, future.key) if some_error: # pragma: no cover raise RuntimeError("Some splitting stages failed. See logs for details.") @@ -145,6 +147,7 @@ def _reduce_pixels(args, destination_pixel_map, client): ): if future.status == "error": # pragma: no cover some_error = True + continue resume.write_reducing_key(args.tmp_path, future.key) if some_error: # pragma: no cover raise RuntimeError("Some reducing stages failed. See logs for details.") diff --git a/src/hipscat_import/pipeline.py b/src/hipscat_import/pipeline.py index d3695344..eb0f47c9 100644 --- a/src/hipscat_import/pipeline.py +++ b/src/hipscat_import/pipeline.py @@ -55,7 +55,7 @@ def pipeline_with_client(args: RuntimeArguments, client: Client): def _send_failure_email(args: RuntimeArguments, exception: Exception): if not args.completion_email_address: - pass + raise exception message = EmailMessage() message["Subject"] = "hipscat-import failure." message["To"] = args.completion_email_address @@ -66,7 +66,7 @@ def _send_failure_email(args: RuntimeArguments, exception: Exception): def _send_success_email(args): if not args.completion_email_address: - pass + return message = EmailMessage() message["Subject"] = "hipscat-import success." message["To"] = args.completion_email_address