Skip to content

Commit 202789e

Browse files
authored
docs: Move to gp-libs (our internal helpers for sphinx, #381)
- Render changelog in [`linkify_issues`] - Fix Table of contents rendering with sphinx autodoc with [`sphinx_toctree_autodoc_fix`] - Deprecate `sphinx-autoapi`, per above fixing the table of contents issue This also removes the need to workaround autoapi bugs. - Test doctests in our docs via [`pytest_doctest_docutils`] (built on [`doctest_docutils`]) [`linkify_issues`]: https://gp-libs.git-pull.com/linkify_issues/ [`sphinx_toctree_autodoc_fix`]: https://gp-libs.git-pull.com/sphinx_toctree_autodoc_fix/ [`pytest_doctest_docutils`]: https://gp-libs.git-pull.com/doctest/pytest.html [`doctest_docutils`]: https://gp-libs.git-pull.com/doctest
2 parents 303ee97 + 30f273c commit 202789e

File tree

3 files changed

+29
-207
lines changed

3 files changed

+29
-207
lines changed

docs/conf.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,26 @@
1717

1818
extensions = [
1919
"sphinx.ext.autodoc",
20-
"autoapi.extension",
2120
"sphinx.ext.intersphinx",
2221
"sphinx_autodoc_typehints",
2322
"sphinx.ext.todo",
2423
"sphinx.ext.napoleon",
2524
"sphinx.ext.linkcode",
26-
"sphinx_autoissues",
2725
"sphinx_click.ext", # sphinx-click
2826
"sphinx_inline_tabs",
2927
"sphinx_copybutton",
3028
"sphinxext.opengraph",
3129
"sphinxext.rediraffe",
3230
"myst_parser",
31+
"sphinx_toctree_autodoc_fix",
32+
"linkify_issues",
33+
]
34+
myst_enable_extensions = [
35+
"colon_fence",
36+
"substitution",
37+
"replacements",
38+
"strikethrough",
3339
]
34-
myst_enable_extensions = ["colon_fence", "substitution", "replacements"]
3540

3641
templates_path = ["_templates"]
3742

@@ -83,25 +88,17 @@
8388
]
8489
}
8590

86-
# sphinx-autoissues
87-
issuetracker = "github"
88-
issuetracker_project = "vcs-python/vcspull"
91+
# linkify_issues
92+
issue_url_tpl = "https://github.com/tony/vcs-python/vcspull/issues/{issue_id}"
8993

9094
# sphinx.ext.autodoc
9195
autoclass_content = "both"
9296
autodoc_member_order = "bysource"
93-
autosummary_generate = True
9497

9598
# sphinx-autodoc-typehints
9699
autodoc_typehints = "description" # show type hints in doc body instead of signature
97100
simplify_optional_unions = True
98101

99-
# sphinx-autoapi
100-
autoapi_type = "python"
101-
autoapi_dirs = [project_root / "vcspull"]
102-
autoapi_generate_api_docs = False # when fales, use directives
103-
suppress_warnings = ["autoapi.python_import_resolution", "autoapi.not_readable"]
104-
105102
# sphinx.ext.napoleon
106103
napoleon_google_docstring = True
107104
napoleon_include_init_with_doc = True

0 commit comments

Comments
 (0)