-
Notifications
You must be signed in to change notification settings - Fork 2
140 lines (124 loc) · 5.87 KB
/
run_edps_cached.yaml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Run tests cached
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# Run every day at 2:00 UTC
- cron: "0 2 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies with cache
id: cache-dep
uses: awalsh128/cache-apt-pkgs-action@latest
env:
cache-name: cache-dependencies
with:
packages: wget gcc automake autogen libtool gsl-bin libgsl-dev libfftw3-bin libfftw3-dev fftw-dev
curl bzip2 less subversion git cppcheck lcov valgrind
zlib1g zlib1g-dev
liberfa1 liberfa-dev
libcurl4-openssl-dev libcurl4
tmux ripgrep file
libcfitsio-bin libcfitsio-dev
wcslib-dev wcslib-tools
libcpl-dev
libblas3
perl cmake
graphviz meld
emacs vim nano
version: 1.0
# execute_install_scripts: true
- name: Setup edps cache
id: cache-pip
uses: actions/setup-python@v5
with:
python-version: '3.12.3'
cache: 'pip' # caching pip dependencies
- name: Install edps with cache
run: |
export PYCPL_RECIPE_DIR="$(pwd)/metisp/pyrecipes/"
pip install -r ./toolbox/requirements.txt
- name: Setup edps config
run: ./toolbox/create_config.sh
- name: Fetch test data
run: |
git clone https://github.com/AstarVienna/METIS_Pipeline_Test_Data.git
# Try to checkout a branch in METIS_Pipeline_Test_Data that has
# the same name as the branch in METIS_Pipeline that we are testing.
git -C METIS_Pipeline_Test_Data checkout "${GITHUB_HEAD_REF}" || true
- name: Run pytest tests
run: |
set +x
# . metispipe/bin/activate
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/blas:/usr/lib/x86_64-linux-gnu/lapack:$LD_LIBRARY_PATH
export PYESOREX_PLUGIN_DIR="$(pwd)/metisp/pyrecipes/"
export PYCPL_RECIPE_DIR="$(pwd)/metisp/pyrecipes/"
export PYTHONPATH="$(pwd)/metisp/pymetis/src/"
export SOF_DATA="$(pwd)/METIS_Pipeline_Test_Data/small202402/outputSmall/"
export SOF_DIR="$(pwd)/METIS_Pipeline_Test_Data/small202402/sofFiles/"
export PYESOREX_OUTPUT_DIR="$SOF_DATA"
python -m pytest -s
- name: Run pyESOREX test
run: |
set +x
# . metispipe/bin/activate
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/blas:/usr/lib/x86_64-linux-gnu/lapack:$LD_LIBRARY_PATH
export PYESOREX_PLUGIN_DIR="$(pwd)/metisp/pyrecipes/"
export PYCPL_RECIPE_DIR="$(pwd)/metisp/pyrecipes/"
export PYTHONPATH="$(pwd)/metisp/pymetis/src/"
export SOF_DATA="$(pwd)/METIS_Pipeline_Test_Data/small202402/outputSmall/"
export SOF_DIR="$(pwd)/METIS_Pipeline_Test_Data/small202402/sofFiles/"
export PYESOREX_OUTPUT_DIR="$SOF_DATA"
# LIST RECIPES
pyesorex --recipes
# DET RECIPES
pyesorex metis_det_lingain "${SOF_DIR}/metis_det_lingain.lm.sof"
pyesorex metis_det_dark "${SOF_DIR}/metis_det_dark.lm.sof"
# IMG LM RECIPES
pyesorex metis_lm_img_distortion "${SOF_DIR}/metis_lm_img_distortion.sof"
pyesorex metis_lm_img_flat "${SOF_DIR}/metis_lm_img_flat.lamp.sof"
pyesorex metis_lm_img_basic_reduce "${SOF_DIR}/metis_lm_img_basic_reduce.std.sof"
pyesorex metis_lm_img_basic_reduce "${SOF_DIR}/metis_lm_img_basic_reduce.sci.sof"
pyesorex metis_lm_img_basic_reduce "${SOF_DIR}/metis_lm_img_basic_reduce.sky.sof"
pyesorex metis_lm_img_background "${SOF_DIR}/metis_lm_img_background.std.sof"
pyesorex metis_lm_img_background "${SOF_DIR}/metis_lm_img_background.sci.sof"
pyesorex metis_lm_img_std_process "${SOF_DIR}/metis_lm_img_std_process.sof"
pyesorex metis_lm_img_calibrate "${SOF_DIR}/metis_lm_img_calibrate.sof"
pyesorex metis_lm_img_sci_postprocess "${SOF_DIR}/metis_lm_img_sci_postprocess.sof"
# IFU RECIPES
pyesorex metis_ifu_distortion "${SOF_DIR}/metis_ifu_distortion.sof"
pyesorex metis_ifu_wavecal "${SOF_DIR}/metis_ifu_wavecal.sof"
pyesorex metis_ifu_rsrf "${SOF_DIR}/metis_ifu_rsrf.sof"
pyesorex metis_ifu_reduce "${SOF_DIR}/metis_ifu_reduce.std.sof"
pyesorex metis_ifu_reduce "${SOF_DIR}/metis_ifu_reduce.sci.sof"
pyesorex metis_ifu_telluric "${SOF_DIR}/metis_ifu_telluric.std.sof"
pyesorex metis_ifu_telluric "${SOF_DIR}/metis_ifu_telluric.sci.sof"
pyesorex metis_ifu_calibrate "${SOF_DIR}/metis_ifu_calibrate.sof"
pyesorex metis_ifu_postprocess "${SOF_DIR}/metis_ifu_postprocess.sof"
# CAL RECIPES
pyesorex metis_cal_chophome "${SOF_DIR}/metis_cal_chophome.sof"
# PUPIL IMAGING
pyesorex metis_pupil_imaging "${SOF_DIR}/metis_pupil_imaging.lm.sof"
- name: Run EDPS
run: |
# . metispipe/bin/activate
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/blas:/usr/lib/x86_64-linux-gnu/lapack:$LD_LIBRARY_PATH
export PYESOREX_PLUGIN_DIR="$(pwd)/metisp/pyrecipes/"
export PYCPL_RECIPE_DIR="$(pwd)/metisp/pyrecipes/"
export PYTHONPATH="$(pwd)/metisp/pymetis/src/"
export SOF_DATA="$(pwd)/METIS_Pipeline_Test_Data/small202402/outputSmall/"
export SOF_DIR="$(pwd)/METIS_Pipeline_Test_Data/small202402/sofFiles/"
edps -lw
edps -w metis.metis_wkf -i $SOF_DATA -c
edps -w metis.metis_wkf -i $SOF_DATA -lt
edps -w metis.metis_wkf -i $SOF_DATA -m all | tee edps.stdout.txt
! grep "'FAILED'" edps.stdout.txt