Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to mkdocstrings #193

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions .github/workflows/deploy_mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[psycopg-binary]"
python -m pip install nbconvert mkdocs mkdocs-material mkdocs-jupyter pygments pdocs mike~=2.0

- name: update API docs
run: |
pdocs as_markdown \
--output_dir docs/src/api \
--exclude_source \
--overwrite \
titiler.pgstac.db \
titiler.pgstac.dependencies \
titiler.pgstac.extensions \
titiler.pgstac.factory \
titiler.pgstac.model \
titiler.pgstac.mosaic \
titiler.pgstac.reader \
titiler.pgstac.settings \
titiler.pgstac.utils
python -m pip install -e ".[psycopg-binary,docs]"

- name: Set module version
id: module
Expand Down
37 changes: 36 additions & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,49 @@ nav:
plugins:
- search
- mkdocs-jupyter:
include_source: True
include_source: true
ignore: ["**/.ipynb_checkpoints/*.ipynb"]
- 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://numpy.org/doc/stable/objects.inv
- https://rasterio.readthedocs.io/en/stable/objects.inv
- https://docs.pydantic.dev/latest/objects.inv
- https://fastapi.tiangolo.com/objects.inv
- https://cogeotiff.github.io/rio-tiler/objects.inv
- https://developmentseed.org/morecantile/objects.inv
- https://developmentseed.org/titiler/objects.inv

theme:
name: material
favicon: img/favicon.ico
logo: img/logo.png
features:
- content.code.annotate
- content.code.copy
- navigation.indexes
- navigation.instant
- navigation.tracking
- search.suggest
- search.share

extra_css:
- overrides/stylesheets/extra.css
Expand Down
1 change: 1 addition & 0 deletions docs/src/api/titiler/pgstac/db.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: titiler.pgstac.db
3 changes: 3 additions & 0 deletions docs/src/api/titiler/pgstac/dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
::: titiler.pgstac.dependencies
options:
show_source: true
1 change: 1 addition & 0 deletions docs/src/api/titiler/pgstac/extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: titiler.pgstac.extensions
1 change: 1 addition & 0 deletions docs/src/api/titiler/pgstac/factory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: titiler.pgstac.factory
1 change: 1 addition & 0 deletions docs/src/api/titiler/pgstac/model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: titiler.pgstac.model
1 change: 1 addition & 0 deletions docs/src/api/titiler/pgstac/mosaic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: titiler.pgstac.mosaic
1 change: 1 addition & 0 deletions docs/src/api/titiler/pgstac/reader.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: titiler.pgstac.reader
1 change: 1 addition & 0 deletions docs/src/api/titiler/pgstac/settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: titiler.pgstac.settings
1 change: 1 addition & 0 deletions docs/src/api/titiler/pgstac/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: titiler.pgstac.utils
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ psycopg-binary = [ # pre-compiled C implementation
]
dev = [
"pre-commit",
"bump-my-version",
]
test = [
"pytest",
Expand All @@ -59,6 +60,14 @@ test = [
"pypgstac>=0.7,<=0.9.1",
"pytest-postgresql",
]
docs = [
"mkdocs>=1.4.3",
"mkdocs-jupyter>=0.24.5",
"mkdocs-material[imaging]>=9.5",
"griffe-inherited-docstrings>=1.0.0",
"mkdocstrings[python]>=0.25.1",
"mike~=2.0",
]

[project.urls]
Homepage = 'https://stac-utils.github.io/titiler-pgstac/'
Expand Down
Loading