Skip to content

Commit

Permalink
titiler 0.4.0 (developmentseed#394)
Browse files Browse the repository at this point in the history
* update rio-tiler/morecatile/cogeo-mosaic requirements

* update ci

* update version and fix mypy error for now

* update defaultDependency and QueryParameter format (developmentseed#395)

* use resampling alias for resampling_method (developmentseed#397)

* better test dependencies

* default to available bands and assets (developmentseed#398)

* update viewers

* use the custom JSON response for statistics endpoint

* better output model definition and update rio-tiler version (developmentseed#400)

* better output model definition and update rio-tiler version

* fix tests and Point endpoint for MultiBaseTiler

* update output model for mosaic

* fix mosaic point model

* Update stats (developmentseed#401)

* update response from `/info` endpoint to match the model.

* update docs

* update statistics endpoint dependencies

* fix ci

* update docs and notebooks

* more general tiles description

* update black and pre-commit

* update notebooks

* update docs and add deployment

* release date
  • Loading branch information
vincentsarago authored Nov 12, 2021
1 parent 2335048 commit 09d71b2
Show file tree
Hide file tree
Showing 63 changed files with 5,068 additions and 4,496 deletions.
53 changes: 50 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand All @@ -41,9 +41,8 @@ jobs:
- name: Run Tox
run: tox -e py

# Run pre-commit (only for python-3.8)
# Run pre-commit
- name: run pre-commit
if: matrix.python-version == 3.8
run: pre-commit run --all-files

- name: Upload Results
Expand Down Expand Up @@ -156,3 +155,51 @@ jobs:
developmentseed/titiler:${{ steps.tag.outputs.tag }}
ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.tag }}
public.ecr.aws/${{ secrets.AWS_ECR_PUBLIC_REPO }}/titiler:${{ steps.tag.outputs.tag }}
deploy:
needs: [tests, publish]
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'

defaults:
run:
working-directory: deployment/aws

steps:
- uses: actions/checkout@v2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Install cdk
run: npm install -g

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
# Build and Deploy CDK application
- name: Build & Deploy
run: cdk deploy ${{ secrets.STACK_NAME }}-lambda-${{ secrets.STACK_STAGE }} --require-approval never
env:
TITILER_STACK_NAME: ${{ secrets.STACK_NAME }}
TITILER_STACK_STAGE: ${{ secrets.STACK_STAGE }}
TITILER_STACK_MEMORY: ${{ secrets.STACK_MEMORY }}
TITILER_STACK_OWNER: ${{ secrets.STACK_OWNER }}
TITILER_STACK_CLIENT: ${{ secrets.STACK_CLIENT }}
TITILER_STACK_BUCKET: '["*"]'
6 changes: 0 additions & 6 deletions .github/workflows/deploy_mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,5 @@ jobs:
titiler.mosaic.resources.enums \
titiler.mosaic.errors
pdocs as_markdown \
--output_dir docs/api \
--exclude_source \
--overwrite \
titiler.application.middleware
- name: Deploy docs
run: mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
rev: 21.10b0
hooks:
- id: black
language_version: python
Expand Down
41 changes: 41 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Release Notes

## 0.4.0a0 (2021-11-12)

* remove python 3.6 supports (related to morecantile/pyproj update)

### titiler.core

* update `rio-tiler/morecantile` requirement (>=3.0)
* remove `utils.bbox_to_feature` (replaced by geojson_pydantic native function `Feature(geometry=Polygon.from_bounds(*bounds), properties=info)`)
* remove `utils.data_stats` (replaced by rio-tiler new statistics method)
* remove `metadata` endpoints **breaking API**
* update `statistics` endpoints with histogram options
* update `statistics` endpoint responses **breaking API**
* remove `band_expression` in `BandsExprParams` dependency **breaking API**
* remove `morecantile` requirement definition in setup.py and defers to rio-tiler supported version
* update `titiler.core.dependencies.DefaultDependency` (allows dict unpacking and remove `.kwargs`) **breaking API**
* use standard for List in QueryParameter (e.g `bidx=1&bidx=2&bidx` instead of `bidx=1,2,3`) **breaking API**
* add `asset_bidx` query parameter in replacement of `bidx` in MultiBaseFactory dependencies and switch to new format: `{asset name}|{bidx,bidx,bidx}` **breaking API**
* update `asset_expression` to the new format: `{asset name}|{expression}` (e.g `data|b1+b2`) **breaking API**
* update `assets` QueryParameter to List (e.g `assets=COG&assets=Data`) **breaking API**
* update `bands` QueryParameter to List (e.g `bands=B01&bands=B02`) **breaking API**
* split `RenderParams` dependency into:
* `PostProcessParams`: `rescale` and `color_formula` parameters
* `ImageRenderingParams`: `return_mask`
* add `process_dependency` attribute in `BaseTilerFactory` (defaults to `PostProcessParams`)
* use `resampling` alias instead of `resampling_method` for QueryParameter **breaking API**
* defaults to available assets if `assets` option is not provided for `MultiBaseTilerFactory` info and statistics endpoints.
* defaults to available bands if `bands` option is not provided for `MultiBandsTilerFactory` info and statistics endpoints.
* better output models definition
* keep `bounds`, `minzoom` and `maxzoom` in `/info` response
* remove `dataset` in `/info` response to better follow the Info model
* add `/statistics` endpoint by default

### titiler.mosaic

* update `cogeo-mosaic` requirement (>=4.0)
* update response from `/info` endpoint to match the model.

### titiler.application

* update viewers to match changes in titiler.core endpoints

## 0.3.12 (2021-10-20)

### titiler.core
Expand Down
8 changes: 1 addition & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $ pip install \
-e src/titiler/application["test"]
```

**Python3.8 only**
**pre-commit**

This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code.

Expand Down Expand Up @@ -62,10 +62,4 @@ $ mkdocs gh-deploy
titiler.mosaic.factory \
titiler.mosaic.resources.enums \
titiler.mosaic.errors

pdocs as_markdown \
--output_dir docs/api \
--exclude_source \
--overwrite \
titiler.application.middleware
```
3 changes: 2 additions & 1 deletion deployment/aws/cdk/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def __init__(
f"{id}-lambda",
runtime=runtime,
code=aws_lambda.Code.from_docker_build(
path=os.path.abspath(code_dir), file="lambda/Dockerfile",
path=os.path.abspath(code_dir),
file="lambda/Dockerfile",
),
handler="handler.handler",
memory_size=memory,
Expand Down
4 changes: 2 additions & 2 deletions docs/advanced/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ mosaic = MosaicTilerFactory(path_dependency=MosaicPathParams)
app.include_router(mosaic.router)
```

The endpoint url will now look like: `{endoint}/mosaic/tilejson.json?mosaic=vincent.mosaic`
The endpoint url will now look like: `{endpoint}/mosaic/tilejson.json?mosaic=vincent.mosaic`


### Custom TMS

```python
from morecantile import tms, TileMatrixSet
from rasterio.crs import CRS
from pyproj import CRS

from titiler.core.factory import TilerFactory

Expand Down
Loading

0 comments on commit 09d71b2

Please sign in to comment.