nirs4all.workspace.upgrade module
Explicit copy-and-upgrade for the existing SQLite workspace format.
This upgrades metadata, preserving stored model and array bytes. It does not convert DuckDB, legacy inline prediction arrays, or reconstruct models.
- nirs4all.workspace.upgrade.upgrade_workspace_copy(source: Path | str, output: Path | str) dict[str, Any][source]
Copy a closed SQLite workspace and upgrade only the new copy.
outputmust not exist and must be disjoint fromsource. SQLite metadata schemas 2 through the current version are accepted. Nonempty WAL or rollback journals require the writer to close/checkpoint before this offline operation. Empty WAL and shared-memory coordination files may remain after read-only inspection; these do not contain committed database changes. The resulting workspace can subsequently be used with normal WAL readers and writers; the returned digest is a conversion receipt only.- Returns:
JSON-compatible provenance for the completed, validated output.