Skip to content

cdm_data_loaders.pipelines.uniref_cdm

DLT pipelines to import UniRef data into KBase CDM tables via XML-to-PyArrow.

UniRefCdmSettings

Bases: UniRefXmlToPyArrowSettings

Base settings for UniRef CDM XML-to-PyArrow ingestion pipelines.

Source code in src/cdm_data_loaders/pipelines/uniref_cdm.py
class UniRefCdmSettings(UniRefXmlToPyArrowSettings):
    """Base settings for UniRef CDM XML-to-PyArrow ingestion pipelines."""

    _PROTOCOL: ClassVar[str]

    model_config: SettingsConfigDict = default_settings_with_shortcuts(
        cli_prog_name=UNIREF_CDM_PIPELINE_NAME,
        cli_shortcuts=XML_CLI_SHORTCUTS,
    )

    transforms_module: ClassVar[str | None] = None
    output_schemas_module: ClassVar[str | None] = None

    log_interval: Annotated[
        LogInterval,
        Field(
            default=UNIREF_LOG_INTERVAL,
        ),
    ]

    def _resolve_settings_schema_map(self, default_pyarrow_schema: pa.Schema | None = None) -> None:
        """Bind the variant-specific UniRef CDM transform and schemas to the entry table."""
        self._bind_cdm_transform_and_schemas(
            make_uniref_cdm_transform(self._PROTOCOL),
            UNIREF_CDM_SCHEMA_MAP,
            default_pyarrow_schema=default_pyarrow_schema,
        )

UniRef50CdmSettings

Bases: UniRefCdmSettings

UniRef 50 CDM XML-to-PyArrow ingest settings.

Source code in src/cdm_data_loaders/pipelines/uniref_cdm.py
class UniRef50CdmSettings(UniRefCdmSettings):
    """UniRef 50 CDM XML-to-PyArrow ingest settings."""

    _PROTOCOL: ClassVar[str] = "UniRef 50"

    model_config: SettingsConfigDict = default_settings_with_shortcuts(
        cli_prog_name=UNIREF50_CDM,
        cli_shortcuts=XML_CLI_SHORTCUTS,
    )

    dataset_name: ClassVar[str] = UNIREF50_CDM

UniRef90CdmSettings

Bases: UniRefCdmSettings

UniRef 90 CDM XML-to-PyArrow ingest settings.

Source code in src/cdm_data_loaders/pipelines/uniref_cdm.py
class UniRef90CdmSettings(UniRefCdmSettings):
    """UniRef 90 CDM XML-to-PyArrow ingest settings."""

    _PROTOCOL: ClassVar[str] = "UniRef 90"

    model_config: SettingsConfigDict = default_settings_with_shortcuts(
        cli_prog_name=UNIREF90_CDM,
        cli_shortcuts=XML_CLI_SHORTCUTS,
    )

    dataset_name: ClassVar[str] = UNIREF90_CDM

UniRef100CdmSettings

Bases: UniRefCdmSettings

UniRef 100 CDM XML-to-PyArrow ingest settings.

Source code in src/cdm_data_loaders/pipelines/uniref_cdm.py
class UniRef100CdmSettings(UniRefCdmSettings):
    """UniRef 100 CDM XML-to-PyArrow ingest settings."""

    _PROTOCOL: ClassVar[str] = "UniRef 100"

    model_config: SettingsConfigDict = default_settings_with_shortcuts(
        cli_prog_name=UNIREF100_CDM,
        cli_shortcuts=XML_CLI_SHORTCUTS,
    )

    dataset_name: ClassVar[str] = UNIREF100_CDM