Skip to content

Commit 09d71b2

Browse files
titiler 0.4.0 (#394)
* update rio-tiler/morecatile/cogeo-mosaic requirements * update ci * update version and fix mypy error for now * update defaultDependency and QueryParameter format (#395) * use resampling alias for resampling_method (#397) * better test dependencies * default to available bands and assets (#398) * update viewers * use the custom JSON response for statistics endpoint * better output model definition and update rio-tiler version (#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 (#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
1 parent 2335048 commit 09d71b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+5068
-4496
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
strategy:
2525
matrix:
26-
python-version: [3.6, 3.7, 3.8, 3.9]
26+
python-version: [3.7, 3.8, 3.9]
2727

2828
steps:
2929
- uses: actions/checkout@v2
@@ -41,9 +41,8 @@ jobs:
4141
- name: Run Tox
4242
run: tox -e py
4343

44-
# Run pre-commit (only for python-3.8)
44+
# Run pre-commit
4545
- name: run pre-commit
46-
if: matrix.python-version == 3.8
4746
run: pre-commit run --all-files
4847

4948
- name: Upload Results
@@ -156,3 +155,51 @@ jobs:
156155
developmentseed/titiler:${{ steps.tag.outputs.tag }}
157156
ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.tag }}
158157
public.ecr.aws/${{ secrets.AWS_ECR_PUBLIC_REPO }}/titiler:${{ steps.tag.outputs.tag }}
158+
159+
deploy:
160+
needs: [tests, publish]
161+
runs-on: ubuntu-latest
162+
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
163+
164+
defaults:
165+
run:
166+
working-directory: deployment/aws
167+
168+
steps:
169+
- uses: actions/checkout@v2
170+
171+
- name: Configure AWS credentials
172+
uses: aws-actions/configure-aws-credentials@v1
173+
with:
174+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
175+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
176+
aws-region: us-east-1
177+
178+
- name: Set up Node.js
179+
uses: actions/setup-node@v1
180+
with:
181+
node-version: '12.x'
182+
183+
- name: Install cdk
184+
run: npm install -g
185+
186+
- name: Set up Python
187+
uses: actions/setup-python@v1
188+
with:
189+
python-version: '3.x'
190+
191+
- name: Install dependencies
192+
run: |
193+
python -m pip install --upgrade pip
194+
python -m pip install -r requirements.txt
195+
196+
# Build and Deploy CDK application
197+
- name: Build & Deploy
198+
run: cdk deploy ${{ secrets.STACK_NAME }}-lambda-${{ secrets.STACK_STAGE }} --require-approval never
199+
env:
200+
TITILER_STACK_NAME: ${{ secrets.STACK_NAME }}
201+
TITILER_STACK_STAGE: ${{ secrets.STACK_STAGE }}
202+
TITILER_STACK_MEMORY: ${{ secrets.STACK_MEMORY }}
203+
TITILER_STACK_OWNER: ${{ secrets.STACK_OWNER }}
204+
TITILER_STACK_CLIENT: ${{ secrets.STACK_CLIENT }}
205+
TITILER_STACK_BUCKET: '["*"]'

.github/workflows/deploy_mkdocs.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,5 @@ jobs:
5252
titiler.mosaic.resources.enums \
5353
titiler.mosaic.errors
5454
55-
pdocs as_markdown \
56-
--output_dir docs/api \
57-
--exclude_source \
58-
--overwrite \
59-
titiler.application.middleware
60-
6155
- name: Deploy docs
6256
run: mkdocs gh-deploy --force

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 19.10b0
3+
rev: 21.10b0
44
hooks:
55
- id: black
66
language_version: python

CHANGES.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# Release Notes
22

