Skip to content
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
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.raster
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PYTHON_VERSION=3.12

FROM bitnami/python:${PYTHON_VERSION}
FROM python:${PYTHON_VERSION}
RUN apt update && apt upgrade -y \
&& apt install curl -y \
&& rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.stac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PYTHON_VERSION=3.12

FROM bitnami/python:${PYTHON_VERSION}
FROM python:${PYTHON_VERSION}
RUN apt update && apt upgrade -y \
&& apt install curl -y \
&& rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.vector
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PYTHON_VERSION=3.12

FROM bitnami/python:${PYTHON_VERSION}
FROM python:${PYTHON_VERSION}
RUN apt update && apt upgrade -y \
&& apt install curl -y \
&& rm -rf /var/lib/apt/lists/*
Expand Down
6 changes: 3 additions & 3 deletions runtimes/eoapi/stac/eoapi/stac/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import jinja2
from eoapi.auth_utils import OpenIdConnectAuth, OpenIdConnectSettings
from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from stac_fastapi.api.models import (
CollectionUri,
ItemCollectionUri,
ItemUri,
JSONResponse,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stac-fastapi JSONReponse will pick ORJSON if available

create_get_request_model,
create_post_request_model,
create_request_model,
Expand Down Expand Up @@ -82,7 +82,7 @@
TransactionExtension(
client=TransactionsClient(),
settings=settings,
response_class=ORJSONResponse,
response_class=JSONResponse,
)
)
application_extensions.append(
Expand Down Expand Up @@ -220,7 +220,7 @@ async def lifespan(app: FastAPI):
collections_get_request_model=collections_get_model,
search_get_request_model=search_get_model,
search_post_request_model=search_post_model,
response_class=ORJSONResponse,
response_class=JSONResponse,
middlewares=middlewares,
)
app = api.app
Expand Down
6 changes: 3 additions & 3 deletions runtimes/eoapi/stac/eoapi/stac/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ async def item_collection(
if fields.include or fields.exclude:
return JSONResponse(item_collection) # type: ignore

return ItemCollection(**item_collection)
return item_collection

# NOTE: We can't use `super.get_search(...)` because of the `fields` extension
# which, when used, might return a JSONResponse directly instead of a ItemCollection (TypeDict)
Expand Down Expand Up @@ -657,7 +657,7 @@ async def get_search(
if fields.include or fields.exclude:
return JSONResponse(item_collection) # type: ignore

return ItemCollection(**item_collection)
return item_collection

# NOTE: We can't use `super.post_search(...)` because of the `fields` extension
# which, when used, might return a JSONResponse directly instead of a ItemCollection (TypeDict)
Expand Down Expand Up @@ -717,4 +717,4 @@ async def post_search(
if fields.include or fields.exclude:
return JSONResponse(item_collection) # type: ignore

return ItemCollection(**item_collection)
return item_collection
1 change: 1 addition & 0 deletions runtimes/eoapi/stac/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers = [
]
dynamic = ["version"]
dependencies = [
"orjson",
"stac-fastapi.pgstac>=5.0,<5.1",
"jinja2>=2.11.2,<4.0.0",
"starlette-cramjam>=0.4,<0.5",
Expand Down