Skip to content

Commit 8f353a2

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

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
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: .

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Usage
2222
The 3x3 augmented affine transformation matrix for transformations in two
2323
dimensions is illustrated below.
2424

25-
::
25+
.. code-block:: none
2626
2727
| x' | | a b c | | x |
2828
| y' | = | d e f | | y |

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: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,27 @@ 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
----------
9395
a, b, c, d, e, f, g, h, i : float
94-
Coefficients of the 3 x 3 augmented affine transformation
95-
matrix::
96+
Coefficients of the 3 x 3 augmented affine transformation matrix.
97+
98+
.. code-block:: none
9699
97100
| x' | | a b c | | x |
98101
| y' | = | d e f | | y |
99102
| 1 | | g h i | | 1 |
100103
101104
`g`, `h`, and `i` are always 0, 0, and 1.
102105
106+
Notes
107+
-----
103108
The Affine package is derived from Casey Duncan's Planar package.
104109
See the copyright statement below. Parallel lines are preserved by
105110
these transforms. Affine transforms can perform any combination of

0 commit comments

Comments
 (0)