Skip to content

Commit 062291f

Browse files
committed
chore(docs): upgrade sphinx
use numpy doc style fix minor warnings
1 parent a7a916f commit 062291f

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

.readthedocs.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
version: 2
22

33
build:
4-
os: ubuntu-22.04
4+
os: ubuntu-24.04
55
tools:
6-
python: "3.11"
6+
python: "3.14"
77

88
sphinx:
99
configuration: docs/src/conf.py
1010

1111
python:
1212
install:
1313
- requirements: docs/requirements.txt
14+
- method: pip
15+
path: .

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
attrs
2-
sphinx==6.2.1
2+
sphinx==9.1.0

docs/src/conf.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1212

1313
project = "rasterio/affine"
14-
copyright = "2025, Sean Gillies"
14+
project_copyright = "%Y, Sean Gillies"
1515
author = "Sean Gillies"
1616
release = "development"
1717

@@ -21,28 +21,20 @@
2121
extensions = [
2222
"sphinx.ext.autodoc",
2323
"sphinx.ext.coverage",
24+
"sphinx.ext.githubpages",
2425
"sphinx.ext.ifconfig",
26+
"sphinx.ext.napoleon", # NumPy doc style.
27+
"sphinx.ext.todo",
2528
"sphinx.ext.viewcode",
26-
"sphinx.ext.githubpages",
2729
]
2830

2931
templates_path = ["_templates"]
30-
exclude_patterns = ["Thumbs.db", ".DS_Store"]
31-
32-
# The suffix of source filenames.
33-
source_suffix = ".rst"
34-
35-
# The root toctree document.
36-
root_doc = "index"
37-
38-
# The name of the Pygments (syntax highlighting) style to use.
39-
pygments_style = "sphinx"
32+
exclude_patterns = ["build", "Thumbs.db", ".DS_Store"]
4033

4134
# -- Options for HTML output -------------------------------------------------
4235
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
4336

4437
html_theme = "nature"
45-
4638
html_static_path = ["_static"]
4739

4840
# If this is not None, a 'Last updated on:' timestamp is inserted at every page bottom.

src/affine.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ class Affine:
8484
8585
Parameters
8686
----------
87-
a, b, c, d, e, f, [g, h, i] : float
88-
Coefficients of the 3 x 3 augmented affine transformation
89-
matrix.
87+
a, b, c, d, e, f : float
88+
Coefficients of the 3 x 3 augmented affine transformation matrix.
89+
90+
g, h, i : float, optional
91+
Coefficients of the 3 x 3 augmented affine transformation matrix.
9092
9193
Attributes
9294
----------
@@ -100,6 +102,8 @@ class Affine:
100102
101103
`g`, `h`, and `i` are always 0, 0, and 1.
102104
105+
Notes
106+
-----
103107
The Affine package is derived from Casey Duncan's Planar package.
104108
See the copyright statement below. Parallel lines are preserved by
105109
these transforms. Affine transforms can perform any combination of

0 commit comments

Comments
 (0)