Display metric units in web UI, make seed idempotent, simplify code
- Load m.unit in get_domain() so MetricBound carries units from DB - Add Unit column to domains list template - Make load_transport_seed() idempotent with IntegrityError handling and metric unit backfill for existing DBs - Remove unused imports (json, sqlite3, Entity) - Simplify combinator loop to list comprehension - Merge duplicate conditional/valid branches in pipeline - Consolidate duplicated SQL in get_all_results() - Expand CLAUDE.md with fuller architecture docs and conventions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sqlite3
|
||||
|
||||
import pytest
|
||||
|
||||
from physcom.db.schema import init_db
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Tests for async pipeline: resume, cancellation, status guard, run lifecycle."""
|
||||
|
||||
import json
|
||||
|
||||
from physcom.engine.constraint_resolver import ConstraintResolver
|
||||
from physcom.engine.scorer import Scorer
|
||||
from physcom.engine.pipeline import Pipeline, CancelledError
|
||||
@@ -287,7 +285,6 @@ def test_save_combination_loads_existing_status(seeded_repo):
|
||||
"""save_combination should load the status of an existing combo from DB."""
|
||||
repo = seeded_repo
|
||||
from physcom.models.combination import Combination
|
||||
from physcom.models.entity import Entity
|
||||
|
||||
entities = repo.list_entities(dimension="platform")[:1] + repo.list_entities(dimension="power_source")[:1]
|
||||
combo = Combination(entities=entities)
|
||||
|
||||
Reference in New Issue
Block a user