Skip to content

Commit b781d3c

Browse files
committed
Upgrade Cylc Review to Python 3
1 parent 2df63c7 commit b781d3c

File tree

30 files changed

+1168
-582
lines changed

30 files changed

+1168
-582
lines changed

.github/workflows/test.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ jobs:
5454
coreutils
5555
5656
- name: install cylc-flow
57-
uses: cylc/release-actions/install-cylc-components@v1
57+
uses: wxtim/release-actions/install-cylc-components@v1
5858
with:
5959
cylc_flow: true
6060
cylc_flow_opts: ''
61+
editable_installations: true
6162

6263
- name: install cylc-uiserver
6364
run: pip install -e .[all]
@@ -76,8 +77,30 @@ jobs:
7677
- name: Test
7778
run: pytest
7879

80+
- name: Cylc Review tests
81+
run: |
82+
CONF_PATH="$HOME/.cylc/flow/8"
83+
mkdir -p "$CONF_PATH"
84+
touch "$CONF_PATH/global.cylc"
85+
ln -s "$CONF_PATH/global.cylc" "$CONF_PATH/global-tests.cylc"
86+
87+
cat >> "$CONF_PATH/global.cylc" <<__HERE__
88+
[platforms]
89+
[[_local_background_indep_tcp]]
90+
hosts = localhost
91+
install target = localhost
92+
ssh command = ssh -oBatchMode=yes -oConnectTimeout=8 -oStrictHostKeyChecking=no
93+
__HERE__
94+
95+
# Check that Cylc Review is ready to run
96+
export CYLC_COVERAGE=1
97+
cylc review --help || exit 1
98+
99+
./etc/bin/run-functional-tests
100+
79101
- name: Coverage report
80102
run: |
103+
coverage combine
81104
coverage xml --ignore-errors
82105
coverage report
83106

cylc/uiserver/cylc_review/template/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
{% if logo -%}
1616
<img {{logo}} />
1717
{% endif -%}
18+
{% if jupythub_base %}
19+
<a href="{{jupythub_base}}">Return to Cylc GUI</a>
20+
{% endif %}
1821
<h1>{{title}} <small>@ {{host}}</small></h1>
1922
<p>Browse User Suite-logs on HTTP</p>
2023
<p class="pull-right"><small>Cylc {{cylc_version}}</small></p>

cylc/uiserver/cylc_review/template/suite-base.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
<span class="icon-bar"></span>
3030
<span class="icon-bar"></span>
3131
</button>
32+
33+
{% if jupythub_base %}
34+
<a class="navbar-brand" href="{{jupythub_base}}">Cylc GUI</a>
35+
<div class="navbar-brand">|</div>
36+
{% endif %}
3237
<a class="navbar-brand" href="{{script}}/">
3338
{% if logo -%}
3439
<img {{logo}} />

cylc/uiserver/cylc_review/template/suites.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<span class="icon-bar"></span>
2525
<span class="icon-bar"></span>
2626
</button>
27+
{% if jupythub_base %}
28+
<a class="navbar-brand" href="{{jupythub_base}}">Cylc GUI</a>
29+
<div class="navbar-brand">|</div>
30+
{% endif %}
2731
<a class="navbar-brand" href="{{script}}/">
2832
{% if logo -%}
2933
<img {{logo}} />

cylc/uiserver/jupyter_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
)
2525
from cylc.uiserver.app import USER_CONF_ROOT
2626
from cylc.uiserver.authorise import CylcAuthorizer
27+
from cylc.uiserver.ws import get_review_service_config
2728

2829

2930
# the command the hub should spawn (i.e. the cylc uiserver itself)
@@ -104,3 +105,7 @@
104105
# Lab as a result of being granted the ``access:servers`` permission in Jupyter
105106
# Hub.
106107
c.ServerApp.authorizer_class = CylcAuthorizer
108+
109+
110+
# Setup Cylc Review
111+
c.JupyterHub.services = [get_review_service_config()]

0 commit comments

Comments
 (0)