hats.catalog.dataset.collection_properties#

Attributes#

Classes#

CollectionProperties

Container class for catalog metadata

Module Contents#

EXTRA_ALLOWED_FIELDS = ['addendum_did', 'bib_reference', 'bib_reference_url', 'creator_did', 'data_ucd',...[source]#
class CollectionProperties(/, **data: Any)[source]#

Bases: pydantic.BaseModel

Container class for catalog metadata

name: str = None[source]#
hats_primary_table_url: str = None[source]#

Reference to object catalog. Relevant for nested, margin, association, and index.

all_margins: list[str] | None = None[source]#
default_margin: str | None = None[source]#
all_indexes: dict[str, str] | None = None[source]#
default_index: str | None = None[source]#
model_config[source]#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod space_delimited_list(str_value: str) list[str][source]#

Convert a space-delimited list string into a python list of strings.

classmethod index_tuples(str_value: str) dict[str, str][source]#

Convert a space-delimited list string into a python list of strings.

serialize_list_as_space_delimited_list(str_list: Iterable[str]) str[source]#

Convert a python list of strings into a space-delimited string.

serialize_dict_as_space_delimited_list(str_dict: dict[str, str]) str[source]#

Convert a python list of strings into a space-delimited string.

check_allowed_and_required() typing_extensions.Self[source]#

Check that type-specific fields are appropriate, and required fields are set.

check_default_margin_exists() typing_extensions.Self[source]#

Check that the default margin is in the list of all margins.

check_default_index_exists() typing_extensions.Self[source]#

Check that the default index is in the list of all indexes.

explicit_dict()[source]#

Create a dict, based on fields that have been explicitly set, and are not “extra” keys.

__str__()[source]#

Friendly string representation based on named fields.

classmethod read_from_dir(catalog_dir: str | pathlib.Path | upath.UPath) typing_extensions.Self[source]#

Read field values from a java-style properties file.

to_properties_file(catalog_dir: str | pathlib.Path | upath.UPath) typing_extensions.Self[source]#

Write fields to a java-style properties file.