diff --git a/.github/workflows/deploy_mkdocs.yml b/.github/workflows/deploy_mkdocs.yml index 8b88489..3428cef 100644 --- a/.github/workflows/deploy_mkdocs.yml +++ b/.github/workflows/deploy_mkdocs.yml @@ -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 diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index f1a1a45..d4e7189 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -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 diff --git a/docs/src/api/titiler/pgstac/db.md b/docs/src/api/titiler/pgstac/db.md new file mode 100644 index 0000000..1aa6d90 --- /dev/null +++ b/docs/src/api/titiler/pgstac/db.md @@ -0,0 +1 @@ +::: titiler.pgstac.db diff --git a/docs/src/api/titiler/pgstac/dependencies.md b/docs/src/api/titiler/pgstac/dependencies.md new file mode 100644 index 0000000..5189c7b --- /dev/null +++ b/docs/src/api/titiler/pgstac/dependencies.md @@ -0,0 +1,3 @@ +::: titiler.pgstac.dependencies + options: + show_source: true diff --git a/docs/src/api/titiler/pgstac/extensions.md b/docs/src/api/titiler/pgstac/extensions.md new file mode 100644 index 0000000..d178f9a --- /dev/null +++ b/docs/src/api/titiler/pgstac/extensions.md @@ -0,0 +1 @@ +::: titiler.pgstac.extensions diff --git a/docs/src/api/titiler/pgstac/factory.md b/docs/src/api/titiler/pgstac/factory.md new file mode 100644 index 0000000..8d20c44 --- /dev/null +++ b/docs/src/api/titiler/pgstac/factory.md @@ -0,0 +1 @@ +::: titiler.pgstac.factory diff --git a/docs/src/api/titiler/pgstac/model.md b/docs/src/api/titiler/pgstac/model.md new file mode 100644 index 0000000..d788c26 --- /dev/null +++ b/docs/src/api/titiler/pgstac/model.md @@ -0,0 +1 @@ +::: titiler.pgstac.model diff --git a/docs/src/api/titiler/pgstac/mosaic.md b/docs/src/api/titiler/pgstac/mosaic.md new file mode 100644 index 0000000..7445f58 --- /dev/null +++ b/docs/src/api/titiler/pgstac/mosaic.md @@ -0,0 +1 @@ +::: titiler.pgstac.mosaic diff --git a/docs/src/api/titiler/pgstac/reader.md b/docs/src/api/titiler/pgstac/reader.md new file mode 100644 index 0000000..7a80e25 --- /dev/null +++ b/docs/src/api/titiler/pgstac/reader.md @@ -0,0 +1 @@ +::: titiler.pgstac.reader diff --git a/docs/src/api/titiler/pgstac/settings.md b/docs/src/api/titiler/pgstac/settings.md new file mode 100644 index 0000000..d082d9c --- /dev/null +++ b/docs/src/api/titiler/pgstac/settings.md @@ -0,0 +1 @@ +::: titiler.pgstac.settings diff --git a/docs/src/api/titiler/pgstac/utils.md b/docs/src/api/titiler/pgstac/utils.md new file mode 100644 index 0000000..cdc3aa8 --- /dev/null +++ b/docs/src/api/titiler/pgstac/utils.md @@ -0,0 +1 @@ +::: titiler.pgstac.utils diff --git a/pyproject.toml b/pyproject.toml index 676ad2c..66a3707 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ psycopg-binary = [ # pre-compiled C implementation ] dev = [ "pre-commit", + "bump-my-version", ] test = [ "pytest", @@ -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/'