diff --git a/lib/bootstrapper/index.ts b/lib/bootstrapper/index.ts index e4cd30d..224270e 100644 --- a/lib/bootstrapper/index.ts +++ b/lib/bootstrapper/index.ts @@ -17,7 +17,7 @@ function hasVpc( return (instance as aws_rds.DatabaseInstance).vpc !== undefined; } -const DEFAULT_PGSTAC_VERSION = "0.6.13"; +const DEFAULT_PGSTAC_VERSION = "0.7.9"; /** * Bootstraps a database instance, installing pgSTAC onto the database. diff --git a/lib/bootstrapper/runtime/handler.py b/lib/bootstrapper/runtime/handler.py index dc20419..12fb1b5 100644 --- a/lib/bootstrapper/runtime/handler.py +++ b/lib/bootstrapper/runtime/handler.py @@ -5,8 +5,8 @@ import json import boto3 -import psycopg import httpx +import psycopg from psycopg import sql from psycopg.conninfo import make_conninfo from pypgstac.db import PgstacDB diff --git a/lib/ingestor-api/runtime/dev_requirements.txt b/lib/ingestor-api/runtime/dev_requirements.txt index c7f7a45..4270b89 100644 --- a/lib/ingestor-api/runtime/dev_requirements.txt +++ b/lib/ingestor-api/runtime/dev_requirements.txt @@ -1,2 +1,2 @@ httpx -moto[dynamodb, ssm]>=4.0.9 +moto[dynamodb, ssm]>=4.0.9 \ No newline at end of file diff --git a/lib/ingestor-api/runtime/requirements.txt b/lib/ingestor-api/runtime/requirements.txt index 349a2ed..f9dad97 100644 --- a/lib/ingestor-api/runtime/requirements.txt +++ b/lib/ingestor-api/runtime/requirements.txt @@ -1,12 +1,11 @@ Authlib==1.0.1 -cachetools==5.1.0 fastapi>=0.75.1 mangum>=0.15.0 orjson>=3.6.8 psycopg[binary,pool]>=3.0.15 pydantic_ssm_settings>=0.2.0 pydantic>=1.9.0 -pypgstac==0.6.13 +pypgstac==0.7.9 requests>=2.27.1 # Waiting for https://github.com/stac-utils/stac-pydantic/pull/116 stac-pydantic @ git+https://github.com/alukach/stac-pydantic.git@patch-1 diff --git a/lib/ingestor-api/runtime/src/utils.py b/lib/ingestor-api/runtime/src/utils.py index c0cbb1f..34d2cc8 100644 --- a/lib/ingestor-api/runtime/src/utils.py +++ b/lib/ingestor-api/runtime/src/utils.py @@ -2,9 +2,9 @@ import boto3 import pydantic +from fastapi.encoders import jsonable_encoder from pypgstac.db import PgstacDB from pypgstac.load import Methods -from fastapi.encoders import jsonable_encoder from .loader import Loader from .schemas import Ingestion diff --git a/lib/ingestor-api/runtime/tests/test_collection.py b/lib/ingestor-api/runtime/tests/test_collection.py index 6141342..b0ce9ca 100644 --- a/lib/ingestor-api/runtime/tests/test_collection.py +++ b/lib/ingestor-api/runtime/tests/test_collection.py @@ -1,9 +1,10 @@ +import os from unittest.mock import Mock, patch + import pytest +import src.collection as collection from pypgstac.load import Methods from src.utils import DbCreds -import src.collection as collection -import os @pytest.fixture() diff --git a/lib/ingestor-api/runtime/tests/test_registration.py b/lib/ingestor-api/runtime/tests/test_registration.py index 55721de..f83cbe0 100644 --- a/lib/ingestor-api/runtime/tests/test_registration.py +++ b/lib/ingestor-api/runtime/tests/test_registration.py @@ -4,9 +4,8 @@ from typing import TYPE_CHECKING, List from unittest.mock import call, patch -from fastapi.encoders import jsonable_encoder import pytest - +from fastapi.encoders import jsonable_encoder if TYPE_CHECKING: from fastapi.testclient import TestClient diff --git a/lib/ingestor-api/runtime/tests/test_utils.py b/lib/ingestor-api/runtime/tests/test_utils.py index f03bb1d..cdba105 100644 --- a/lib/ingestor-api/runtime/tests/test_utils.py +++ b/lib/ingestor-api/runtime/tests/test_utils.py @@ -1,8 +1,8 @@ from unittest.mock import Mock, patch import pytest -from pypgstac.load import Methods from fastapi.encoders import jsonable_encoder +from pypgstac.load import Methods from src.utils import DbCreds diff --git a/lib/stac-api/runtime/requirements.txt b/lib/stac-api/runtime/requirements.txt index bb0bfe9..3f8d6d0 100644 --- a/lib/stac-api/runtime/requirements.txt +++ b/lib/stac-api/runtime/requirements.txt @@ -1,8 +1,8 @@ mangum==0.15.1 -stac-fastapi.api==2.4.1 -stac-fastapi.extensions==2.4.1 -stac-fastapi.pgstac==2.4.1 -stac-fastapi.types==2.4.1 +stac-fastapi.api==2.4.8 +stac-fastapi.extensions==2.4.8 +stac-fastapi.pgstac==2.4.8 +stac-fastapi.types==2.4.8 # https://github.com/stac-utils/stac-fastapi/pull/466 pygeoif==0.7 starlette_cramjam \ No newline at end of file diff --git a/lib/stac-api/runtime/src/handler.py b/lib/stac-api/runtime/src/handler.py index dd79f0b..e4a4745 100644 --- a/lib/stac-api/runtime/src/handler.py +++ b/lib/stac-api/runtime/src/handler.py @@ -4,6 +4,7 @@ import asyncio import os + from mangum import Mangum from .app import app diff --git a/lib/tipg-api/runtime/src/handler.py b/lib/tipg-api/runtime/src/handler.py index 40e358a..00ab3f2 100644 --- a/lib/tipg-api/runtime/src/handler.py +++ b/lib/tipg-api/runtime/src/handler.py @@ -4,21 +4,20 @@ import asyncio import os + from mangum import Mangum from src.utils import load_pgstac_secret load_pgstac_secret(os.environ["PGSTAC_SECRET_ARN"]) # required for the below imports -# skipping linting rule that wants all imports at the top -from tipg.main import app # noqa: E402 from tipg.collections import register_collection_catalog # noqa: E402 from tipg.database import connect_to_db # noqa: E402 -from tipg.settings import ( # noqa: E402 - CustomSQLSettings, # noqa: E402 - DatabaseSettings, # noqa: E402 - PostgresSettings, # noqa: E402 -) # noqa: E402 +# skipping linting rule that wants all imports at the top +from tipg.main import app # noqa: E402 +from tipg.settings import CustomSQLSettings # noqa: E402 +from tipg.settings import DatabaseSettings # noqa: E402 +from tipg.settings import PostgresSettings # noqa: E402; noqa: E402 postgres_settings = PostgresSettings() db_settings = DatabaseSettings() diff --git a/lib/tipg-api/runtime/src/utils.py b/lib/tipg-api/runtime/src/utils.py index f9a8ccd..dadb49e 100644 --- a/lib/tipg-api/runtime/src/utils.py +++ b/lib/tipg-api/runtime/src/utils.py @@ -1,8 +1,9 @@ import base64 import json -import boto3 import os +import boto3 + def load_pgstac_secret(secret_name: str): """Retrieve secrets from AWS Secrets Manager diff --git a/lib/titiler-pgstac-api/runtime/src/handler.py b/lib/titiler-pgstac-api/runtime/src/handler.py index 23e8ed2..777cd37 100644 --- a/lib/titiler-pgstac-api/runtime/src/handler.py +++ b/lib/titiler-pgstac-api/runtime/src/handler.py @@ -4,6 +4,7 @@ import asyncio import os + from mangum import Mangum from src.utils import get_secret_dict @@ -20,8 +21,8 @@ } ) -from titiler.pgstac.main import app # noqa: E402 from titiler.pgstac.db import connect_to_db # noqa: E402 +from titiler.pgstac.main import app # noqa: E402 @app.on_event("startup") diff --git a/lib/titiler-pgstac-api/runtime/src/utils.py b/lib/titiler-pgstac-api/runtime/src/utils.py index ec33300..5279139 100644 --- a/lib/titiler-pgstac-api/runtime/src/utils.py +++ b/lib/titiler-pgstac-api/runtime/src/utils.py @@ -1,5 +1,6 @@ import base64 import json + import boto3