add page for LOFAR and experiment-specific features #4394
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
python_version: | |
description: Specify Python version to run tests on | |
type: string | |
required: true | |
default: '3.7' | |
os: | |
description: OS to run tests on | |
type: string | |
default: ubuntu-latest | |
workflow_call: | |
inputs: | |
python_version: | |
description: Specify Python version to run tests on | |
type: string | |
required: true | |
default: '3.7' | |
os: | |
description: OS to run tests on | |
type: string | |
default: ubuntu-latest | |
env: # set the python_version to 3.7 if the workflow is not triggered by workflow_call or workflow_dispatch | |
PYTHON_VERSION: ${{ inputs.python_version || '3.7' }} | |
jobs: | |
build: | |
runs-on: ${{ inputs.os || 'ubuntu-latest' }} | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python [${{ env.PYTHON_VERSION }}] | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('NuRadioMC/test/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libgsl-dev | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
export GSLDIR=$(gsl-config --prefix) | |
python install_dev.py --install --no-interactive | |
pip uninstall numba -y # easiest way to test ARZ without numba | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Lint with flake8 (important) | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
- name: Lint with flake8 (unimportant) | |
run: | | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics --exit-zero | |
- name: "RNO-G Detector" | |
if: always() | |
run: | | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
python NuRadioReco/detector/test/test_rnog_detector.py | |
- name: "detector.Response" | |
if: always() | |
run: | | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
python NuRadioReco/detector/test/test_response.py | |
- name: "RNO-G data reader" | |
if: always() | |
run: | | |
pip install git+https://github.com/RNO-G/mattak.git | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioReco/test/RNO_G/test_read_rnog_data.sh | |
- name: "Single event test (South Pole)" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/SingleEvents/test_build.sh | |
- name: Single event test (Moore's Bay) | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/SingleEvents/validate_MB.sh | |
- name: Single event test (ARZ) | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/SingleEvents/validate_ARZ.sh | |
- name: Test Numba version of ARZ | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
pip install numba | |
NuRadioMC/test/SingleEvents/validate_ARZ.sh | |
- name: Signal generation test | |
if: always() | |
run : | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/SignalGen/test_build.sh | |
- name: "Validate separate trigger channels" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/SingleEvents/validate_separate_trigger_channels.sh | |
- name: "Signal propagation tests" | |
if: always() | |
run: | | |
export PYTHONPATH=$PWD:$PYTHONPATH | |
export GSLDIR=$(gsl-config --prefix) | |
NuRadioMC/test/SignalProp/run_signal_test.sh | |
- name: "Test ray tracing modules" | |
if: always() | |
run: | | |
export PYTHONPATH=$PWD:$PYTHONPATH | |
export GSLDIR=$(gsl-config --prefix) | |
python NuRadioMC/SignalProp/examples/ray_tracing_modules.py | |
- name: "Test Birefringence" | |
if: always() | |
run: | | |
export PYTHONPATH=$PWD:$PYTHONPATH | |
export GSLDIR=$(gsl-config --prefix) | |
NuRadioMC/test/SignalProp/run_birefringence_tests.sh | |
- name: "Test Veff example" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
python install_dev.py --dev proposal --no-interactive | |
NuRadioMC/test/examples/test_veff_example.sh | |
- name: "Test calibration pulser example" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/examples/test_cal_pulser_example.sh | |
- name: "Test radio emitter pulser example" | |
if: always() | |
run: | | |
export PYTHONPATH=$PWD:$PYTHONPATH | |
export GSLDIR=$(gsl-config --prefix) | |
NuRadioMC/test/examples/test_radio_emitting_pulser_example.sh | |
- name: "Test webinar examples" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/examples/test_webinar.sh | |
- name: "Veff test" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/Veff/1e18eV/test_build.sh | |
- name: "Veff test with noise and phased array" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/Veff/1e18eV/test_build_noise.sh | |
- name: "Atmospheric Aeff test" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioMC/test/atmospheric_Aeff/1e18eV/test_build.sh | |
- name: "Tiny reconstrucution" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioReco/test/tiny_reconstruction/testTinyReconstruction.sh | |
- name: "Trigger tests" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioReco/test/trigger_tests/run_trigger_test.sh | |
- name: "Test all examples" | |
if: always() | |
run: | | |
export GSLDIR=$(gsl-config --prefix) | |
export PYTHONPATH=$(pwd):$PYTHONPATH | |
NuRadioReco/test/test_examples.sh |