Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Sync with titiler
Browse files Browse the repository at this point in the history
Update version of (this) package to 0.1.0
Use rio-tiler-pds and titiler 0.7.0.

The titiler package has been split into three packages, do refer to them
Update imports and usage.
  • Loading branch information
f-skold committed Jun 25, 2022
1 parent 4b5ec55 commit 3fcef8d
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY setup.py setup.py
COPY titiler_pds/ titiler_pds/

# Install dependencies
RUN pip install . rasterio==1.1.8 -t /var/task --no-binary numpy,pydantic
RUN pip install . rasterio==1.3a2 -t /var/task --no-binary numpy,pydantic

# Leave module precompiles for faster Lambda startup
RUN cd /var/task && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[2-3][0-9]//'); cp $f $n; done;
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
from setuptools import find_packages, setup

inst_reqs = [
"titiler>=0.1.0,<0.2",
"titiler.core>=0.7.0",
"titiler.mosaic>=0.7.0",
"titiler.application>=0.7.0",
"tilebench",
"rio-tiler-pds>=0.5.0,<1.0",
"rio-tiler-pds>=0.7.0,<1.0",
"mangum>=0.10",
]

Expand All @@ -22,7 +24,7 @@

setup(
name="titiler_pds",
version="0.0.1",
version="0.1.0",
description="TiTiler for AWS Public Dataset",
python_requires=">=3",
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion titiler_pds/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from rio_tiler_pds.landsat.utils import sceneid_parser as l8_sceneid_parser
from rio_tiler_pds.sentinel.utils import s2_sceneid_parser

from titiler.dependencies import DefaultDependency
from titiler.core.dependencies import DefaultDependency

from .settings import mosaic_config

Expand Down
4 changes: 2 additions & 2 deletions titiler_pds/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from brotli_asgi import BrotliMiddleware
from tilebench.middleware import VSIStatsMiddleware

from titiler.errors import DEFAULT_STATUS_CODES, add_exception_handlers
from titiler.middleware import CacheControlMiddleware, TotalTimeMiddleware
from titiler.application.middleware import CacheControlMiddleware, TotalTimeMiddleware
from titiler.core.errors import DEFAULT_STATUS_CODES, add_exception_handlers

from .routes import landsat_collection2, naip, sentinel
from .settings import api_config
Expand Down
7 changes: 4 additions & 3 deletions titiler_pds/routes/landsat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

from rio_tiler_pds.landsat.aws import L8Reader

from titiler.custom.routing import apiroute_factory
from titiler.dependencies import BandsExprParams
from titiler.endpoints.factory import MosaicTilerFactory, MultiBandTilerFactory
from titiler.core.dependencies import BandsExprParams
from titiler.core.factory import MultiBandTilerFactory
from titiler.core.routing import apiroute_factory
from titiler.mosaic.factory import MosaicTilerFactory

from ..dependencies import CustomPathParams, MosaicParams

Expand Down
7 changes: 4 additions & 3 deletions titiler_pds/routes/landsat_collection2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

from rio_tiler_pds.landsat.aws import LandsatC2Reader

from titiler.custom.routing import apiroute_factory
from titiler.dependencies import BandsExprParams
from titiler.endpoints.factory import MosaicTilerFactory, MultiBandTilerFactory
from titiler.core.dependencies import BandsExprParams
from titiler.core.factory import MultiBandTilerFactory
from titiler.core.routing import apiroute_factory
from titiler.mosaic.factory import MosaicTilerFactory

from ..dependencies import CustomPathParams, MosaicParams

Expand Down
8 changes: 4 additions & 4 deletions titiler_pds/routes/naip.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""NAIP endpoint."""

from titiler.custom.routing import apiroute_factory
from titiler.endpoints.factory import MosaicTilerFactory
from titiler.resources.enums import OptionalHeaders
from titiler.core.resources.enums import OptionalHeader
from titiler.core.routing import apiroute_factory
from titiler.mosaic.factory import MosaicTilerFactory

from ..dependencies import MosaicParams

Expand All @@ -20,5 +20,5 @@
path_dependency=MosaicParams,
router_prefix="mosaicjson/naip",
router=APIRouter(route_class=route_class),
optional_headers=[OptionalHeaders.server_timing, OptionalHeaders.x_assets],
optional_headers=[OptionalHeader.server_timing, OptionalHeader.x_assets],
)
7 changes: 4 additions & 3 deletions titiler_pds/routes/sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

from rio_tiler_pds.sentinel.aws import S2COGReader

from titiler.custom.routing import apiroute_factory
from titiler.dependencies import BandsExprParams
from titiler.endpoints.factory import MosaicTilerFactory, MultiBandTilerFactory
from titiler.core.dependencies import BandsExprParams
from titiler.core.factory import MultiBandTilerFactory
from titiler.core.routing import apiroute_factory
from titiler.mosaic.factory import MosaicTilerFactory

from ..dependencies import CustomPathParams, MosaicParams

Expand Down

0 comments on commit 3fcef8d

Please sign in to comment.