Skip to content

Commit 9159319

Browse files
committed
feat: add automatically generated documentation for key modules
1 parent 81ea0f0 commit 9159319

File tree

8 files changed

+47
-1
lines changed

8 files changed

+47
-1
lines changed

docs/source/code.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
====
2+
Code
3+
====
4+
5+
spelling.builder
6+
================
7+
8+
.. automodule:: sphinxcontrib.spelling.builder
9+
:members:
10+
11+
spelling.checker
12+
================
13+
14+
.. automodule:: sphinxcontrib.spelling.checker
15+
:members:
16+
17+
spelling.directive
18+
==================
19+
20+
.. automodule:: sphinxcontrib.spelling.directive
21+
:members:
22+
23+
spelling.domain
24+
================
25+
26+
.. automodule:: sphinxcontrib.spelling.domain
27+
:members:
28+
29+
spelling.filters
30+
================
31+
32+
.. automodule:: sphinxcontrib.spelling.filters
33+
:members:
34+
35+
spelling.role
36+
================
37+
38+
.. automodule:: sphinxcontrib.spelling.role
39+
:members:

docs/source/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
# All configuration values have a default; values that are commented out
1010
# serve to show the default.
1111
import os
12+
import pathlib
1213
import sys
1314

1415
# If extensions (or modules to document with autodoc) are in another directory,
1516
# add these directories to sys.path here. If the directory is relative to the
1617
# documentation root, use os.path.abspath to make it absolute, like shown here.
1718
# sys.path.insert(0, os.path.abspath('.'))
19+
sys.path.insert(0, str(pathlib.Path("..", "src").resolve()))
1820

1921
# -- General configuration -----------------------------------------------------
2022

@@ -25,6 +27,7 @@
2527
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2628
extensions = [
2729
"sphinxcontrib.spelling",
30+
"sphinx.ext.autodoc",
2831
]
2932

3033
spelling_word_list_filename = [

docs/source/history.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Next
2626

2727
- Modernize packaging using hatch and hatchling.
2828
- List Python 3.13 as supported.
29+
- Add automatically generated documentation for key modules.
2930

3031
Bug Fixes
3132
---------

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Details
3434
customize
3535
run
3636
developers
37+
code
3738
history
3839

3940

docs/source/spelling_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ wikis
1212
wordfiles
1313
wordlist
1414
wordlists
15+
domaindata

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ ENABLE_SPELLING = "1"
6161
[tool.hatch.envs.docs.scripts]
6262
build = [
6363
"sphinx-build -W -j auto -b html -d docs/build/doctrees docs/source docs/build/html",
64-
"sphinx-build -W -j auto -b linkcheck -d docs/build/doctrees docs/source docs/build/linkcheck",
6564
"sphinx-build -W -j auto -b spelling -d docs/build/doctrees docs/source docs/build/spelling",
6665
]
6766
check = "sphinx-build -W -j auto -b spelling -d docs/build/doctrees docs/source docs/build/spelling"

sphinxcontrib/spelling/builder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def format_suggestions(self, suggestions):
183183
}
184184

185185
def write_doc(self, docname, doctree):
186+
"""write the document"""
186187
lines = list(self._find_misspellings(docname, doctree))
187188
self.misspelling_count += len(lines)
188189
if lines:

sphinxcontrib/spelling/domain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def get_objects(self):
1515
return []
1616

1717
def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
18+
"""resolve cross reference"""
1819
return None
1920

2021
def resolve_any_xref(self, env, fromdocname, builder, target, node, contnode):

0 commit comments

Comments
 (0)