3+
## 0.4.0a0 (2021-11-12)
4+
5+
* remove python 3.6 supports (related to morecantile/pyproj update)
6+
7+
### titiler.core
8+
9+
* update `rio-tiler/morecantile` requirement (>=3.0)
10+
* remove `utils.bbox_to_feature` (replaced by geojson_pydantic native function `Feature(geometry=Polygon.from_bounds(*bounds), properties=info)`)
11+
* remove `utils.data_stats` (replaced by rio-tiler new statistics method)
12+
* remove `metadata` endpoints **breaking API**
13+
* update `statistics` endpoints with histogram options
14+
* update `statistics` endpoint responses **breaking API**
15+
* remove `band_expression` in `BandsExprParams` dependency **breaking API**
16+
* remove `morecantile` requirement definition in setup.py and defers to rio-tiler supported version
17+
* update `titiler.core.dependencies.DefaultDependency` (allows dict unpacking and remove `.kwargs`) **breaking API**
18+
* use standard for List in QueryParameter (e.g `bidx=1&bidx=2&bidx` instead of `bidx=1,2,3`) **breaking API**
19+
* add `asset_bidx` query parameter in replacement of `bidx` in MultiBaseFactory dependencies and switch to new format: `{asset name}|{bidx,bidx,bidx}` **breaking API**
20+
* update `asset_expression` to the new format: `{asset name}|{expression}` (e.g `data|b1+b2`) **breaking API**
21+
* update `assets` QueryParameter to List (e.g `assets=COG&assets=Data`) **breaking API**
22+
* update `bands` QueryParameter to List (e.g `bands=B01&bands=B02`) **breaking API**
23+
* split `RenderParams` dependency into:
24+
* `PostProcessParams`: `rescale` and `color_formula` parameters
25+
* `ImageRenderingParams`: `return_mask`
26+
* add `process_dependency` attribute in `BaseTilerFactory` (defaults to `PostProcessParams`)
27+
* use `resampling` alias instead of `resampling_method` for QueryParameter **breaking API**
28+
* defaults to available assets if `assets` option is not provided for `MultiBaseTilerFactory` info and statistics endpoints.
29+
* defaults to available bands if `bands` option is not provided for `MultiBandsTilerFactory` info and statistics endpoints.
30+
* better output models definition
31+
* keep `bounds`, `minzoom` and `maxzoom` in `/info` response
32+
* remove `dataset` in `/info` response to better follow the Info model
33+
* add `/statistics` endpoint by default
34+
35+
### titiler.mosaic
36+
37+
* update `cogeo-mosaic` requirement (>=4.0)
38+
* update response from `/info` endpoint to match the model.
39+
40+
### titiler.application
41+
42+
* update viewers to match changes in titiler.core endpoints
43+
344
## 0.3.12 (2021-10-20)
445

546
### titiler.core

CONTRIBUTING.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $ pip install \
1414
-e src/titiler/application["test"]
1515
```
1616

17-
**Python3.8 only**
17+
**pre-commit**
1818

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

@@ -62,10 +62,4 @@ $ mkdocs gh-deploy
6262
titiler.mosaic.factory \
6363
titiler.mosaic.resources.enums \
6464
titiler.mosaic.errors
65-
66-
pdocs as_markdown \
67-
--output_dir docs/api \
68-
--exclude_source \
69-
--overwrite \
70-
titiler.application.middleware
7165
```

deployment/aws/cdk/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def __init__(
4949
f"{id}-lambda",
5050
runtime=runtime,
5151
code=aws_lambda.Code.from_docker_build(
52-
path=os.path.abspath(code_dir), file="lambda/Dockerfile",
52+
path=os.path.abspath(code_dir),
53+
file="lambda/Dockerfile",
5354
),
5455
handler="handler.handler",
5556
memory_size=memory,

docs/advanced/customization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ mosaic = MosaicTilerFactory(path_dependency=MosaicPathParams)
4242
app.include_router(mosaic.router)
4343
```
4444

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

4747

4848
### Custom TMS
4949

5050
```python
5151
from morecantile import tms, TileMatrixSet
52-
from rasterio.crs import CRS
52+
from pyproj import CRS
5353

5454
from titiler.core.factory import TilerFactory
5555

0 commit comments

Comments
 (0)