Skip to content

Commit

Permalink
fix: synchronize pgstac versions -> 0.7.9 across constructs
Browse files Browse the repository at this point in the history
Affects stac-api, ingestor, bootstrapper
  • Loading branch information
ividito committed Oct 5, 2023
1 parent a1081a2 commit c6bb921
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion lib/bootstrapper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrapper/runtime/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ingestor-api/runtime/dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
httpx
moto[dynamodb, ssm]>=4.0.9
moto[dynamodb, ssm]>=4.0.9
3 changes: 1 addition & 2 deletions lib/ingestor-api/runtime/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lib/ingestor-api/runtime/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions lib/ingestor-api/runtime/tests/test_collection.py
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
3 changes: 1 addition & 2 deletions lib/ingestor-api/runtime/tests/test_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ingestor-api/runtime/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
8 changes: 4 additions & 4 deletions lib/stac-api/runtime/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions lib/stac-api/runtime/src/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import asyncio
import os

from mangum import Mangum

from .app import app
Expand Down
13 changes: 6 additions & 7 deletions lib/tipg-api/runtime/src/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion lib/tipg-api/runtime/src/utils.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/titiler-pgstac-api/runtime/src/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import asyncio
import os

from mangum import Mangum
from src.utils import get_secret_dict

Expand All @@ -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")
Expand Down
1 change: 1 addition & 0 deletions lib/titiler-pgstac-api/runtime/src/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import base64
import json

import boto3


Expand Down

0 comments on commit c6bb921

Please sign in to comment.