gcubed.data.database_comparator
A class to compare two databases and identify differences.
DatabaseComparator( model_a_configuration: gcubed.model_configuration.ModelConfiguration, model_b_configuration: gcubed.model_configuration.ModelConfiguration)
Overview
This class is designed to compare the databases from two G-Cubed models and document the differences between them.
Initialize the DatabaseComparator with two G-Cubed models.
Arguments
model_a_configuration: the first model configuration.model_b_configuration: the second model_configuration.
model_a_configuration: gcubed.model_configuration.ModelConfiguration
Get the first model configuration.
model_b_configuration: gcubed.model_configuration.ModelConfiguration
Get the second model configuration.
variables_in_a_not_b: pandas.Index
Get the variables in model a but not in model b.
:return: The variables in model a but not in model b.
variables_in_b_not_a: pandas.Index
Get the variables in model b but not in model a.
:return: The variables in model b but not in model a.
variables_with_different_values: pandas.Index
Get the variables in both models that are not close in value.
Return
The variables in both models that are not close in value.
def
save_comparison_results(self, output_directory_path: pathlib.Path):
Save the comparison results to CSV files.
Arguments
output_directory: The directory to save the CSV files.