hipscatalog_gen.utils._detect_hats_catalog_root

_detect_hats_catalog_root(paths)[source]

Best-effort detection of a HATS catalog root directory.

Strategy:

For each path, walk up its parents looking for ‘collection.properties’ or ‘hats.properties’. The first match is returned as the catalog root.

Parameters:

paths (List[str]) – List of input paths (files or directories).

Returns:

Catalog root path if found, otherwise None.

Return type:

Path | None