hipscat.catalog.dataset.catalog_info_factory#

Module Contents#

Functions#

create_catalog_info(...)

Generate a typed catalog info object from the type specified explicitly or

from_catalog_dir(catalog_base_dir[, storage_options])

Generate a typed catalog info object from the type specified in the

Attributes#

CATALOG_TYPE_TO_INFO_CLASS

Map of catalog types to their expected subclass of BaseCatalogInfo.

CATALOG_TYPE_TO_INFO_CLASS[source]#

Map of catalog types to their expected subclass of BaseCatalogInfo.

create_catalog_info(keywords: dict, catalog_type: hipscat.catalog.catalog_type.CatalogType | None = None) hipscat.catalog.dataset.base_catalog_info.BaseCatalogInfo[source]#

Generate a typed catalog info object from the type specified explicitly or using catalog_type keyword.

Parameters:
  • keywords – dictionary of catalog info keywords (e.g. from reading a catalog_info.json file).

  • catalog_type – explicit request for a specific catalog type. if not provided, we will look for a key catalog_type in the keywords.

Returns:

populated BaseCatalogInfo of appropriate type.

from_catalog_dir(catalog_base_dir: hipscat.io.FilePointer, storage_options: Dict[Any, Any] | None = None)[source]#

Generate a typed catalog info object from the type specified in the catalog info file.

Parameters:
  • catalog_base_dir – a path pointing to the base directory of a catalog, or may point to a catalog_info.json file directly.

  • storage_options – dictionary that contains abstract filesystem credentials

Returns:

populated BaseCatalogInfo of appropriate type.