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

Renamed conversion interface mdims argument to groupby #1066

Merged
merged 3 commits into from
Jan 17, 2017

Conversation

philippjfr
Copy link
Member

As suggested in #1061 renaming mdims to groupby in the conversion interface .to method is a lot clearer. This PR renames the kwarg while retaining support for the mdims argument along with a deprecation warning.

"""
if 'mdims' in kwargs:
if groupby:
raise ValuError('Cannot supply both mdims and groupby')
Copy link
Member

Choose a reason for hiding this comment

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

ValueError?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks.

else:
self._element.warning("mdims keyword has been renamed to "
"groupby and will be deprecated in "
"version 1.8.")
Copy link
Member

Choose a reason for hiding this comment

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

"will be deprecated" is ambiguous; isn't it now deprecated already? Plus it seems like we shouldn't promise a version 1.8 we might not have (in favor of 2.0). How about:

mdims keyword has been renamed to groupby; the name mdims is deprecated and will be removed after version 1.7.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed.

@jbednar
Copy link
Member

jbednar commented Jan 16, 2017

Looks great; I think that will be much clearer. Also seems to add support for passing a single dimension, not just a list of dimensions.

@philippjfr
Copy link
Member Author

Looks great; I think that will be much clearer. Also seems to add support for passing a single dimension, not just a list of dimensions.

Yes, should have listed that explicitly, both the kdims and vdims arguments support this so it's been annoying me persistently that you had to pass a list here.

@philippjfr
Copy link
Member Author

Passing and ready to merge.

self._element.warning("mdims keyword has been renamed "
"to groupby; the name mdims is "
"deprecated and will be removed "
"after version 1.7.")
Copy link
Contributor

@jlstevens jlstevens Jan 16, 2017

Choose a reason for hiding this comment

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

I never know whether it should be 'mdims' keyword ... or mdims keyword.... As we are referring to the name of the keyword, I think I would include the quotes (also ... renamed to 'groupby'). Anyway, this is a very minor issue and I don't mind if you prefer to leave it as it is.

Copy link
Member

Choose a reason for hiding this comment

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

I agree the quote marks (or even backquote marks) would be the correct way, but figured we were being expedient.

@jlstevens
Copy link
Contributor

Made one minor comment about the deprecation message but otherwise, I am happy to merge now.

@philippjfr
Copy link
Member Author

Comment addressed, ready to merge when tests pass.

@jlstevens
Copy link
Contributor

Looks good. Merging!

@jlstevens jlstevens merged commit 52f219c into master Jan 17, 2017
@philippjfr philippjfr deleted the deprecate_mdims branch January 27, 2017 02:53
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants