-
Notifications
You must be signed in to change notification settings - Fork 903
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
Should kedro-datasets
be a namespace package?
#1652
Comments
noklam Pending I don't know if this works well in general, there are a few people against this approach from the links you posted. Use native namespace packages. This type of namespace package is defined in PEP 420 and is available in Python 3.3 and later. This is recommended if packages in your namespace only ever need to support Python 3 and installation via pip. This also worries me a bit if pip isn't used, especially if we are doing something further deviated from the standard PEP 420. Personally, I will stand on a more conservative side. @AntonyMilneQB AntonyMilneQB 23 hours ago • What I think @noklam was asking about here though is a separate question about the documentation, i.e. how do we get these dataset docs in the right place. This is an excellent question and not something we'd thought of either. This actually sounds quite tricky and hard to do well 😬 @noklam please could you make a ticket for this if it's what you meant? @deepyaman deepyaman 20 hours ago I think another part of it just comes down to whether you all think sharing the kedro namespace would be nice--the user feels like they're using one cohesive product--or confusing. @AntonyMilneQB AntonyMilneQB 8 hours ago @AntonyMilneQB AntonyMilneQB 8 hours ago deepyaman 34 minutes ago Happy to talk this through, if it could be helpful for all involved; I think the tradeoffs are worth discussing. :) @noklam noklam Pending Do you know what happens if two packages have the same top-level namespace? Since datasets is one of the most popular libraries (HF) out there. I am not sure how it will be resolved by Python or does pip allow this at all. import datasets # Which library does it actually import? |
Just copying the conversation here to document this more transparently. |
@noklam as I understand it, the import path as it stands is |
That's a good point, maybe we just need the top level namespace |
Notes from Technical Design session: DiscussionPros:
Cons:
Other concerns and questions raised:
ConclusionThe team reached a consensus to namespace the Implementation
|
I don't think we want to map strictly to |
These 2 links will be useful for this ticket
While doing this, we should make sure these still works import kedro
from kedro.extras.datasets import * # From kedro-dataset
from kedro.io import * # From kedro |
Closing this issue in favour of the ticket for implementing the change. |
@noklam @MerelTheisenQB Bit late to the party, but... did you all consider/discuss keeping the import path as is?
kedro-datasets
would just expose thekedro.extras.datasets
namespace package, andkedro
would ideally exclude that namespace (even though it will probably still work, which is pretty neat from a compatibility perspective). This would mean that the change would largely be transparent to the user.Originally posted by @deepyaman in kedro-org/kedro-plugins#38 (comment)
The text was updated successfully, but these errors were encountered: