Skip to content

Commit

Permalink
move function to hopefully trigger a travis run
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaS11 committed Nov 6, 2023
1 parent 170bd98 commit ef26223
Showing 1 changed file with 28 additions and 25 deletions.
53 changes: 28 additions & 25 deletions icepyx/core/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import icepyx.core.APIformatting as apifmt
from icepyx.core.auth import EarthdataAuthMixin
import icepyx.core.granules as granules

# QUESTION: why doesn't from granules import Granules work, since granules=icepyx.core.granules?
from icepyx.core.granules import Granules
import icepyx.core.is2ref as is2ref
Expand Down Expand Up @@ -448,6 +449,7 @@ def __init__(

# initialize authentication properties
EarthdataAuthMixin.__init__(self)

# ----------------------------------------------------------------------
# Properties

Expand Down Expand Up @@ -648,7 +650,7 @@ def subsetparams(self, **kwargs):
else:
# If the user has supplied a subset list of variables, append the
# icepyx required variables to the Coverage dict
if 'Coverage' in kwargs.keys():
if "Coverage" in kwargs.keys():
var_list = [
"orbit_info/sc_orient",
"orbit_info/sc_orient_time",
Expand All @@ -664,9 +666,9 @@ def subsetparams(self, **kwargs):
]
# Add any variables from var_list to Coverage that are not already included
for var in var_list:
if var not in kwargs['Coverage'].keys():
kwargs['Coverage'][var.split('/')[-1]] = [var]
if var not in kwargs["Coverage"].keys():
kwargs["Coverage"][var.split("/")[-1]] = [var]

if self._subsetparams == None:
self._subsetparams = apifmt.Parameters("subset")
if self._spatial._geom_file is not None:
Expand Down Expand Up @@ -710,9 +712,9 @@ def order_vars(self):
if hasattr(self, "_cust_options"):
self._order_vars = Variables(
product=self.product,
version = self._version,
version=self._version,
avail=self._cust_options["variables"],
auth = self.auth,
auth=self.auth,
)
else:
self._order_vars = Variables(
Expand Down Expand Up @@ -742,17 +744,18 @@ def file_vars(self):
Examples
--------
>>> reg_a = ipx.Query('ATL06',[-55, 68, -48, 71],['2019-02-20','2019-02-28']) # doctest: +SKIP
>>> reg_a.file_vars # doctest: +SKIP
<icepyx.core.variables.Variables at [location]>
"""

if not hasattr(self, "_file_vars"):
if self._source == "file":
self._file_vars = Variables(auth=self.auth,
product=self.product,
version=self._version,
)
self._file_vars = Variables(
auth=self.auth,
product=self.product,
version=self._version,
)

return self._file_vars

Expand Down Expand Up @@ -817,20 +820,6 @@ def product_summary_info(self):
]
for key in summ_keys:
print(key, ": ", self._about_product["feed"]["entry"][-1][key])

def latest_version(self):
"""
A reference function to is2ref.latest_version.
Determine the most recent version available for the given product.
Examples
--------
>>> reg_a = ipx.Query('ATL06',[-55, 68, -48, 71],['2019-02-20','2019-02-28'])
>>> reg_a.latest_version()
'006'
"""
return is2ref.latest_version(self.product)

def product_all_info(self):
"""
Expand All @@ -847,6 +836,20 @@ def product_all_info(self):
self._about_product = is2ref.about_product(self._prod)
pprint.pprint(self._about_product)

def latest_version(self):
"""
A reference function to is2ref.latest_version.
Determine the most recent version available for the given product.
Examples
--------
>>> reg_a = ipx.Query('ATL06',[-55, 68, -48, 71],['2019-02-20','2019-02-28'])
>>> reg_a.latest_version()
'006'
"""
return is2ref.latest_version(self.product)

def show_custom_options(self, dictview=False):
"""
Display customization/subsetting options available for this product.
Expand Down

0 comments on commit ef26223

Please sign in to comment.