Skip to content

Commit 627bb51

Browse files
authored
Merge branch 'CRPropa:master' into pions
2 parents d85b25e + 1dba43e commit 627bb51

34 files changed

+760
-1098
lines changed

.github/workflows/create_documentation.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,25 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
config:
12-
- name: "ubuntu-20"
13-
os: ubuntu-20.04
14-
cxx: "g++-9"
15-
cc: "gcc-9"
16-
fc: "gfortran-9"
17-
swig_builtin: "Off" #uses swig 4.0.1
12+
- name: "ubuntu-22"
13+
os: ubuntu-22.04
14+
cxx: "g++-11"
15+
cc: "gcc-11"
16+
fc: "gfortran-11"
17+
swig_builtin: "On" #uses swig 4.0.2
18+
py: "/usr/bin/python3" #python 3.10
1819

1920
# define steps to take
2021
steps:
2122
- name: Checkout repository
22-
uses: actions/checkout@v3
23-
- name: Python install
24-
uses: actions/setup-python@v4
25-
with:
26-
python-version: '3.9'
27-
cache: 'pip' # caching pip dependencies
23+
uses: actions/checkout@v4
2824
- name: Prerequirements
2925
run: |
3026
sudo apt-get update
3127
sudo apt-get install libmuparser-dev libhdf5-serial-dev libomp5 libomp-dev libfftw3-dev libcfitsio-dev lcov doxygen graphviz
3228
sudo apt-get install pandoc # do not only use pip to install pandoc, see https://stackoverflow.com/questions/62398231/building-docs-fails-due-to-missing-pandoc
3329
pip install -r doc/pages/example_notebooks/requirements.txt # load requirements for notebooks
34-
pip install sphinx sphinx_rtd_theme m2r2 nbsphinx breathe pandoc exhale # load requirements for documentation
30+
pip install sphinx sphinx_rtd_theme m2r2 nbsphinx lxml_html_clean breathe pandoc exhale # load requirements for documentation
3531
- name: Set up the build
3632
env:
3733
CXX: ${{ matrix.config.cxx }}
@@ -40,9 +36,7 @@ jobs:
4036
run: |
4137
mkdir build
4238
cd build
43-
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local \
44-
-DENABLE_PYTHON=True -DENABLE_TESTING=ON -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} \
45-
-DSIMD_EXTENSIONS=native -DBUILD_DOC=True -DENABLE_COVERAGE=True
39+
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DENABLE_PYTHON=True -DPython_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native -DPython_INSTALL_PACKAGE_DIR=/home/runner/.local/ -DBUILD_DOC=On -DENABLE_COVERAGE=On
4640
- name: Build CRPropa
4741
run: |
4842
cd build
@@ -63,7 +57,7 @@ jobs:
6357
make doc
6458
tar -zcvf documentation.tar.gz doc
6559
- name: archive documentation
66-
uses: actions/upload-artifact@v3
60+
uses: actions/upload-artifact@v4
6761
with:
6862
name: "documentation"
6963
path: |

.github/workflows/test_examples.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ jobs:
88
fail-fast: false
99
matrix:
1010
config:
11-
- name: "ubuntu-20"
12-
os: ubuntu-20.04
13-
cxx: "g++-9"
14-
cc: "gcc-9"
15-
fc: "gfortran-9"
16-
swig_builtin: "Off" #uses swig 4.0.1
17-
py: "/usr/bin/python3" #python 3.8
11+
- name: "ubuntu-22"
12+
os: ubuntu-22.04
13+
cxx: "g++-11"
14+
cc: "gcc-11"
15+
fc: "gfortran-11"
16+
swig_builtin: "On" #uses swig 4.0.2
17+
py: "/usr/bin/python3" #python 3.10
1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
- name: Preinstall
2222
run: |
2323
sudo apt-get update
24-
sudo apt-get install libmuparser-dev python3-dev python-dev python3-numpy python-numpy python3-setuptools python-setuptools libhdf5-serial-dev libomp5 libomp-dev libfftw3-dev libcfitsio-dev lcov
24+
sudo apt-get install libmuparser-dev python3 python3-dev python3-numpy python3-setuptools python-setuptools libhdf5-serial-dev libomp5 libomp-dev libfftw3-dev libcfitsio-dev lcov
2525
pip3 install -r doc/pages/example_notebooks/requirements.txt # load requrements for notebooks
2626
pip3 install --upgrade Pygments
2727
pip3 install --upgrade numpy
@@ -33,14 +33,14 @@ jobs:
3333
run: |
3434
mkdir build
3535
cd build
36-
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DENABLE_PYTHON=True -DPYTHON_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=Off -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
36+
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DENABLE_PYTHON=True -DPython_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=Off -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native -DPython_INSTALL_PACKAGE_DIR=/home/runner/.local/
3737
- name: Build CRPropa
3838
run: |
3939
cd build
4040
make install -j
4141
- name: convert notebooks to python
4242
env:
43-
PYTHONPATH: "/home/runner/.local/lib/python3.8/site-packages/"
43+
PYTHONPATH: "/home/runner/.local"
4444
runfolder: "/home/runner/notebook_run"
4545
run: |
4646
mkdir "$runfolder"
@@ -58,7 +58,7 @@ jobs:
5858
done
5959
- name: run all python scripts
6060
env:
61-
PYTHONPATH: "$/home/runner/.local/lib/python3.8/site-packages/"
61+
PYTHONPATH: "/home/runner/.local"
6262
runfolder: "/home/runner/notebook_run"
6363
run: |
6464
cp doc/pages/example_notebooks/galactic_lensing/crpropa_output.txt "$runfolder"/

