mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Link API docs to GitHub source code, refs #464
This commit is contained in:
parent
271433fdd1
commit
45e24deffe
2 changed files with 26 additions and 2 deletions
20
docs/conf.py
20
docs/conf.py
|
|
@ -2,6 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
from beanbag_docutils.sphinx.ext.github import github_linkcode_resolve
|
||||
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
|
|
@ -30,7 +31,12 @@ from subprocess import Popen, PIPE
|
|||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ["sphinx.ext.extlinks", "sphinx.ext.autodoc", "sphinx_copybutton"]
|
||||
extensions = [
|
||||
"sphinx.ext.extlinks",
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx_copybutton",
|
||||
"sphinx.ext.linkcode",
|
||||
]
|
||||
autodoc_member_order = "bysource"
|
||||
autodoc_typehints = "description"
|
||||
|
||||
|
|
@ -38,6 +44,18 @@ extlinks = {
|
|||
"issue": ("https://github.com/simonw/sqlite-utils/issues/%s", "#"),
|
||||
}
|
||||
|
||||
|
||||
def linkcode_resolve(domain, info):
|
||||
return github_linkcode_resolve(
|
||||
domain=domain,
|
||||
info=info,
|
||||
allowed_module_names=["sqlite_utils"],
|
||||
github_org_id="simonw",
|
||||
github_repo_id="sqlite-utils",
|
||||
branch="main",
|
||||
)
|
||||
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ["_templates"]
|
||||
|
||||
|
|
|
|||
8
setup.py
8
setup.py
|
|
@ -32,7 +32,13 @@ setup(
|
|||
],
|
||||
extras_require={
|
||||
"test": ["pytest", "black", "hypothesis", "cogapp"],
|
||||
"docs": ["furo", "sphinx-autobuild", "codespell", "sphinx-copybutton"],
|
||||
"docs": [
|
||||
"furo",
|
||||
"sphinx-autobuild",
|
||||
"codespell",
|
||||
"sphinx-copybutton",
|
||||
"beanbag-docutils @ https://github.com/simonw/beanbag-docutils/archive/refs/heads/bytes-in-url.zip",
|
||||
],
|
||||
"mypy": [
|
||||
"mypy",
|
||||
"types-click",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue