From c7c31035efe7f4e0ec30bad6bf89fdc78ea160fe Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Sat, 21 Nov 2020 20:39:29 -0500 Subject: [PATCH 1/2] update TiTiler version --- setup.py | 4 +--- stac_api/api/extensions/tiles.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 279fafb56..121aed302 100644 --- a/setup.py +++ b/setup.py @@ -18,9 +18,7 @@ "sqlakeyset", "stac-pydantic>=1.3.5", "pydantic[dotenv]", - "cogeo-mosaic==3.0a10", - "titiler==0.1a2", - "rio-cogeo==2.0a5", + "titiler==0.1.0a12", ] extra_reqs = { diff --git a/stac_api/api/extensions/tiles.py b/stac_api/api/extensions/tiles.py index 1f02c07ea..6b13bb72c 100644 --- a/stac_api/api/extensions/tiles.py +++ b/stac_api/api/extensions/tiles.py @@ -23,9 +23,7 @@ class TilesExtension(ApiExtension): def register(self, app: FastAPI) -> None: """register extension with the application""" from titiler.endpoints.stac import STACTiler - - template_dir = pkg_resources.resource_filename("titiler", "templates") - templates = Jinja2Templates(directory=template_dir) + from titiler.templates import templates titiler_router = STACTiler().router From d78de938ccf8e629174ba02da933d3f4c253ae29 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Sat, 21 Nov 2020 20:41:06 -0500 Subject: [PATCH 2/2] remove unused module --- stac_api/api/extensions/tiles.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/stac_api/api/extensions/tiles.py b/stac_api/api/extensions/tiles.py index 6b13bb72c..be4002e55 100644 --- a/stac_api/api/extensions/tiles.py +++ b/stac_api/api/extensions/tiles.py @@ -1,17 +1,14 @@ """tiles extension""" from dataclasses import dataclass -import pkg_resources from fastapi import FastAPI -from starlette.requests import Request -from starlette.responses import HTMLResponse -from starlette.templating import Jinja2Templates - from stac_api.api.extensions.extension import ApiExtension from stac_api.api.models import ItemUri from stac_api.api.routes import create_endpoint_with_depends from stac_api.clients.tiles.ogc import TilesClient from stac_api.models.ogc import TileSetResource +from starlette.requests import Request +from starlette.responses import HTMLResponse @dataclass