Repository navigation
Add auto-generated API docs - #797
smheidrich wants to merge 1 commit into
Conversation
| Have a look at ``rope.refactor`` package and its sub-modules. For | ||
| example for performing a move refactoring you can create a ``Move`` | ||
| object like this: | ||
| Have a look at the `rope.refactor` package and its sub-modules. For | ||
| example for performing a move refactoring you can create an object | ||
| representing this operation (which will be an instance of e.g. | ||
| `MoveMethod`, `MoveModule`, ...) using `create_move`. |
There was a problem hiding this comment.
I've made a few adjustments like this one in library.rst just to show the benefit of the API docs for readers of the existing docs.
Ideally, this should be done throughout the existing docs, but I'll only do that if I get the green light for the basic idea behind this PR.
ed1ddac to
99aac98
Compare
f9645ce to
4c7bbce
Compare
|
Could you refresh this PR against current master and resolve the documentation conflicts first? Some documentation clean-ups have landed since this was opened. The most useful validation here is a documentation build with the current documentation dependencies, rather than the Python test matrix. Please include the build command, a summary of warnings introduced by this PR, and a preview of the generated API pages. In particular, please check that the API reference is reachable from the navigation, its cross-references resolve as intended, and the generated pages do not duplicate or disrupt the existing library documentation. Once refreshed, we should arrange a Read the Docs preview so the rendered result can be reviewed before merge. |
|
Are you still planning to update this PR? If so, please refresh it against current master and post a docs-build result, a summary of new warnings, and a Read the Docs preview. If not, please say so and we can close it. |
The documentation tells library users to read the source of rope.refactor and friends, because there is no API reference. Generate one from the docstrings with sphinx-autoapi, which, unlike autosummary, does not need hand-written stubs for every module, and link it from the table of contents through a short "API reference" page that points to the main entry points. The reference documents public members, including those inherited from private base classes (e.g. Project gets do(), get_resource(), history, ... from _Project), but leaves imported members out, so that rope.base.ast does not document the whole stdlib ast again. napoleon parses the NumPy-style docstring sections, which would otherwise become section titles with duplicate labels, and an autoapi-skip-member hook documents only the first of names that are intentionally defined several times (try/except fallbacks, operator handlers in type_hinting). The documentation build stays free of warnings. library.rst now uses cross-references to the reference instead of literal names where it mentions rope modules, classes and functions in running text; section titles are left unchanged to keep their autosectionlabel anchors. This replaces the stale PR #797 and takes its idea and its sphinx-autoapi and intersphinx setup. Fixes: #796 Co-authored-by: Shahriar Heidrich <smheidrich@weltenfunktion.de>
|
I have refreshed this against current master as #973, which keeps your sphinx-autoapi and intersphinx setup (you are credited as co-author) and adds the API reference to the navigation, napoleon for the NumPy-style docstrings, and cross-references from @smheidrich, I'm leaving this PR open for now — any comments on #973 are very welcome. |
Description
Add an auto-generated API reference to Rope's docs.
Fixes #796
Details (might change as the PR evolves)
sphinx-autoapito generate the docs.