From eeb483983aae23fdb33a3c49f7713965ed211461 Mon Sep 17 00:00:00 2001
From: schroedtert <t.schroedter@fz-juelich.de>
Date: Wed, 20 Apr 2022 10:15:09 +0200
Subject: [PATCH 1/5] Use correct 0-based index when setting the marker ID

Signed-off-by: schroedtert <t.schroedter@fz-juelich.de>
---
 src/personStorage.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/personStorage.cpp b/src/personStorage.cpp
index fa08541d8..e4b35f03b 100644
--- a/src/personStorage.cpp
+++ b/src/personStorage.cpp
@@ -1138,7 +1138,7 @@ void PersonStorage::setMarkerIDs(const std::unordered_map<int, int> &markerIDs)
         if(markerIDs.find(personID) != std::end(markerIDs))
         {
             int markerID = markerIDs.at(personID);
-            setMarkerID(personID, markerID);
+            setMarkerID(i, markerID);
         }
         else
         {
-- 
GitLab


From 247a9f49264b1f7b3469f69167898120f7140fd2 Mon Sep 17 00:00:00 2001
From: schroedtert <t.schroedter@fz-juelich.de>
Date: Wed, 20 Apr 2022 10:15:29 +0200
Subject: [PATCH 2/5] Build installer

Signed-off-by: schroedtert <t.schroedter@fz-juelich.de>
---
 .gitlab-ci.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 557cc1ae9..1a7cec2fc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -146,10 +146,10 @@ regression_test_windows:
 
 build_installer_windows:
   stage: build_installer
-  rules:
-    - if: $CI_PIPELINE_SOURCE == "schedule"
-      when: never
-    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+#  rules:
+#    - if: $CI_PIPELINE_SOURCE == "schedule"
+#      when: never
+#    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
   tags:
     - windows
   script:
-- 
GitLab


From ff869b7baeabfe5795ff5b915d8ae445f22a2834 Mon Sep 17 00:00:00 2001
From: schroedtert <t.schroedter@fz-juelich.de>
Date: Wed, 20 Apr 2022 10:19:04 +0200
Subject: [PATCH 3/5] Disable regression tests

Signed-off-by: schroedtert <t.schroedter@fz-juelich.de>
---
 .gitlab-ci.yml | 84 +++++++++++++++++++++++++-------------------------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1a7cec2fc..1d913615e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -77,20 +77,20 @@ unit_test_linux:
       junit: "build/tests/unit_test/unit_test_report.xml"
   needs: ["build_linux"]
 
-# Execute regression tests
-regression_test_linux:
-  image: $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_SLUG}_linux
-  stage: test
-  script:
-    - cd tests/regression_test/tests
-    - python3 -m pytest --path=../../../build/petrack --junitxml=pytest_report.xml | tee "RegressionTestLog.txt"
-  artifacts:
-    when: on_failure
-    paths:
-      - "tests/regression_test/tests/RegressionTestLog.txt"
-    reports:
-      junit: "tests/regression_test/tests/pytest_report.xml"
-  needs: ["build_linux"]
+## Execute regression tests
+#regression_test_linux:
+#  image: $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_SLUG}_linux
+#  stage: test
+#  script:
+#    - cd tests/regression_test/tests
+#    - python3 -m pytest --path=../../../build/petrack --junitxml=pytest_report.xml | tee "RegressionTestLog.txt"
+#  artifacts:
+#    when: on_failure
+#    paths:
+#      - "tests/regression_test/tests/RegressionTestLog.txt"
+#    reports:
+#      junit: "tests/regression_test/tests/pytest_report.xml"
+#  needs: ["build_linux"]
 
 
 ###############################################################################
@@ -129,20 +129,20 @@ unit_test_windows:
   needs: ["build_windows"]
 
 # Ggf. muss man nicht in den Ordner der Testskripte verzweigen, da PyTest auch rekusrsiv in Unterorndern nach tests sucht
