Skip to content

Commit 675eaad

Browse files
committed
docs: Move to gp-lib modules
Remove sphinx-autoapi, which has broken imports. The only purpose this module had was showing table of contents. The tradeoff was a lot of difficult to track, subtle bugs. Also move to linkify_issues. A much simpler and more concise issue linker.
1 parent 35f0640 commit 675eaad

File tree

8 files changed

+11
-18
lines changed

8 files changed

+11
-18
lines changed

docs/conf.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@
2222

2323
extensions = [
2424
"sphinx.ext.autodoc",
25-
"autoapi.extension",
2625
"sphinx.ext.intersphinx",
2726
"sphinx_autodoc_typehints",
2827
"sphinx.ext.todo",
2928
"sphinx.ext.linkcode",
3029
"sphinx.ext.napoleon",
31-
"sphinx_autoissues",
3230
"sphinx_click.ext", # sphinx-click
3331
"sphinx_inline_tabs",
3432
"sphinx_copybutton",
3533
"sphinxext.opengraph",
3634
"sphinxext.rediraffe",
3735
"myst_parser",
36+
"linkify_issues",
37+
"sphinx_toctree_autodoc_fix",
3838
]
3939

4040
myst_enable_extensions = [
@@ -94,21 +94,14 @@
9494
]
9595
}
9696

97-
# sphinx-autoissues
98-
issuetracker = "github"
99-
issuetracker_project = about["__github__"].replace("https://github.com/", "")
97+
# linkify_issues
98+
issue_url_tpl = f'{about["__github__"]}/issues/{{issue_id}}'
10099

101100
# sphinx.ext.autodoc
102101
autoclass_content = "both"
103102
autodoc_member_order = "bysource"
104103
autosummary_generate = True
105104

106-
# sphinx-autoapi
107-
autoapi_type = "python"
108-
autoapi_dirs = [project_root / "libtmux"]
109-
autoapi_generate_api_docs = False # when fales, use directives
110-
suppress_warnings = ["autoapi.python_import_resolution", "autoapi.not_readable"]
111-
112105
# sphinx-copybutton
113106
copybutton_prompt_text = (
114107
r">>> |\.\.\. |> |\$ |\# | In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "

docs/internals/test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Test helpers
22

33
```{eval-rst}
4-
.. autoapimodule:: libtmux.test
4+
.. automodule:: libtmux.test
55
:members:
66
```

docs/reference/common.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Utilities
22

33
```{eval-rst}
4-
.. autoapimodule:: libtmux.common
4+
.. automodule:: libtmux.common
55
:members:
66
```

docs/reference/exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Exceptions
22

33
```{eval-rst}
4-
.. autoapimodule:: libtmux.exc
4+
.. automodule:: libtmux.exc
55
:members:
66
```

docs/reference/panes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[pty(4)]: https://www.freebsd.org/cgi/man.cgi?query=pty&sektion=4
1111

1212
```{eval-rst}
13-
.. autoapiclass:: libtmux.Pane
13+
.. autoclass:: libtmux.Pane
1414
:members:
1515
:inherited-members:
1616
:private-members:

docs/reference/servers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
tmux initializes a server on automatically on first running (e.g. executing `tmux`)
1111

1212
```{eval-rst}
13-
.. autoapiclass:: libtmux.Server
13+
.. autoclass:: libtmux.Server
1414
:members:
1515
:inherited-members:
1616
:private-members:

docs/reference/sessions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Identified by `$`, e.g. `$313`
88

99
```{eval-rst}
10-
.. autoapiclass:: libtmux.Session
10+
.. autoclass:: libtmux.Session
1111
:members:
1212
:inherited-members:
1313
:private-members:

docs/reference/windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
```
1212

1313
```{eval-rst}
14-
.. autoapiclass:: Window
14+
.. autoclass:: Window
1515
:members:
1616
:inherited-members:
1717
:private-members:

0 commit comments

Comments
 (0)