Skip to content

Commit

Permalink
Merge branch 'master' into Array
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Feb 2, 2024
2 parents f35b8e9 + 1f5b06f commit 0a5da73
Show file tree
Hide file tree
Showing 632 changed files with 13,876 additions and 10,030 deletions.
18 changes: 17 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ shallow_clone: true
skip_commits:
files:
- .github/**/*
- 'CITATION.cff'
- '**/*.md'
- '**/*.html'
- '**/*.htm'
Expand Down Expand Up @@ -31,15 +32,30 @@ build_script:
# find boost on Appveyor. Version depends on VM
- for /D %%d in (C:\Libraries\boost_*) do set BOOST_ROOT=%%d
- echo Using Boost %BOOST_ROOT%
# find miniconda
- for /D %%d in (C:\Miniconda*-x64) do set MINICONDA=%%d
- echo Using Miniconda %MINICONDA%
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%MINICONDA%\\Library\\bin;%PATH%"
# install parallelproj and Python stuff
- conda install -c conda-forge -yq libparallelproj swig numpy pytest
- CALL conda.bat activate base
- python --version
- mkdir build
- mkdir install
- cd build
- cmake.exe .. -DCMAKE_INSTALL_PREFIX="C:\projects\stir\install" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_CONFIGURATION_TYPES=%CONFIGURATION% -DSTIR_OPENMP:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=OFF
- cmake.exe .. -A x64 -DCMAKE_INSTALL_PREFIX="C:\projects\stir\install" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_CONFIGURATION_TYPES=%CONFIGURATION% -DSTIR_OPENMP:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=OFF -DBUILD_SWIG_PYTHON:BOOL=ON -DPython_EXECUTABLE="%MINICONDA%\\python.exe"
- cmake.exe --build . --config %CONFIGURATION%
- cmake.exe --build . --target install --config %CONFIGURATION%
- conda deactivate

