You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dataclassclassCliConfig:
"""Handles loading and storing the config from disk"""_module_site: str=None_collection: str=None_editor: str=Nonedefload_config(self, config_file: str="pyproject.toml"):
"""Load config from [tool.render-engine.cli]"""
TUI Implementation
Currently reads inline from pyproject.toml in SiteLoader
Proposed API
Create render_engine_api.config with:
classRenderEngineConfig:
"""Simple configuration reader for render-engine tools."""def__init__(self, project_root: Optional[Path] =None):
"""Initialize from project root or cwd."""defget_site_module(self) ->str:
"""Get site_module from [tool.render-engine]. Returns: Site module path (e.g., "app.site") Raises: ConfigError: If site_module not found """defget_editor(self) ->Optional[str]:
"""Get configured editor or fallback to $EDITOR env var."""
Configuration Schema
[tool.render-engine]
site_module = "app.site"# Required: module path to Site instanceeditor = "vim"# Optional: falls back to $EDITOR env var
Benefits
Simplicity: Single source of truth for basic config
Activity