From 39c542b7975429a35c5bde9a393be0188ff7d463 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Tue, 5 Nov 2024 14:43:06 +0000 Subject: [PATCH] Loki-transform: Add deprecation message about custom entry points --- scripts/loki_transform.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/loki_transform.py b/scripts/loki_transform.py index 2309d903e..f8e3b14b3 100644 --- a/scripts/loki_transform.py +++ b/scripts/loki_transform.py @@ -17,7 +17,7 @@ from loki import ( config as loki_config, Sourcefile, Frontend, as_tuple, - set_excepthook, auto_post_mortem_debugger, info + set_excepthook, auto_post_mortem_debugger, info, warning ) from loki.batch import Transformation, Pipeline, Scheduler, SchedulerConfig @@ -201,6 +201,12 @@ def convert( 'idem-lower', 'idem-lower-loop', 'cuda-parametrise', 'cuda-hoist' ] + # Add deprecation message to warn about future removal of non-config entry point. + # Once we're ready to force config-only mode, everything after this can go. + msg = '[Loki] [DEPRECATION WARNING] Custom entry points to loki-transform.py convert are deprecated.\n' + msg += '[Loki] Please provide a config file with configured transformation or pipelines instead.\n' + warning(msg) + # Pull dimension definition from configuration horizontal = scheduler.config.dimensions.get('horizontal', None) vertical = scheduler.config.dimensions.get('vertical', None)