test_script:
- cd C:\projects\stir\build
- CALL conda.bat activate base
- python --version
- ctest --output-on-failure -C %CONFIGURATION%
- cd ..\recon_test_pack
- run_tests --nointbp "C:\projects\stir\install\bin\"
- cd ..\src
- "set PYTHONPATH=C:\\projects\\stir\\install\\python"
- python -m pytest .
- conda deactivate
3 changes: 1 addition & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ BraceWrapping:
SplitEmptyFunction: false
SplitEmptyRecord: true
SplitEmptyNamespace: true
# non-standard GNU
SplitEmptyFunction: false
ColumnLimit: 130
IndentPPDirectives: AfterHash
PointerAlignment: Left
SortIncludes: false
SortUsingDeclarations: false
SpaceBeforeParens: ControlStatements
PackConstructorInitializers: Never
Standard: Cpp11
...
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*.v -text -diff
*.s -text -diff
*.scn -text -diff
*.l -text -diff
*.root -text -diff
*.gz -text -diff
*.nii -text -diff
*.sh eol=lf
Expand Down
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Fill in most of this text, and delete what is not appropriate.
Please read and adhere to the [contribution guidelines](https://github.com/UCL/STIR/blob/master/CONTRIBUTING.md).
Did you sign the STIR Contribution License Agreement?
-->

## Changes in this pull request


## Testing performed


## Related issues
<!-- Use keywords such as "fixes", "closes", see https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue -->


## Checklist before requesting a review
<!--Put an x between the [] when completed. Delete a line if not applicable. -->
- [] I have performed a self-review of my code
- [] I have added docstrings/doxygen in line with the guidance in the developer guide
- [] I have implemented unit tests that cover any new or modified functionality (if applicable)
- [] The code builds and runs on my machine
- [] `documentation/release_XXX.md` has been updated with any functionality change (if applicable)
23 changes: 23 additions & 0 deletions .github/workflows/GHA_increase_disk_space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
df -h
# locations from the internet, e.g. https://github.com/easimon/maximize-build-space
# saves about 2GB
if [ -d /usr/share/dotnet ]; then
echo removing dotnet
sudo rm -rf /usr/share/dotnet
fi
# saves about 10 GB
if [ -d "$AGENT_TOOLSDIRECTORY" ]; then
echo removing agent_tools
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
fi
# saves about 10 GB
if [ -d /usr/local/lib/android ]; then
echo removing android files
sudo rm -rf /usr/local/lib/android
fi
if [ -d /opt/ghc ]; then
echo removing android files
sudo rm -rf /opt/ghc
fi
df -h
48 changes: 39 additions & 9 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@ name: Build and ctest and recon_test_pack CI

on:
push:
branches: [ master ]
branches:
- master
- tof_sino_UCL
paths-ignore:
- '.appveyor.yml'
- 'CITATION.cff'
- '**/*.md'
- '**/*.html'
- '**/*.htm'
- '**/*.tex'

pull_request:
branches: [ master ]
branches:
- master
- tof_sino_UCL
paths-ignore:
- '.appveyor.yml'
- 'CITATION.cff'
- '**/*.md'
- '**/*.html'
- '**/*.htm'
Expand Down Expand Up @@ -114,6 +120,18 @@ jobs:
with:
submodules: recursive

- name: disk space
shell: bash
run: |
case ${{matrix.os}} in
(ubuntu* | macOS*)
sudo .github/workflows/GHA_increase_disk_space.sh
;;
(windows*)
# no idea what to do here
;;
esac
- name: set_compiler_variables
shell: bash
run: |
Expand Down Expand Up @@ -264,7 +282,7 @@ jobs:
EXTRA_BUILD_FLAGS="-DBUILD_SWIG_PYTHON=ON -DPYTHON_EXECUTABLE=`which python`"
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -DDOWNLOAD_ZENODO_TEST_DATA=ON"
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -DDISABLE_STIR_LOCAL=OFF -DSTIR_LOCAL=${GITHUB_WORKSPACE}/examples/C++/src"
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -DDISABLE_STIR_LOCAL=OFF -DSTIR_LOCAL=${GITHUB_WORKSPACE}/examples/C++/using_STIR_LOCAL"
echo "cmake flags $BUILD_FLAGS $EXTRA_BUILD_FLAGS"
mkdir build
cd build
Expand Down Expand Up @@ -296,7 +314,7 @@ jobs:
cd ${GITHUB_WORKSPACE}/build
# don't run all of them in Debug mode as it takes too long
if test ${BUILD_TYPE} = Debug; then
EXCLUDE="-E test_data_processor_projectors|test_export_array|test_ArcCorrection|test_blocks_on_cylindrical_projectors"
EXCLUDE="-E test_data_processor_projectors|test_export_array|test_ArcCorrection"
fi
ctest --output-on-failure -C ${BUILD_TYPE} ${EXCLUDE}
Expand All @@ -318,7 +336,7 @@ jobs:
./run_scatter_tests.sh
./run_test_zoom_image.sh
./run_ML_norm_tests.sh
if [[ $BUILD_FLAGS == *"DDISABLE_CERN_ROOT=0"* ]]; then ./run_root_GATE.sh; fi
if test "${{matrix.ROOT}}XX" == "ONXX"; then ./run_root_GATE.sh; fi
./run_tests_modelling.sh
cd ${GITHUB_WORKSPACE}/recon_test_pack/SPECT
./run_SPECT_tests.sh
Expand All @@ -329,14 +347,17 @@ jobs:
if: failure()
with:
name: recon_test_pack_log_files-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.compiler_version }}-${{ matrix.BUILD_TYPE }}-pp=${{ matrix.parallelproj }}-ROOT=${{ matrix.ROOT }}
path: ${{ github.workspace }}/recon_test_pack/**/*.log
path: |
${{ github.workspace }}/recon_test_pack/**/*.log
${{ github.workspace }}/recon_test_pack/**/my_*v
${{ github.workspace }}/recon_test_pack/**/my_*s
retention-days: 7

# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session if triggered
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled == 'true' }}

