Skip to content

Commit

Permalink
add extra=ignore to pydantic settings
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Mar 25, 2024
1 parent 2505efe commit e3b6cbb
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

pull_request:
env:
LATEST_PY_VERSION: '3.10'
LATEST_PY_VERSION: '3.12'

jobs:
tests:
Expand All @@ -27,6 +27,7 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- '3.12'

steps:
- uses: actions/checkout@v3
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
groups:
all:
patterns:
- "*"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: GIS",
]
dependencies = [
Expand Down
6 changes: 4 additions & 2 deletions titiler/pgstac/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def get_collection_id(pool: ConnectionPool, collection_id: str) -> str:
metadata = model.Metadata(
name=f"Mosaic for '{collection_id}' Collection",
bounds=bbox[0],
# TODO: use asset extension to populate the `assets` attribute
# TODO:
# - use the `asset`` extension to populate the `assets` attribute
# - use the `render` extension to populate the `defaults` attribute
)

cursor.row_factory = class_row(model.Search)
Expand All @@ -75,7 +77,7 @@ def get_collection_id(pool: ConnectionPool, collection_id: str) -> str:
metadata.model_dump_json(exclude_none=True),
),
)
search_info = cursor.fetchone()
search_info: model.Search = cursor.fetchone()

return search_info.id

Expand Down
6 changes: 5 additions & 1 deletion titiler/pgstac/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ class CacheSettings(BaseSettings):
# Whether or not caching is enabled
disable: bool = False

model_config = {"env_prefix": "TITILER_PGSTAC_CACHE_", "env_file": ".env"}
model_config = {
"env_prefix": "TITILER_PGSTAC_CACHE_",
"env_file": ".env",
"extra": "ignore",
}

@model_validator(mode="after")
def check_enable(self):
Expand Down

0 comments on commit e3b6cbb

Please sign in to comment.