Skip to content

Commit

Permalink
add api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Sep 6, 2024
1 parent 4cfb616 commit fe2c2fa
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 6 deletions.
38 changes: 38 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ nav:
- Home: 'index.md'
- Usage: 'usage.md'
- TMS v2: 'tms-v2.md'
- API:
- morecantile.commons: api/morecantile/commons.md
- morecantile.defaults: api/morecantile/defaults.md
- morecantile.errors: api/morecantile/errors.md
- morecantile.models: api/morecantile/models.md
- morecantile.utils: api/morecantile/utils.md
- CLI: 'cli.md'
- Development - Contributing: 'contributing.md'
- Release: 'release-notes.md'
Expand All @@ -41,9 +47,41 @@ theme:
font:
text: 'Nunito Sans'
code: 'Fira Code'
features:
- content.code.annotate
- content.code.copy
- navigation.indexes
- navigation.instant
- navigation.tracking
- search.suggest
- search.share

plugins:
- search
- mkdocstrings:
enable_inventory: true
handlers:
python:
paths: [src]
options:
filters:
- "!^__post_init__"
docstring_section_style: list
docstring_style: google
line_length: 100
separate_signature: true
show_root_heading: true
show_signature_annotations: true
show_source: false
show_symbol_type_toc: true
signature_crossrefs: true
extensions:
- griffe_inherited_docstrings
import:
- https://docs.python.org/3/objects.inv
- https://rasterio.readthedocs.io/en/stable/objects.inv
- https://docs.pydantic.dev/latest/objects.inv
- https://pyproj4.github.io/pyproj/stable/objects.inv

# These extensions are chosen to be a superset of Pandoc's Markdown.
# This way, I can write in Pandoc's Markdown and have it be supported here.
Expand Down
1 change: 1 addition & 0 deletions docs/src/api/morecantile/commons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: morecantile.commons
1 change: 1 addition & 0 deletions docs/src/api/morecantile/defaults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: morecantile.defaults
1 change: 1 addition & 0 deletions docs/src/api/morecantile/errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: morecantile.errors
1 change: 1 addition & 0 deletions docs/src/api/morecantile/models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: morecantile.models
1 change: 1 addition & 0 deletions docs/src/api/morecantile/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: morecantile.utils
8 changes: 4 additions & 4 deletions morecantile/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ class BoundingBox(NamedTuple):
"""A xmin,ymin,xmax,ymax coordinates tuple.
Args:
left (number): min horizontal coordinate.
bottom (number):min vertical coordinate.
right (number): max horizontal coordinate.
top (number): max vertical coordinate.
left (number): min horizontal coordinate.
bottom (number):min vertical coordinate.
right (number): max horizontal coordinate.
top (number): max vertical coordinate.
Examples:
>>> BoundingBox(-180.0, -90.0, 180.0, 90.0)
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ dev = [
"bump-my-version",
]
docs = [
"mkdocs",
"mkdocs-material",
"mkdocs>=1.4.3",
"mkdocs-material[imaging]>=9.5",
"griffe-inherited-docstrings>=1.0.0",
"mkdocstrings[python]>=0.25.1",
"pygments",
]

Expand Down

0 comments on commit fe2c2fa

Please sign in to comment.