Skip to content

Commit

Permalink
fixed squeeze
Browse files Browse the repository at this point in the history
  • Loading branch information
mullenkamp committed Nov 17, 2022
1 parent f861e98 commit 9b37e9a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "tethysts" %}
{% set version = "4.5.6" %}
{% set version = "4.5.7" %}
# {% set sha256 = "ae2cc83fb5a75e8dc3e1b2c2137deea412c8a4c7c9acca52bf4ec59de52a80c9" %}

# sha256 is the prefered checksum -- you can get it for a file with:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
name = 'tethysts'
main_package = 'tethysts'
datasets = 'datasets/time_series'
version = '4.5.6'
version = '4.5.7'
descrip = 'tethys time series S3 extraction'

# The below code is for readthedocs. To have sphinx/readthedocs interact with
Expand Down
2 changes: 1 addition & 1 deletion tethysts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def get_results(self,
xr3.attrs['version_date'] = pd.Timestamp(vd).tz_localize(None).isoformat()

if squeeze_dims:
xr3 = xr3.squeeze_dims()
xr3 = xr3.squeeze()

else:
xr3 = xr.Dataset()
Expand Down
9 changes: 7 additions & 2 deletions tethysts/tests/utest_tethysts.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,15 @@
remote = {'bucket': 'met-solutions', 'public_url': 'https://b2.tethys-ts.xyz/file', 'version': 4}
remote = {'bucket': 'tasman-env', 'public_url': 'https://b2.tethys-ts.xyz/file', 'version': 4}
remote = {'bucket': 'noaa-nwm', 'public_url': 'https://b2.tethys-ts.xyz/file', 'version': 4}
remote = {'bucket': 'jaxa-data', 'public_url': 'https://b2.tethys-ts.xyz/file', 'version': 4}
remote = {'bucket': 'linz-data', 'public_url': 'https://b2.tethys-ts.xyz/file', 'version': 4}

cache = '/media/nvme1/cache/tethys'
# cache = '/home/mike/cache/tethys'

dataset_id = '7751c5f1bf47867fb109d7eb'
dataset_id = '0b2bd62cc42f3096136f11e9'
# dataset_id = '0de7cbfe05aebc2272ceba17'
dataset_id = 'fb60aaa921d35a33727b53fe'
dataset_id = 'f16774ea29f024a306c7fc7a'
dataset_id = '9568f663d566aabb62a8e98e'

Expand All @@ -260,6 +262,7 @@
dataset_id = '0b2bd62cc42f3096136f11e9'
station_ids = 'c8db6013a9eb76705b5c80f2'
ref = 'ashley'
station_ids = '7eb2694917a2ece89e86e9b8'

dataset_id = 'b3d852cd72ac043c701493c4'

Expand All @@ -281,6 +284,8 @@
version_date = '2022-09-04T19:00:00'

dataset_id = '469b6a9ef620bce70fab5760'
dataset_id = '980177538186a9bb9c9a0672'
dataset_id = '54374801c0311a98a0f8e5ef'

self = Tethys([remote], cache=cache)
self = Tethys([remote])
Expand All @@ -290,7 +295,7 @@
stns1 = self.get_stations(dataset_id)
stns1 = self.get_stations(dataset_id, version_date=version_date)

station_ids = [s['station_id'] for s in stns1[:100]]
station_ids = [s['station_id'] for s in stns1[:1]]
station_ids = [s['station_id'] for s in stns1 if ref in s['ref']]

results1 = self.get_results(dataset_id, station_ids, heights=None)
Expand Down

0 comments on commit 9b37e9a

Please sign in to comment.