Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github test runner #52

Merged
merged 12 commits into from
Nov 6, 2024
47 changes: 47 additions & 0 deletions .github/workflows/run_edps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run EDPS

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
run: |
sudo ./toolbox/install_dependencies_ubuntu.sh
# python3 -m venv metispipe
# . metispipe/bin/activate
export PYCPL_RECIPE_DIR="$(pwd)/metisp/pyrecipes/"
./toolbox/install_edps.sh
./toolbox/create_config.sh
- name: Fetch test data
run: |
git clone https://github.com/AstarVienna/METIS_Pipeline_Test_Data.git
- name: Run EDPS
run: |
# . metispipe/bin/activate
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/metis_sim_small_1/data"
export SOF_DIR="$(pwd)/METIS_Pipeline_Test_Data/metis_sim_small_1/sof"
pyesorex --recipes
pyesorex metis_det_lingain "${SOF_DIR}/metis_lm_lingain.sof"
edps -lw
edps -w metis.metis_lm_img_wkf -i $SOF_DATA -c
# edps -w metis.metis_lm_img_wkf -i $SOF_DATA -t metis_det_lingain
edps -w metis.metis_lm_img_wkf -i $SOF_DATA -t metis_det_detlin
edps -w metis.metis_lm_img_wkf -i $SOF_DATA
12 changes: 8 additions & 4 deletions toolbox/config/DOTedps/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ port=5000
# Comma-separated list of directories where workflows are installed.
# If not specified, EDPS will search for workflows in the pipeline installation tree.
# The naming convention for workflows is: <instrument>/<instrument>_wkf.py, e.g. espresso/espresso_wkf.py
workflow_dir=/home/metis/METIS_Pipeline/skeleton/workflows,/usr/share/esopipes/workflows/espdr-3.1.0/
# This is relative to the directory where you run the EDPS server.
workflow_dir=.

[executor]
# esorex is the command to execute pipeline recipes and it is installed with the pipeline.
Expand All @@ -30,7 +31,8 @@ genreport_path=genreport
# Example: ESPRESSO/bias/fbf31155-a731-47f5-abf2-6445adce6c4b/master_bias.fits
# Please make sure that this directory has enough disk space available for storing the pipeline products,
# and consider enabling automatic data cleaning in the [cleanup] section.
base_dir=/home/metis/EDPS_data
#base_dir=$HOME/EDPS_data
base_dir=/tmp/EDPS_data

# If true, a dummy command is executed instead of esorex
dummy=False
Expand Down Expand Up @@ -90,7 +92,8 @@ association_preference=raw_per_quality_level
# URL to ESO-provided list of calibration breakpoints.
#breakpoints_url=https://archive.eso.org/calselector/v1/breakpoints
# Copying the file locally makes it feasible to use EDPS without internet.
breakpoints_url=/home/metis/METIS_Pipeline/toolbox/config/breakpoints.json
#breakpoints_url=/home/metis/METIS_Pipeline/toolbox/config/breakpoints.json
breakpoints_url=

# Comma-separated list of workflows which should be combined together into one.
# This allows to submit data from different instruments to a single workflow "edps.workflow.meta_wkf"
Expand All @@ -105,7 +108,8 @@ truncate=False
local=True

# Path where the bookkeeping database should be stored.
path=/home/metis/EDPS_data/db.json
#path=$HOME/EDPS_data/db.json
path=/tmp/EDPS_data/db.json

# Type of bookkeeping database to use.
# Options: tiny, memory, caching
Expand Down
11 changes: 8 additions & 3 deletions toolbox/create_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ source "${script_dir}/set_environment.sh"
# Enter root of this checkout.
pushd "${script_dir}/.."

cp -av ./toolbox/config/DOTedps /home/metis/.edps
cp -av ./toolbox/config/DOTesorex /home/metis/.esorex
mkdir /home/metis/EDPS_data
mkdir -p "${HOME}/EDPS_data"
mkdir -p "/tmp/EDPS_data"
mkdir -p "${HOME}/.edps"
mkdir -p "${HOME}/.esorex"

cp -av ./toolbox/config/DOTedps/* "${HOME}/.edps"
cp -av ./toolbox/config/DOTesorex/* "${HOME}/.esorex"

17 changes: 17 additions & 0 deletions toolbox/install_dependencies_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apt-get update
apt-get install -y \
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 \
python3-astropy python3-matplotlib python3-numpy \
perl cmake \
graphviz meld \
python3-pip python3-full \
python3-jupyter-core python3-jupyter-client python3-notebook \
emacs vim nano
1 change: 0 additions & 1 deletion toolbox/install_edps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -Eeuo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)

# Run as normal user 'metis'
export PYCPL_RECIPE_DIR=$HOME/metis_pipeline/lib/esopipes-plugins
pip install --extra-index-url https://ftp.eso.org/pub/dfs/pipelines/libraries pycpl pyesorex edps adari_core