Skip to main content

KernelDB.check_metakernel()

Check which kernels from a metakernel are already available locally.

Usage

Source

KernelDB.check_metakernel(
    mk_path,
    mission=None,
)

Each KERNELS_TO_LOAD entry is looked up with resolve_kernel, preferring the metakernel’s mission. The method prints nothing and touches no network. The CLI renders its result, and check_report adds the other verdicts (#46).

Parameters

mk_path: str | Path

Any reference resolve_metakernel accepts, so a path to the .tm file or a tracked name.

mission: str | None = None
Mission name for preferred-mission resolution. By default it is read from the registry row of a tracked metakernel, and only an untracked file is guessed from its path.

Returns

dict

With the keys:

  • mk_path: the resolved path, as a string
  • mission: the mission used for resolution
  • found: list of (raw_entry, local_path) tuples
  • missing: list of raw_entry strings
  • warnings: list of warning strings

Raises

MetakernelNotTracked

mk_path matches nothing.

AmbiguousMetakernel
mk_path matches several registry rows.