Skip to content

fix test with pseudonetcdf 3.2 - #5875

Merged
mathause merged 1 commit into
pydata:mainfrom
mathause:fix_test_pseudonetcdf_32
Oct 22, 2021
Merged

fix test with pseudonetcdf 3.2#5875
mathause merged 1 commit into
pydata:mainfrom
mathause:fix_test_pseudonetcdf_32

Conversation

@mathause

@mathausemathause commented Oct 18, 2021

Copy link
Copy Markdown
Collaborator

Fixes one part of #5872

pseudoNETCDF adds two attrs to ict files, which breaks the following two tests:

Test 1:

deftest_ict_format(self):

Test 2:

deftest_ict_format_write(self):

I reproduced the test file so that the tests pass again. To reproduce the file I used the following bit of code:

importxarrayasxrfromxarray.testsimporttest_backendsfN="xarray/tests/data/example.ict"fmtkw= {"format": "ffi1001"}
ds=xr.open_dataset(fN, engine="pseudonetcdf", backend_kwargs={"format": "ffi1001"})
c=test_backends.TestPseudoNetCDFFormat()
c.save(ds, fN, **fmtkw)

The save method is here:

defsave(self, dataset, path, **save_kwargs):

@barronh I would appreciate your review here - I am not sure if this is the right approach.

@github-actions

Copy link
Copy Markdown
Contributor

Unit Test Results

6 files 6 suites 53m 22s ⏱️
16 230 tests 14 494 ✔️ 1 736 💤 0
90 576 runs 82 396 ✔️ 8 180 💤 0

Results for commit d72c3be.

@barronh

Copy link
Copy Markdown
Contributor

This makes sense to me. These attributes more fully describe the independent variable. They were added due to a lack of clarity and to allow better unit handling on the independent variable. Thank you for updating the test.

@mathause

Copy link
Copy Markdown
CollaboratorAuthor

Thanks for the feedback - so I suggest to merge soonish as this breaks the tests on main.

@Illviljan

Copy link
Copy Markdown
Contributor

Looks good to me. Shall we merge?

@mathause
mathause merged commit 29e38db into pydata:mainOct 22, 2021
@mathause
mathause deleted the fix_test_pseudonetcdf_32 branch October 22, 2021 21:23
@mathause

Copy link
Copy Markdown
CollaboratorAuthor

Jup, let's merge. Thanks!

dcherian added a commit to dcherian/xarray that referenced this pull request Oct 23, 2021
snowman2 pushed a commit to snowman2/xarray that referenced this pull request Feb 9, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mathause@barronh@Illviljan