Skip to content

API Reference parrot_pipelines.planogram.migration

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_pipelines.planogram.migration

View source

Offline configuration migration for the perceive → identify → compare cycle (FEAT-574).

Candidate conversion of legacy ProductOnShelves configs into slots_definition + rule_bindings, and a read-only database preflight. Nothing here writes to a database.

Class ConversionReport

Result of a candidate conversion. candidate is a proposal for human review.

Fields:

Field Type Default Description
candidate Dict[str, Any]
bindings List[Dict[str, Any]]
unresolved List[str]
warnings List[str]
layout_profile Dict[str, Any]

Attribute MIGRATED_TYPES

Class PreflightRow

Preflight verdict for one active configuration row.

Fields:

Field Type Default Description
config_name str
planogram_type str
ok bool
problems List[str]

Alias SlotsDefinitionError

Re-exported from parrot_pipelines.planogram.comparison.definition.SlotsDefinitionError.

Function check_row

Pure verdict for one row dict (unit-testable without a database).

check_row(row: Dict[str, Any]) -> PreflightRow

Parameter Type Default Description
row Dict[str, Any] One troc.planograms_configurations row as a dict.

Returns: PreflightRow — The verdict; unknown types are never ok.

Function convert_config

Convert any registered type into a candidate definition and rule bindings.

convert_config(planogram_config: Dict[str, Any], *, planogram_type: str) -> ConversionReport

Parameter Type Default Description
planogram_config Dict[str, Any] The raw planogram_config dict (never mutated).
planogram_type str The configuration's planogram type.

Returns: ConversionReport — A ConversionReport. unresolved lists every human decision and validation failure.

Raises:

  • ValueError — When planogram_type is not convertible.

Alias load_slots_definition

Re-exported from parrot_pipelines.planogram.comparison.definition.load_slots_definition.

Attribute logger

Function preflight

List active rows and whether each migrated-type row is ready. SELECT-only.

preflight(dsn: str) -> List[PreflightRow]

Parameter Type Default Description
dsn str PostgreSQL DSN.

Returns: List[PreflightRow] — One PreflightRow per active configuration (unknown types are never ok).

Alias validate_bindings

Re-exported from parrot_pipelines.planogram.comparison.definition.validate_bindings.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally