-
Notifications
You must be signed in to change notification settings - Fork 590
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
Using entry points for loading backends #2379
Conversation
|
can you rebase |
|
There is something very strange going on here. Apparently, in some parts of the code, when using I think the responsibly is pytest. I'm not sure, but I think it does a lot of Python internal monkeypatching, and that's the only reason I can find. Regardless of this error, I don't think it's a great idea that |
yep this all sounds good. |
|
@datapythonista looks like needs a rebase. |
Rebased. Let's see if moving the omnisci backend fixed the strange pytest error. If that's the case, we'll still have to move the spark backends (its CI was also red). |
|
dont' we need to rebuild the actual conda packages first? |
setup.py
Outdated
| entry_points={ | ||
| 'ibis.backends': [ | ||
| 'pandas = ibis.pandas.api' | ||
| 'csv = ibis.file.csv', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think if you sync this now ,then the updates for the other backends can update this as needed
|
Hello @datapythonista! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-02-24 19:23:33 UTC |
|
@jreback this is green now, and should be ready. |
|
cool, this doesn't actually change the user behavior right? |
Not at all. It's just an internal change that lets third party packages to also register backends. User API is exactly the same, that's why there are no changes to tests and all is green. |
|
great and actually we dont' import things pre-emptively now, so import times should be faster? |
We still load all backends at init unfortunately. I wanted to do that, but the problem are the backend specific options. If the backend is loaded when we do I think we can find a solution, with small API changes, but will come later. |
With entry points, the code is not only cleaner, but this will allow that third-party backends are used in the same exact way as packages deployed with Ibis. For example:
This will work if
ibis-mssqlis installed in the environment.This change also allows to easily move backends out of Ibis, for example OmniSci (see #2356). Having the backend outside of this repo will be backward compatible and no change to the user code will be needed.