Skip to content

Commit 67044c2

Browse files
authored
Merge pull request #842 from wxtim/Document-extra-task-modifiers
Document new task modifiers in Cylc GUI/TUI
1 parent 082bd3b commit 67044c2

File tree

11 files changed

+53
-42
lines changed

11 files changed

+53
-42
lines changed

src/conf.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,31 @@
2626

2727
from cylc_release import CYLC_RELEASE
2828

29+
30+
def generate_task_icon_modifier_rst():
31+
"""Generate reStructuredText for task icon modifier shortcuts
32+
of assorted sizes.
33+
34+
Makes available `|task-<modifier>-<size>|` where
35+
* sizes are
36+
* "large"
37+
* "super" (superscript)
38+
* empty (default size)
39+
* Modifiers are defined by files in /img/task-job-icons/task-is*.png.
40+
"""
41+
rst = []
42+
for modifier in Path('img/task-job-icons').glob('task-is*.png'):
43+
modifier_name = modifier.stem.replace('task-is', '').lower()
44+
for size, height in {'-large': 60, '': 18, '-super': 24}.items():
45+
rst.append(
46+
f".. |task-{modifier_name}{size}| image:: /{str(modifier)}\n"
47+
f" :height: {height}px\n"
48+
f" :align: middle\n"
49+
f" :alt: {modifier_name} icon"
50+
)
51+
return '\n\n'.join(rst)
52+
53+
2954
# -- General configuration ------------------------------------------------
3055

3156
# Sphinx extension module names.
@@ -63,7 +88,8 @@
6388
rst_prolog = f"""
6489
.. |reserved_filenames| replace:: ``{'``, ``'.join(WorkflowFiles.RESERVED_NAMES)}``
6590
"""
66-
rst_epilog = open('hyperlinks.rst.include', 'r').read()
91+
92+
rst_epilog = open('hyperlinks.rst.include', 'r').read() + generate_task_icon_modifier_rst()
6793

6894
default_role = 'cylc:conf'
6995

@@ -300,3 +326,5 @@
300326
# Create sentence case versions of wordlist:
301327
sentence_case = [word.capitalize() for word in words]
302328
sentence_case_file.write_text('\n'.join(sentence_case) + '\n')
329+
330+

src/hyperlinks.rst.include

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -72,37 +72,6 @@
7272
:height: 18px
7373
:align: middle
7474

75-
76-
.. Task Modifiers (inline)
77-
78-
.. |task-held| image:: /img/task-job-icons/task-isHeld.png
79-
:height: 18px
80-
:align: middle
81-
82-
.. |task-runahead| image:: /img/task-job-icons/task-isRunahead.png
83-
:height: 18px
84-
:align: middle
85-
86-
.. |task-queued| image:: /img/task-job-icons/task-isQueued.png
87-
:height: 18px
88-
:align: middle
89-
90-
91-
.. Task Modifiers (inline with modifiers as superscript)
92-
93-
.. |task-held-super| image:: /img/task-job-icons/task-isHeld.png
94-
:height: 24px
95-
:align: middle
96-
97-
.. |task-runahead-super| image:: /img/task-job-icons/task-isRunahead.png
98-
:height: 24px
99-
:align: middle
100-
101-
.. |task-queued-super| image:: /img/task-job-icons/task-isQueued.png
102-
:height: 24px
103-
:align: middle
104-
105-
10675
.. Job Icons (inline)
10776

10877
.. |job-submitted| image:: /img/task-job-icons/job-submitted.png

src/img/info-view.xtriggers.png

51.9 KB
Loading
-10.9 KB
Loading
-8.2 KB
Loading
16 KB
Loading
-10.5 KB
Loading
17.7 KB
Loading
16.2 KB
Loading

src/reference/changes.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ Cylc 8.5
3636
:cylc-rose: `1.5 <https://github.com/cylc/cylc-rose/blob/master/CHANGES.md>`__
3737
:rose: `2.4 <https://github.com/metomi/rose/blob/master/CHANGES.md>`__
3838
39+
More task information in the GUI (and Tui)
40+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41+
42+
Task now icons in the GUI and TUI have badges for tasks waiting for:
43+
44+
* retries |task-retry|
45+
* xtriggers |task-xtriggered|
46+
* wallclock |task-wallclock|
47+
48+
Xtriggers, wallclock triggers, retry triggers and task run mode are now
49+
shown in the information view:
50+
51+
.. image:: ../img/info-view.xtriggers.png
52+
:align: center
53+
:width: 65%
3954

4055
Compatibility Mode
4156
^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)