Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add extra=ignore to pydantic settings #157

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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'
Copy link
Member Author

Choose a reason for hiding this comment

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

also adds python 3.12 tests


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
Loading