-regression_test_windows:
-  stage: test
-  tags:
-    - windows
-  script:
-    - cd tests/regression_test/tests
-    - python -m pytest --junitxml=pytest_report.xml | Tee-Object -FilePath "RegressionTestLog.txt"
-  artifacts:
-    when: on_failure
-    paths:
-      - "tests/regression_test/tests/RegressionTestLog.txt"
-    reports:
-      junit: "tests/regression_test/tests/pytest_report.xml"
-  needs: ["build_windows"]
+#regression_test_windows:
+#  stage: test
+#  tags:
+#    - windows
+#  script:
+#    - cd tests/regression_test/tests
+#    - python -m pytest --junitxml=pytest_report.xml | Tee-Object -FilePath "RegressionTestLog.txt"
+#  artifacts:
+#    when: on_failure
+#    paths:
+#      - "tests/regression_test/tests/RegressionTestLog.txt"
+#    reports:
+#      junit: "tests/regression_test/tests/pytest_report.xml"
+#  needs: ["build_windows"]
 
 build_installer_windows:
   stage: build_installer
@@ -221,20 +221,20 @@ unit_test_macos:
   needs: ["build_macos"]
 
 # Execute regression tests
-regression_test_macos:
-  stage: test
-  tags:
-    - macos
-  script:
-    - cd tests/regression_test/tests
-    - python3 -m pytest --path=../../../build/petrack.app/Contents/MacOS/petrack --junitxml=pytest_report.xml | tee "RegressionTestLog.txt"
-  artifacts:
-    when: on_failure
-    paths:
-      - "tests/regression_test/tests/RegressionTestLog.txt"
-    reports:
-      junit: "tests/regression_test/tests/pytest_report.xml"
-  needs: ["build_macos"]
+#regression_test_macos:
+#  stage: test
+#  tags:
+#    - macos
+#  script:
+#    - cd tests/regression_test/tests
+#    - python3 -m pytest --path=../../../build/petrack.app/Contents/MacOS/petrack --junitxml=pytest_report.xml | tee "RegressionTestLog.txt"
+#  artifacts:
+#    when: on_failure
+#    paths:
+#      - "tests/regression_test/tests/RegressionTestLog.txt"
+#    reports:
+#      junit: "tests/regression_test/tests/pytest_report.xml"
+#  needs: ["build_macos"]
 
 make_release_macos:
   image: $CI_REGISTRY/ped-dyn-emp/petrack/alpine
-- 
GitLab


From d6ebd190a87b3fb59cd99291f8375b6c3e2ba57e Mon Sep 17 00:00:00 2001
From: schroedtert <t.schroedter@fz-juelich.de>
Date: Mon, 23 May 2022 09:18:07 +0200
Subject: [PATCH 4/5] Re-enable regression tests

Signed-off-by: schroedtert <t.schroedter@fz-juelich.de>
---
 .gitlab-ci.yml | 92 +++++++++++++++++++++++++-------------------------
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1d913615e..557cc1ae9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -77,20 +77,20 @@ unit_test_linux:
       junit: "build/tests/unit_test/unit_test_report.xml"
   needs: ["build_linux"]
 
-## Execute regression tests
-#regression_test_linux:
-#  image: $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_SLUG}_linux
-#  stage: test
-#  script:
-#    - cd tests/regression_test/tests
-#    - python3 -m pytest --path=../../../build/petrack --junitxml=pytest_report.xml | tee "RegressionTestLog.txt"
-#  artifacts:
-#    when: on_failure
-#    paths:
-#      - "tests/regression_test/tests/RegressionTestLog.txt"
-#    reports:
-#      junit: "tests/regression_test/tests/pytest_report.xml"
-#  needs: ["build_linux"]
+# Execute regression tests
+regression_test_linux:
+  image: $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_SLUG}_linux
+  stage: test
+  script:
+    - cd tests/regression_test/tests
+    - python3 -m pytest --path=../../../build/petrack --junitxml=pytest_report.xml | tee "RegressionTestLog.txt"
+  artifacts:
+    when: on_failure
+    paths:
+      - "tests/regression_test/tests/RegressionTestLog.txt"
+    reports:
+      junit: "tests/regression_test/tests/pytest_report.xml"
+  needs: ["build_linux"]
 
 
 ###############################################################################
@@ -129,27 +129,27 @@ unit_test_windows:
   needs: ["build_windows"]
 
 # Ggf. muss man nicht in den Ordner der Testskripte verzweigen, da PyTest auch rekusrsiv in Unterorndern nach tests sucht
