Specification

class compas_ifc.validation.Specification(name, ifc_types, required_psets, description='')

Bases: object

An information requirement specification (analogous to an IDS facet).

Combines applicability criteria (which IFC element types) with property-set requirements (which Psets must be present and what schema they must satisfy).

Parameters:
namestr

Human-readable name for this specification.

ifc_typeslist[str]

IFC class names this specification applies to (e.g. ["IfcWall"]).

required_psetsdict[str, type[BaseModel]] or type[BaseModel]

Either a mapping of property-set name to Pydantic schema class, or a single Pydantic model whose field names are pset names and field types are per-pset schemas:

class MySpec(BaseModel):
    Pset_SlabCommon: SlabCommonSchema
    Pset_EnvironmentalImpactIndicators: EnvSchema

spec = Specification(..., required_psets=MySpec)
descriptionstr, optional

Longer description of the requirement.

Methods

__init__

resolved_psets

Return required_psets as a dict[str, type[BaseModel]].