bayesline.api.stamp_version

Contents

bayesline.api.stamp_version#

bayesline.api.stamp_version(settings_type: type, raw_json: dict[str, Any]) dict[str, Any]#

Stamp the current schema version into raw_json for persistence.

Only stamps for version > 1 so that existing v1 settings are untouched.

Parameters#

settings_typetype

The Settings subclass.

raw_jsondict[str, Any]

The raw JSON dict from model_dump().

Returns#

dict[str, Any]

The dict with VERSION_KEY added (if version > 1).