From f533dcbeaf9c703d28455a960405e3110fcb4750 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Sun, 1 Sep 2024 15:36:23 +0000 Subject: [PATCH 01/26] minor tweak to cmake to not break CPM --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfb6115f6..fef31ca38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -340,4 +340,4 @@ if(NOT TARGET uninstall) endif() # KS: Configure the Doxygen input file, this is to ensure whenever we update MaCh3 version Doxyfile will have same version. -configure_file(${CMAKE_SOURCE_DIR}/cmake/Templates/Doxyfile.in ${CMAKE_SOURCE_DIR}/Doc/Doxyfile @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Templates/Doxyfile.in ${CMAKE_CURRENT_SOURCE_DIR}/Doc/Doxyfile @ONLY) From 09e09fcee0afd24b4ed5ba2f0486346386eabbd2 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 12:30:01 +0000 Subject: [PATCH 02/26] test with new validations CI commence --- .github/workflows/CIValidations.yml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/CIValidations.yml diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml new file mode 100644 index 000000000..22053059f --- /dev/null +++ b/.github/workflows/CIValidations.yml @@ -0,0 +1,39 @@ +name: Validations CI + +# The events that trigger the workflow +on: + pull_request: + branches: [ develop ] + push: + branches: [ feature_CIvalidations ] + +permissions: + contents: read + packages: write + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false # KS: Prevents cancellation of remaining jobs if one fails + matrix: + include: + - name: SplineValidations + + + name: Build CI ${{ matrix.name }} + + steps: + - uses: actions/checkout@v3 + + - name: Getting MaCh3 Container + run: docker pull ghcr.io/mach3-software/mach3:alma9latest && docker run --name mach3-container -d ghcr.io/mach3-software/mach3:alma9latest + + - name: Get MaCh3 Validations + run: cd /opt/ && git clone https://@github.com/MaCh3Validations-software/MaCh3.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.head_ref }} + + - name: Install + run: make install && source bin/setup.MaCh3.sh && source bin/setup.MaCh3Validations.sh + + - name: Validations + run: Apps/${{ matrix.name }} From 4e6737c0b60e7a7165ec4c5d150df5b48d19ab08 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 12:32:20 +0000 Subject: [PATCH 03/26] ups --- .github/workflows/CIValidations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 22053059f..81d9a524d 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -30,7 +30,7 @@ jobs: run: docker pull ghcr.io/mach3-software/mach3:alma9latest && docker run --name mach3-container -d ghcr.io/mach3-software/mach3:alma9latest - name: Get MaCh3 Validations - run: cd /opt/ && git clone https://@github.com/MaCh3Validations-software/MaCh3.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.head_ref }} + run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.head_ref }} - name: Install run: make install && source bin/setup.MaCh3.sh && source bin/setup.MaCh3Validations.sh From 8790ad63abcdf42fb2e58eb29575c05a7a55761a Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 12:37:48 +0000 Subject: [PATCH 04/26] wrong docker command... --- .github/workflows/CIValidations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 81d9a524d..3edbb7e65 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v3 - name: Getting MaCh3 Container - run: docker pull ghcr.io/mach3-software/mach3:alma9latest && docker run --name mach3-container -d ghcr.io/mach3-software/mach3:alma9latest + run: docker pull ghcr.io/mach3-software/mach3:alma9latest && docker run -it --name mach3-container ghcr.io/mach3-software/mach3:alma9latest - name: Get MaCh3 Validations run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.head_ref }} From f3ebe7c681b6aed5fe96bac36570621905c07da0 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 12:52:02 +0000 Subject: [PATCH 05/26] maybe now --- .github/workflows/CIValidations.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 3edbb7e65..4d5ee8b7f 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -14,21 +14,21 @@ permissions: jobs: build: runs-on: ubuntu-latest + + name: Validations CI ${{ matrix.name }} + strategy: - fail-fast: false # KS: Prevents cancellation of remaining jobs if one fails + fail-fast: false # Prevents cancellation of remaining jobs if one fails matrix: include: - name: SplineValidations - - name: Build CI ${{ matrix.name }} + container: + image: ghcr.io/mach3-software/mach3:alma9latest steps: - uses: actions/checkout@v3 - - name: Getting MaCh3 Container - run: docker pull ghcr.io/mach3-software/mach3:alma9latest && docker run -it --name mach3-container ghcr.io/mach3-software/mach3:alma9latest - - name: Get MaCh3 Validations run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.head_ref }} From 616f40806011679b702a4d7497842c919731d110 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 12:55:47 +0000 Subject: [PATCH 06/26] debug --- .github/workflows/CIValidations.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 4d5ee8b7f..790611d8d 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -29,8 +29,11 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Debug Branch Name + run: echo "Current Branch: ${{ github.head_ref }}" + - name: Get MaCh3 Validations - run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.head_ref }} + run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch="${{ github.head_ref }}" - name: Install run: make install && source bin/setup.MaCh3.sh && source bin/setup.MaCh3Validations.sh From 0b0b6e9e67ccb93dec93d2d5bc4e2ff8f5898814 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:00:35 +0000 Subject: [PATCH 07/26] github treats push different to PR... --- .github/workflows/CIValidations.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 790611d8d..8bad612f1 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -30,10 +30,10 @@ jobs: - uses: actions/checkout@v3 - name: Debug Branch Name - run: echo "Current Branch: ${{ github.head_ref }}" + run: echo "Current Branch: ${{ github.ref }}" - name: Get MaCh3 Validations - run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch="${{ github.head_ref }}" + run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.ref }} - name: Install run: make install && source bin/setup.MaCh3.sh && source bin/setup.MaCh3Validations.sh From 830b4290da1123c29914c3fdd1497ad57dc6d755 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:01:22 +0000 Subject: [PATCH 08/26] arghhh --- .github/workflows/CIValidations.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 8bad612f1..8694c3951 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -29,9 +29,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Debug Branch Name - run: echo "Current Branch: ${{ github.ref }}" - - name: Get MaCh3 Validations run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.ref }} From b72cb8f027b76769d0a8a8e39f70b8e7423e1898 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:04:05 +0000 Subject: [PATCH 09/26] ... --- .github/workflows/CIValidations.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 8694c3951..22d68fe6f 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -29,8 +29,12 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Debug Branch Name + run: echo "Current Branch: ${{ github.ref }}" + - name: Get MaCh3 Validations - run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=${{ github.ref }} + run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=feature_CIvalidations + #${{ github.head_ref }} - name: Install run: make install && source bin/setup.MaCh3.sh && source bin/setup.MaCh3Validations.sh From 6c6995474f434e9b1dbcadc3e724c6f5933bfd72 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:05:26 +0000 Subject: [PATCH 10/26] no clue... --- .github/workflows/CIValidations.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 22d68fe6f..f960fc231 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -33,7 +33,8 @@ jobs: run: echo "Current Branch: ${{ github.ref }}" - name: Get MaCh3 Validations - run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=feature_CIvalidations + run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=develop + #${{ github.head_ref }} - name: Install From df172290c5fbdba5ff69f16ffa005f45f24c69ad Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:06:29 +0000 Subject: [PATCH 11/26] why... --- .github/workflows/CIValidations.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index f960fc231..d9f88be44 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -33,9 +33,8 @@ jobs: run: echo "Current Branch: ${{ github.ref }}" - name: Get MaCh3 Validations - run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ -DMaCh3_Branch=develop - - #${{ github.head_ref }} + run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ + #-DMaCh3_Branch=${{ github.head_ref }} - name: Install run: make install && source bin/setup.MaCh3.sh && source bin/setup.MaCh3Validations.sh From 45eb499eddccb350c50a647e4bca62ae81a8e111 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:07:12 +0000 Subject: [PATCH 12/26] sry for spam... --- .github/workflows/CIValidations.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index d9f88be44..e65b8d4de 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -29,9 +29,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Debug Branch Name - run: echo "Current Branch: ${{ github.ref }}" - - name: Get MaCh3 Validations run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ #-DMaCh3_Branch=${{ github.head_ref }} From a6e23f78e744e6c48264b4ca05729d950ed69dd2 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:11:33 +0000 Subject: [PATCH 13/26] problematic paths... --- .github/workflows/CIValidations.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index e65b8d4de..12ce8075c 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -29,12 +29,28 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Get MaCh3 Validations - run: cd /opt/ && git clone https://@github.com/mach3-software/MaCh3Validations.git MaCh3Validations && cd MaCh3Validations && mkdir build && cd build && cmake ../ - #-DMaCh3_Branch=${{ github.head_ref }} - - name: Install - run: make install && source bin/setup.MaCh3.sh && source bin/setup.MaCh3Validations.sh + - name: Get MaCh3 Validations + run: | + cd /opt/ + git clone https://github.com/mach3-software/MaCh3Validations.git MaCh3Validations + cd MaCh3Validations + mkdir build + cd build + cmake ../ + #-DMaCh3_Branch="${{ github.ref_name }}" + + - name: Build MaCh3 Validations + run: | + cd /opt/MaCh3Validations/build + make install # Build the project + + - name: Source Setup Scripts + run: | + source /opt/MaCh3Validations/build/bin/setup.MaCh3.sh + source /opt/MaCh3Validations/build/bin/setup.MaCh3Validations.sh - name: Validations - run: Apps/${{ matrix.name }} + run: | + cd /opt/MaCh3Validations/build + Apps/${{ matrix.name }} From a8a4fee4bcac5e17cb83e1c745ec4196aa9b4797 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:30:13 +0000 Subject: [PATCH 14/26] it should work now --- .github/workflows/CIValidations.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 12ce8075c..726b1fe7e 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -54,3 +54,4 @@ jobs: run: | cd /opt/MaCh3Validations/build Apps/${{ matrix.name }} + From cc98a49eca879ed87e9609c7e4fa84f88ec775ae Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:41:30 +0000 Subject: [PATCH 15/26] final tidy before PR --- .github/workflows/CIValidations.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 726b1fe7e..ce2fe5439 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -4,8 +4,6 @@ name: Validations CI on: pull_request: branches: [ develop ] - push: - branches: [ feature_CIvalidations ] permissions: contents: read @@ -37,8 +35,7 @@ jobs: cd MaCh3Validations mkdir build cd build - cmake ../ - #-DMaCh3_Branch="${{ github.ref_name }}" + cmake ../ -DMaCh3_Branch="{{ github.ref_name }} - name: Build MaCh3 Validations run: | @@ -54,4 +51,3 @@ jobs: run: | cd /opt/MaCh3Validations/build Apps/${{ matrix.name }} - From f59bb1df2a4c5543f7bdc32ad1d8f3c8d9c57ebd Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:45:53 +0000 Subject: [PATCH 16/26] ups... --- .github/workflows/CIValidations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index ce2fe5439..469cb8ecb 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -35,7 +35,7 @@ jobs: cd MaCh3Validations mkdir build cd build - cmake ../ -DMaCh3_Branch="{{ github.ref_name }} + cmake ../ -DMaCh3_Branch={{ github.ref_name }} - name: Build MaCh3 Validations run: | From 63603909e3acbba3f0f0a80e76664782d0f28bef Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:49:16 +0000 Subject: [PATCH 17/26] hopefully last one... --- .github/workflows/CIValidations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 469cb8ecb..224acd4dd 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -35,7 +35,7 @@ jobs: cd MaCh3Validations mkdir build cd build - cmake ../ -DMaCh3_Branch={{ github.ref_name }} + cmake ../ -DMaCh3_Branch=${{ github.ref_name }} - name: Build MaCh3 Validations run: | From bfc2354bbb998102c94d44f18260e61e64d77449 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 13:53:18 +0000 Subject: [PATCH 18/26] sumimasen --- .github/workflows/CIValidations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index 224acd4dd..d8cd4a828 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -35,7 +35,7 @@ jobs: cd MaCh3Validations mkdir build cd build - cmake ../ -DMaCh3_Branch=${{ github.ref_name }} + cmake ../ -DMaCh3_Branch=${{ github.head_ref }} - name: Build MaCh3 Validations run: | From d4d492e0dde966e017804f7ebdc567855bb252bb Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Mon, 2 Sep 2024 16:28:41 +0000 Subject: [PATCH 19/26] Minor fixes to cmake related to python binding and now Python interface is being used for containers and CI --- CMakeLists.txt | 3 +-- Doc/MaCh3DockerFiles/Alma9/Dockerfile | 2 +- Doc/MaCh3DockerFiles/Fedora32/Dockerfile | 2 +- Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile | 2 +- README.md | 2 +- cmake/Templates/MaCh3Config.cmake.in | 1 + plotting/plottingUtils/CMakeLists.txt | 4 +--- plotting/plottingUtils/inputManager.cpp | 4 ++-- 8 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fef31ca38..c3b5cdd14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,6 +188,7 @@ LIST(APPEND ALL_FEATURES DEBUG MULTITHREAD GPU + PYTHON LOW_MEMORY_STRUCTS Oscillator Fitter @@ -232,8 +233,6 @@ if( MaCh3_PYTHON_ENABLED ) endif() - - #This is to export the target properties of MaCh3 #Anything that links to "MaCh3" will get all of these target properties add_library(MaCh3 INTERFACE) diff --git a/Doc/MaCh3DockerFiles/Alma9/Dockerfile b/Doc/MaCh3DockerFiles/Alma9/Dockerfile index 1509d59e6..fd9eec0d1 100644 --- a/Doc/MaCh3DockerFiles/Alma9/Dockerfile +++ b/Doc/MaCh3DockerFiles/Alma9/Dockerfile @@ -18,7 +18,7 @@ RUN git checkout ${MACH3_VERSION} RUN mkdir -p ${MACH3_INSTALL_DIR} WORKDIR ${MACH3_INSTALL_DIR} -RUN cmake ${MACH3_WORK_DIR} +RUN cmake -DMaCh3_PYTHON_ENABLED=ON ${MACH3_WORK_DIR} RUN make VERBOSE=1 && make install # KS: Need to set them here, otherwise container using this container will not be able to find MaCh3 diff --git a/Doc/MaCh3DockerFiles/Fedora32/Dockerfile b/Doc/MaCh3DockerFiles/Fedora32/Dockerfile index 0586ccf94..cc5f457a4 100644 --- a/Doc/MaCh3DockerFiles/Fedora32/Dockerfile +++ b/Doc/MaCh3DockerFiles/Fedora32/Dockerfile @@ -18,7 +18,7 @@ RUN git checkout ${MACH3_VERSION} RUN mkdir -p ${MACH3_INSTALL_DIR} WORKDIR ${MACH3_INSTALL_DIR} -RUN cmake ${MACH3_WORK_DIR} +RUN cmake -DMaCh3_PYTHON_ENABLED=ON ${MACH3_WORK_DIR} RUN make VERBOSE=1 RUN make install diff --git a/Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile b/Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile index bc8423eca..8670c54f8 100644 --- a/Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile +++ b/Doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile @@ -24,7 +24,7 @@ RUN git checkout ${MACH3_VERSION} RUN mkdir -p ${MACH3_INSTALL_DIR} WORKDIR ${MACH3_INSTALL_DIR} -RUN cmake ${MACH3_WORK_DIR} +RUN cmake -DMaCh3_PYTHON_ENABLED=ON ${MACH3_WORK_DIR} RUN make VERBOSE=1 RUN make install diff --git a/README.md b/README.md index da36cd2f5..153ab0978 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Some functionalities rely on setting `Env{MACH3}` which should point to path exp MaCh3 can be compiled with a python interface by specifying the cmake option ``` -cmake ../ MaCh3_PYTHON_ENABLED=ON +cmake ../ -DMaCh3_PYTHON_ENABLED=ON make && make install ``` and then adding the path to the installed module to your `PYTHONPATH` environment variable: diff --git a/cmake/Templates/MaCh3Config.cmake.in b/cmake/Templates/MaCh3Config.cmake.in index 20cabb4a5..37344f915 100644 --- a/cmake/Templates/MaCh3Config.cmake.in +++ b/cmake/Templates/MaCh3Config.cmake.in @@ -10,6 +10,7 @@ set(DEBUG_LEVEL @DEBUG_LEVEL@) set(MaCh3_DEBUG_ENABLED @MaCh3_DEBUG_ENABLED@) set(MaCh3_MULTITHREAD_ENABLED @MaCh3_MULTITHREAD_ENABLED@) set(MaCh3_GPU_ENABLED @MaCh3_GPU_ENABLED@) +set(MaCh3_PYTHON_ENABLED @MaCh3_PYTHON_ENABLED@) set(MaCh3_MINUIT2_ENABLED @MaCh3_MINUIT2_ENABLED@) get_filename_component(MaCh3_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) diff --git a/plotting/plottingUtils/CMakeLists.txt b/plotting/plottingUtils/CMakeLists.txt index 58bb07fcd..004c03378 100644 --- a/plotting/plottingUtils/CMakeLists.txt +++ b/plotting/plottingUtils/CMakeLists.txt @@ -21,9 +21,7 @@ target_link_libraries( Plotting ${ROOT_LIBRARIES} MaCh3::Manager ) ## to be compiled into python module needs to be compiled as position independent library if( MaCh3_PYTHON_ENABLED ) - set_property( TARGET Plotting PROPERTY POSITION_INDEPENDENT_CODE ON ) - endif() install(TARGETS Plotting @@ -32,4 +30,4 @@ install(TARGETS Plotting PUBLIC_HEADER DESTINATION include/plotting ) -add_library(MaCh3::Plotting ALIAS Plotting) \ No newline at end of file +add_library(MaCh3::Plotting ALIAS Plotting) diff --git a/plotting/plottingUtils/inputManager.cpp b/plotting/plottingUtils/inputManager.cpp index 47a33a950..8e9e69811 100644 --- a/plotting/plottingUtils/inputManager.cpp +++ b/plotting/plottingUtils/inputManager.cpp @@ -205,7 +205,7 @@ std::vector InputManager::getTaggedValues(const std::vector Date: Mon, 2 Sep 2024 17:54:44 +0000 Subject: [PATCH 20/26] Now also covaraince valdiations --- .github/workflows/CIValidations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index d8cd4a828..b0cb8e5f2 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -20,7 +20,7 @@ jobs: matrix: include: - name: SplineValidations - + - name: CovarianceValidations container: image: ghcr.io/mach3-software/mach3:alma9latest From d0528c88290490f3217e5367e354fa3669effc09 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Tue, 3 Sep 2024 09:56:22 +0000 Subject: [PATCH 21/26] bump --- .github/workflows/CDImage.yml | 1 - README.md | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CDImage.yml b/.github/workflows/CDImage.yml index 9747d5080..b04efc135 100644 --- a/.github/workflows/CDImage.yml +++ b/.github/workflows/CDImage.yml @@ -40,7 +40,6 @@ jobs: - name: Build Docker image run: | if [ "${{ github.event_name }}" == 'release' ]; then - docker build . --file ${{ matrix.file }} --tag ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.tag_release }} --build-arg MACH3_VERSION=develop docker build . --file ${{ matrix.file }} --tag ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.os }}v${{ github.event.release.tag_name }} --build-arg MACH3_VERSION=develop else docker build . --file ${{ matrix.file }} --tag ghcr.io/${{ github.repository_owner }}/mach3:${{ matrix.tag_latest }} --build-arg MACH3_VERSION=develop diff --git a/README.md b/README.md index da36cd2f5..6f3f06083 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The Markov Chain 3 flavour is a framework born in 2013 as a Bayesian MCMC fitter The framework has also evolved to allow non MCMC modules to interrogate the likelihoods implemented. [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://github.com/mach3-software/MaCh3/blob/develop/LICENSE.txt) -[![Release - v1.0.0](https://img.shields.io/badge/Release-v1.0.0-2ea44f)](https://github.com/mach3-software/MaCh3/releases) +[![Release - v1.1.0](https://img.shields.io/badge/Release-v1.1.0-2ea44f)](https://github.com/mach3-software/MaCh3/releases) [![Container Image](https://img.shields.io/badge/Container-Image-brightgreen)](https://github.com/mach3-software/MaCh3/pkgs/container/mach3) [![Code - Documented](https://img.shields.io/badge/Code-Documented-2ea44f)](https://github.com/mach3-software/MaCh3/wiki) [![Code - Doxygen](https://img.shields.io/badge/Code-Doxygen-2ea44f)](https://mach3-software.github.io/MaCh3/index.html) @@ -15,7 +15,7 @@ Example of plots made using MaCh3 apparent in scientific publications, for more MaCh3 ## Cite -When citing MaCh3, please use [on Zenodo](https://zenodo.org/records/10949376) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10949376.svg)](https://doi.org/10.5281/zenodo.10949376). +When citing MaCh3, please use [on Zenodo](https://zenodo.org/records/7608367) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13642670.svg)](https://doi.org/10.5281/zenodo.13642670). # How to Compile MaCh3 follows standard cmake pattern. By default you should get most optimal build setting although below we list many configurable options: From b5efe9728d50b46a7209cf9a1296c112edfcb344 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Tue, 3 Sep 2024 10:04:10 +0000 Subject: [PATCH 22/26] Expand CI --- .github/workflows/CIValidations.yml | 3 ++- mcmc/FitterBase.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index b0cb8e5f2..c2d0d4408 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -13,7 +13,7 @@ jobs: build: runs-on: ubuntu-latest - name: Validations CI ${{ matrix.name }} + name: ${{ matrix.name }} strategy: fail-fast: false # Prevents cancellation of remaining jobs if one fails @@ -21,6 +21,7 @@ jobs: include: - name: SplineValidations - name: CovarianceValidations + - name: FitterValidations container: image: ghcr.io/mach3-software/mach3:alma9latest diff --git a/mcmc/FitterBase.cpp b/mcmc/FitterBase.cpp index 4d66d21df..dddb38457 100644 --- a/mcmc/FitterBase.cpp +++ b/mcmc/FitterBase.cpp @@ -175,8 +175,8 @@ void FitterBase::PrepareOutput() { { // Check that we have added samples if (!samples.size()) { - MACH3LOG_CRITICAL("No samples Found! If this is what you want find me here"); - throw MaCh3Exception(__FILE__ , __LINE__ ); + MACH3LOG_CRITICAL("No samples Found! Is this really what you wanted?"); + //throw MaCh3Exception(__FILE__ , __LINE__ ); } // Prepare the output trees From 39612ff14c241ac94363f7a42b147b284e7c7d9d Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Tue, 3 Sep 2024 10:16:50 +0000 Subject: [PATCH 23/26] minor --- .github/workflows/CIValidations.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/CIValidations.yml b/.github/workflows/CIValidations.yml index c2d0d4408..391de9a62 100644 --- a/.github/workflows/CIValidations.yml +++ b/.github/workflows/CIValidations.yml @@ -43,12 +43,9 @@ jobs: cd /opt/MaCh3Validations/build make install # Build the project - - name: Source Setup Scripts + - name: Validations run: | source /opt/MaCh3Validations/build/bin/setup.MaCh3.sh source /opt/MaCh3Validations/build/bin/setup.MaCh3Validations.sh - - - name: Validations - run: | cd /opt/MaCh3Validations/build Apps/${{ matrix.name }} From 63590b46e1f07bbbed97b52533db7917e4c7c7cb Mon Sep 17 00:00:00 2001 From: Kamil <45295406+KSkwarczynski@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:33:29 +0100 Subject: [PATCH 24/26] Update readme after discussion on general meeting --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6f3f06083..6a1e6303b 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,7 @@ Don't forget to: source bin/setup.MaCh3.sh ``` ## Building against MaCh3 -If you compiled MaCh3 and sourced it you can simply call -``` -find_package(MaCh3) -``` -and cmake will find it. Alternatively, you can use CPM, for example: +To include MaCh3 in your cmake project you can use following syntax ``` CPMFindPackage( NAME MaCh3 @@ -44,6 +40,12 @@ CPMFindPackage( GITHUB_REPOSITORY mach3-software/MaCh3 ) ``` +Where "blarb" is the MaCh3 version. You can find a list of releases [here](https://github.com/mach3-software/MaCh3/wiki/0.1.-History) +If you compiled MaCh3 and sourced it you can simply call +``` +find_package(MaCh3) +``` + Once you found MaCh3 you might want to link your library against MaCh3. You can do this as follows: ``` target_link_libraries(blarb MaCh3::All) From f095a025e932026da9e6c41c57919f74ce79d845 Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Tue, 3 Sep 2024 19:45:55 +0000 Subject: [PATCH 25/26] let's test more robust CI --- covariance/covarianceBase.cpp | 6 ------ mcmc/MinuitFit.cpp | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/covariance/covarianceBase.cpp b/covariance/covarianceBase.cpp index 16628db7f..ed43b8f42 100644 --- a/covariance/covarianceBase.cpp +++ b/covariance/covarianceBase.cpp @@ -1005,12 +1005,6 @@ void covarianceBase::setParameters(const std::vector& pars) { } } - MACH3LOG_DEBUG("Set parameters to:"); - std::cout << "Set parameters to: " << std::endl; - for(int par_i = 0 ; par_i < pars.size() ; ++par_i){ - MACH3LOG_DEBUG("{} : {}", par_i, _fPropVal[par_i]); - } - // And if pca make the transfer if (pca) { TransferToPCA(); diff --git a/mcmc/MinuitFit.cpp b/mcmc/MinuitFit.cpp index a9cb8417a..db350e970 100644 --- a/mcmc/MinuitFit.cpp +++ b/mcmc/MinuitFit.cpp @@ -37,7 +37,7 @@ void MinuitFit::runMCMC() { //KS: add config or something minuit->SetPrintLevel(2); minuit->SetTolerance(0.01); - minuit->SetMaxFunctionCalls(fitMan->raw()["General.NSteps"].as()); + minuit->SetMaxFunctionCalls(fitMan->raw()["General"]["Minuit2"]["NSteps"].as();); minuit->SetMaxIterations(10000); MACH3LOG_INFO("Preparing Minuit"); From d123f1ac13c2ed0e0069692a7644cc278a6ddffa Mon Sep 17 00:00:00 2001 From: Kamil Skwarczynski Date: Tue, 3 Sep 2024 19:53:00 +0000 Subject: [PATCH 26/26] ups... --- mcmc/MinuitFit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcmc/MinuitFit.cpp b/mcmc/MinuitFit.cpp index db350e970..e54feb94a 100644 --- a/mcmc/MinuitFit.cpp +++ b/mcmc/MinuitFit.cpp @@ -37,7 +37,7 @@ void MinuitFit::runMCMC() { //KS: add config or something minuit->SetPrintLevel(2); minuit->SetTolerance(0.01); - minuit->SetMaxFunctionCalls(fitMan->raw()["General"]["Minuit2"]["NSteps"].as();); + minuit->SetMaxFunctionCalls(fitMan->raw()["General"]["Minuit2"]["NSteps"].as()); minuit->SetMaxIterations(10000); MACH3LOG_INFO("Preparing Minuit");