Skip to content

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

Merged
merged 5 commits into from
Nov 4, 2021

Conversation

honno
Copy link
Member

@honno honno commented Nov 2, 2021

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.

@kgryte kgryte added this to the v2021 milestone Nov 4, 2021
@kgryte kgryte added the Narrative Content Narrative documentation content. label Nov 4, 2021
Copy link
Contributor

@kgryte kgryte left a 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.

@kgryte kgryte merged commit 45771c9 into data-apis:main Nov 4, 2021
Copy link
Member Author

@honno honno left a 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

Copy link
Member

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Narrative Content Narrative documentation content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: use entrypoints to make array-api submodules discoverable
3 participants