Skip to content

Commit

Permalink
Merge branch 'release/2.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
mpu-creare committed Aug 16, 2020
2 parents 9837cbd + 779d245 commit 767af80
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 2.2.2
### Bug Fixes
* Fixed floating point errors on selection of data subset (short circuit optimization to avoid unnecessary interpolation)
* Fixed bug in cosmos_stations.latlon_from_label giving the wrong latlon for a label
* Fixing compositor to update interpolation of sources automatically (and deleting cached definitions).
* Also making cached node definitions easier to remove -- no longer caching node.json, node.json_pretty and node.hash

## 2.2.0
### Introduction

Expand Down
11 changes: 11 additions & 0 deletions doc/source/deploy-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

> Note this it not included in built documentation
## Checklist
* [ ] Update version number
* [ ] Update changelog
* [ ] Update windows installation (see below)
* [ ] Check all of the notebooks using the updated windows installation
* [ ] Update the conda environment .yml file (do this by-hand with any new packages in setup.py)
* [ ] Update the explicit conda environemnt file `conda list --explicit > filename.json`
* [ ] Update the `podpac_deps.zip` and `podpac_dist.zip` for the lambda function installs
* [ ] Upload windows install folder to AWS
* [ ] Make windows install folder public on AWS

## Uploading to pypi
Run this command to create the wheel and source code tarball
```bash
Expand Down
4 changes: 2 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ to enable simple, reproducible geospatial analyses that run locally or in the cl
soil_moisture = podpac.data.H5PY(source="smap.h5", interpolation="bilinear")
# evaluate soil moisture at the coordinates of the elevation data
output = soil_moisture.eval(elevation.native_coordinates)
output = soil_moisture.eval(elevation.coordinates)
# run evaluation in the cloud
aws_node = podpac.managers.aws.Lambda(source=soil_moisture)
output = aws_node.eval(elevation.native_coordinates)
output = aws_node.eval(elevation.coordinates)
Expand Down
2 changes: 2 additions & 0 deletions podpac/core/compositor/compositor.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def select_sources(self, coordinates):
for s in sources:
if s.has_trait("interpolation"):
s.set_trait("interpolation", self.interpolation)
if hasattr(s, "_podpac_cached_property_definition"):
del s._podpac_cached_property_definition

return sources

Expand Down
5 changes: 4 additions & 1 deletion podpac/core/interpolation/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,10 @@ def interpolate(self, source_coordinates, source_data, eval_coordinates, output_

# short circuit if source_coordinates contains eval_coordinates
if eval_coordinates.issubset(source_coordinates):
output_data[:] = source_data.sel(output_data.coords).transpose(*output_data.dims)
try:
output_data.data[:] = source_data.sel(output_data.coords, method="nearest").transpose(*output_data.dims)
except NotImplementedError:
output_data.data[:] = source_data.sel(output_data.coords).transpose(*output_data.dims)
return output_data

interpolator_queue = self._select_interpolator_queue(
Expand Down
6 changes: 3 additions & 3 deletions podpac/core/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,19 +475,19 @@ def add_node(node):
finally:
self._definition_guard = False

@cached_property
@property
def json(self):
"""Definition for this node in JSON format."""

return json.dumps(self.definition, separators=(",", ":"), cls=JSONEncoder)

@cached_property
@property
def json_pretty(self):
"""Definition for this node in JSON format, with indentation suitable for display."""

return json.dumps(self.definition, indent=4, cls=JSONEncoder)

@cached_property
@property
def hash(self):
""" hash for this node, used in caching and to determine equality. """

Expand Down
5 changes: 4 additions & 1 deletion podpac/datalib/cosmos_stations.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ def latlon_from_label(self, label):
if ind.size == 0:
return podpac.Coordinates([]) # Empty

return self.source_coordinates[ind]
lat_lon = np.array(self.stations_value("location"))[ind].squeeze()
c = podpac.Coordinates([[lat_lon[0], lat_lon[1]]], ["lat_lon"])

return c

def _get_label_inds(self, label):
""" Helper function to get source indices for partially matched labels """
Expand Down
4 changes: 3 additions & 1 deletion podpac/datalib/modis_pds.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def _make_source(self, date):


class MODIS(S3Mixin, OrderedCompositor):
""" MODIS whole-world compositor.
""" MODIS whole-world compositor.
For documentation about the data, start here: https://ladsweb.modaps.eosdis.nasa.gov/search/order/1
For information about the bands, see here: https://modis.gsfc.nasa.gov/about/specifications.php
Attributes
----------
Expand Down
2 changes: 1 addition & 1 deletion podpac/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
##############
MAJOR = 2
MINOR = 2
HOTFIX = 1
HOTFIX = 2
##############


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
podpac module
"""

# Always perfer setuptools over distutils
import sys
import subprocess

# Always prefer setuptools over distutils
from setuptools import find_packages, setup
from setuptools.command.develop import develop

Expand Down

0 comments on commit 767af80

Please sign in to comment.