Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cg-laser committed Jan 26, 2023
2 parents c9946c8 + 69a50af commit dc29319
Show file tree
Hide file tree
Showing 154 changed files with 8,805 additions and 5,610 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_and_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- name: Get the master branch (for checks)
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
with:
ref: 'refs/heads/master'

- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
Expand All @@ -28,11 +28,11 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install poetry
run: |
python -m pip install --upgrade pip
pip install poetry
pip install poetry
# poetry recommends using curl to install - probably doesn't make a difference though?
- name: Check if version is updated
run: |
Expand All @@ -47,14 +47,14 @@ jobs:
- name: Build NuRadioMC # let's always build - maybe this will occasionally catch errors
run: poetry build

- name: Publish distribution 📦 to Test PyPI
if: ${{ github.ref == 'refs/heads/master'}} # only runs if the push is to master
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution 📦 to PyPI
if: ${{ github.ref == 'refs/heads/master'}} # only runs if the push is to master
uses: pypa/gh-action-pypi-publish@master
Expand Down
31 changes: 25 additions & 6 deletions .github/workflows/deploy_documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
name: Deploy Documentation

on: push
on: [push, pull_request]
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
runtests: ${{ steps.check.outputs.runtests }}
steps:
- id: check
run: |
output='false'
if [[ "${{ github.event_name }}" != pull_request ]]
then
runtests='true'
elif [[ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.event.pull_request.base.repo.full_name }}" ]]
then
runtests='true'
fi
echo "runtests=${runtests}" >> $GITHUB_OUTPUT
build:
needs: [prepare]
if: needs.prepare.outputs.runtests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.4.0 # get the develop branch
- uses: actions/checkout@v3 # get the develop branch
with:
ref: 'refs/heads/develop'
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
Expand Down Expand Up @@ -66,7 +85,7 @@ jobs:
- name: Deploy 🚀
if: ${{ github.ref == 'refs/heads/develop'}} # only runs if the push is to develop
uses: JamesIves/github-pages-deploy-action@4.1.6
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: documentation/build/html # The folder the action should deploy.
59 changes: 48 additions & 11 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
name: Unit tests

on: [push]
on: [push, pull_request]

jobs:
build:

prepare:
runs-on: ubuntu-latest
outputs:
runtests: ${{ steps.check.outputs.runtests }}
steps:
- id: check
run: |
output='false'
if [[ "${{ github.event_name }}" != pull_request ]]
then
runtests='true'
elif [[ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.event.pull_request.base.repo.full_name }}" ]]
then
runtests='true'
fi
echo "runtests=${runtests}" >> $GITHUB_OUTPUT
build:
needs: [prepare]
if: needs.prepare.outputs.runtests
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
Expand All @@ -32,98 +50,117 @@ jobs:
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
- 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 --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics --exit-zero
- 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: "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 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_emitter_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 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"
- 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
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Everyone is invited to contribute and use the software for their experiment.
If you intend to contribute significantly to NuRadioMC or NuRadioReco, please contact @anelles and @cg-laser so that we
are informed about ongoing activities. Both will also be able to provide commit access to the repository. You can of course also use the github tools to do so.

For a more extensive guide on how to contribute to NuRadioMC, consult our online documentation at https://nu-radio.github.io/NuRadioMC/Introduction/pages/contributing.html.

* Workflow

If you work with NuRadioMC/Reco and you encounter a problem that you CANNOT solve, please file an issue.
Expand Down
Loading

0 comments on commit dc29319

Please sign in to comment.