From 4cc143cdf70fd318606c32fa97a3449ce9833ac1 Mon Sep 17 00:00:00 2001 From: djm21 Date: Tue, 18 Aug 2026 08:41:10 -0700 Subject: [PATCH 1/8] Change default testing versions to mirror currently supported python versions --- tox.ini | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index 350f656c..d1d2e3e0 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ [tox] requires = tox>=4 -envlist = py{38,39,310,311}-tests-{clean,unit,integration} +envlist = py{310,311,312,313,314}-tests-{clean,unit,integration} # Allow execution even if all Python versions are not present skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True} @@ -21,10 +21,11 @@ skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True} # Required by tox-gh-actions GH action. Maps GH Python runtime to tox envlist. [gh-actions] python = - 3.8: py38 - 3.9: py39 3.10: py310 3.11: py311 + 3.12: py312 + 3.13: py313 + 3.14: py314 [testenv] description = run standard unit and integration tests @@ -43,14 +44,14 @@ deps = tests: pytest-cov tests: betamax >= 0.8.1 tests: betamax_serializers >= 0.2.0 - tests: scikit-learn < 1.5.0 - tests: pandas < 2.0.0 - tests: numpy < 2.0.0 + tests: scikit-learn + tests: pandas + tests: numpy tests: cython # required to install pandas from source tests: swat >= 1.8 tests: kerberos ; platform_system != "Windows" and platform_system != "Darwin" - tests: xgboost == 1.7.3 - tests: urllib3 < 2.0.0 + tests: xgboost + tests: urllib3 tests: nbconvert tests: nbformat # tests: torch From 2ed8af4b15b488103274fcb08a32327475587714 Mon Sep 17 00:00:00 2001 From: djm21 Date: Tue, 18 Aug 2026 08:42:35 -0700 Subject: [PATCH 2/8] more testing version updates --- .github/workflows/build-test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 87fac0e2..f0dc3df4 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -21,7 +21,7 @@ jobs: LANG: en_US.UTF-8 strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] os-version: ['ubuntu-latest', 'windows-latest', 'macos-latest'] # os-version: [ubuntu-latest, windows-latest, macos-latest] From c62d395942fcaf53f4a1143793e23415473b4d25 Mon Sep 17 00:00:00 2001 From: djm21 Date: Tue, 18 Aug 2026 08:47:29 -0700 Subject: [PATCH 3/8] remove upper bounds on python imports for testing environments --- .github/workflows/build-test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index f0dc3df4..2e6f9d4a 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -44,7 +44,7 @@ jobs: run: | # Setup tox & code coverage pip install --upgrade pip - pip install tox tox-gh-actions pytest pytest-cov 'scikit-learn<=1.5.0' 'numpy<2.0.0' + pip install tox tox-gh-actions pytest pytest-cov 'scikit-learn' 'numpy' - name: Run Tests run: | From 362f4007b9a75f9d60451864b88b021ca98817a4 Mon Sep 17 00:00:00 2001 From: djm21 Date: Tue, 18 Aug 2026 09:05:18 -0700 Subject: [PATCH 4/8] add libomp to test xgboost in macos testing envs --- .github/workflows/build-test-deploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 2e6f9d4a..1759950c 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -40,6 +40,10 @@ jobs: sudo apt-get update sudo apt-get install build-essential libkrb5-dev + - name: Install dependencies (macOS) + if: startsWith(matrix.os-version, 'macos') + run: brew install libomp + - name: Install dependencies (Common) run: | # Setup tox & code coverage From 4a328518525b4856c61e83d271b31a942ce59707 Mon Sep 17 00:00:00 2001 From: djm21 Date: Tue, 18 Aug 2026 09:38:37 -0700 Subject: [PATCH 5/8] fix more tests --- tests/unit/test_model_parameters.py | 2 +- tests/unit/test_write_json_files.py | 4 +--- tests/unit/test_write_score_code.py | 6 +++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_model_parameters.py b/tests/unit/test_model_parameters.py index 52b2761d..10a5d159 100644 --- a/tests/unit/test_model_parameters.py +++ b/tests/unit/test_model_parameters.py @@ -48,7 +48,7 @@ def sklearn_model(train_data): with warnings.catch_warnings(): warnings.simplefilter("ignore") model = LogisticRegression( - multi_class="multinomial", solver="lbfgs", max_iter=1000 + solver="lbfgs", max_iter=1000 ) model.fit(X, y) return model diff --git a/tests/unit/test_write_json_files.py b/tests/unit/test_write_json_files.py index 3321fc30..c4e8cc56 100644 --- a/tests/unit/test_write_json_files.py +++ b/tests/unit/test_write_json_files.py @@ -74,9 +74,7 @@ def sklearn_model(train_data): X, y = train_data with warnings.catch_warnings(): warnings.simplefilter("ignore") - model = LogisticRegression( - multi_class="multinomial", solver="lbfgs", max_iter=1000 - ) + model = LogisticRegression(solver="lbfgs", max_iter=1000) model.fit(X, y) return model diff --git a/tests/unit/test_write_score_code.py b/tests/unit/test_write_score_code.py index f953b5cf..7ef4d7f8 100644 --- a/tests/unit/test_write_score_code.py +++ b/tests/unit/test_write_score_code.py @@ -11,6 +11,7 @@ import pandas as pd import pytest +from packaging.version import Version from sasctl import current_session from sasctl.core import RestObj, VersionInfo @@ -1165,7 +1166,10 @@ def test_input_var_lists(): data = pd.DataFrame(data=[[1, "A"], [5, "B"]], columns=["First", "Second"]) var_list, dtypes_list = sc._input_var_lists(data) assert var_list == ["First", "Second"] - assert dtypes_list == ["int64", "object"] + if Version(pd.__version__) < Version("3.0.0"): + assert dtypes_list == ["int64", "object"] + else: + assert dtypes_list == ["int64", "string"] data = [{"name": "First", "type": "int"}, {"name": "Second", "type": "string"}] var_list, dtypes_list = sc._input_var_lists(data) From 59863ac2beea3b141c68a5b810b151fbd3d1e6ec Mon Sep 17 00:00:00 2001 From: djm21 Date: Tue, 18 Aug 2026 09:41:31 -0700 Subject: [PATCH 6/8] black reformatting + import organization --- tests/unit/test_model_parameters.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/unit/test_model_parameters.py b/tests/unit/test_model_parameters.py index 10a5d159..ce05e0c4 100644 --- a/tests/unit/test_model_parameters.py +++ b/tests/unit/test_model_parameters.py @@ -1,11 +1,13 @@ -import ast import copy import json import tempfile +import unittest +import uuid import warnings from pathlib import Path from unittest import mock +import numpy as np import pandas as pd import pytest from requests.models import Response @@ -14,9 +16,6 @@ from sasctl import RestObj, current_session from sasctl.pzmm import ModelParameters as mp -import unittest -import uuid -import numpy as np class BadModel: @@ -47,9 +46,7 @@ def sklearn_model(train_data): X, y = train_data with warnings.catch_warnings(): warnings.simplefilter("ignore") - model = LogisticRegression( - solver="lbfgs", max_iter=1000 - ) + model = LogisticRegression(solver="lbfgs", max_iter=1000) model.fit(X, y) return model From a93f9d0cce584e6a782976eab641000da1ce1660 Mon Sep 17 00:00:00 2001 From: djm21 Date: Tue, 18 Aug 2026 09:44:03 -0700 Subject: [PATCH 7/8] more unit test updating --- tests/conftest.py | 4 +--- tests/integration/test_model_parameters.py | 2 +- tests/integration/test_pymas.py | 4 +--- tests/integration/test_tasks.py | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a6172985..3e37830a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -532,9 +532,7 @@ def sklearn_classification_model(iris_dataset): with warnings.catch_warnings(): warnings.simplefilter("ignore") - model = sk.LogisticRegression( - multi_class="multinomial", solver="lbfgs", max_iter=1000 - ) + model = sk.LogisticRegression(solver="lbfgs", max_iter=1000) model.fit(X, y) return model diff --git a/tests/integration/test_model_parameters.py b/tests/integration/test_model_parameters.py index 2714c403..140e14f4 100644 --- a/tests/integration/test_model_parameters.py +++ b/tests/integration/test_model_parameters.py @@ -42,7 +42,7 @@ def sklearn_model(train_data): X, y = train_data with warnings.catch_warnings(): warnings.simplefilter("ignore") - model = LogisticRegression(multi_class="multinomial", solver="lbfgs") + model = LogisticRegression(solver="lbfgs") model.fit(X, y) return model diff --git a/tests/integration/test_pymas.py b/tests/integration/test_pymas.py index aef90971..fc0f7b27 100644 --- a/tests/integration/test_pymas.py +++ b/tests/integration/test_pymas.py @@ -63,9 +63,7 @@ def sklearn_model(train_data): X, y = train_data with warnings.catch_warnings(): warnings.simplefilter("ignore") - model = LogisticRegression( - multi_class="multinomial", solver="lbfgs", max_iter=10000 - ) + model = LogisticRegression(solver="lbfgs", max_iter=10000) model.fit(X, y) return model diff --git a/tests/integration/test_tasks.py b/tests/integration/test_tasks.py index d648cd2b..d85a8967 100644 --- a/tests/integration/test_tasks.py +++ b/tests/integration/test_tasks.py @@ -40,9 +40,7 @@ def sklearn_logistic_model(): with warnings.catch_warnings(): warnings.simplefilter("ignore") - model = LogisticRegression( - multi_class="multinomial", solver="lbfgs", max_iter=10000 - ) + model = LogisticRegression(solver="lbfgs", max_iter=10000) model.fit(iris.iloc[:, 0:4], iris["Species"]) return model, iris.iloc[:, 0:4] From f638f5d44b56a25e7fe9e8fb4df842f584b01afd Mon Sep 17 00:00:00 2001 From: djm21 Date: Tue, 18 Aug 2026 09:50:05 -0700 Subject: [PATCH 8/8] str instead of string --- tests/unit/test_write_score_code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_write_score_code.py b/tests/unit/test_write_score_code.py index 7ef4d7f8..99e14e3a 100644 --- a/tests/unit/test_write_score_code.py +++ b/tests/unit/test_write_score_code.py @@ -1169,7 +1169,7 @@ def test_input_var_lists(): if Version(pd.__version__) < Version("3.0.0"): assert dtypes_list == ["int64", "object"] else: - assert dtypes_list == ["int64", "string"] + assert dtypes_list == ["int64", "str"] data = [{"name": "First", "type": "int"}, {"name": "Second", "type": "string"}] var_list, dtypes_list = sc._input_var_lists(data)