From 93a94fcc64be9196ff097ddd3aaab2a557067cbb Mon Sep 17 00:00:00 2001 From: janezd Date: Wed, 17 Jan 2024 14:43:17 +0100 Subject: [PATCH 1/3] Require Orange 3.34 --- orangecontrib/geo/__init__.py | 17 ----------------- orangecontrib/geo/tests/test_utils.py | 12 ------------ setup.py | 2 +- tox.ini | 7 ++----- 4 files changed, 3 insertions(+), 35 deletions(-) diff --git a/orangecontrib/geo/__init__.py b/orangecontrib/geo/__init__.py index 55766d7..9add093 100644 --- a/orangecontrib/geo/__init__.py +++ b/orangecontrib/geo/__init__.py @@ -1,23 +1,6 @@ from os.path import join, dirname from Orange.data.table import dataset_dirs -from Orange.data import Table dataset_dirs.insert(0, join(dirname(__file__), "datasets")) del join, dirname, dataset_dirs - - -# Remove this when we require Orange 3.34 -if not hasattr(Table, "get_column"): - import scipy.sparse as sp - import numpy as np - - def get_column(self, column): - col, _ = self.get_column_view(column) - if sp.issparse(col): - col = col.toarray().reshape(-1) - if self.domain[column].is_primitive(): - col = col.astype(np.float64) - return col - - Table.get_column = get_column diff --git a/orangecontrib/geo/tests/test_utils.py b/orangecontrib/geo/tests/test_utils.py index 87e6a0f..07900c0 100755 --- a/orangecontrib/geo/tests/test_utils.py +++ b/orangecontrib/geo/tests/test_utils.py @@ -99,17 +99,5 @@ def attrs_for(*attrs, x=None): self.assertEqual(attrs_for(d1, c3, c2, c1), (c3, c3)) -class TestDeprecations(unittest.TestCase): - def test_remove_get_column_workaround(self): - """ - When this tests start to fail: - 1. remove this test - 2. set minimum version of Orange to 3.34 if not set yet - 3. remove workaround from __inint__.py - """ - from datetime import datetime - self.assertLess(datetime.today(), datetime(2024, 1, 1)) - - if __name__ == "__main__": unittest.main() diff --git a/setup.py b/setup.py index 644bddb..2f1b7ff 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ def _discover_tests(): packages=find_packages(), include_package_data=True, install_requires=[ - 'Orange3>=3.31.0', + 'Orange3>=3.34.0', 'scikit-learn', 'pandas', 'scipy>=0.17', diff --git a/tox.ini b/tox.ini index 6f21679..8e02d46 100644 --- a/tox.ini +++ b/tox.ini @@ -22,11 +22,8 @@ setenv = deps = {env:PYQT_PYPI_NAME:PyQt5}=={env:PYQT_PYPI_VERSION:5.15.*} {env:WEBENGINE_PYPI_NAME:PyQtWebEngine}=={env:WEBENGINE_PYPI_VERSION:5.15.*} - oldest: scikit-learn~=0.23.1 - oldest: numpy~=1.21.0 # some older version - oldest: orange3==3.31.0 - oldest: orange-canvas-core==0.1.24 - oldest: orange-widget-base==4.16.1 + oldest: orange3==3.34.0 + oldest: pandas==1.4.0 latest: https://github.com/biolab/orange3/archive/refs/heads/master.zip#egg=orange3 latest: https://github.com/biolab/orange-canvas-core/archive/refs/heads/master.zip#egg=orange-canvas-core latest: https://github.com/biolab/orange-widget-base/archive/refs/heads/master.zip#egg=orange-widget-base From 0b4be8c725df55af550ca32649eabf6c0c4c25f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Primo=C5=BE=20Godec?= Date: Fri, 19 Jan 2024 09:29:45 +0100 Subject: [PATCH 2/3] Update tox.ini --- tox.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tox.ini b/tox.ini index 8e02d46..7b2a1df 100644 --- a/tox.ini +++ b/tox.ini @@ -22,8 +22,12 @@ setenv = deps = {env:PYQT_PYPI_NAME:PyQt5}=={env:PYQT_PYPI_VERSION:5.15.*} {env:WEBENGINE_PYPI_NAME:PyQtWebEngine}=={env:WEBENGINE_PYPI_VERSION:5.15.*} + oldest: numpy~=1.21.0 # some older version oldest: orange3==3.34.0 + oldest: orange-canvas-core==0.1.28 + oldest: orange-widget-base==4.19.0 oldest: pandas==1.4.0 + oldest: scikit-learn~=1.0.1 latest: https://github.com/biolab/orange3/archive/refs/heads/master.zip#egg=orange3 latest: https://github.com/biolab/orange-canvas-core/archive/refs/heads/master.zip#egg=orange-canvas-core latest: https://github.com/biolab/orange-widget-base/archive/refs/heads/master.zip#egg=orange-widget-base From 0f0a78e45c1a7a928d73f11b20fdbcaffaf42f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Primo=C5=BE=20Godec?= Date: Fri, 19 Jan 2024 09:41:44 +0100 Subject: [PATCH 3/3] Update tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7b2a1df..6d5a09b 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ setenv = deps = {env:PYQT_PYPI_NAME:PyQt5}=={env:PYQT_PYPI_VERSION:5.15.*} {env:WEBENGINE_PYPI_NAME:PyQtWebEngine}=={env:WEBENGINE_PYPI_VERSION:5.15.*} - oldest: numpy~=1.21.0 # some older version + oldest: numpy~=1.22.0 # some older version oldest: orange3==3.34.0 oldest: orange-canvas-core==0.1.28 oldest: orange-widget-base==4.19.0