Skip to content

Commit 1260543

Browse files
committed
update stac-fastapi to next major version
1 parent 9887fdc commit 1260543

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545

4646
database:
4747
container_name: stac-db
48-
image: ghcr.io/stac-utils/pgstac:v0.7.10
48+
image: ghcr.io/stac-utils/pgstac:v0.8.5
4949
environment:
5050
- POSTGRES_USER=username
5151
- POSTGRES_PASSWORD=password

setup.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,26 @@
88
install_requires = [
99
"attrs",
1010
"orjson",
11-
"pydantic[dotenv]>=1.10.8", # https://github.com/pydantic/pydantic/issues/5821
12-
"stac_pydantic==2.0.*",
13-
"stac-fastapi.types~=2.5.5.post1",
14-
"stac-fastapi.api~=2.5.5.post1",
15-
"stac-fastapi.extensions~=2.5.5.post1",
11+
"pydantic",
12+
"stac_pydantic==3.0.*",
13+
# "stac-fastapi.api~=3.0",
14+
# "stac-fastapi.extensions~=3.0",
15+
# "stac-fastapi.types~=3.0",
16+
# For now we use latest commit in master
17+
"stac-fastapi.api @ git+https://github.com/stac-utils/stac-fastapi/@e7f82d6996af0f28574329d57f5a5e90431d66bb#egg=stac-fastapi.api&subdirectory=stac_fastapi/api",
18+
"stac-fastapi.extensions @ git+https://github.com/stac-utils/stac-fastapi/@e7f82d6996af0f28574329d57f5a5e90431d66bb#egg=stac-fastapi.extensions&subdirectory=stac_fastapi/extensions",
19+
"stac-fastapi.types @ git+https://github.com/stac-utils/stac-fastapi/@e7f82d6996af0f28574329d57f5a5e90431d66bb#egg=stac-fastapi.types&subdirectory=stac_fastapi/types",
1620
"asyncpg",
1721
"buildpg",
1822
"brotli_asgi",
1923
"pygeofilter>=0.2",
20-
"pypgstac==0.7.*",
24+
"pypgstac==0.8.*",
2125
]
2226

2327
extra_reqs = {
2428
"dev": [
2529
"pystac[validation]",
26-
"pypgstac[psycopg]==0.7.*",
30+
"pypgstac[psycopg]==0.8.*",
2731
"pytest-postgresql",
2832
"pytest",
2933
"pytest-cov",

stac_fastapi/pgstac/config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from urllib.parse import quote
55

66
from pydantic import BaseModel, Extra
7+
from pydantic_settings import SettingsConfigDict
78
from stac_fastapi.types.config import ApiSettings
89

910
from stac_fastapi.pgstac.types.base_item_cache import (
@@ -58,7 +59,7 @@ class Settings(ApiSettings):
5859
postgres_pass: str
5960
postgres_host_reader: str
6061
postgres_host_writer: str
61-
postgres_port: str
62+
postgres_port: int
6263
postgres_dbname: str
6364

6465
db_min_conn_size: int = 10
@@ -89,7 +90,6 @@ def testing_connection_string(self):
8990
"""Create testing psql connection string."""
9091
return f"postgresql://{self.postgres_user}:{quote(self.postgres_pass)}@{self.postgres_host_writer}:{self.postgres_port}/pgstactestdb"
9192

92-
class Config(ApiSettings.Config):
93-
"""Model config."""
94-
95-
env_nested_delimiter = "__"
93+
model_config = SettingsConfigDict(
94+
**{**ApiSettings.model_config, **{"env_nested_delimiter": "__"}}
95+
)

0 commit comments

Comments
 (0)