Note: We recommend developing in a Conda environment as this provides a more standard setup though if you ensure the non-python dependencies are installed correctly you can bypass this.
Install Conda Deps:
The cylc-flow Conda dependencies are in the cylc-flow repository https://github.com/cylc/cylc-flow/blob/master/conda-environment.yml
(note optional dependencies are commented out)
Create a new Conda environment containing the cylc-flow deps
(and configurable-http-proxy
if working with JupyterHub):
conda create -n cylc-8-dev python=3.7 configurable-http-proxy -f conda-environment.yml
Install Python Projects
Install cylc/cylc-flow and optionally:
# clone the git repository locally then...
pip install -e "path/to/repo[all]"
Install cylc/cylc-ui.
Note: We prefer
yarn
.
cd path/to/cylc-ui
yarn install
Point Cylc Hub at your UI build
The Cylc UI comes bundled with the UI Server.
If you want to develop the UI you will need to point the UI Server at your local UI build:
# ~/.cylc/hub/jupyter_config.py
c.CylcUIServer.ui_build_dir = '~/cylc-ui/dist' # path to build
(see the cylc-uiserver README for more information)
Build The UI
yarn run build:watch
(see the cylc-ui README for more information)
Launch the UI
# standalone
cylc gui
# via Jupyter Hub
cylc hub
# You will be asked to log in with your desktop credentials if you have not
# done so before.
(see the cylc-uiserver README for more information)
Create a basic Cylc workflow:
mkdir -p ~/cylc-run/foo
cat > ~/cylc-run/foo/flow.cylc <<__HERE__
[scheduling]
# a cycling workflow where the cycles are numbered as integers
cycling mode = integer
initial cycle point = 1
[[graph]]
# tasks which run in each cycle until you stop the workflow
P1 = """
# a => b means "b should wait until a has run"
# [-P1] means "from the previous cycle"
b[-P1] => a => b => c
"""
__HERE__
Run the workflow:
cylc play foo
Watch it run on the CLI:
cylc tui foo
Stop it:
(otherwise it will just keep running forever)
cylc stop foo