Skip to content
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
37 changes: 37 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Documentation

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
run: uv python install

- name: Install dependencies
run: |
uv sync --all-extras

- name: Build documentation
run: |
uv run sphinx-build -b html docs/source docs/build/html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build/
.coverage
.coverage.*
dist/
docs/build/html
*.egg-info
.eggs
examples/sentinel-2*/
Expand All @@ -14,3 +15,4 @@ __pycache__
.pytest*
.ruff_cache
.vscode/
.venv
37 changes: 37 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
API Reference
=============

.. autosummary::
:toctree: generated
:recursive:

mapchete_eo.base
mapchete_eo.product
mapchete_eo.source
mapchete_eo.search.base
mapchete_eo.search.stac_search
mapchete_eo.search.stac_static
mapchete_eo.search.utm_search
mapchete_eo.platforms.sentinel2.driver
mapchete_eo.platforms.sentinel2.source
mapchete_eo.platforms.sentinel2.product
mapchete_eo.platforms.sentinel2.preprocessing_tasks
mapchete_eo.platforms.sentinel2.masks
mapchete_eo.image_operations.compositing
mapchete_eo.image_operations.blend_functions
mapchete_eo.image_operations.color_correction
mapchete_eo.image_operations.filters
mapchete_eo.image_operations.linear_normalization
mapchete_eo.processes.merge_rasters
mapchete_eo.processes.dtype_scale
mapchete_eo.processes.eo_to_xarray
mapchete_eo.io.products
mapchete_eo.io.levelled_cubes
mapchete_eo.io.assets
mapchete_eo.io.items
mapchete_eo.array.convert
mapchete_eo.array.color
mapchete_eo.array.buffer
mapchete_eo.time
mapchete_eo.types
mapchete_eo.sort
20 changes: 17 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@ def get_metadata():
version, author = get_metadata()

project = "mapchete-eo"
author = author

release = version

version, author = get_metadata()

rst_prolog = f"""
.. |author| replace:: {author}
.. |version| replace:: {version}
Expand All @@ -58,8 +55,18 @@ def get_metadata():
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
]

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
"rasterio": ("https://rasterio.readthedocs.io/en/latest/", None),
"xarray": ("https://docs.xarray.dev/en/stable/", None),
"mapchete": ("https://mapchete.readthedocs.io/en/latest/", None),
}

autosummary_generate = True

# Optional: include tests folder on path (if you want to import tests modules)
Expand All @@ -71,3 +78,10 @@ def get_metadata():

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
# docs/source/conf.py

# Tells Sphinx to be strict, but ignore these specific ambiguous targets
nitpicky = True
nitpick_ignore = [
("py:class", "MergeMethod"),
]
36 changes: 33 additions & 3 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,40 @@ Examples

Examples can be found in the `examples` directory of this repository.

List of available examples:
List of available Examples
========

1) `sentinel-2_2025-may-june_first-pixel.mapchete`
2) *placeholder*
Mapchete-EO Drivers
-------------------

You can execute mapchete-eo drivers as any other mapchete processes.


Sentinel-2 First Pixel
-----------------------

This example uses Sentinel-2 data and picks the first available cloud-free pixel from a time range.

* `Config <https://github.com/eox-a/mapchete-eo/blob/main/examples/sentinel-2_2025-may-june_first_pixel.mapchete>`_
* `Process <https://github.com/eox-a/mapchete-eo/blob/main/examples/first_pixel_process.py>`_


Sentinel-2 NDVI
---------------

Calculate the Normalized Difference Vegetation Index (NDVI) from Sentinel-2 data.

* `Config <https://github.com/eox-a/mapchete-eo/blob/main/examples/ndvi.mapchete>`_
* `Process <https://github.com/eox-a/mapchete-eo/blob/main/examples/ndvi_process.py>`_


Sentinel-2 Temporal Mean
------------------------

Create a temporal mean composite of cloud-free pixels over a given time range.

* `Config <https://github.com/eox-a/mapchete-eo/blob/main/examples/temporal_mean.mapchete>`_
* `Process <https://github.com/eox-a/mapchete-eo/blob/main/examples/temporal_mean_process.py>`_

Usage
-----
Expand Down
12 changes: 12 additions & 0 deletions docs/source/generated/mapchete_eo.array.buffer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mapchete\_eo.array.buffer
=========================

.. automodule:: mapchete_eo.array.buffer


.. rubric:: Functions

.. autosummary::

buffer_array

14 changes: 14 additions & 0 deletions docs/source/generated/mapchete_eo.array.color.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
mapchete\_eo.array.color
========================

.. automodule:: mapchete_eo.array.color


.. rubric:: Functions

.. autosummary::

color_array
hex_to_rgb
outlier_pixels

15 changes: 15 additions & 0 deletions docs/source/generated/mapchete_eo.array.convert.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mapchete\_eo.array.convert
==========================

.. automodule:: mapchete_eo.array.convert


.. rubric:: Functions

.. autosummary::

to_bands_mask
to_dataarray
to_dataset
to_masked_array

37 changes: 37 additions & 0 deletions docs/source/generated/mapchete_eo.array.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
mapchete\_eo.array package
==========================

Submodules
----------

mapchete\_eo.array.buffer module
--------------------------------

.. automodule:: mapchete_eo.array.buffer
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.array.color module
-------------------------------

.. automodule:: mapchete_eo.array.color
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.array.convert module
---------------------------------

.. automodule:: mapchete_eo.array.convert
:members:
:show-inheritance:
:undoc-members:

Module contents
---------------

.. automodule:: mapchete_eo.array
:members:
:show-inheritance:
:undoc-members:
14 changes: 14 additions & 0 deletions docs/source/generated/mapchete_eo.base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
mapchete\_eo.base
=================

.. automodule:: mapchete_eo.base


.. rubric:: Classes

.. autosummary::

BaseDriverConfig
EODataCube
InputData

101 changes: 101 additions & 0 deletions docs/source/generated/mapchete_eo.cli.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
mapchete\_eo.cli package
========================

Submodules
----------

mapchete\_eo.cli.bounds module
------------------------------

.. automodule:: mapchete_eo.cli.bounds
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.options\_arguments module
------------------------------------------

.. automodule:: mapchete_eo.cli.options_arguments
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.s2\_brdf module
--------------------------------

.. automodule:: mapchete_eo.cli.s2_brdf
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.s2\_cat\_results module
----------------------------------------

.. automodule:: mapchete_eo.cli.s2_cat_results
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.s2\_find\_broken\_products module
--------------------------------------------------

.. automodule:: mapchete_eo.cli.s2_find_broken_products
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.s2\_jp2\_static\_catalog module
------------------------------------------------

.. automodule:: mapchete_eo.cli.s2_jp2_static_catalog
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.s2\_mask module
--------------------------------

.. automodule:: mapchete_eo.cli.s2_mask
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.s2\_mgrs module
--------------------------------

.. automodule:: mapchete_eo.cli.s2_mgrs
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.s2\_rgb module
-------------------------------

.. automodule:: mapchete_eo.cli.s2_rgb
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.s2\_verify module
----------------------------------

.. automodule:: mapchete_eo.cli.s2_verify
:members:
:show-inheritance:
:undoc-members:

mapchete\_eo.cli.static\_catalog module
---------------------------------------

.. automodule:: mapchete_eo.cli.static_catalog
:members:
:show-inheritance:
:undoc-members:

Module contents
---------------

.. automodule:: mapchete_eo.cli
:members:
:show-inheritance:
:undoc-members:
Loading