Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update titiler version and fix starlette breaking change #149

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ classifiers = [
"Topic :: Scientific/Engineering :: GIS",
]
dependencies = [
"titiler.core>=0.15.2,<0.16",
"titiler.mosaic>=0.15.2,<0.16",
"titiler.core>=0.16.0,<0.17",
"titiler.mosaic>=0.16.0,<0.17",
"geojson-pydantic~=1.0",
"pydantic>=2.4,<3.0",
"pydantic-settings~=2.0",
Expand Down
6 changes: 3 additions & 3 deletions titiler/pgstac/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ def _first_value(values: List[Any], default: Any = None):
return next(filter(lambda x: x is not None, values), default)


DEFAULT_TEMPLATES = Jinja2Templates(
directory="",
jinja2_env = jinja2.Environment(
loader=jinja2.ChoiceLoader(
[
jinja2.PackageLoader(__package__, "templates"),
jinja2.PackageLoader("titiler.core", "templates"),
]
),
) # type:ignore
)
DEFAULT_TEMPLATES = Jinja2Templates(env=jinja2_env)


def check_query_params(
Expand Down
13 changes: 8 additions & 5 deletions titiler/pgstac/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@
logging.getLogger("botocore.utils").disabled = True
logging.getLogger("rio-tiler").setLevel(logging.ERROR)

templates = Jinja2Templates(
directory="",
loader=jinja2.ChoiceLoader([jinja2.PackageLoader(__package__, "templates")]),
) # type:ignore

jinja2_env = jinja2.Environment(
loader=jinja2.ChoiceLoader(
[
jinja2.PackageLoader(__package__, "templates"),
]
),
)
templates = Jinja2Templates(env=jinja2_env)

postgres_settings = PostgresSettings()
settings = ApiSettings()
Expand Down
Loading