kazu.krt.ontology_update_editor.utils

Classes

OntologyUpdateManager

A class to manage the updating the raw ontology files of ontology parsers.

class kazu.krt.ontology_update_editor.utils.OntologyUpdateManager[source]

Bases: object

A class to manage the updating the raw ontology files of ontology parsers.

__init__(parser_name)[source]
Parameters:

parser_name (str)

display_new_downloader_config_as_yaml()[source]
Return type:

str

display_new_parser_config_as_yaml()[source]
Return type:

str

download_ontology_with_new_config()[source]

Download the ontology with the new configuration.

Returns:

Return type:

None

get_downloader_args_and_types()[source]

Get the types of the arguments of the kazu.ontology_preprocessing.downloads.OntologyDownloader class.

Return type:

dict[str, type]

get_downloader_args_and_vals()[source]

Get the arguments and their values of the configured kazu.ontology_preprocessing.downloads.OntologyDownloader class.

Return type:

dict[str, Any]

get_or_build_upgrade_report()[source]

Get the upgrade report if it exists, otherwise build it.

Returns:

Return type:

OntologyUpgradeReport

instantiate_parser_with_new_config()[source]

Instantiate a new parser with the new configuration.

Returns:

Return type:

OntologyParser

modify_downloader_cfg_with_new_args(kwargs)[source]

Modify the downloader configuration with the new arguments.

Parameters:

kwargs (dict[str, Any])

Returns:

Return type:

None

modify_parser_cfg_with_new_args()[source]

Modify the parser configuration with the new downloader configuration.

Returns:

Return type:

None

static name_to_parser_cfg()[source]

Get the names of the parsers and their configurations.

Returns:

Return type:

dict[str, DictConfig]

novel_df()[source]

Get the dataframe of the novel resources.

Returns:

Return type:

DataFrame | None

obsolete_df()[source]

Get the dataframe of the obsolete resources.

Returns:

Return type:

DataFrame | None

write_new_defaults_to_model_pack()[source]

Write the new default resources to the model pack.

Returns:

Return type:

Path