Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Orange 3.34 #175

Merged
merged 3 commits into from
Jan 19, 2024
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
17 changes: 0 additions & 17 deletions orangecontrib/geo/__init__.py
Original file line number Diff line number Diff line change
@@ -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
12 changes: 0 additions & 12 deletions orangecontrib/geo/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +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: 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: 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
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
Expand Down