ibis icon indicating copy to clipboard operation
ibis copied to clipboard

api: should `GroupedTable.order_by` / `Table.sort_by` have the same method name?

Open jcrist opened this issue 3 years ago • 5 comments
trafficstars

That these methods have different names is a bit unexpected to me, perhaps we should settle on one and deprecate the other?

jcrist avatar Sep 16 '22 18:09 jcrist

Having both would be another option, slight preference for changing to order_by and soft deprecating sort_by.

cpcloud avatar Sep 16 '22 18:09 cpcloud

I personally don't love intentional aliases. When interactively learning a new API I always see both versions and have to lookup both to see what the difference is (if any). This happened to me recently in ibis with group_by/groupby. Would rather we pick one proper spelling and stick with it.

jcrist avatar Sep 16 '22 18:09 jcrist

What about keeping the method around and removing all references, tests and usages of it and even adding a deprecation warning?

cpcloud avatar Sep 16 '22 18:09 cpcloud

Yes, I think that's what I was arguing for (sorry, my previous comment was in response to "Having both would be another option").

Just to clarify - your preference is moving to order_by everywhere instead of sort_by?

jcrist avatar Sep 16 '22 19:09 jcrist

Let's move to order_by and deprecate sort_by. Let's also figure out how to remove deprecated functions from tab completion options.

saulpw avatar Sep 20 '22 21:09 saulpw