polaris.build.source_record.read_source_record
- polaris.build.source_record.read_source_record(build_dir: str | None) Dict[str, Any] | None[source]
Read the record of the source that Polaris built a model from.
Polaris’s build scripts write the record into the build directory before configuring the build, so it names the commit that was built even if the source tree has moved since.
- Parameters:
build_dir (str, optional) – The build directory of Omega or MPAS-Ocean
- Returns:
record (dict, optional) – The record, with the source tree’s path (
source), its full hash (hash), the output ofgit describe(describe), whether the build started from an empty build directory (clean_build) and its last five first-parent commits (log), orNoneif the build directory has no record