Skip to content

Commit 65d365a

Browse files
committed
fix merge conflicts
2 parents ee3152a + ddab53b commit 65d365a

File tree

6 files changed

+18
-27
lines changed

6 files changed

+18
-27
lines changed

icepyx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from _icepyx_version import version as __version__
2-
from icepyx.core.base_query import BaseQuery, GenQuery, LegacyQuery
2+
from icepyx.core.base_query import BaseQuery, GenQuery
33
from icepyx.core.query import Query
44
from icepyx.core.read import Read
55
from icepyx.core.variables import Variables

icepyx/core/base_query.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ def __init__(
419419
auth=None,
420420
**kwargs,
421421
):
422-
423422
self._prod = is2ref._validate_product(product)
424423

425424
super().__init__(spatial_extent, date_range, start_time, end_time, **kwargs)
@@ -448,9 +447,9 @@ def concept_id(self) -> Union[str, None]:
448447
version = self._version
449448
else:
450449
version = is2ref.latest_version(short_name)
451-
collections = earthaccess.search_datasets(short_name=short_name,
452-
version=version,
453-
cloud_hosted=True)
450+
collections = earthaccess.search_datasets(
451+
short_name=short_name, version=version, cloud_hosted=True
452+
)
454453
if collections:
455454
return collections[0].concept_id()
456455
else:
@@ -901,7 +900,6 @@ def granules(self):
901900
# ----------------------------------------------------------------------
902901
# Methods - Get and display neatly information at the product level
903902

904-
905903
# ----------------------------------------------------------------------
906904
# Methods - Granules (NSIDC-API)
907905

icepyx/core/granules.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,7 @@ def get_avail(
207207
query.Query.avail_granules
208208
"""
209209

210-
assert (
211-
CMRparams is not None
212-
), "Missing required input parameter dictionaries"
210+
assert CMRparams is not None, "Missing required input parameter dictionaries"
213211

214212
# if not hasattr(self, 'avail'):
215213
self.avail = []

icepyx/core/is2ref.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
# ICESat-2 specific reference functions
1313

14+
1415
def _get_concept_id(product, version):
15-
collections = earthaccess.search_datasets(short_name=product,
16-
version=version,
17-
cloud_hosted=True)
16+
collections = earthaccess.search_datasets(
17+
short_name=product, version=version, cloud_hosted=True
18+
)
1819
if collections:
1920
return collections[0].concept_id()
2021

icepyx/core/query.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def download(self, path, overwrite=False):
9090
return earthaccess.download(self.granules, local_path=path)
9191

9292

93-
9493
class Query(BaseQuery):
9594
_temporal: Union[tp.Temporal, None]
9695
_CMRparams: apifmt.CMRParameters
@@ -118,7 +117,6 @@ def __init__(self, *args, **kwargs):
118117
self._prod, cycles=self.cycles, tracks=self.tracks
119118
)
120119

121-
122120
@property
123121
def cycles(self):
124122
"""
@@ -159,11 +157,10 @@ def tracks(self):
159157
else:
160158
return sorted(set(self._tracks))
161159

162-
163160
def _get_concept_id(self, product, version) -> Union[str, None]:
164-
collections = earthaccess.search_datasets(short_name=product,
165-
version=version,
166-
cloud_hosted=True)
161+
collections = earthaccess.search_datasets(
162+
short_name=product, version=version, cloud_hosted=True
163+
)
167164
if collections:
168165
return collections[0].concept_id()
169166
else:
@@ -190,12 +187,10 @@ def show_custom_options(self) -> None:
190187
191188
"""
192189
if self.concept_id:
193-
194190
capabilities = self.harmony_api.get_capabilities(concept_id=self.concept_id)
195191
print(json.dumps(capabilities, indent=2))
196192
return None
197193

198-
199194
@property
200195
def CMRparams(self) -> CMRParams:
201196
"""
@@ -214,7 +209,6 @@ def CMRparams(self) -> CMRParams:
214209
self._CMRparams = apifmt.Parameters("CMR")
215210
# print(self._CMRparams)
216211
# print(self._CMRparams.fmted_keys)
217-
218212

219213
# dictionary of optional CMR parameters
220214
kwargs = {}
@@ -239,7 +233,7 @@ def CMRparams(self) -> CMRParams:
239233
)
240234

241235
return self._CMRparams.fmted_keys
242-
236+
243237
@property
244238
def granules(self):
245239
"""
@@ -328,8 +322,6 @@ def avail_granules(self, ids=False, cycles=False, tracks=False, cloud=False):
328322
else:
329323
return self.granules.avail
330324

331-
332-
333325
def _order_subset_granules(self) -> str:
334326
concept_id = self._get_concept_id(
335327
product=self._prod,
@@ -338,7 +330,9 @@ def _order_subset_granules(self) -> str:
338330

339331

340332
if concept_id is None:
341-
raise ValueError(f"Could not find concept ID for {self._prod} v{self._version}")
333+
raise ValueError(
334+
f"Could not find concept ID for {self._prod} v{self._version}"
335+
)
342336

343337
readable_granule_name = self.CMRparams.get("readable_granule_name[]", [])
344338
harmony_temporal = None
@@ -410,7 +404,7 @@ def _order_whole_granules(self, cloud_hosted=False, path="./") -> list[str]:
410404
The local directory to download the granules to.
411405
412406
"""
413-
407+
414408
links = self.get_granule_links(cloud_hosted=cloud_hosted)
415409
files = earthaccess.download(links, local_path=path)
416410
return files

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
backoff
22
dask[dataframe]
33
datashader
4+
deprecated
45
earthaccess>=0.12.0
56
fiona
67
geopandas
@@ -15,4 +16,3 @@ requests
1516
s3fs
1617
shapely
1718
xarray
18-
deprecated

0 commit comments

Comments
 (0)