-
Notifications
You must be signed in to change notification settings - Fork 609
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
discuss: top-level APIs future #7147
Comments
I can only agree that gravitation towards a smaller API is a virtue! I like it that with Ibis I usually can think of only one correct way to do a task, and this has to do with absence of redundant / overly similar methods. |
Probably a copy-paste is fine for these cases.
I think the top-level is around for folks coming from tools and systems that are function-based (SQL, R/dplyr) instead of class/method-based tools like those in the PyData ecosystem. I'm in favor of reducing our API surface by removing redundancies, though in this particular case the API is literally a copy of the other. Any chance you'd be will to do an audit for redundancies and post it here for discussion 😅?
Yeah, I think that makes sense. The soft deprecation sounds like a fine approach to me. |
I think the .where/.ifelse is the only redundancy I can think of at this point. Will bring them up here if I find them as I refactor.
One question is should we rename ops.Where to ops.IfElse? The name of computed columns is "Where", which is a little confusing to users. But that has always been an inconsistency you saw if you used .ifelse, so this isn't a new problem we are creating. |
|
Ah, one other instance of aliasing the same thing is |
Yeah, there's sort of a question whether It's not clear that |
Let's deal with these on a case by case basis for now and avoid any general decisions until we see a pattern emerge. |
related (in the sense of trying to reduce the API surface): Can we remove (or merely remove from docs as a start)
|
exhaustive list of null/NA inconsistencies/reduncancies (✅ means it exists, ❌ means it doesn't)
It seems like we slightly already prefer null over NA. I agree with this, I think NULL is more generally accepted. What do we think about soft-deprecating |
We've talked about this in the past with respect to I personally never use |
I also don't understand the distinction. I use it interchangeably/inconsistently with ibis.null(). Once #7262 is done I think I'm going to submit a PR moving to |
What happened?
Thought of these things as I'm going through moving top-level stuff in #7141
[ibis.greatest](https://ibis-project.org/reference/top_level#ibis.expr.api.greatest)
has no docstring.[ibis.ifelse](https://ibis-project.org/reference/top_level#ibis.expr.api.ifelse)
has an incorrect docstring. Should we make some more refined mechanism that updates/fixes the docstrings to be correct (ie replace use of "self", add an additional param in front)? Or just keep it simple and copy paste, with a few manual edits?ibis.ifelse
? when is that needed/preferable toBooleanValue.ifelse()
? Just trying to reduce our API. Similar with.isin
,name
, and a few others.ibis.where
? ifelse does the same thing (IMO with a better name), and I'd prefer there to be exactly one way. Maybe just a soft deprecation where we remove it from the docs but don't add a DeprecationWarning?What version of ibis are you using?
main
What backend(s) are you using, if any?
Na
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: