import logging import typing from pydantic import BaseModel, validator LOG = logging.getLogger("acm.config") class ACMProfileTarget(BaseModel): name: str version: str processors: typing.List[str] extensions: typing.List[str] output_extension: str force_preserve_smaller_input: bool command: str signature: typing.Optional[str] @validator('signature', always=True) def signature_validator(cls, v, values) -> str: # TODO calculate the hash for the profile target return "" class ACMProfile(BaseModel): name: str processors: typing.List[ACMProfileTarget] signature: typing.Optional[str] @validator('signature', always=True) def hash_signature_validator(cls, v, values) -> str: # TODO calculate the hash for the profile return "" class ACMConfig(BaseModel): concurrency: int = 0 profiles: typing.List[ACMProfile] signature: typing.Optional[str] @validator('signature', always=True) def signature_validator(cls, v, values) -> str: # TODO calculate the hash for the config return ""