Skip to content
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

Vendor internal imports from xarray.core in xarray.py #1079

Merged
merged 2 commits into from Jul 5, 2019
Merged

Vendor internal imports from xarray.core in xarray.py #1079

merged 2 commits into from Jul 5, 2019

Conversation

jthielen
Copy link
Collaborator

@jthielen jthielen commented Jul 2, 2019

As suggested in #1077, this PR vendors either_dict_or_kwargs, expanded_indexer, and is_dict_like, which are used in metpy/xarray.py, instead of using them from the internal API of xarray.core (DatasetAccessor is handled in #1078).

This is the first time I've tried vendoring code like this, so please do let me know if this is the right approach to take or if the code and/or license should be included elsewhere. Also, should I add tests of the vendored functions?

dopplershift
dopplershift previously approved these changes Jul 2, 2019
Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though its test coverage is a bit low since I don't think we were testing as much of it. Could you maybe add a test of our .loc using an Ellipsis?

Since everything is failing right now, I'm going to get #1078 in first.

@dopplershift dopplershift added Area: Xarray Pertains to xarray integration Type: Maintenance Updates and clean ups (but not wrong) labels Jul 2, 2019
@dopplershift dopplershift added this to the 0.11 milestone Jul 2, 2019
@jthielen
Copy link
Collaborator Author

jthielen commented Jul 2, 2019

I went ahead and added tests for all the portions of the utilities that were previously unused in the tests. Once #1078 is in, I'll rebase and hopefully this will be good to go!

@dopplershift
Copy link
Member

Needs a rebase anyway to address the conflict.

@dopplershift
Copy link
Member

Merging over skewT failures.

@dopplershift dopplershift merged commit 2735af5 into Unidata:master Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Xarray Pertains to xarray integration Type: Maintenance Updates and clean ups (but not wrong)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants