Skip to content
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6e9fd02
move header to subfolder for consistency with other externals libs
rafaelab Jul 4, 2026
d350902
move header to subfolder for consistency with other externals libs
rafaelab Jul 4, 2026
1ad42a8
minor style changes
rafaelab Jul 4, 2026
419701e
minor style changes
rafaelab Jul 4, 2026
8613022
change path of zlib headers for consistency with other external libra…
rafaelab Jul 4, 2026
1f3cf19
change path of zlib headers for consistency with other external libra…
rafaelab Jul 4, 2026
605d8ad
expose external libs headers and libraries + style changes
rafaelab Jul 4, 2026
f992959
improve test implementation through functions
rafaelab Jul 4, 2026
042197c
clean up CRPropa finder
rafaelab Jul 5, 2026
4876eea
change case of filename
rafaelab Jul 5, 2026
79a18fc
major improvements in cmake for plugins
rafaelab Jul 5, 2026
f2224b6
add a helper CRPropa finder (fallback)
rafaelab Jul 5, 2026
46c2b39
enforce CRPropa code style
rafaelab Jul 5, 2026
8dbab3d
minor changes to README
rafaelab Jul 5, 2026
71780a8
remove gtest source in favour of the version shipped with CRPropa
rafaelab Jul 5, 2026
7d4aaca
use CRPropa's gtest
rafaelab Jul 5, 2026
a9f895c
fix typo
rafaelab Jul 7, 2026
f96863e
fix bug affecting variants in some systems
rafaelab Jul 7, 2026
b8481f0
update changelog
rafaelab Jul 7, 2026
1b9ba74
update changelog
rafaelab Jul 7, 2026
e7fcbd3
Merge branch 'master' into pluginImprovements
rafaelab Jul 7, 2026
ba192cd
use indentantion consistently
rafaelab Jul 7, 2026
af505d7
update name of cmake option: USE_CRPROPA_BUILTIN to USE_OWN_CRPROPA
rafaelab Jul 7, 2026
b04d79b
fix problem in indentation
rafaelab Jul 7, 2026
341b9c5
re-introduce pybind11 stubgen
rafaelab Jul 7, 2026
e081125
implement comments by @JanNiklasB
rafaelab Jul 7, 2026
106c236
fix typos
rafaelab Jul 7, 2026
c9619c0
remove misleading comment
rafaelab Jul 7, 2026
acd3f2f
remove duplicate code
rafaelab Jul 8, 2026
7db28a1
remove some redundant code and improve organisation
rafaelab Jul 8, 2026
6bd9a13
check for gtest installation and ensure compatibility with versions <…
rafaelab Jul 8, 2026
6bb28d4
implement suggestions by @JanNiklasB
rafaelab Jul 8, 2026
e295b8f
fix tests in conda installation
rafaelab Jul 8, 2026
03b4549
implement variable to correctly point to test paths
rafaelab Jul 8, 2026
e52caf1
Merge branch 'master' into pluginImprovements
rafaelab Jul 8, 2026
fdce373
fix bug running tests
rafaelab Jul 8, 2026
8067fb6
simplify gtest handling (for earlier CRPropa versions)
rafaelab Jul 8, 2026
6df5f5b
address comments by @JanNiklasB
rafaelab Jul 8, 2026
4332128
remove , since this is for C++ < 11
rafaelab Jul 9, 2026
b4b0c8a
coverage was not being set / used in the plugin
rafaelab Jul 9, 2026
34a29a0
fix minor bug with debug build flags
rafaelab Jul 9, 2026
435a0c2
make gtest finder compatible with older CRPropa versions
rafaelab Jul 9, 2026
89af5a3
fix problems with gtest when using
rafaelab Jul 9, 2026
0949fb5
re-add cmake flags to support older versions
rafaelab Jul 9, 2026
1a2a3a9
fix gtests, making it generic across CRPropa versions and systems
rafaelab Jul 9, 2026
5060e8e
optionally enable/disable pybind11-stugen
rafaelab Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 47 additions & 47 deletions .github/workflows/testing_plugin-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
cd plugin-template
mkdir build
cd build
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS="none" -DUSE_CRPROPA_BUILTIN=ON
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS="none" -DUSE_OWN_CRPROPA=ON
- name: Build CRPropa
run: |
cd plugin-template/build
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
cd plugin-template
mkdir build
cd build
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS="none" -DUSE_CRPROPA_BUILTIN=ON
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS="none" -DUSE_OWN_CRPROPA=ON
- name: Build CRPropa
run: |
cd plugin-template/build
Expand Down Expand Up @@ -124,49 +124,49 @@ jobs:
swig_builtin: "On" #uses swig 4.0.2
py: "/usr/bin/python3" # python 3.14
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Preinstall
run: |
brew install hdf5 fftw cfitsio muparser libomp swig
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install numpy cmake
pip show numpy # cross-check numpy version for Python_NumPy_INCLUDE_DIR
- name: Set up the build
env:
CXX: ${{ matrix.config.cxx }}
CC: ${{ matrix.config.cc }}
FC: ${{ matrix.config.fc }}
CRPROPA_DATA_PATH: "/Users/runner/work/CRPropa3/CRPropa3/build/data"
run: |
cd plugin-template
mkdir build
cd build

