Skip to content

Set up for Python documentation (including front page)#187

Merged
jpivarski merged 47 commits into
masterfrom
docs/0187-python-doxygen-1
Mar 26, 2020
Merged

Set up for Python documentation (including front page)#187
jpivarski merged 47 commits into
masterfrom
docs/0187-python-doxygen-1

Conversation

@jpivarski

@jpivarski jpivarski commented Mar 25, 2020

Copy link
Copy Markdown
Member

No description provided.

@jpivarski

Copy link
Copy Markdown
Member Author

I've tested it on ReadTheDocs and all is well. Now I just need to write that documentation.

@jpivarski jpivarski changed the title [WIP] Start writing doxygen docstrings in Python. Set up for Python documentation (including front page) Mar 26, 2020
@jpivarski

Copy link
Copy Markdown
Member Author

I'm going to close this PR off now because it's really about the front page documentation. The next PR will be about Python docstrings.

@jpivarski
jpivarski merged commit f61ce36 into master Mar 26, 2020
@jpivarski
jpivarski deleted the docs/0187-python-doxygen-1 branch March 26, 2020 18:23
TaiSakuma added a commit to TaiSakuma/awkward that referenced this pull request Apr 3, 2026
When prepare_docstrings.py was developed in 2020 (scikit-hep#187, scikit-hep#158), there was
no standard Sphinx solution for generating API docs without importing the
package. The script used ast to parse source files and called napoleon
directly, then applied regex-based post-processing to indent RST directives.

This post-processing handles specific RST constructs (:param, :type,
:returns, :raises) but not others. Adding Google-style summary lines to
docstrings (scikit-hep#3946) exposed this gap: summary lines were not indented
inside the py:function directive, breaking the parameter rendering.

sphinx-autoapi, which parses source via astroid without importing, is now
available as a standard Sphinx extension. It lets Sphinx parse the
generated RST natively, avoiding the need for regex-based post-processing.

This commit replaces prepare_docstrings.py with sphinx-autoapi:
- Add sphinx-autoapi and napoleon extensions
- Monkey-patch output paths to preserve existing ak.* URL structure
- Custom Jinja templates for display names and GitHub source links
- Docstring filter for cross-references, backtick escaping, and member links
- Skip internal submodules that collide on case-insensitive filesystems

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TaiSakuma added a commit to TaiSakuma/awkward that referenced this pull request Apr 3, 2026
When prepare_docstrings.py was developed in 2020 (scikit-hep#187, scikit-hep#158), there was
no standard Sphinx solution for generating API docs without importing the
package. The script used ast to parse source files and called napoleon
directly, then applied regex-based post-processing to indent RST directives.

This post-processing handles specific RST constructs (:param, :type,
:returns, :raises) but not others. Adding Google-style summary lines to
docstrings (scikit-hep#3946) exposed this gap: summary lines were not indented
inside the py:function directive, breaking the parameter rendering.

sphinx-autoapi, which parses source via astroid without importing, is now
available as a standard Sphinx extension. It lets Sphinx parse the
generated RST natively, avoiding the need for regex-based post-processing.

This commit replaces prepare_docstrings.py with sphinx-autoapi:
- Add sphinx-autoapi and napoleon extensions
- Monkey-patch output paths to preserve existing ak.* URL structure
- Custom Jinja templates for display names and GitHub source links
- Docstring filter for cross-references, backtick escaping, and member links
- Skip internal submodules that collide on case-insensitive filesystems

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TaiSakuma added a commit to TaiSakuma/awkward that referenced this pull request Apr 6, 2026
When prepare_docstrings.py was developed in 2020 (scikit-hep#187, scikit-hep#158), there was
no standard Sphinx solution for generating API docs without importing the
package. The script used ast to parse source files and called napoleon
directly, then applied regex-based post-processing to indent RST directives.

This post-processing handles specific RST constructs (:param, :type,
:returns, :raises) but not others. Adding Google-style summary lines to
docstrings (scikit-hep#3946) exposed this gap: summary lines were not indented
inside the py:function directive, breaking the parameter rendering.

sphinx-autoapi, which parses source via astroid without importing, is now
available as a standard Sphinx extension. It lets Sphinx parse the
generated RST natively, avoiding the need for regex-based post-processing.

This commit replaces prepare_docstrings.py with sphinx-autoapi:
- Add sphinx-autoapi and napoleon extensions
- Monkey-patch output paths to preserve existing ak.* URL structure
- Custom Jinja templates for display names and GitHub source links
- Docstring filter for cross-references, backtick escaping, and member links
- Skip internal submodules that collide on case-insensitive filesystems

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TaiSakuma added a commit that referenced this pull request Apr 7, 2026
* docs: replace prepare_docstrings.py with sphinx-autoapi

When prepare_docstrings.py was developed in 2020 (#187, #158), there was
no standard Sphinx solution for generating API docs without importing the
package. The script used ast to parse source files and called napoleon
directly, then applied regex-based post-processing to indent RST directives.

This post-processing handles specific RST constructs (:param, :type,
:returns, :raises) but not others. Adding Google-style summary lines to
docstrings (#3946) exposed this gap: summary lines were not indented
inside the py:function directive, breaking the parameter rendering.

sphinx-autoapi, which parses source via astroid without importing, is now
available as a standard Sphinx extension. It lets Sphinx parse the
generated RST natively, avoiding the need for regex-based post-processing.

This commit replaces prepare_docstrings.py with sphinx-autoapi:
- Add sphinx-autoapi and napoleon extensions
- Monkey-patch output paths to preserve existing ak.* URL structure
- Custom Jinja templates for display names and GitHub source links
- Docstring filter for cross-references, backtick escaping, and member links
- Skip internal submodules that collide on case-insensitive filesystems

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: suppress internal _module. pages from autoapi output

Internal submodule pages (e.g., ak._module.recordarray) are generated
to avoid case collisions on case-insensitive filesystems but should
not produce visible HTML pages. Suppress them by checking for the
_module. prefix in the module template.

Reduces orphan pages from 208 to 106.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add blank line in ak.flatten docstring to trigger Tests workflow (#3948)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant