Add Flask web UI, Docker Compose, core engine + tests
- physcom core: CLI, 5-pass pipeline, SQLite repo, 37 tests - physcom_web: Flask app with HTMX for entity/domain/pipeline/results CRUD - Docker Compose: web + cli services sharing a named volume for the DB - Clean up local settings to use wildcard permissions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
26
src/physcom/models/domain.py
Normal file
26
src/physcom/models/domain.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""Domain and MetricBound dataclasses."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
|
||||
@dataclass
|
||||
class MetricBound:
|
||||
"""Per-metric weight and normalization bounds within a domain."""
|
||||
|
||||
metric_name: str
|
||||
weight: float # 0.0–1.0
|
||||
norm_min: float # Below this → score 0
|
||||
norm_max: float # Above this → score 1
|
||||
metric_id: int | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class Domain:
|
||||
"""A context frame that defines what 'good' means (e.g., urban_commuting)."""
|
||||
|
||||
name: str
|
||||
description: str = ""
|
||||
metric_bounds: list[MetricBound] = field(default_factory=list)
|
||||
id: int | None = None
|
||||
Reference in New Issue
Block a user