hats.catalog.dataset.collection_properties#
Classes#
Container class for catalog metadata |
Module Contents#
- class CollectionProperties(/, **data: Any)[source]#
Bases:
hats.catalog.dataset.hats_properties.HatsPropertiesContainer class for catalog metadata
- hats_primary_table_url: str[source]#
Reference to object catalog. Relevant for nested, margin, association, and index.
- all_margins: Annotated[list[str] | None, Field(default=None), PlainSerializer(HatsProperties.serialize_list_as_space_delimited_list), BeforeValidator(HatsProperties.space_delimited_list)][source]#
- all_indexes: Annotated[dict[str, str] | None, Field(default=None), PlainSerializer(HatsProperties.serialize_dict_as_space_delimited_list)][source]#
- all_extensions: Annotated[dict[str, str] | None, Field(default=None), PlainSerializer(HatsProperties.serialize_dict_as_space_delimited_list)][source]#
Extensions of this collection, each holding a set of additional columns, and described by an
<extension>.propertiesfile. Maps the alias of each extension to the path to that file, relative to the collection root or absolute.
- classmethod space_delimited_dict(str_value: str, info: pydantic.ValidationInfo) dict[str, str][source]#
Convert a space-delimited list string of key-value pairs into a python dict of strings.
- Parameters:
- str_value: str
a space-delimited list string
- info: ValidationInfo
information about the field being validated
- Returns:
- dict[str, str]
a python dict of strings
- Raises:
- ValueError
if the string list has an odd number of elements (and so is not pairs of name and path)
- check_default_margin_exists() Self[source]#
Check that the default margin is in the list of all margins.
- check_default_index_exists() Self[source]#
Check that the default index is in the list of all indexes.
- check_extension_paths() Self[source]#
Check that each extension is listed by the path to its properties file.
- classmethod read_from_dir(catalog_dir: str | pathlib.Path | upath.UPath) Self[source]#
Read field values from a java-style properties file.
- Parameters:
- catalog_dir: str | Path | UPath
base directory of catalog.
- Returns:
- CollectionProperties
new object from the contents of a
collection.propertiesfile in the directory.