Skip to content

fix pandas-dev tests - #3491

Merged
dcherian merged 3 commits into
pydata:masterfrom
dcherian:fix/upstream-dev-tests
Nov 8, 2019
Merged

fix pandas-dev tests#3491
dcherian merged 3 commits into
pydata:masterfrom
dcherian:fix/upstream-dev-tests

Conversation

@dcherian

Copy link
Copy Markdown
Contributor

This PR makes DataArray.__init__ ignore the pandas attrs.

Not sure what we want to do about these attributes in the long term. One option would be to pop the name attribute, assign to DataArray.name and keep the rest as DataArray.attrs? But what if name clashes with the provided name?

@dcheriandcherian mentioned this pull request Nov 7, 2019
12 tasks
@dcherian

Copy link
Copy Markdown
ContributorAuthor

flake is complaining about

# Drop variables@overload# noqa: F811defdrop(
self, labels: Union[Hashable, Iterable[Hashable]], *, errors: str="raise"
) ->"Dataset":
...
# Drop index labels along dimension@overload# noqa: F811defdrop(
self, labels: Any, dim: Hashable, *, errors: str="raise"# array-like
) ->"Dataset":
...
./xarray/core/dataarray.py:1903:5: F811 redefinition of unused 'drop' from line 1896
./xarray/core/dataset.py:3531:5: F811 redefinition of unused 'drop' from line 3524

@max-sixty

Copy link
Copy Markdown
Collaborator

@dcherian you can # noqa those, they're going away anyway; I can sort in the drop PR

@crusaderky

crusaderky commented Nov 7, 2019

Copy link
Copy Markdown
Contributor

The F811 errors are a known issue that pyflakes has with @overload, already fixed in their git tip. For now just add # noqa: F811 wherever you get it

@max-sixty

max-sixty commented Nov 7, 2019

Copy link
Copy Markdown
Collaborator

I merged the drop PR, so those overloads are now removed. Merging master should cause the tests to pass

…tests
* upstream/master:
drop_vars; deprecate drop for variables (pydata#3475)
uamiv test using only raw uamiv variables (pydata#3485)
Optimize dask array equality checks. (pydata#3453)
@dcheriandcherian changed the title Fix/upstream dev testsfix pandas-dev testsNov 7, 2019
@max-sixty
max-sixty self-requested a review November 7, 2019 21:07
@max-sixty

Copy link
Copy Markdown
Collaborator

Not sure what we want to do about these attributes in the long term. One option would be to pop the name attribute, assign to DataArray.name and keep the rest as DataArray.attrs? But what if name clashes with the provided name?

Agree! I think we could prioritize the supplied name above that in attrs. Another option would be raising an error if both were supplied.

@dcherian

Copy link
Copy Markdown
ContributorAuthor

I'm merging this so we can continue testing against pandas master. Discussion can continue in #3497

@dcherian
dcherian merged commit 37e5ae7 into pydata:masterNov 8, 2019
@dcherian
dcherian deleted the fix/upstream-dev-tests branch November 8, 2019 15:33
dcherian added a commit to dcherian/xarray that referenced this pull request Nov 12, 2019
* upstream/master:
add missing pint integration tests (pydata#3508)
DOC: update bottleneck repo url (pydata#3507)
add drop_sel, drop_vars, map to api.rst (pydata#3506)
remove syntax warning (pydata#3505)
Dataset.map, GroupBy.map, Resample.map (pydata#3459)
tests for datasets with units (pydata#3447)
fix pandas-dev tests (pydata#3491)
unpin pseudonetcdf (pydata#3496)
whatsnew corrections (pydata#3494)
dcherian added a commit to dcherian/xarray that referenced this pull request Nov 12, 2019
* upstream/master:
add missing pint integration tests (pydata#3508)
DOC: update bottleneck repo url (pydata#3507)
add drop_sel, drop_vars, map to api.rst (pydata#3506)
remove syntax warning (pydata#3505)
Dataset.map, GroupBy.map, Resample.map (pydata#3459)
tests for datasets with units (pydata#3447)
fix pandas-dev tests (pydata#3491)
unpin pseudonetcdf (pydata#3496)
whatsnew corrections (pydata#3494)
drop_vars; deprecate drop for variables (pydata#3475)
uamiv test using only raw uamiv variables (pydata#3485)
Optimize dask array equality checks. (pydata#3453)
dcherian added a commit to dcherian/xarray that referenced this pull request Nov 13, 2019
* upstream/master:
format indexing.rst code with black (pydata#3511)
add missing pint integration tests (pydata#3508)
DOC: update bottleneck repo url (pydata#3507)
add drop_sel, drop_vars, map to api.rst (pydata#3506)
remove syntax warning (pydata#3505)
Dataset.map, GroupBy.map, Resample.map (pydata#3459)
tests for datasets with units (pydata#3447)
fix pandas-dev tests (pydata#3491)
unpin pseudonetcdf (pydata#3496)
whatsnew corrections (pydata#3494)
drop_vars; deprecate drop for variables (pydata#3475)
uamiv test using only raw uamiv variables (pydata#3485)
Optimize dask array equality checks. (pydata#3453)
Propagate indexes in DataArray binary operations. (pydata#3481)
python 3.8 tests (pydata#3477)
dcherian added a commit to dcherian/xarray that referenced this pull request Nov 13, 2019
commit d430ae0
Author: dcherian <deepak@cherian.net>
Date: Wed Nov 13 08:27:04 2019 -0700
proper fix.
commit 7fd69be
Author: dcherian <deepak@cherian.net>
Date: Wed Nov 13 08:03:26 2019 -0700
fix whats-new merge.
commit 4489394
Merge: 279ff1db74f80c
Author: dcherian <deepak@cherian.net>
Date: Wed Nov 13 08:03:06 2019 -0700
Merge remote-tracking branch 'upstream/master' into fix/plot-broadcast
* upstream/master:
format indexing.rst code with black (pydata#3511)
add missing pint integration tests (pydata#3508)
DOC: update bottleneck repo url (pydata#3507)
add drop_sel, drop_vars, map to api.rst (pydata#3506)
remove syntax warning (pydata#3505)
Dataset.map, GroupBy.map, Resample.map (pydata#3459)
tests for datasets with units (pydata#3447)
fix pandas-dev tests (pydata#3491)
unpin pseudonetcdf (pydata#3496)
whatsnew corrections (pydata#3494)
drop_vars; deprecate drop for variables (pydata#3475)
uamiv test using only raw uamiv variables (pydata#3485)
Optimize dask array equality checks. (pydata#3453)
Propagate indexes in DataArray binary operations. (pydata#3481)
python 3.8 tests (pydata#3477)
commit 279ff1d
Author: dcherian <deepak@cherian.net>
Date: Wed Nov 13 08:02:44 2019 -0700
Undo the transpose change and add test to make sure transposition is right.
commit c9cc698
Author: dcherian <deepak@cherian.net>
Date: Wed Nov 13 08:01:39 2019 -0700
Test to make sure transpose is right
commit 9b35ecf
Author: dcherian <deepak@cherian.net>
Date: Sat Nov 2 15:49:08 2019 -0600
Additional test.
commit 7aed950
Author: dcherian <deepak@cherian.net>
Date: Sat Nov 2 15:20:07 2019 -0600
make plotting work with transposed nondim coords.
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.

Build failure with pandas master

3 participants

@dcherian@max-sixty@crusaderky