Skip to content

Commit

Permalink
Add Xarray sub-package (#1013)
Browse files Browse the repository at this point in the history
* sketch

* add tests

* add pyramid tests

* remove multiscale option

* Update src/titiler/xarray/tests/test_factory.py

Co-authored-by: Henry Rodman <[email protected]>

* use xarray.open_zarr and make aiohttp and s3fs optional (#1016)

* use xarray.open_zarr and make aiohttp and s3fs optional

* add support for references

* tests prefixed protocol

* use tmp_dir for reference

* add parquet support

* remove kerchunk support

* create variable extension

* add aiohttp

* remove cache layer (#1019)

* remove cache layer

* Update src/titiler/xarray/README.md

Co-authored-by: Aimee Barciauskas <[email protected]>

* add tile example

---------

Co-authored-by: Aimee Barciauskas <[email protected]>

* Update src/titiler/xarray/titiler/xarray/io.py

Co-authored-by: Jonas <[email protected]>

* Update src/titiler/xarray/titiler/xarray/io.py

Co-authored-by: Jonas <[email protected]>

* Update src/titiler/xarray/titiler/xarray/io.py

Co-authored-by: Jonas <[email protected]>

* lint

* fix zarr pyramid tests

* Update src/titiler/xarray/pyproject.toml

Co-authored-by: Max Jones <[email protected]>

* refactor dependencies

* update docs

---------

Co-authored-by: Henry Rodman <[email protected]>
Co-authored-by: Aimee Barciauskas <[email protected]>
Co-authored-by: Jonas <[email protected]>
Co-authored-by: Max Jones <[email protected]>
  • Loading branch information
5 people authored Nov 7, 2024
1 parent 40c4143 commit d33d60a
Show file tree
Hide file tree
Showing 127 changed files with 2,695 additions and 100 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ jobs:
python -m pip install -e src/titiler/extensions["test,cogeo,stac"]
python -m pytest src/titiler/extensions --cov=titiler.extensions --cov-report=xml --cov-append --cov-report=term-missing
- name: Test titiler.xarray
run: |
python -m pip install -e src/titiler/xarray["test"]
python -m pytest src/titiler/xarray --cov=titiler.xarray --cov-report=xml --cov-append --cov-report=term-missing
- name: Test titiler.mosaic
run: |
python -m pip install -e src/titiler/mosaic["test"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install src/titiler/core src/titiler/extensions["cogeo,stac"] src/titiler/mosaic src/titiler/application
python -m pip install src/titiler/core src/titiler/extensions["cogeo,stac"] src/titiler/xarray src/titiler/mosaic src/titiler/application
python -m pip install -r requirements/requirements-docs.txt
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Starting with version `0.3.0`, the `TiTiler` python module has been split into a
| Package | Version | Description
| ------- | ------- |-------------
[**titiler.core**](https://github.com/developmentseed/titiler/tree/main/src/titiler/core) | [![titiler.core](https://img.shields.io/pypi/v/titiler.core?color=%2334D058&label=pypi)](https://pypi.org/project/titiler.core) | The `Core` package contains libraries to help create a dynamic tiler for COG and STAC
[**titiler.xarray**](https://github.com/developmentseed/titiler/tree/main/src/titiler/xarray) | [![titiler.xarray](https://img.shields.io/pypi/v/titiler.xarray?color=%2334D058&label=pypi)](https://pypi.org/project/titiler.xarray) | The `xarray` package contains libraries to help create a dynamic tiler for Zarr/NetCDF datasets
[**titiler.extensions**](https://github.com/developmentseed/titiler/tree/main/src/titiler/extensions) | [![titiler.extensions](https://img.shields.io/pypi/v/titiler.extensions?color=%2334D058&label=pypi)](https://pypi.org/project/titiler.extensions) | TiTiler's extensions package. Contains extensions for Tiler Factories.
[**titiler.mosaic**](https://github.com/developmentseed/titiler/tree/main/src/titiler/mosaic) | [![titiler.mosaic](https://img.shields.io/pypi/v/titiler.mosaic?color=%2334D058&label=pypi)](https://pypi.org/project/titiler.mosaic) | The `mosaic` package contains libraries to help create a dynamic tiler for MosaicJSON (adds `cogeo-mosaic` requirement)
[**titiler.application**](https://github.com/developmentseed/titiler/tree/main/src/titiler/application) | [![titiler.application](https://img.shields.io/pypi/v/titiler.application?color=%2334D058&label=pypi)](https://pypi.org/project/titiler.application) | TiTiler's `demo` package. Contains a FastAPI application with full support of COG, STAC and MosaicJSON
Expand All @@ -71,6 +72,7 @@ python -m pip install -U pip
python -m pip install titiler.{package}
# e.g.,
# python -m pip install titiler.core
# python -m pip install titiler.xarray
# python -m pip install titiler.extensions
# python -m pip install titiler.mosaic
# python -m pip install titiler.application (also installs core, extensions and mosaic)
Expand All @@ -89,7 +91,7 @@ git clone https://github.com/developmentseed/titiler.git
cd titiler
python -m pip install -U pip
python -m pip install -e src/titiler/core -e src/titiler/extensions -e src/titiler/mosaic -e src/titiler/application
python -m pip install -e src/titiler/core -e src/titiler/xarray -e src/titiler/extensions -e src/titiler/mosaic -e src/titiler/application
python -m pip install uvicorn
uvicorn titiler.application.main:app --reload
Expand Down Expand Up @@ -125,6 +127,7 @@ Some options can be set via environment variables, see: https://github.com/tiang
src/titiler/ - titiler modules.
├── application/ - Titiler's `Application` package
├── extensions/ - Titiler's `Extensions` package
├── xarray/ - Titiler's `Xarray` package
├── core/ - Titiler's `Core` package
└── mosaic/ - Titiler's `Mosaic` package
```
Expand Down
13 changes: 12 additions & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ nav:
- User Guide:
- Intro: "intro.md"
- Dynamic Tiling: "dynamic_tiling.md"
- Mosaics: "mosaics.md"
- TileMatrixSets: "tile_matrix_sets.md"
- Output data format: "output_format.md"

Expand All @@ -53,6 +52,13 @@ nav:
- Rendering: "advanced/rendering.md"
# - APIRoute and environment variables: "advanced/APIRoute_and_environment_variables.md"

- Packages:
- titiler.core: "packages/core.md"
- titiler.xarray: "packages/xarray.md"
- titiler.extensions: "packages/extensions.md"
- titiler.mosaic: "packages/mosaic.md"
- titiler.application: "packages/application.md"

- Endpoints documentation:
- /cog: "endpoints/cog.md"
- /stac: "endpoints/stac.md"
Expand Down Expand Up @@ -109,6 +115,11 @@ nav:
- errors: api/titiler/mosaic/errors.md
- models:
- responses: api/titiler/mosaic/models/responses.md
- titiler.xarray:
- io: api/titiler/xarray/io.md
- dependencies: api/titiler/xarray/dependencies.md
- extensions: api/titiler/xarray/extensions.md
- factory: api/titiler/xarray/factory.md

- Deployment:
- Amazon Web Services:
Expand Down
Loading

0 comments on commit d33d60a

Please sign in to comment.