Repository navigation
feat: add awkward.* aliases to objects.inv for intersphinx - #3958
Conversation
Post-process the Sphinx inventory after build to duplicate ak.* entries as awkward.* so downstream projects can resolve cross-references like awkward.Array. Closes scikit-hep#3950. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This PR is doc only. It will get stuck again for the same reason as described in #3948 (comment). I'll touch some code. |
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR3958 |
Docs-only PRs from forks don't trigger the required Tests workflow (paths-ignore: docs/**). This trivial src/ change forces CI to run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I pushed 27e637a to trigger the workflows. |
|
The |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
|
ianna
left a comment
There was a problem hiding this comment.
@TaiSakuma - Thanks! I wonder if this is an old PR and needs an update-- the docs do not expose private members nor the cross links are consistently present:
ianna
left a comment
There was a problem hiding this comment.
@TaiSakuma - Fantastic! Thanks for clarification. This PR is ready to merged. Thanks!
|
For example, in the hypothesis-awkward doc, the Python builtins (e.g., This PR fixes similar links to Awkward objects. |
Summary
ak.*entries asawkward.*, so downstream projects can resolve intersphinx cross-references likeawkward.ArrayMotivation
Downstream projects that use type annotations like
ak.Arrayorak.contents.RegularArrayhave their documentation tools (mkdocstrings, sphinx-autodoc, etc.) resolve these to the fully qualifiedawkward.*names. Since the inventory only containedak.*entries, cross-reference lookups failed silently — no links were generated.With this change, a downstream project like hypothesis-awkward can write:
and its API reference will automatically link
ak.Arrayto the Awkward Array documentation. Similarly, references like[RegularArray][ak.contents.RegularArray]will resolve correctly.Details
A
build-finishedSphinx event handler reads the generatedobjects.inv, duplicates eachak.*entry with anawkward.*prefix pointing to the same URL, and writes it back.Test plan
sphinx-build -M html . _build -D nb_execution_mode=offobjects.invcontainsawkward.Array,awkward.Record,awkward.flattenentriesawkward.Arrayagainst the local inventoryCo-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com