Skip to content

Commit

Permalink
Merge pull request #90 from astronomy-commons/delucchi/qol
Browse files Browse the repository at this point in the history
Checkpoint some quality-of-life fixes
  • Loading branch information
delucchi-cmu committed Jun 22, 2023
2 parents 1a27d41 + 7a179c3 commit 328b9fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hipscat_import/catalog/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
3 changes: 3 additions & 0 deletions src/hipscat_import/catalog/run_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.")
Expand Down Expand Up @@ -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.")
Expand Down

0 comments on commit 328b9fc

Please sign in to comment.