cmake .. \
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/venv \
-DENABLE_PYTHON=True \
-DPython_EXECUTABLE=$GITHUB_WORKSPACE/venv/bin/python \
-DENABLE_TESTING=On \
-DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} \
-DPython_INSTALL_PACKAGE_DIR=$GITHUB_WORKSPACE/venv/lib/python3.14/site-packages \
-DUSE_CRPROPA_BUILTIN=ON
- name: Checkout repository
uses: actions/checkout@v6
- name: Preinstall
run: |
brew install hdf5 fftw cfitsio muparser libomp swig
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install numpy cmake
pip show numpy # cross-check numpy version for Python_NumPy_INCLUDE_DIR
- name: Set up the build
env:
CXX: ${{ matrix.config.cxx }}
CC: ${{ matrix.config.cc }}
FC: ${{ matrix.config.fc }}
CRPROPA_DATA_PATH: "/Users/runner/work/CRPropa3/CRPropa3/build/data"
run: |
cd plugin-template
mkdir build
cd build

- name: Build CRPropa
run: |
cd plugin-template/build
make
- name: Run tests
env:
CRPROPA_DATA_PATH: "/Users/runner/work/CRPropa3/CRPropa3/plugin-template/build/data"
run: |
cd plugin-template/build
ctest --output-on-failure --repeat until-pass:3
- name: Archive test results
if: always()
uses: actions/upload-artifact@v7
with:
name: "test-report_${{matrix.config.name}}"
path: plugin-template/build/Testing/Temporary/LastTest.log
cmake .. \
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/venv \
-DENABLE_PYTHON=True \
-DPython_EXECUTABLE=$GITHUB_WORKSPACE/venv/bin/python \
-DENABLE_TESTING=On \
-DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} \
-DPython_INSTALL_PACKAGE_DIR=$GITHUB_WORKSPACE/venv/lib/python3.14/site-packages \
-DUSE_OWN_CRPROPA=ON

- name: Build CRPropa
run: |
cd plugin-template/build
make
- name: Run tests
env:
CRPROPA_DATA_PATH: "/Users/runner/work/CRPropa3/CRPropa3/plugin-template/build/data"
run: |
cd plugin-template/build
ctest --output-on-failure --repeat until-pass:3
- name: Archive test results
if: always()
uses: actions/upload-artifact@v7
with:
name: "test-report_${{matrix.config.name}}"
path: plugin-template/build/Testing/Temporary/LastTest.log
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
## CRPropa vNext

### Bug fixes:
* Fixed the secondariesFirst parameter not actually allowing secondary particles to be propagated before the primary
* threshold calculation in PhotoPionProduction
* Fixed the secondariesFirst parameter not actually allowing secondary particles to be propagated before the primary
* Threshold calculation in PhotoPionProduction
* Bug fixed when generating python binding for variants with some specific compilers (e.g., clang-llvm 21).

### New features:

* Improved plugin-template and added test to ensure the template is working
* Added position-dependent photon fields
* Secondaries are now distributed over multiple threads if OpenMP parallelisation is enabled
* Advanced CMake finder for CRPropa, to be used with plugins.
* Exposed `getRate` function for electromagnetic interactions


### Interface changes:

### Features that are deprecated and will be removed after this release
Expand Down
Loading
Loading