diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 87fac0e2..1759950c 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] @@ -40,11 +40,15 @@ 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 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: | 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] diff --git a/tests/unit/test_model_parameters.py b/tests/unit/test_model_parameters.py index 52b2761d..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( - 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_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..99e14e3a 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", "str"] data = [{"name": "First", "type": "int"}, {"name": "Second", "type": "string"}] var_list, dtypes_list = sc._input_var_lists(data) 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