Skip to content

Include __array_api_version__ in API specification section#480

Merged
leofang merged 3 commits into
data-apis:mainfrom
honno:dunder-version-namespace-attr
Oct 17, 2022
Merged

Include __array_api_version__ in API specification section#480
leofang merged 3 commits into
data-apis:mainfrom
honno:dunder-version-namespace-attr

Conversation

@honno

@honno honno commented Sep 21, 2022

Copy link
Copy Markdown
Member

xp.__array_api_version__ has been specified in our Versioning section for a while now (~2yrs), but no such mention of it is found in the API specification section, which is probably why this wasn't implemented in numpy/numpy/pull/18585 and all subsequent adoption efforts across the ecosystem (happy to submit respective PRs after we get this in).

So this PR simply creates a spec/API_specification/version.rst file which includes a documented __array_api_version__ attribute, which also will show up in our array-api/latest/API_specification/ page (as well as the sidebar).

@Zac-HD

Zac-HD commented Sep 21, 2022

Copy link
Copy Markdown

After this is merged, let's also add a test to the conformance suite.

Comment thread spec/API_specification/array_api/__init__.py Outdated
@honno honno force-pushed the dunder-version-namespace-attr branch from 624c403 to 1b0491b Compare October 6, 2022 11:43
@leofang

leofang commented Oct 17, 2022

Copy link
Copy Markdown
Contributor

Merging as this got two green checks and is what we should have had.

@leofang leofang merged commit 67d5e26 into data-apis:main Oct 17, 2022
@kgryte kgryte added this to the v2022 milestone Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants