Feature/reactivate python bindings (#74)

major changes:
- add python bindings for all c++ features except network_io
- changes to cross compile on windows,linux and macos
- fix bugs with cluster_finder
- use Dtype in Frame instead of bitdepth
- remove boost::program_options and replace with our implementation 
- add Transforms class that applies a sequence of functions (c++ or
python functions) on a Frame.
- remove frame reorder and flip from SubFile.cpp. use Transforms instead
- Test clusterFinder and Pedestal results in comparison with
slsDetectorCalibration

---------

Co-authored-by: Bechir <bechir.brahem420@gmail.com>
Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
Bechir Braham
2024-07-04 11:51:48 +02:00
committed by GitHub
parent 5b7ab5a810
commit 68dcfca74e
107 changed files with 11451 additions and 1476 deletions

View File

@ -1,36 +0,0 @@
name: clang-tidy
on:
push:
jobs:
clang-tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
environment-file: aare-environment.yml
init-shell: bash
cache-environment: true
post-cleanup: 'all'
- name: update clang-tidy
shell: bash -el {0}
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
sudo apt install clang-tidy-17
- name: cmake
shell: bash -el {0}
run: |
mkdir build
cd build
cmake .. -DAARE_SYSTEM_LIBRARIES="ON" -DCMAKE_BUILD_TYPE="Debug" -DAARE_PYTHON_BINDINGS="OFF" -DAARE_IN_GITHUB_ACTIONS="ON"
- name: linting checks
shell: bash -el {0}
run: |
clang-tidy-17 --version
echo $GITHUB_ACTIONS
cd build
cmake --build . --target clang-tidy

View File

@ -11,13 +11,18 @@ on:
type: string
default: Debug
use-python-bindings:
# required: true
required: true
type: string
default: OFF
os:
required: true
type: string
default: ubuntu-latest
jobs:
build-and-test:
runs-on: ubuntu-latest
name: "Build and test[os: ${{ inputs.os }}, build-type: ${{ inputs.build-type }}, use-system-libraries: ${{ inputs.use-system-libraries }}, use-python-bindings: ${{ inputs.use-python-bindings }}]"
runs-on: ${{ inputs.os }}
steps:
- name: Dump GitHub context
env:
@ -42,9 +47,6 @@ jobs:
echo "build-type: ${{inputs.build-type}}"
echo "use-python-bindings: ${{inputs.use-python-bindings}}"
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
@ -54,6 +56,7 @@ jobs:
init-shell: bash
cache-environment: true
post-cleanup: 'all'
- name: build
shell: bash -el {0}
run: |
@ -65,7 +68,18 @@ jobs:
run: |
cd build/
./run_tests
if: ${{ inputs.os != 'windows-latest' }}
- name: run tests
run: |
cd build/
dir
cd Debug/
dir
start run_tests.exe
# start /B /WAIT "run_tests.exe"
if: ${{ inputs.os == 'windows-latest' }}
- name: run examples
if: ${{ inputs.os != 'windows-latest' }}
# find all examples in build/examples and run them
run: |
pwd
@ -73,7 +87,7 @@ jobs:
ls build/examples/*_example
# examples to run
cd build/examples
examples=(raw_example cluster_example json_example logger_example multiport_example mythen_example)
examples=(raw_example json_example logger_example multiport_example mythen_example)
examples+=(numpy_read_example numpy_write_example)
for example in "${examples[@]}"; do
echo "Running example: $example"

View File

@ -11,18 +11,23 @@ jobs:
# fail-fast is true by default
fail-fast: false
matrix:
use-system-libraries: ["OFF","ON"]
build-type: ["Debug","Release"]
# use-python-bindings: ["OFF","ON"]
# exclude:
# # excludes combinations that are not supported
# - use-python-bindings: "ON"
# use-sanitizers: "ON"
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
build-type: ["Release", "Debug"]
use-system-libraries: ["ON", "OFF"]
use-python-bindings: ["OFF", "ON"]
exclude:
# excludes combinations that are not supported
- os: "windows-latest"
build-type: "Release" # TODO: fix this
- os: "windows-latest"
build-type: "Debug"
use-system-libraries: "ON" # different _ITERATOR_DEBUG_LEVEL for system libraries
uses: ./.github/workflows/common-workflow.yml # calls the one above
with:
use-system-libraries: ${{ matrix.use-system-libraries }}
build-type: ${{ matrix.build-type }}
# use-python-bindings: ${{ matrix.use-python-bindings }}
use-python-bindings: ${{ matrix.use-python-bindings }}
os: ${{ matrix.os }}
secrets: inherit

View File

@ -1,33 +0,0 @@
name: test-formatting
on:
push:
jobs:
test-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
environment-file: aare-environment.yml
init-shell: bash
cache-environment: true
post-cleanup: 'all'
- name: cmake
shell: bash -el {0}
run: |
mkdir build
cd build
cmake .. -DAARE_SYSTEM_LIBRARIES="ON" -DCMAKE_BUILD_TYPE="Debug" -DAARE_PYTHON_BINDINGS="OFF" -DAARE_IN_GITHUB_ACTIONS="ON"
- name: linting checks
shell: bash -el {0}
run: |
# find all examples in build/examples and run them
cd build
cmake --build . --target=check-format