Skip to content

Commit

Permalink
fix: Keep environment variables but remove default values
Browse files Browse the repository at this point in the history
This fixes a regression where environment variables were not being properly loaded.
Now we:
- Keep environment variables support
- Remove default values
- Keep proper validation
  • Loading branch information
lfnovo committed Jan 3, 2025
1 parent 9ac4a8a commit 9c724bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "surrantic"
version = "0.2.1"
version = "0.2.2"
description = "A simple Pydantic ORM implementation for SurrealDB"
readme = "README.md"
authors = [
Expand Down
10 changes: 5 additions & 5 deletions src/surrantic/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
setup_logging(logging.DEBUG)

# Default database configuration
SURREAL_ADDRESS = os.getenv("SURREAL_ADDRESS")
SURREAL_USER = os.getenv("SURREAL_USER")
SURREAL_PASS = os.getenv("SURREAL_PASS")
SURREAL_NAMESPACE = os.getenv("SURREAL_NAMESPACE")
SURREAL_DATABASE = os.getenv("SURREAL_DATABASE")
SURREAL_ADDRESS = os.getenv("SURREAL_ADDRESS", None)
SURREAL_USER = os.getenv("SURREAL_USER", None)
SURREAL_PASS = os.getenv("SURREAL_PASS", None)
SURREAL_NAMESPACE = os.getenv("SURREAL_NAMESPACE", None)
SURREAL_DATABASE = os.getenv("SURREAL_DATABASE", None)

class SurranticConfig:
"""Configuration class for Surrantic database connection.
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9c724bf

Please sign in to comment.