-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
59 lines (56 loc) · 2.64 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: smart heating workflow
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 0,12 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: cdo
python-version: 3.9
channels: conda-forge,bioconda
allow-softlinks: true
channel-priority: flexible
show-channel-urls: true
use-only-tar-bz2: true
- name: Install packages
run: |
conda install cdo=1.9.10 s3fs=2021.8.1 pip=21.2.4 pandas=1.3.3 bokeh=2.3.3
conda list
# Runs a set of commands using the runners shell
- name: Fetch Hirlam FMI grib data, select area and convert to netCDF
run: |
python get_hirlam_FMI.py
cdo -f nc -t ecmwf copy -sellonlatbox,10,11,59,60 numerical-hirlam74-forecast-Temperature.grb2 numerical-hirlam74-forecast-Temperature.netcdf
- name: Start Galaxy workflow with planemo
run: |
python -m venv planemo
. planemo/bin/activate
pip install galaxy-tool-util==21.9.2 planemo==0.74.11
GALAXY_TAG=$(cat numerical-hirlam74-forecast-Temperature.txt)
planemo run af528de055395eae smart_heating.yml --galaxy_url https://usegalaxy.eu/ --galaxy_user_key ${{ secrets.GALAXY_API_KEY }} --history_name "smart heating" --tags "smart_heating,$GALAXY_TAG"
- name: Fetch and plot results from Galaxy history
run: |
pip install bioblend==0.18.0 click
python get_dataset_from_history.py --galaxy-server https://usegalaxy.eu/ --galaxy-user-key ${{ secrets.GALAXY_API_KEY }} --tags "smart_heating,$GALAXY_TAG" --dataset-name "Filter Tabular on data 5"
python plotting_temperature.py --in-file Filter_Tabular_on_data_5 --out-file plotting_temperature.html
- name: Commit changes to branch
run: |
git config --global user.name 'Anne Fouilloux'
git config --global user.email 'annefou@users.noreply.github.com'
git commit -am "Automated plotting $GALAXY_TAG"
git push