Files
bambuddy/backend/app/core/config.py
T
maziggy 2867401116 Add Cloud Profiles template visibility and preset diff view
Cloud Profiles (ProfilesPage.tsx):
  - Add template visibility control (showInModal flag)
    - Eye/EyeOff toggle in templates modal to show/hide templates
    - Only templates with showInModal=true appear in preset modals
    - Default new templates to showInModal=true in save dialog
  - Add preset diff/compare view with two modes:
    - Compare button in edit modal (preset vs base)
    - Compare mode on main page (two-preset comparison)
    - Side-by-side diff with added/removed/changed highlighting
    - Stats showing added/removed/changed/same counts
    - Search filter and Changes/All toggle
    - Type restriction (only compare same preset types)
  - Fix array value display (show "value" instead of ["value"])
  - Fix printer preset G-code display (format escaped \n as real newlines)
  - Fix modal overflow issues with proper flex patterns
  - Fix light theme colors for compare selection text
2025-12-08 14:03:38 +00:00

39 lines
1.0 KiB
Python

from pathlib import Path
from pydantic_settings import BaseSettings
# Application version - single source of truth
APP_VERSION = "0.1.5b"
GITHUB_REPO = "maziggy/bambusy"
class Settings(BaseSettings):
app_name: str = "BambuTrack"
debug: bool = False # Default to production mode
# Paths
base_dir: Path = Path(__file__).resolve().parent.parent.parent.parent
archive_dir: Path = base_dir / "archive"
static_dir: Path = base_dir / "static"
log_dir: Path = base_dir / "logs"
database_url: str = f"sqlite+aiosqlite:///{base_dir}/bambutrack.db"
# Logging
log_level: str = "INFO" # Override with LOG_LEVEL env var or DEBUG=true
log_to_file: bool = True # Set to false to disable file logging
# API
api_prefix: str = "/api/v1"
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings()
# Ensure directories exist
settings.archive_dir.mkdir(exist_ok=True)
settings.static_dir.mkdir(exist_ok=True)
if settings.log_to_file:
settings.log_dir.mkdir(exist_ok=True)