- name: examples
shell: bash
Expand All @@ -348,8 +369,8 @@ jobs:
./run_simulation.sh 1> /dev/null
# Run the Demo executables
EXE_LOC=${GITHUB_WORKSPACE}/build/src/examples/C++
cd ${GITHUB_WORKSPACE}/examples/C++/src
EXE_LOC=${GITHUB_WORKSPACE}/build/src/examples/C++/using_STIR_LOCAL
cd ${GITHUB_WORKSPACE}/examples/C++/using_STIR_LOCAL
generate_image generate_image.par
forward_project sino.hs image.hv small.hs
Expand All @@ -360,6 +381,15 @@ jobs:
${EXE_LOC}/demo4_obj_fun demo4_obj_fun.par
${EXE_LOC}/demo5_line_search demo5_line_search.par
# build and run C++/using_installed_STIR
cd ${GITHUB_WORKSPACE}/examples/C++/using_installed_STIR
cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
cmake --build build/ --config Release --target install
# run demo
demo_create_image
# just check if its output makes sense
list_image_info test.hv
- name: Python
shell: bash
run: |
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: cffconvert

on:
push:
paths:
- CITATION.cff

jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v2

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: "--validate"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ install/
examples/ROOT_files/ROOT_STIR_consistency/Gate_macros/main_GATE_macro_test*.mac
examples/ROOT_files/ROOT_STIR_consistency/pretest_output/root_data_test*.root
examples/ROOT_files/ROOT_STIR_consistency/pretest_output/root_header_test*.hroot
examples/ROOT_files/ROOT_STIR_consistency/pretest_output/root_header_test*_lor_pos.txt
examples/ROOT_files/ROOT_STIR_consistency/*voxel_data_*.*
examples/ROOT_files/ROOT_STIR_consistency/pretest_output/stir_image*.*

7 changes: 5 additions & 2 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ Palak Wadhwa <pwadhwa351@gmail.com> <umdde@leeds.ac.uk>
Rebecca Gillen <rebecca.gillen.18@ucl.ac.uk> <43674917+RebeccaGillen@users.noreply.github.com>
Richard Brown <richard.brown@ucl.ac.uk> <33289025+rijobro@users.noreply.github.com>
Richard Brown <richard.brown@ucl.ac.uk> <richard.brown@ucl.ac.uk>
Robert Twyman <robbietuk@gmail.com> <robbietuk@gmail.com>
Robert Twyman <robbietuk@gmail.com> <robert.twyman.18@ucl.ac.uk>
Robert Twyman Skelly <robbietuk@gmail.com> <robbietuk@gmail.com>
Robert Twyman Skelly <robbietuk@gmail.com> <robert.twyman.18@ucl.ac.uk>
Robert Twyman Skelly <robbietuk@gmail.com> <robert@prescientimaging.com>
Robert Twyman Skelly <robbietuk@gmail.com> <117300855+Robert-PrescientImaging@users.noreply.github.com>
Yu-jung Tsai <yu-jung.tsai.14@ucl.ac.uk> <yu-jung.tsai.14@ucl.ac.uk>
Gemma Fardell <gemma.fardell@stfc.ac.uk> <gemma.fardell@stfc.ac.uk>
Gemma Fardell <gemma.fardell@stfc.ac.uk> <47746591+gfardell@users.noreply.github.com>
Expand All @@ -62,5 +64,6 @@ Nicole Jurjew <nicole.jurjew.20@ucl.ac.uk>
Tahereh Niknejad <tahereh.niknejad@tecnico.ulisboa.pt>
Tahereh Niknejad <tahereh.niknejad@tecnico.ulisboa.pt> <tahereh@Taherehs-MacBook-Pro.local>
Sam D Porter <92305641+samdporter@users.noreply.github.com>
Sam D Porter <92305641+samdporter@users.noreply.github.com> <porter.samd@gmail.com>
Matthew Strugari <matthew.strugari@dal.ca>
Matthew Strugari <matthew.strugari@dal.ca> <56315593+mastergari@users.noreply.github.com>
89 changes: 0 additions & 89 deletions .zenodo.json

This file was deleted.

Loading

0 comments on commit 0a5da73

Please sign in to comment.