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:
45
src/physcom/models/combination.py
Normal file
45
src/physcom/models/combination.py
Normal file
@@ -0,0 +1,45 @@
|
||||
"""Combination and scoring dataclasses."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from physcom.models.entity import Entity
|
||||
|
||||
|
||||
@dataclass
|
||||
class Score:
|
||||
"""A single metric score for a combination in a domain."""
|
||||
|
||||
metric_name: str
|
||||
raw_value: float
|
||||
normalized_score: float
|
||||
estimation_method: str = "physics_calc"
|
||||
confidence: float = 1.0
|
||||
|
||||
|
||||
@dataclass
|
||||
class ScoredResult:
|
||||
"""Final composite result for a combination in a domain."""
|
||||
|
||||
combination_id: int | None
|
||||
domain_name: str
|
||||
scores: list[Score] = field(default_factory=list)
|
||||
composite_score: float = 0.0
|
||||
novelty_flag: str | None = None
|
||||
llm_review: str | None = None
|
||||
human_notes: str | None = None
|
||||
pass_reached: int = 0
|
||||
|
||||
|
||||
@dataclass
|
||||
class Combination:
|
||||
"""A generated combination of entities (one per dimension)."""
|
||||
|
||||
entities: list[Entity] = field(default_factory=list)
|
||||
status: str = "pending" # pending → valid/blocked → scored → reviewed
|
||||
block_reason: str | None = None
|
||||
hash: str | None = None
|
||||
id: int | None = None
|
||||
Reference in New Issue
Block a user