From 8f703ed98c260738c72957bc400d8d275b9ed357 Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Fri, 5 Apr 2024 12:59:02 +1300 Subject: [PATCH] Switch unicode chars for output display. --- cylc/flow/cfgspec/workflow.py | 2 +- cylc/flow/task_outputs.py | 10 ++++++---- cylc/flow/util.py | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cylc/flow/cfgspec/workflow.py b/cylc/flow/cfgspec/workflow.py index eda47de9ca9..44fda4dfa1e 100644 --- a/cylc/flow/cfgspec/workflow.py +++ b/cylc/flow/cfgspec/workflow.py @@ -1000,7 +1000,7 @@ def get_script_common_text(this: str, example: Optional[str] = None): Define the condition for task output completion. The completion condition is evaluated when a task attains - a final status - i.e., once it finished executing (``succeeded`` + a final status - i.e. once it finished executing (``succeeded`` or ``failed``) or it ``submit-failed``, or ``expired``. It is a validation check which confirms that the task has generated the outputs it was expected to. diff --git a/cylc/flow/task_outputs.py b/cylc/flow/task_outputs.py index 2e2d6f9b72e..44902581fe9 100644 --- a/cylc/flow/task_outputs.py +++ b/cylc/flow/task_outputs.py @@ -439,6 +439,7 @@ def color_wrap(string, is_complete): ret: List[str] = [] indent_level: int = 0 op: Optional[str] = None + fence = '⦙' # U+2999 (dotted fence) for part in RE_EXPR_SPLIT.split(self._completion_expression): if not part.strip(): continue @@ -450,18 +451,19 @@ def color_wrap(string, is_complete): elif part == '(': if op: ret.append( - f' |{_gutter}{(indent_space * indent_level)}' + f' {fence}{_gutter}{(indent_space * indent_level)}' f'{op} {part}' ) else: ret.append( - f' |{_gutter}{(indent_space * indent_level)}{part}' + f' {fence}{_gutter}' + f'{(indent_space * indent_level)}{part}' ) indent_level += 1 elif part == ')': indent_level -= 1 ret.append( - f' |{_gutter}{(indent_space * indent_level)}{part}' + f' {fence}{_gutter}{(indent_space * indent_level)}{part}' ) else: @@ -470,7 +472,7 @@ def color_wrap(string, is_complete): ] is_complete = self._is_compvar_complete(part) _pre = ( - f'{color_wrap(_symbol, is_complete)} |' + f'{color_wrap(_symbol, is_complete)} {fence}' f'{_gutter}{(indent_space * indent_level)}' ) if op: diff --git a/cylc/flow/util.py b/cylc/flow/util.py index 14c2cbb9a1b..4f38d32d98f 100644 --- a/cylc/flow/util.py +++ b/cylc/flow/util.py @@ -29,8 +29,9 @@ Tuple, ) - -BOOL_SYMBOLS: List[str] = ['x', '✓'] +# U+2713 (check) +# U+2A2F (vector cross product) +BOOL_SYMBOLS: List[str] = ['⨯', '✓'] _NAT_SORT_SPLIT = re.compile(r'([\d\.]+)')