Rename picture-targets to output-targets across entire codebase
Rename all Python modules, classes, API endpoints, config keys, frontend fetch URLs, and Home Assistant integration URLs from picture-targets to output-targets. Store loads both new and legacy JSON keys for backward compatibility with existing data files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,11 +30,11 @@ from .color_strip_sources import (
|
||||
ColorStripSourceUpdate,
|
||||
CSSCalibrationTestRequest,
|
||||
)
|
||||
from .picture_targets import (
|
||||
PictureTargetCreate,
|
||||
PictureTargetListResponse,
|
||||
PictureTargetResponse,
|
||||
PictureTargetUpdate,
|
||||
from .output_targets import (
|
||||
OutputTargetCreate,
|
||||
OutputTargetListResponse,
|
||||
OutputTargetResponse,
|
||||
OutputTargetUpdate,
|
||||
TargetMetricsResponse,
|
||||
TargetProcessingState,
|
||||
)
|
||||
@@ -100,10 +100,10 @@ __all__ = [
|
||||
"ColorStripSourceResponse",
|
||||
"ColorStripSourceUpdate",
|
||||
"CSSCalibrationTestRequest",
|
||||
"PictureTargetCreate",
|
||||
"PictureTargetListResponse",
|
||||
"PictureTargetResponse",
|
||||
"PictureTargetUpdate",
|
||||
"OutputTargetCreate",
|
||||
"OutputTargetListResponse",
|
||||
"OutputTargetResponse",
|
||||
"OutputTargetUpdate",
|
||||
"TargetMetricsResponse",
|
||||
"TargetProcessingState",
|
||||
"EngineInfo",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Picture target schemas (CRUD, processing state, metrics)."""
|
||||
"""Output target schemas (CRUD, processing state, metrics)."""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Dict, Optional, List
|
||||
@@ -46,8 +46,8 @@ class KeyColorsResponse(BaseModel):
|
||||
timestamp: Optional[datetime] = Field(None, description="Extraction timestamp")
|
||||
|
||||
|
||||
class PictureTargetCreate(BaseModel):
|
||||
"""Request to create a picture target."""
|
||||
class OutputTargetCreate(BaseModel):
|
||||
"""Request to create an output target."""
|
||||
|
||||
name: str = Field(description="Target name", min_length=1, max_length=100)
|
||||
target_type: str = Field(default="led", description="Target type (led, key_colors)")
|
||||
@@ -67,8 +67,8 @@ class PictureTargetCreate(BaseModel):
|
||||
description: Optional[str] = Field(None, description="Optional description", max_length=500)
|
||||
|
||||
|
||||
class PictureTargetUpdate(BaseModel):
|
||||
"""Request to update a picture target."""
|
||||
class OutputTargetUpdate(BaseModel):
|
||||
"""Request to update an output target."""
|
||||
|
||||
name: Optional[str] = Field(None, description="Target name", min_length=1, max_length=100)
|
||||
# LED target fields
|
||||
@@ -87,8 +87,8 @@ class PictureTargetUpdate(BaseModel):
|
||||
description: Optional[str] = Field(None, description="Optional description", max_length=500)
|
||||
|
||||
|
||||
class PictureTargetResponse(BaseModel):
|
||||
"""Picture target response."""
|
||||
class OutputTargetResponse(BaseModel):
|
||||
"""Output target response."""
|
||||
|
||||
id: str = Field(description="Target ID")
|
||||
name: str = Field(description="Target name")
|
||||
@@ -111,15 +111,15 @@ class PictureTargetResponse(BaseModel):
|
||||
updated_at: datetime = Field(description="Last update timestamp")
|
||||
|
||||
|
||||
class PictureTargetListResponse(BaseModel):
|
||||
"""List of picture targets response."""
|
||||
class OutputTargetListResponse(BaseModel):
|
||||
"""List of output targets response."""
|
||||
|
||||
targets: List[PictureTargetResponse] = Field(description="List of picture targets")
|
||||
targets: List[OutputTargetResponse] = Field(description="List of output targets")
|
||||
count: int = Field(description="Number of targets")
|
||||
|
||||
|
||||
class TargetProcessingState(BaseModel):
|
||||
"""Processing state for a picture target."""
|
||||
"""Processing state for an output target."""
|
||||
|
||||
target_id: str = Field(description="Target ID")
|
||||
device_id: Optional[str] = Field(None, description="Device ID")
|
||||
@@ -5,7 +5,7 @@ from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from .picture_targets import KeyColorRectangleSchema
|
||||
from .output_targets import KeyColorRectangleSchema
|
||||
|
||||
|
||||
class PatternTemplateCreate(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user