-
Notifications
You must be signed in to change notification settings - Fork 53
Include entry points as an optional feature #297
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
Conversation
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.
LGTM. Thanks, @honno!
If we need to make further changes, we can do so in a follow-up PR.
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.
@kgryte as per slack—yep your changes all look good.
@@ -369,6 +369,31 @@ recommended not to add other functions or objects, because that may make it | |||
harder for users to write code that will work with multiple array libraries. | |||
|
|||
|
|||
### Discoverability | |||
|
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.
This is a bit cryptic for a reader, like why does it exist? what goes wrong if an entrypoint is not implemented? The one word may is not enough, I'll try to add a note with rationale. Especially because this is in the "Purpose and scope" section, that is important.
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.
Thanks!
Resolves #244 by adding a subsection that goes over entry points as an optional thing to adopt in the "How to adopt this API" section.
I thought to give an example of how it would be used, like how
xp = x.__array_namespace__()
is shown above. It's a bit awkward due to the dict interface deprecation, but it seemed better to address it in the code example than in a separate note.I also thought to give an example of defining an entry point in setup.py i.e.
entry_points={'array_api': ['package_name = package_name.array_api']}
, but that is a bit out-of-scope really.