Skip to content

Commit ff5ff1b

Browse files
committed
Sphinx docs stub
1 parent d9732ee commit ff5ff1b

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= uv run sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from importlib import metadata
2+
3+
extensions = [
4+
'sphinx.ext.autodoc',
5+
'sphinx.ext.intersphinx',
6+
]
7+
8+
intersphinx_mapping = {
9+
'python': ('http://docs.python.org', None),
10+
}
11+
12+
project = 'pytest-sqlalchemy'
13+
author = 'Torsten Irländer'
14+
release = metadata.version(project)
15+
copyright = f'2015 onwards {author}'
16+
17+
templates_path = ['_templates']
18+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
19+
20+
autodoc_member_order = 'bysource'
21+
22+
html_theme = 'furo'
23+
24+
nitpicky = True
25+
nitpick_ignore: list[tuple[str, str]] = []

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../README.rst

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ dev = [
3232
"mypy>=1.15.0",
3333
"pytest-xdist>=3.6.1",
3434
]
35+
docs = [
36+
"furo>=2024.8.6",
37+
"sphinx>=8.1.3",
38+
]
3539

3640
[build-system]
3741
requires = ["setuptools>=61.0"]

0 commit comments

Comments
 (0)