Skip to content

Refactor resampler module to submodules #3124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e873d3b
Refactor resampler module to submodules
lahtinep May 12, 2025
b65098a
Update resample imports
lahtinep May 12, 2025
f3712ab
Update and move resampling docstring
lahtinep May 12, 2025
0b59ca8
Fix DOS line-endings, fix get_area_def import
lahtinep May 13, 2025
9051519
Fix imports to use new resampler modules
lahtinep May 13, 2025
41f5ef0
Simplify prepare_resampler()
lahtinep May 13, 2025
43f4b33
Simplify add_xy_coords()
lahtinep May 13, 2025
80b16e1
Simplify BucketResamplerBase.resample()
lahtinep May 13, 2025
b16e834
Simplify KDTreeResampler.load_neighbour_info()
lahtinep May 13, 2025
d68afb5
Simplify NativeResampler.compute()
lahtinep May 13, 2025
ea5d24b
Simplify native._rechunk_if_nonfactor_chunks()
lahtinep May 13, 2025
c71f33d
Simplify _check_crs_units and add_xy_coords() more
lahtinep May 13, 2025
86a4def
Reduce cyclomatic complecity of NativeResampler._expand_reduce()
lahtinep May 13, 2025
44ee39b
Make base.hash_dict a private function
lahtinep May 13, 2025
e33ea4b
Make get_area_file and update_resampled_coords private functions
lahtinep May 16, 2025
412d848
Fix import
lahtinep May 16, 2025
d7e4e9e
Move get_area_def and get_area_file to a new module satpy.area_utils
lahtinep May 16, 2025
125e691
Create satpy.coords_utils module
lahtinep May 16, 2025
f24507f
Fix get_area_def patching
lahtinep May 16, 2025
28e02ca
Merge branch 'main' into refactor-resample
lahtinep May 16, 2025
9371f45
Fix bucket doc references, again
lahtinep May 16, 2025
5a73b6e
Merge branch 'main' into refactor-resample
pnuu May 28, 2025
e5a4db7
Use helper function instead of if/elif/else in satpy.resample imports
pnuu May 28, 2025
3fcbe6d
Fix resample imports and doc references
pnuu May 28, 2025
5fe8f06
Remove unnecessary pyproj<2.0 check
pnuu May 28, 2025
ea17ec0
Merge branch 'main' into refactor-resample
pnuu May 28, 2025
bfdb334
Fix resampling related invalid sphinx references
djhoese May 28, 2025
9d5a3a7
Move BaseResampler import from top level to functions
pnuu May 30, 2025
9f9a385
Refactor collection of resampler classes
pnuu May 30, 2025
561101b
Merge branch 'refactor-resample' of https://github.com/pnuu/satpy int…
pnuu May 30, 2025
5bbd4f1
Rename area_utils.py to area.py
pnuu May 30, 2025
0b2be45
Rename coords_utils.py to coords.py
pnuu May 30, 2025
7ff4f6d
Move resample_dataset and prepare_rempler import to functions
pnuu May 30, 2025
80296ee
Add a test for warnings issued when importing directly from satpy.res…
pnuu May 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion satpy/composites/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ def __init__(self, name, filename=None, url=None, known_hash=None, area=None, #
self._known_hash = known_hash
self.area = None
if area is not None:
from satpy.resample import get_area_def
from satpy.resample.base import get_area_def
self.area = get_area_def(area)

super(StaticImageCompositor, self).__init__(name, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/cmsaf_claas2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import datetime

from satpy.resample import get_area_def
from satpy.resample.base import get_area_def

from .netcdf_utils import NetCDF4FileHandler

Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/eum_l2_bufr.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from satpy.readers.eum_base import get_service_mode, recarray2dict
from satpy.readers.file_handlers import BaseFileHandler
from satpy.readers.seviri_base import mpef_product_header
from satpy.resample import get_area_def
from satpy.resample.base import get_area_def
from satpy.utils import get_legacy_chunk_size

try:
Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/fci_l2_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from satpy.readers._geos_area import get_geos_area_naming, make_ext
from satpy.readers.eum_base import get_service_mode
from satpy.readers.file_handlers import BaseFileHandler
from satpy.resample import get_area_def
from satpy.resample.base import get_area_def
from satpy.utils import get_legacy_chunk_size

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/gerb_l2_hr_h5.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import logging

from satpy.readers.hdf5_utils import HDF5FileHandler
from satpy.resample import get_area_def
from satpy.resample.base import get_area_def

LOG = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/hsaf_h5.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import xarray as xr

from satpy.readers.file_handlers import BaseFileHandler
from satpy.resample import get_area_def
from satpy.resample.base import get_area_def
from satpy.utils import get_legacy_chunk_size

LOG = logging.getLogger(__name__)
Expand Down
Loading
Loading