From 6c4451fcccc805d0fdee80105b7f183879cccb34 Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi <113376043+delucchi-cmu@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:06:52 -0400 Subject: [PATCH] Use hipscat for healpix dependency. (#346) * Use hipscat for healpix dependency. * isort . --- pyproject.toml | 1 - src/hipscat_import/catalog/map_reduce.py | 2 +- src/hipscat_import/catalog/resume_plan.py | 2 +- src/hipscat_import/catalog/sparse_histogram.py | 2 +- src/hipscat_import/margin_cache/margin_cache_arguments.py | 2 +- src/hipscat_import/margin_cache/margin_cache_map_reduce.py | 2 +- src/hipscat_import/soap/resume_plan.py | 2 +- tests/hipscat_import/catalog/test_map_reduce.py | 2 +- tests/hipscat_import/conftest.py | 2 +- .../hipscat_import/margin_cache/test_margin_cache_map_reduce.py | 2 +- 10 files changed, 9 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9315e911..6a94e18e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,6 @@ dynamic = ["version"] dependencies = [ "dask[complete]>=2024.3.0", # Includes dask expressions. "deprecated", - "healpy", "hipscat >=0.3.5", "ipykernel", # Support for Jupyter notebooks "numpy", diff --git a/src/hipscat_import/catalog/map_reduce.py b/src/hipscat_import/catalog/map_reduce.py index 7326335a..5c6508c0 100644 --- a/src/hipscat_import/catalog/map_reduce.py +++ b/src/hipscat_import/catalog/map_reduce.py @@ -3,7 +3,7 @@ import pickle from typing import Any, Dict, Union -import healpy as hp +import hipscat.pixel_math.healpix_shim as hp import numpy as np import pyarrow as pa import pyarrow.parquet as pq diff --git a/src/hipscat_import/catalog/resume_plan.py b/src/hipscat_import/catalog/resume_plan.py index 5ff33f2e..8d7cb70b 100644 --- a/src/hipscat_import/catalog/resume_plan.py +++ b/src/hipscat_import/catalog/resume_plan.py @@ -6,7 +6,7 @@ from dataclasses import dataclass, field from typing import List, Optional, Tuple -import healpy as hp +import hipscat.pixel_math.healpix_shim as hp import numpy as np from hipscat import pixel_math from hipscat.io import FilePointer, file_io diff --git a/src/hipscat_import/catalog/sparse_histogram.py b/src/hipscat_import/catalog/sparse_histogram.py index 14367942..ff2a3ebc 100644 --- a/src/hipscat_import/catalog/sparse_histogram.py +++ b/src/hipscat_import/catalog/sparse_histogram.py @@ -1,6 +1,6 @@ """Sparse 1-D histogram of healpix pixel counts.""" -import healpy as hp +import hipscat.pixel_math.healpix_shim as hp import numpy as np from scipy.sparse import csc_array, load_npz, save_npz, sparray diff --git a/src/hipscat_import/margin_cache/margin_cache_arguments.py b/src/hipscat_import/margin_cache/margin_cache_arguments.py index 11362cde..fa689a91 100644 --- a/src/hipscat_import/margin_cache/margin_cache_arguments.py +++ b/src/hipscat_import/margin_cache/margin_cache_arguments.py @@ -2,7 +2,7 @@ from dataclasses import dataclass, field from typing import Any, Dict, List, Union -import healpy as hp +import hipscat.pixel_math.healpix_shim as hp from hipscat.catalog import Catalog from hipscat.catalog.margin_cache.margin_cache_catalog_info import MarginCacheCatalogInfo from hipscat.io.validation import is_valid_catalog diff --git a/src/hipscat_import/margin_cache/margin_cache_map_reduce.py b/src/hipscat_import/margin_cache/margin_cache_map_reduce.py index 0f621318..a96251d4 100644 --- a/src/hipscat_import/margin_cache/margin_cache_map_reduce.py +++ b/src/hipscat_import/margin_cache/margin_cache_map_reduce.py @@ -1,4 +1,4 @@ -import healpy as hp +import hipscat.pixel_math.healpix_shim as hp import numpy as np import pandas as pd import pyarrow as pa diff --git a/src/hipscat_import/soap/resume_plan.py b/src/hipscat_import/soap/resume_plan.py index 3afd8626..c1b7e973 100644 --- a/src/hipscat_import/soap/resume_plan.py +++ b/src/hipscat_import/soap/resume_plan.py @@ -5,7 +5,7 @@ from dataclasses import dataclass, field from typing import List, Optional, Tuple -import healpy as hp +import hipscat.pixel_math.healpix_shim as hp import numpy as np from hipscat.catalog import Catalog from hipscat.io import file_io diff --git a/tests/hipscat_import/catalog/test_map_reduce.py b/tests/hipscat_import/catalog/test_map_reduce.py index 34c72147..ffe5434d 100644 --- a/tests/hipscat_import/catalog/test_map_reduce.py +++ b/tests/hipscat_import/catalog/test_map_reduce.py @@ -4,8 +4,8 @@ import pickle from io import StringIO -import healpy as hp import hipscat.pixel_math as hist +import hipscat.pixel_math.healpix_shim as hp import numpy as np import numpy.testing as npt import pandas as pd diff --git a/tests/hipscat_import/conftest.py b/tests/hipscat_import/conftest.py index e16e9fab..f1e714f3 100644 --- a/tests/hipscat_import/conftest.py +++ b/tests/hipscat_import/conftest.py @@ -4,7 +4,7 @@ import re from pathlib import Path -import healpy as hp +import hipscat.pixel_math.healpix_shim as hp import numpy as np import numpy.testing as npt import pandas as pd diff --git a/tests/hipscat_import/margin_cache/test_margin_cache_map_reduce.py b/tests/hipscat_import/margin_cache/test_margin_cache_map_reduce.py index 72b93dbc..67b426d2 100644 --- a/tests/hipscat_import/margin_cache/test_margin_cache_map_reduce.py +++ b/tests/hipscat_import/margin_cache/test_margin_cache_map_reduce.py @@ -1,6 +1,6 @@ import os -import healpy as hp +import hipscat.pixel_math.healpix_shim as hp import numpy as np import pandas as pd import pytest