Skip to content

Commit fe2c2fa

Browse files
committed
add api docs
1 parent 4cfb616 commit fe2c2fa

File tree

8 files changed

+51
-6
lines changed

8 files changed

+51
-6
lines changed

docs/mkdocs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ nav:
2424
- Home: 'index.md'
2525
- Usage: 'usage.md'
2626
- TMS v2: 'tms-v2.md'
27+
- API:
28+
- morecantile.commons: api/morecantile/commons.md
29+
- morecantile.defaults: api/morecantile/defaults.md
30+
- morecantile.errors: api/morecantile/errors.md
31+
- morecantile.models: api/morecantile/models.md
32+
- morecantile.utils: api/morecantile/utils.md
2733
- CLI: 'cli.md'
2834
- Development - Contributing: 'contributing.md'
2935
- Release: 'release-notes.md'
@@ -41,9 +47,41 @@ theme:
4147
font:
4248
text: 'Nunito Sans'
4349
code: 'Fira Code'
50+
features:
51+
- content.code.annotate
52+
- content.code.copy
53+
- navigation.indexes
54+
- navigation.instant
55+
- navigation.tracking
56+
- search.suggest
57+
- search.share
4458

4559
plugins:
4660
- search
61+
- mkdocstrings:
62+
enable_inventory: true
63+
handlers:
64+
python:
65+
paths: [src]
66+
options:
67+
filters:
68+
- "!^__post_init__"
69+
docstring_section_style: list
70+
docstring_style: google
71+
line_length: 100
72+
separate_signature: true
73+
show_root_heading: true
74+
show_signature_annotations: true
75+
show_source: false
76+
show_symbol_type_toc: true
77+
signature_crossrefs: true
78+
extensions:
79+
- griffe_inherited_docstrings
80+
import:
81+
- https://docs.python.org/3/objects.inv
82+
- https://rasterio.readthedocs.io/en/stable/objects.inv
83+
- https://docs.pydantic.dev/latest/objects.inv
84+
- https://pyproj4.github.io/pyproj/stable/objects.inv
4785

4886
# These extensions are chosen to be a superset of Pandoc's Markdown.
4987
# This way, I can write in Pandoc's Markdown and have it be supported here.

docs/src/api/morecantile/commons.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: morecantile.commons

docs/src/api/morecantile/defaults.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: morecantile.defaults

docs/src/api/morecantile/errors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: morecantile.errors

docs/src/api/morecantile/models.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: morecantile.models

docs/src/api/morecantile/utils.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: morecantile.utils

morecantile/commons.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ class BoundingBox(NamedTuple):
77
"""A xmin,ymin,xmax,ymax coordinates tuple.
88
99
Args:
10-
left (number): min horizontal coordinate.
11-
bottom (number):min vertical coordinate.
12-
right (number): max horizontal coordinate.
13-
top (number): max vertical coordinate.
10+
left (number): min horizontal coordinate.
11+
bottom (number):min vertical coordinate.
12+
right (number): max horizontal coordinate.
13+
top (number): max vertical coordinate.
1414
1515
Examples:
1616
>>> BoundingBox(-180.0, -90.0, 180.0, 90.0)

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ dev = [
4141
"bump-my-version",
4242
]
4343
docs = [
44-
"mkdocs",
45-
"mkdocs-material",
44+
"mkdocs>=1.4.3",
45+
"mkdocs-material[imaging]>=9.5",
46+
"griffe-inherited-docstrings>=1.0.0",
47+
"mkdocstrings[python]>=0.25.1",
4648
"pygments",
4749
]
4850

0 commit comments

Comments
 (0)