diff --git a/flow/project.py b/flow/project.py index 2a99e6d55..266d1cdc0 100644 --- a/flow/project.py +++ b/flow/project.py @@ -21,6 +21,7 @@ import textwrap import threading import time +import warnings from collections import Counter, defaultdict from copy import deepcopy from enum import IntFlag @@ -687,6 +688,13 @@ def __call__(self, func=None, /, *, directives=None): func The decorated function. """ + if directives is not None: + warnings.warn( + "The current directives (e.g. nranks, np) are deprecated as of flow 0.27. " + "When updating flow please look at the documentation for the new style " + "(https://docs.signac.io/en/latest/cluster_submission.html#submission-directives).", + DeprecationWarning, + ) if func is None: return functools.partial(self._internal_call, directives=directives) return self._internal_call(func, directives=directives) @@ -785,6 +793,13 @@ def __init__( submit_options="", run_options="", ): + if operation_directives is not None: + warnings.warn( + "The current directives (e.g. nranks, np) are deprecated as of flow 0.27. " + "When updating flow please look at the documentation for the new style " + "(https://docs.signac.io/en/latest/cluster_submission.html#submission-directives).", + DeprecationWarning, + ) self.name = name self.submit_options = submit_options self.run_options = run_options