Skip to content

Data vars in open mfdataset #1623

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

Merged
merged 31 commits into from
Oct 11, 2017
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
180cf58
add data_vars option to open_mfdataset
guziy Sep 19, 2017
6195fcd
use single quotes
guziy Sep 19, 2017
956fbeb
fix the 'line too long' warning from flake8
guziy Sep 19, 2017
e721620
document the data_vars keyword for open_mfdataset
guziy Sep 19, 2017
34b1004
improve the data_vars record in whats-new
guziy Sep 19, 2017
09d25c6
update my name in wats-new.rst
guziy Sep 19, 2017
e901a37
Start writing the test for the data_vars keyword
guziy Sep 19, 2017
3141ce4
use the data_vars keyword in combine
guziy Sep 20, 2017
8319aa7
address flake8 warnings for test_backend.py
guziy Sep 20, 2017
fdc940e
ignore flake8 warnings concerning whats-new.rst
guziy Sep 20, 2017
96e842e
fix function reference in whats-new.rst
guziy Sep 20, 2017
b033bec
open_mfdataset does not accept dim keyword argument
guziy Sep 20, 2017
b854ce4
use single quotes for strings in the added tests
guziy Sep 20, 2017
787a98b
refactor data_vars related tests
guziy Sep 20, 2017
4d3c685
Use with for opening mfdataset in data_vars related tests
guziy Sep 20, 2017
1823ba3
add @requires_scipy_or_netCDF4 to the data_vars test class
guziy Sep 20, 2017
b47e665
address flake8 warnings about long lines in the data_vars related tests.
guziy Sep 20, 2017
23f0fc6
close opened datasets in case of a ValueError in open_mfdataset, seem…
guziy Sep 20, 2017
05c8391
fix line too long warnings from flake8
guziy Sep 20, 2017
1f0e763
refactor tests and open_mfdataset, to address comments
guziy Sep 21, 2017
fadda83
refactor tests for data_vars keyword in open_mfdataset
guziy Sep 21, 2017
f80fe1f
refactor to address flake8 warnings
guziy Sep 21, 2017
14dee9d
add another example of data_vars usage in open_mfdataset
guziy Sep 21, 2017
f1f9d8b
add coords keyword to open_mfdataset
guziy Sep 21, 2017
f64c9e3
add a memory and performance related observations to the whats-new an…
guziy Sep 21, 2017
633eec3
fixed a grammar mistake
guziy Sep 21, 2017
086cf25
quote variable names referenced in the text
guziy Sep 21, 2017
b0ca228
add tests for coords keyword in the open_mfdataset, along with the si…
guziy Sep 22, 2017
e463e37
split a test into 2 to simplify, introduce context manager for settin…
guziy Sep 23, 2017
70d8e2b
make tests more explicit
guziy Oct 10, 2017
394597a
Merge branch 'master' into data_vars_in_open_mfdataset
guziy Oct 11, 2017
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
32 changes: 7 additions & 25 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -1340,19 +1340,10 @@ def test_common_coord_when_datavars_all(self):

var_shape = ds[self.var_name].shape

# shape pairs to be compared
shape_pairs = [
(var_shape, coord_shape),
(coord_shape1, coord_shape),
(coord_shape2, coord_shape)
]
# tests to be applied to respective pairs
tests = [self.assertEqual,
self.assertNotEqual, self.assertNotEqual]

for a_test, a_shape_pair in zip(tests, shape_pairs):
a_test(*a_shape_pair)

self.assertEqual(var_shape, coord_shape)
self.assertNotEqual(coord_shape1, coord_shape)
self.assertNotEqual(coord_shape2, coord_shape)

def test_common_coord_when_datavars_minimal(self):
opt = 'minimal'

Expand All @@ -1366,18 +1357,9 @@ def test_common_coord_when_datavars_minimal(self):

var_shape = ds[self.var_name].shape

# shape pairs to be compared
shape_pairs = [
(var_shape, coord_shape),
(coord_shape1, coord_shape),
(coord_shape2, coord_shape)
]
# tests to be applied to respective pairs
tests = [self.assertNotEqual,
self.assertEqual, self.assertEqual]

for a_test, a_shape_pair in zip(tests, shape_pairs):
a_test(*a_shape_pair)
self.assertNotEqual(var_shape, coord_shape)
self.assertEqual(coord_shape1, coord_shape)
self.assertEqual(coord_shape2, coord_shape)

def test_invalid_data_vars_value_should_fail(self):

Expand Down