-#regression_test_windows:
-#  stage: test
-#  tags:
-#    - windows
-#  script:
-#    - cd tests/regression_test/tests
-#    - python -m pytest --junitxml=pytest_report.xml | Tee-Object -FilePath "RegressionTestLog.txt"
-#  artifacts:
-#    when: on_failure
-#    paths:
-#      - "tests/regression_test/tests/RegressionTestLog.txt"
-#    reports:
-#      junit: "tests/regression_test/tests/pytest_report.xml"
-#  needs: ["build_windows"]
+regression_test_windows:
+  stage: test
+  tags:
+    - windows
+  script:
+    - cd tests/regression_test/tests
+    - python -m pytest --junitxml=pytest_report.xml | Tee-Object -FilePath "RegressionTestLog.txt"
+  artifacts:
+    when: on_failure
+    paths:
+      - "tests/regression_test/tests/RegressionTestLog.txt"
+    reports:
+      junit: "tests/regression_test/tests/pytest_report.xml"
+  needs: ["build_windows"]
 
 build_installer_windows:
   stage: build_installer
-#  rules:
-#    - if: $CI_PIPELINE_SOURCE == "schedule"
-#      when: never
-#    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "schedule"
+      when: never
+    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
   tags:
     - windows
   script:
@@ -221,20 +221,20 @@ unit_test_macos:
   needs: ["build_macos"]
 
 # Execute regression tests
-#regression_test_macos:
-#  stage: test
-#  tags:
-#    - macos
-#  script:
-#    - cd tests/regression_test/tests
-#    - python3 -m pytest --path=../../../build/petrack.app/Contents/MacOS/petrack --junitxml=pytest_report.xml | tee "RegressionTestLog.txt"
-#  artifacts:
-#    when: on_failure
-#    paths:
-#      - "tests/regression_test/tests/RegressionTestLog.txt"
-#    reports:
-#      junit: "tests/regression_test/tests/pytest_report.xml"
-#  needs: ["build_macos"]
+regression_test_macos:
+  stage: test
+  tags:
+    - macos
+  script:
+    - cd tests/regression_test/tests
+    - python3 -m pytest --path=../../../build/petrack.app/Contents/MacOS/petrack --junitxml=pytest_report.xml | tee "RegressionTestLog.txt"
+  artifacts:
+    when: on_failure
+    paths:
+      - "tests/regression_test/tests/RegressionTestLog.txt"
+    reports:
+      junit: "tests/regression_test/tests/pytest_report.xml"
+  needs: ["build_macos"]
 
 make_release_macos:
   image: $CI_REGISTRY/ped-dyn-emp/petrack/alpine
-- 
GitLab


From cc9ae5999ac5b8dbbf9f854968a3d3341b1cdbeb Mon Sep 17 00:00:00 2001
From: schroedtert <t.schroedter@fz-juelich.de>
Date: Thu, 9 Jun 2022 11:47:18 +0200
Subject: [PATCH 5/5] Rename to better distingush between 0- and 1-based
 index/IDs

Signed-off-by: schroedtert <t.schroedter@fz-juelich.de>
---
 include/personStorage.h | 2 +-
 src/personStorage.cpp   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/personStorage.h b/include/personStorage.h
index 2b1286a88..4ebcf8d8a 100644
--- a/include/personStorage.h
+++ b/include/personStorage.h
@@ -123,7 +123,7 @@ public:
     // rueckgabewert false wenn keine hoeheninformationen in tracker datensatz vorliegt
     bool printHeightDistribution();
     void setMarkerHeights(const std::unordered_map<int, float> &heights);
-    void setMarkerID(int person, int markerIDs, bool manual = false);
+    void setMarkerID(int personIndex, int markerIDs, bool manual = false);
     void setMarkerIDs(const std::unordered_map<int, int> &markerIDs);
     void purge(int frame);
 
diff --git a/src/personStorage.cpp b/src/personStorage.cpp
index e4b35f03b..0ec16fd24 100644
--- a/src/personStorage.cpp
+++ b/src/personStorage.cpp
@@ -1107,16 +1107,16 @@ void PersonStorage::setMarkerHeights(const std::unordered_map<int, float> &heigh
 
 /**
  * Sets/Overwrites the markerID for a specific person and all trackpaints belonging to that person
- * @param personID internal id of persons (0 based)
+ * @param personIndex internal id of persons (0 based)
  * @param markerIDs new marker ID
  */
-void PersonStorage::setMarkerID(int personID, int markerID, bool manual)
+void PersonStorage::setMarkerID(int personIndex, int markerID, bool manual)
 {
     if(manual)
     {
         mAutosave.trackPersonModified();
     }
-    auto &person = mPersons.at(personID);
+    auto &person = mPersons.at(personIndex);
     person.setMarkerID(markerID);
     for(auto &trackPoint : person) // over TrackPoints
     {
-- 
GitLab