From b71ae0e236df21daab0e4ac496992e9755711621 Mon Sep 17 00:00:00 2001 From: eblondel Date: Mon, 13 May 2024 17:00:51 +0200 Subject: [PATCH] add deprecated handler warning when loading handler #386 --- R/initWorkflow.R | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/R/initWorkflow.R b/R/initWorkflow.R index 5ebc2d85..bde93489 100644 --- a/R/initWorkflow.R +++ b/R/initWorkflow.R @@ -276,6 +276,10 @@ initWorkflow <- function(file, dir = ".", jobDirPath = NULL, handleMetadata = TR x$source, x$handler)) md_dict_handler <- loadMetadataHandler(config, x, type = "dictionary") + if(md_dict_handler$status == "deprecated"){ + config$logger.warn(sprintf("Dictionary handler '%s' is deprecated. Notes: %s", + md_dict_handler$id, ifelse(nzchar(md_dict_handler$notes), md_dict_handler$notes, "-"))) + } config$logger.info("Execute handler to load dictionary data structures...") dict <- md_dict_handler$fun( handler = md_dict_handler, @@ -395,6 +399,10 @@ initWorkflow <- function(file, dir = ".", jobDirPath = NULL, handleMetadata = TR config$logger.info(sprintf("Loading metadata contacts from '%s' [with '%s' handler]...", x$source, x$handler)) md_contact_handler <- loadMetadataHandler(config, x, type = "contacts") + if(md_contact_handler$status == "deprecated"){ + config$logger.warn(sprintf("Contact handler '%s' is deprecated. Notes: %s", + md_contact_handler$id, ifelse(nzchar(md_contact_handler$notes), md_contact_handler$notes, "-"))) + } config$logger.info("Execute contact handler to load contacts...") contacts <- md_contact_handler$fun( handler = md_contact_handler, @@ -434,6 +442,10 @@ initWorkflow <- function(file, dir = ".", jobDirPath = NULL, handleMetadata = TR config$logger.info(sprintf("Loading metadata entities from '%s' [with '%s' handler]...", x$source, x$handler)) md_entity_handler <- loadMetadataHandler(config, x, type = "entities") + if(md_entity_handler$status == "deprecated"){ + config$logger.warn(sprintf("Entity handler '%s' is deprecated. Notes: %s", + md_entity_handler$id, ifelse(nzchar(md_entity_handler$notes), md_entity_handler$notes, "-"))) + } config$logger.info("Execute handler to load entities...") entities <- md_entity_handler$fun( handler = md_entity_handler,