From aff08d22dd176365e1b9314f324c2891d7629f03 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Thu, 30 Apr 2026 14:16:17 +1000 Subject: [PATCH 1/7] Update CI actions - update Python used for sphinx build, coverage, testing - update version of actions used. --- .github/workflows/master.yml | 15 ++++++++------- .github/workflows/publish.yml | 4 ++-- .github/workflows/sphinx.yml | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 23deebe9..82442f07 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -17,7 +17,8 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-22.04, macos-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + # https://devguide.python.org/versions/ + python-version: ["3.10", "3.11", "3.12", "3.13"] exclude: - os: windows-latest python-version: "3.11" @@ -25,7 +26,7 @@ jobs: python-version: "3.12" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -36,7 +37,7 @@ jobs: pip install .[dev] - name: Test with pytest env: - MPLBACKEND: TkAgg + MPLBACKEND: Agg run: | pytest -s --ignore=W605 --timeout=50 --timeout_method=thread @@ -46,11 +47,11 @@ jobs: needs: unittest runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip @@ -61,7 +62,7 @@ jobs: coverage report coverage xml - name: upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 with: file: ./coverage.xml sphinx: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e2d439fd..0c2c1f88 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,10 +16,10 @@ jobs: max-parallel: 2 matrix: os: [ubuntu-22.04] - python-version: [3.8] + python-version: [3.12] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 45105ee5..eb05fff7 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -8,11 +8,11 @@ jobs: runs-on: ubuntu-22.04 if: ${{ github.event_name != 'pull_request' }} steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip From e5bf170a6e79b854932d10476217c9d6d39c24e9 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Thu, 30 Apr 2026 16:24:18 +1000 Subject: [PATCH 2/7] Fix CI test errors - skips tests that run forever, interaction of plt.pause() with Agg backend. --- .github/workflows/master.yml | 2 +- tests/base/test_transforms3d_plot.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 82442f07..d292a707 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -39,7 +39,7 @@ jobs: env: MPLBACKEND: Agg run: | - pytest -s --ignore=W605 --timeout=50 --timeout_method=thread + pytest -s --timeout=50 --timeout_method=thread codecov: # If all tests pass: diff --git a/tests/base/test_transforms3d_plot.py b/tests/base/test_transforms3d_plot.py index f250df4a..1f05806e 100755 --- a/tests/base/test_transforms3d_plot.py +++ b/tests/base/test_transforms3d_plot.py @@ -14,6 +14,7 @@ from math import pi import math from scipy.linalg import logm, expm +import os import pytest import sys @@ -25,8 +26,9 @@ class Test3D(unittest.TestCase): @pytest.mark.skipif( - sys.platform.startswith("darwin") and sys.version_info < (3, 11), - reason="tkinter bug with mac", + os.environ.get("CI") == "true" + or (sys.platform.startswith("darwin") and sys.version_info < (3, 11)), + reason="no display in CI / tkinter bug on mac", ) def test_plot(self): plt.figure() @@ -72,8 +74,9 @@ def test_plot(self): plt.close("all") @pytest.mark.skipif( - sys.platform.startswith("darwin") and sys.version_info < (3, 11), - reason="tkinter bug with mac", + os.environ.get("CI") == "true" + or (sys.platform.startswith("darwin") and sys.version_info < (3, 11)), + reason="no display in CI / tkinter bug on mac", ) def test_animate(self): tranimate(transl(1, 2, 3), repeat=False, wait=True) From ad2d69e8bde1eadb43f8b3b44efc09805a2df2c8 Mon Sep 17 00:00:00 2001 From: Jenny Barry Date: Thu, 30 Apr 2026 08:48:16 -0400 Subject: [PATCH 3/7] Do not fail fast so we can see which jobs are failing --- .github/workflows/master.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index d292a707..0dd2101c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -16,6 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: + fail-fast: false os: [windows-latest, ubuntu-22.04, macos-latest] # https://devguide.python.org/versions/ python-version: ["3.10", "3.11", "3.12", "3.13"] From db8135de786d522bdf49787c7fccda06b868e2d7 Mon Sep 17 00:00:00 2001 From: Jenny Barry Date: Thu, 30 Apr 2026 08:53:05 -0400 Subject: [PATCH 4/7] Fix where fail-fast goes --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 0dd2101c..3efa466c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -15,8 +15,8 @@ jobs: unittest: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - fail-fast: false os: [windows-latest, ubuntu-22.04, macos-latest] # https://devguide.python.org/versions/ python-version: ["3.10", "3.11", "3.12", "3.13"] From abac9fc3445cdcf4cec8fd8e7906c47c3161232d Mon Sep 17 00:00:00 2001 From: Jenny Barry Date: Thu, 30 Apr 2026 08:55:53 -0400 Subject: [PATCH 5/7] Add single check for all jobs and increase timeout --- .github/workflows/master.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 3efa466c..a4e5d77c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -40,7 +40,16 @@ jobs: env: MPLBACKEND: Agg run: | - pytest -s --timeout=50 --timeout_method=thread + pytest -s --timeout=1000 --timeout_method=thread + + all-unittests-passed: + needs: unittest + if: always() + runs-on: ubuntu-latest + steps: + - name: Check unittest status + if: ${{ needs.test.result != 'success' }} + run: exit 1 codecov: # If all tests pass: From 5c89fa44a446f79728642597e8cd9918acee98b9 Mon Sep 17 00:00:00 2001 From: Jenny Barry Date: Thu, 30 Apr 2026 09:02:14 -0400 Subject: [PATCH 6/7] Remove visualization in test spline --- .github/workflows/master.yml | 2 +- tests/test_spline.py | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a4e5d77c..af028a3a 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -40,7 +40,7 @@ jobs: env: MPLBACKEND: Agg run: | - pytest -s --timeout=1000 --timeout_method=thread + pytest -s --timeout=50 --timeout_method=thread all-unittests-passed: needs: unittest diff --git a/tests/test_spline.py b/tests/test_spline.py index 9f27c608..1a8ae0e8 100644 --- a/tests/test_spline.py +++ b/tests/test_spline.py @@ -1,3 +1,6 @@ +import os +import pytest + import numpy.testing as nt import numpy as np import matplotlib.pyplot as plt @@ -25,6 +28,7 @@ def test_evaluation(self): nt.assert_almost_equal(spline(0).A, self.control_poses[0].A) nt.assert_almost_equal(spline(1).A, self.control_poses[-1].A) + @pytest.mark.skipif(os.environ.get("CI") == "true", reason="no display in CI") def test_visualize(self): spline = BSplineSE3(self.control_poses) spline.visualize( @@ -65,6 +69,7 @@ def test_small_delta_t(self): np.linspace(0, InterpSplineSE3._e, len(self.waypoints)), self.waypoints ) + @pytest.mark.skipif(os.environ.get("CI") == "true", reason="no display in CI") def test_visualize(self): spline = InterpSplineSE3(self.times, self.waypoints) spline.visualize( @@ -105,8 +110,9 @@ def test_spline_fit(self): assert fit.max_angular_error() < np.deg2rad(5.0) assert fit.max_angular_error() < 0.1 - spline.visualize( - sample_times=np.linspace(0, self.time_horizon, 100), - animate=True, - repeat=False, - ) + if os.environ.get("CI") != "true": + spline.visualize( + sample_times=np.linspace(0, self.time_horizon, 100), + animate=True, + repeat=False, + ) From 8b322696800a5d9888f33879c07ff0cabe37e1ec Mon Sep 17 00:00:00 2001 From: Jenny Barry Date: Thu, 30 Apr 2026 09:04:48 -0400 Subject: [PATCH 7/7] Fix all-unittests-passed check --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index af028a3a..9d1b0daf 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check unittest status - if: ${{ needs.test.result != 'success' }} + if: ${{ needs.unittest.result != 'success' }} run: exit 1 codecov: