diff --git a/ted_sws/event_manager/adapters/event_handler.py b/ted_sws/event_manager/adapters/event_handler.py index 4e6089f3c..1333dc85f 100644 --- a/ted_sws/event_manager/adapters/event_handler.py +++ b/ted_sws/event_manager/adapters/event_handler.py @@ -113,7 +113,7 @@ def _prepare_message(cls, event_message: EventMessage): :return: None """ event_message.caller_name = cls._caller_name(event_message) - return str(event_message.dict()) + return str(event_message.model_dump()) def log(self, severity_level: SeverityLevelType, event_message: EventMessage, settings: EventMessageLogSettings = EventMessageLogSettings()): diff --git a/ted_sws/event_manager/adapters/event_logging_repository.py b/ted_sws/event_manager/adapters/event_logging_repository.py index 3b41ec7a1..c2c4eb77d 100644 --- a/ted_sws/event_manager/adapters/event_logging_repository.py +++ b/ted_sws/event_manager/adapters/event_logging_repository.py @@ -84,7 +84,7 @@ def prepare_record(cls, event_message: EventMessage) -> dict: :return: The event message dict """ - event_message_dict = event_message.dict() + event_message_dict = event_message.model_dump() for event_date_field_name in LOGGING_DATE_FIELD_NAMES: inject_date_string_fields(data=event_message_dict, date_field_name=event_date_field_name, date_string_fields_suffix_map=LOGGING_DATE_STRING_FIELDS_SUFFIX_MAP diff --git a/ted_sws/mapping_suite_processor/adapters/github_package_downloader.py b/ted_sws/mapping_suite_processor/adapters/github_package_downloader.py index b02a50a72..480fda707 100644 --- a/ted_sws/mapping_suite_processor/adapters/github_package_downloader.py +++ b/ted_sws/mapping_suite_processor/adapters/github_package_downloader.py @@ -74,5 +74,6 @@ def get_git_head_hash(git_repository_path: pathlib.Path) -> str: git_last_commit_hash = get_git_head_hash( git_repository_path=temp_dir_path / self.github_repository_name) downloaded_tmp_mapping_suite_path = temp_dir_path / self.github_repository_name / MAPPINGS_DIR_NAME + downloaded_tmp_mapping_suite_path.mkdir(exist_ok=True, parents=True) shutil.copytree(downloaded_tmp_mapping_suite_path, output_mapping_suite_package_path, dirs_exist_ok=True) return git_last_commit_hash diff --git a/ted_sws/mapping_suite_processor/services/conceptual_mapping_differ.py b/ted_sws/mapping_suite_processor/services/conceptual_mapping_differ.py index 3fc5b0be2..79116ebd2 100644 --- a/ted_sws/mapping_suite_processor/services/conceptual_mapping_differ.py +++ b/ted_sws/mapping_suite_processor/services/conceptual_mapping_differ.py @@ -202,17 +202,17 @@ def mapping_suite_diff_conceptual_mappings(mappings: List[ConceptualMapping]) -> "conceptual_mapping": MS_TRANSFORM_FOLDER_NAME + "/" + MS_CONCEPTUAL_MAPPING_FILE_NAME }, metadata=[ - mappings[0].metadata.dict(), - mappings[1].metadata.dict() + mappings[0].metadata.model_dump(), + mappings[1].metadata.model_dump() ] ) - mapping1: dict = mappings[0].dict() - mapping2: dict = mappings[1].dict() + mapping1: dict = mappings[0].model_dump() + mapping2: dict = mappings[1].model_dump() diff.data = transform_conceptual_mappings_diff_data(ConceptualMappingDiffData( original=DeepDiff(mapping1, mapping2, ignore_order=False) ), mapping1=mappings[0], mapping2=mappings[1]) - return diff.dict() + return diff.model_dump() def mapping_suite_diff_files_conceptual_mappings(filepaths: List[Path]) -> dict: