ml_switcheroo.semantics.paths¶

Path Resolution Utilities for Semantics.

Handles locating the ‘semantics/’ and ‘snapshots/’ directories within the package or source tree.

Attributes¶

files

Functions¶

resolve_semantics_dir(→ pathlib.Path)

Locates the directory containing semantic JSON definitions.

resolve_snapshots_dir(→ pathlib.Path)

Locates the directory containing framework snapshots and mapping overlays.

Module Contents¶

ml_switcheroo.semantics.paths.files = None¶
ml_switcheroo.semantics.paths.resolve_semantics_dir() → pathlib.Path¶

Locates the directory containing semantic JSON definitions.

Prioritizes the local file system (relative to this file) to ensure tests and editable installs find the source of truth correctly. Falls back to package resources for installed distributions.

Returns:

The absolute path to the ‘semantics’ directory.

Return type:

Path

ml_switcheroo.semantics.paths.resolve_snapshots_dir() → pathlib.Path¶

Locates the directory containing framework snapshots and mapping overlays. Defaults to the sibling ‘snapshots’ directory relative to ‘semantics’.

Returns:

The absolute path to the ‘snapshots’ directory.

Return type:

Path