From 4d1810cedf32269417272f0b438dc97f29db2e6d Mon Sep 17 00:00:00 2001 From: Jonathan Rampersad Date: Sat, 26 Sep 2026 14:46:27 +0000 Subject: [PATCH 1/6] Add Python 3.14 to automatic tests --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 857f851..f0ba760 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -6,7 +6,7 @@ jobs: runs-on: nvidia-cuda strategy: matrix: - python-version: ["3.8", "3.10", "3.12"] + python-version: ["3.8", "3.10", "3.12", "3.14"] steps: - name: Checkout repository -- 2.54.0 From d23861eaf11a78ba09b1d3b850ab239b6cc5c6e8 Mon Sep 17 00:00:00 2001 From: Jonathan Rampersad Date: Sat, 26 Sep 2026 14:46:56 +0000 Subject: [PATCH 2/6] Update Python version to 3.14 --- .gitea/workflows/publish-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/publish-python.yml b/.gitea/workflows/publish-python.yml index b728699..6c8bee8 100644 --- a/.gitea/workflows/publish-python.yml +++ b/.gitea/workflows/publish-python.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.14' - name: Install dependencies run: | -- 2.54.0 From 49ab363354aed67ee9e9f6fe3e422832602638c9 Mon Sep 17 00:00:00 2001 From: Jonathan Rampersad Date: Sat, 26 Sep 2026 14:47:37 +0000 Subject: [PATCH 3/6] Add Python 3.14 to automatic tests --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3352ce9..269200c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,7 +81,7 @@ You can replicate our CI environment exactly to minimize "it works on my machine * **CUDA Toolkit:** 12.5.1 * **Base Docker Image:** `nvidia/cuda:12.5.1-devel-ubuntu24.04` * **Node.js Version:** 20.x -* **Python Versions Tested:** 3.8, 3.10, 3.12 +* **Python Versions Tested:** 3.8, 3.10, 3.12, 3.14 * **CI Docker Image:** You can pull the exact image used by our runners from Docker Hub: ```bash -- 2.54.0 From dd0e42f68fa0f683344da5c5bdd3e88264839d09 Mon Sep 17 00:00:00 2001 From: Jonathan Rampersad Date: Sat, 26 Sep 2026 14:48:45 +0000 Subject: [PATCH 4/6] Add Python 3.13 & 3.14 to supported version in toml file --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 11a2088..75353b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,8 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: Mathematics", ] -- 2.54.0 From 182af45fdfcbb814a1105af3fa707301ae500a86 Mon Sep 17 00:00:00 2001 From: Jonathan Rampersad Date: Sat, 26 Sep 2026 14:55:29 +0000 Subject: [PATCH 5/6] Increase num_of_generarions in get_roots tests. This is to help decrease likelihood of failure due to lower processing times. Failures at these low values can make users incorrectly think the code was broken --- tests/test_polysolve.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_polysolve.py b/tests/test_polysolve.py index 32803a4..b37c737 100644 --- a/tests/test_polysolve.py +++ b/tests/test_polysolve.py @@ -139,7 +139,7 @@ def test_get_real_roots_numpy(quadratic_func): Tests that the NumPy-based genetic algorithm approximates the roots correctly. """ # Using more generations for higher accuracy in testing - ga_opts = GA_Options(num_of_generations=50, data_size=200000, selection_percentile=0.66, root_precision=3) + ga_opts = GA_Options(num_of_generations=100, data_size=200000, selection_percentile=0.66, root_precision=3) roots = quadratic_func.get_real_roots(ga_opts, use_cuda=False) @@ -158,7 +158,7 @@ def test_get_real_roots_cuda(quadratic_func): It will be skipped automatically if CuPy is not available. """ - ga_opts = GA_Options(num_of_generations=50, data_size=200000, selection_percentile=0.66, root_precision=3) + ga_opts = GA_Options(num_of_generations=100, data_size=200000, selection_percentile=0.66, root_precision=3) roots = quadratic_func.get_real_roots(ga_opts, use_cuda=True) @@ -172,7 +172,7 @@ def test_get_roots_numpy(complex_func): Tests that the NumPy-based genetic algorithm approximates the roots correctly. """ # Using more generations for higher accuracy in testing - ga_opts = GA_Options(num_of_generations=50, data_size=200000, selection_percentile=0.66, root_precision=3) + ga_opts = GA_Options(num_of_generations=100, data_size=200000, selection_percentile=0.66, root_precision=3) roots = complex_func.get_roots(ga_opts, use_cuda=False) @@ -191,7 +191,7 @@ def test_get_roots_cuda(complex_func): It will be skipped automatically if CuPy is not available. """ - ga_opts = GA_Options(num_of_generations=50, data_size=200000, selection_percentile=0.66, root_precision=3) + ga_opts = GA_Options(num_of_generations=100, data_size=200000, selection_percentile=0.66, root_precision=3) roots = complex_func.get_roots(ga_opts, use_cuda=True) -- 2.54.0 From 7594b272111d336595061e207d61d7d7427690da Mon Sep 17 00:00:00 2001 From: Jonathan Rampersad Date: Sat, 26 Sep 2026 14:57:54 +0000 Subject: [PATCH 6/6] Made further changes to GA_options for get_roots tests --- tests/test_polysolve.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_polysolve.py b/tests/test_polysolve.py index b37c737..fb54642 100644 --- a/tests/test_polysolve.py +++ b/tests/test_polysolve.py @@ -139,7 +139,7 @@ def test_get_real_roots_numpy(quadratic_func): Tests that the NumPy-based genetic algorithm approximates the roots correctly. """ # Using more generations for higher accuracy in testing - ga_opts = GA_Options(num_of_generations=100, data_size=200000, selection_percentile=0.66, root_precision=3) + ga_opts = GA_Options(num_of_generations=100, data_size=500000, selection_percentile=0.66, root_precision=2) roots = quadratic_func.get_real_roots(ga_opts, use_cuda=False) @@ -158,7 +158,7 @@ def test_get_real_roots_cuda(quadratic_func): It will be skipped automatically if CuPy is not available. """ - ga_opts = GA_Options(num_of_generations=100, data_size=200000, selection_percentile=0.66, root_precision=3) + ga_opts = GA_Options(num_of_generations=100, data_size=500000, selection_percentile=0.66, root_precision=2) roots = quadratic_func.get_real_roots(ga_opts, use_cuda=True) @@ -172,7 +172,7 @@ def test_get_roots_numpy(complex_func): Tests that the NumPy-based genetic algorithm approximates the roots correctly. """ # Using more generations for higher accuracy in testing - ga_opts = GA_Options(num_of_generations=100, data_size=200000, selection_percentile=0.66, root_precision=3) + ga_opts = GA_Options(num_of_generations=100, data_size=500000, selection_percentile=0.66, root_precision=2) roots = complex_func.get_roots(ga_opts, use_cuda=False) @@ -191,7 +191,7 @@ def test_get_roots_cuda(complex_func): It will be skipped automatically if CuPy is not available. """ - ga_opts = GA_Options(num_of_generations=100, data_size=200000, selection_percentile=0.66, root_precision=3) + ga_opts = GA_Options(num_of_generations=100, data_size=500000, selection_percentile=0.66, root_precision=2) roots = complex_func.get_roots(ga_opts, use_cuda=True) -- 2.54.0