feat: flow engine data layer with tests
- SQLModel tables: flow_definitions/versions/runs, approval_tasks - Alembic setup with autogenerate (sqlmodel types fixed via script.py.mako) - Settings extended (shared root .env), db engine/session helpers - pytest suite: conftest with isolated test DB, 5 model tests green
This commit is contained in:
parent
2ba062c4c5
commit
e178ae406d
12 changed files with 686 additions and 3 deletions
|
|
@ -1,11 +1,27 @@
|
|||
from pydantic_settings import BaseSettings
|
||||
from pathlib import Path
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
# Repo-root .env (shared with the compose stack). Real environment variables
|
||||
# always take precedence over .env values.
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent.parent
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=REPO_ROOT / ".env", extra="ignore")
|
||||
|
||||
version: str = "0.1.0"
|
||||
debug: bool = False
|
||||
|
||||
model_config = {"env_prefix": "KIRCHE_"}
|
||||
database_url: str = "postgresql+psycopg://kirche:kirche@localhost:5432/kirche_einfach"
|
||||
test_database_url: str = (
|
||||
"postgresql+psycopg://kirche:kirche@localhost:5432/kirche_einfach_test"
|
||||
)
|
||||
|
||||
langflow_url: str = "http://localhost:7860"
|
||||
langflow_api_key: str = ""
|
||||
lfx_url: str = "http://localhost:6004"
|
||||
llm_api_key: str = ""
|
||||
|
||||
|
||||
settings = Settings()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue