Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 1.7.1 (2025-03-04)

* remove `PostgresSettings` initialization from `main.py`

## 1.7.0 (2025-02-13)

* update titiler requirement to `>=0.21,<0.22`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ filterwarnings = [
]

[tool.bumpversion]
current_version = "1.7.0"
current_version = "1.7.1"
search = "{current_version}"
replace = "{new_version}"
regex = false
Expand Down
2 changes: 1 addition & 1 deletion titiler/pgstac/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""titiler.pgstac"""

__version__ = "1.7.0"
__version__ = "1.7.1"
5 changes: 2 additions & 3 deletions titiler/pgstac/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
add_search_register_route,
)
from titiler.pgstac.reader import PgSTACReader
from titiler.pgstac.settings import ApiSettings, PostgresSettings
from titiler.pgstac.settings import ApiSettings

logging.getLogger("botocore.credentials").disabled = True
logging.getLogger("botocore.utils").disabled = True
Expand All @@ -63,15 +63,14 @@
)
templates = Jinja2Templates(env=jinja2_env)

postgres_settings = PostgresSettings()
Copy link
Member Author

Choose a reason for hiding this comment

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

The settings will be initialized later in the lifespan so there is no real need to do this.

Now instead of failing on import it will fail during the startup event (if no env are found)

settings = ApiSettings()


@asynccontextmanager
async def lifespan(app: FastAPI):
"""FastAPI Lifespan."""
# Create Connection Pool
await connect_to_db(app, settings=postgres_settings)
await connect_to_db(app)
yield
# Close the Connection Pool
await close_db_connection(app)
Expand Down
Loading