Skip to content

Commit

Permalink
Merge pull request #429 from ecmwf-ifs/naml-transform-convert-depreca…
Browse files Browse the repository at this point in the history
…tion

Loki-transform: Add deprecation message about custom entry points
  • Loading branch information
reuterbal authored Nov 6, 2024
2 parents b833fef + 39c542b commit 13aba08
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/loki_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 13aba08

Please sign in to comment.