Skip to content

Commit fdc25ea

Browse files
committed
Renamed function and fixed pre-commit
1 parent ae9770d commit fdc25ea

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

reproject/hips/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
from .high_level import * # noqa
2-
from ._dask_array import hips_as_dask_and_wcs
2+
from ._dask_array import hips_as_dask_array # noqa

reproject/hips/_dask_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .high_level import VALID_COORD_SYSTEM
1414
from .utils import is_url, load_properties, map_header, tile_filename
1515

16-
__all__ = ["hips_as_dask_and_wcs"]
16+
__all__ = ["hips_as_dask_array"]
1717

1818

1919
class HiPSArray:
@@ -130,7 +130,7 @@ def _get_tile(self, *, level, index):
130130
return data
131131

132132

133-
def hips_as_dask_and_wcs(directory_or_url, *, level=None):
133+
def hips_as_dask_array(directory_or_url, *, level=None):
134134
"""
135135
Return a dask array and WCS that represent a HiPS dataset at a particular level.
136136
"""

reproject/hips/tests/test_dask_array.py

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

77
from reproject import reproject_interp
88
from reproject.hips import reproject_to_hips
9-
from reproject.hips._dask_array import hips_as_dask_and_wcs
9+
from reproject.hips._dask_array import hips_as_dask_array
1010

1111

1212
class TestHIPSDaskArray:
@@ -37,7 +37,7 @@ def test_roundtrip(self, tmp_path, frame, level):
3737
)
3838

3939
# Represent the HiPS as a dask array
40-
dask_array, wcs = hips_as_dask_and_wcs(output_directory, level=level)
40+
dask_array, wcs = hips_as_dask_array(output_directory, level=level)
4141

4242
# Reproject back to the original WCS
4343
final_array, footprint = reproject_interp(
@@ -73,17 +73,17 @@ def test_level_validation(self, tmp_path):
7373
tile_size=32,
7474
)
7575

76-
dask_array, wcs = hips_as_dask_and_wcs(output_directory, level=0)
76+
dask_array, wcs = hips_as_dask_array(output_directory, level=0)
7777
assert dask_array.shape == (160, 160)
7878

79-
dask_array, wcs = hips_as_dask_and_wcs(output_directory, level=1)
79+
dask_array, wcs = hips_as_dask_array(output_directory, level=1)
8080
assert dask_array.shape == (320, 320)
8181

82-
dask_array, wcs = hips_as_dask_and_wcs(output_directory)
82+
dask_array, wcs = hips_as_dask_array(output_directory)
8383
assert dask_array.shape == (320, 320)
8484

8585
with pytest.raises(Exception, match=r"does not contain level 2 data"):
86-
hips_as_dask_and_wcs(output_directory, level=2)
86+
hips_as_dask_array(output_directory, level=2)
8787

8888
with pytest.raises(Exception, match=r"should be positive"):
89-
hips_as_dask_and_wcs(output_directory, level=-1)
89+
hips_as_dask_array(output_directory, level=-1)

0 commit comments

Comments
 (0)