Skip to content

Commit

Permalink
Switch unicode chars for output display.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Apr 5, 2024
1 parent f9bfdeb commit 8f703ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 6 additions & 4 deletions cylc/flow/task_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions cylc/flow/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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\.]+)')

Expand Down

0 comments on commit 8f703ed

Please sign in to comment.