base_converter
base_converter ¶
Shared base implementation for OSI semantic converters.
OsiConverter ¶
Bases: SemanticConverter
Base class providing shared column-classification and build helpers.
Both DataModelConverter and DsvConverter inherit from this class. Subclasses must implement convert().
export_to_file ¶
export_to_file(
output: list[OsiSemanticModel],
file_path: str,
format: str = "yaml",
**options
) -> None
Export list of OsiSemanticModels to YAML or JSON.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
list[OsiSemanticModel]
|
Models from convert() |
required |
file_path
|
str
|
Destination path |
required |
format
|
str
|
"yaml" (default) or "json" |
'yaml'
|
Source code in src/crew_dcs/integrations/osi/base_converter.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
UnresolvedBeastModeReferenceError ¶
Bases: ValueError
Raised when a Beast Mode's DOMO_BEAST_MODE() reference can't be resolved.
Emitting an OSI metric with a dangling DOMO_BEAST_MODE(nnn) token
would ship an expression that means nothing outside Domo. Callers must
resolve refs via BeastModeTemplate.resolve_domo_beast_mode_refs()
before converting — this error means that either wasn't done, or the
resolution attempt itself failed to reach every referenced template.