19 lines
616 B
Python
19 lines
616 B
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from .config import GeneratorConfig
|
||
|
|
from .models import DatasetBundle
|
||
|
|
from .registry import TABLE_ORDER
|
||
|
|
|
||
|
|
|
||
|
|
def build_contract_fixture(config: GeneratorConfig) -> DatasetBundle:
|
||
|
|
bundle = DatasetBundle(metadata=config.metadata())
|
||
|
|
for name in TABLE_ORDER:
|
||
|
|
bundle.ensure_table(name)
|
||
|
|
bundle.artifacts["assumptions"] = {
|
||
|
|
"units": {"duration": "hour", "weight": "tonne", "length": "meter", "currency": "CNY"},
|
||
|
|
"priorityScale": "1-10; 10 is highest",
|
||
|
|
"relationTypes": ["FS", "SS", "FF", "SF"],
|
||
|
|
"synthetic": True,
|
||
|
|
}
|
||
|
|
return bundle
|