Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ jobs:
unittest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
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"
- os: windows-latest
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:
Expand All @@ -36,21 +38,30 @@ jobs:
pip install .[dev]
- name: Test with pytest
env:
MPLBACKEND: TkAgg
MPLBACKEND: Agg
run: |
pytest -s --ignore=W605 --timeout=50 --timeout_method=thread
pytest -s --timeout=50 --timeout_method=thread

all-unittests-passed:
needs: unittest
if: always()
runs-on: ubuntu-latest
steps:
- name: Check unittest status
if: ${{ needs.unittest.result != 'success' }}
run: exit 1

codecov:
# If all tests pass:
# Run coverage and upload to codecov
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
Expand All @@ -61,7 +72,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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions tests/base/test_transforms3d_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from math import pi
import math
from scipy.linalg import logm, expm
import os
import pytest
import sys

Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
16 changes: 11 additions & 5 deletions tests/test_spline.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
import pytest

import numpy.testing as nt
import numpy as np
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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,
)
Loading