aps-agent/server/importers/ruiyang_aps.py

20 lines
839 B
Python

"""Compatibility exports for the first registered complete-workbook adapter.
Business parsing now belongs to planning_workbook and its JSON profile registry.
"""
from server.importers.planning_workbook import (
apply_planning_batches as apply_ruiyang_batches,
)
from server.importers.planning_workbook import (
preview_planning_workbook as preview_ruiyang_workbook,
)
from server.importers.workbook_profiles import builtin_compatibility_profile
_default = builtin_compatibility_profile()
PROFILE = _default["id"]
HEADERS = {spec["name"]: tuple(spec["columns"].values()) for spec in _default["sheets"].values()}
KINDS = {spec["name"]: "materials" if role == "products" else role
for role, spec in _default["sheets"].items()}
__all__ = ["HEADERS", "KINDS", "PROFILE", "apply_ruiyang_batches", "preview_ruiyang_workbook"]