.github/workflows/testing_OSX.yaml renamed to .github/workflows/testing_OSX.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ jobs:
77
fail-fast: false
88
matrix:
99
config:
10-
- name: "macos-11"
11-
os: macos-11
10+
- name: "macos-14"
11+
os: macos-14
1212
cxx: "clang++"
1313
cc: "clang"
1414
fc: "gfortran-11"
1515
swig_builtin: "On" #uses swig 4.0.2
16-
py: "/usr/bin/python"
16+
py: "/usr/bin/python3"
1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
- name: Preinstall
2121
run: |
22-
brew install hdf5 fftw cfitsio muparser libomp
22+
brew install hdf5 fftw cfitsio muparser libomp numpy swig
2323
- name: Set up the build
2424
env:
2525
CXX: ${{ matrix.config.cxx }}
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
mkdir build
3131
cd build
32-
cmake .. -DENABLE_PYTHON=True -DPYTHON_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=avx
32+
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS="none"
3333
- name: Build CRPropa
3434
run: |
3535
cd build
@@ -42,7 +42,7 @@ jobs:
4242
make test
4343
- name: Archive test results
4444
if: always()
45-
uses: actions/upload-artifact@v3
45+
uses: actions/upload-artifact@v4
4646
with:
4747
name: "test-report_${{matrix.config.name}}"
4848
path: build/Testing/Temporary/LastTest.log

.github/workflows/testing.yml renamed to .github/workflows/testing_ubuntu20.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: crpropa-testing
1+
name: crpropa-testing_ubuntu20
22
on: [push, pull_request]
33

44
jobs:
@@ -17,7 +17,7 @@ jobs:
1717
py: "/usr/bin/python3" #python 3.8
1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
- name: Preinstall
2222
run: |
2323
sudo apt-get update
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
mkdir build
3232
cd build
33-
cmake .. -DENABLE_PYTHON=True -DPYTHON_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
33+
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
3434
- name: Build CRPropa
3535
run: |
3636
cd build
@@ -41,7 +41,7 @@ jobs:
4141
make test
4242
- name: Archive test results
4343
if: always()
44-
uses: actions/upload-artifact@v3
44+
uses: actions/upload-artifact@v4
4545
with:
4646
name: "test-report_${{matrix.config.name}}"
4747
path: build/Testing/Temporary/LastTest.log

.github/workflows/testing_ubuntu22.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
py: "/usr/bin/python3" #python 3.10
1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
- name: Preinstall
2222
run: |
2323
sudo apt-get update
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
mkdir build
3232
cd build
33-
cmake .. -DENABLE_PYTHON=True -DPYTHON_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
33+
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DPython_EXECUTABLE=${{ matrix.config.py }} -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
3434
- name: Build CRPropa
3535
run: |
3636
cd build
@@ -41,7 +41,7 @@ jobs:
4141
make test
4242
- name: Archive test results
4343
if: always()
44-
uses: actions/upload-artifact@v3
44+
uses: actions/upload-artifact@v4
4545
with:
4646
name: "test-report_${{matrix.config.name}}"
4747
path: build/Testing/Temporary/LastTest.log

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
### Bug fixes:
44
* Fixed sign for exponential decay of magn. field strength with Galactic height in LogarithmicSpiralField
5+
* Fixed r term in source distribution for SNR and Pulsar
6+
* Fixed wrong mass inheritance for secondaries other than nuclei or electron/positron
57

68
### New features:
9+
* Added new backwards-compatible function particleMass that returns particle mass also for non-nuclei
710

811
### Interface changes:
912

1013
### Features that are deprecated and will be removed after this release
14+
* EBL model from Finke et al. 2022
1115

1216
### Removed features
1317
* AMRMagneticField - underlying library (saga) is no longer supported.

0 commit comments

Comments
 (0)