Skip to content

Commit e12aab3

Browse files
authored
MAINT drop python 2 and upgrade scikit-learn 0.21 (#576)
1 parent 77cad85 commit e12aab3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+322
-224
lines changed

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# make it explicit that we favor the new container-based travis workers
2-
dist: trusty
2+
dist: xenial
33
sudo: false
44

55
language: python
@@ -16,8 +16,8 @@ cache:
1616
addons:
1717
apt:
1818
packages:
19-
- python-numpy
20-
- python-scipy
19+
- python3-numpy
20+
- python3-scipy
2121
env:
2222
global:
2323
# Directory where tests are run from
@@ -32,12 +32,10 @@ matrix:
3232
# Ubuntu 14.04 environment
3333
- env: DISTRIB="ubuntu"
3434
# Latest release
35-
- env: DISTRIB="conda" PYTHON_VERSION="2.7"
36-
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.20"
3735
- env: DISTRIB="conda" PYTHON_VERSION="3.6"
38-
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="0.20"
36+
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="0.21"
3937
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
40-
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.20"
38+
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.21"
4139
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
4240
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="master"
4341
allow_failures:

README.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,18 @@ Installation
5252
Dependencies
5353
~~~~~~~~~~~~
5454

55-
imbalanced-learn is tested to work under Python 2.7 and Python 3.6, and
56-
3.7. The dependency requirements are based on the last scikit-learn release:
55+
imbalanced-learn is tested to work under Python 3.6+.
56+
The dependency requirements are based on the last scikit-learn release:
5757

58-
* scipy(>=0.13.3)
59-
* numpy(>=1.8.2)
60-
* scikit-learn(>=0.20)
58+
* scipy(>=0.17)
59+
* numpy(>=1.11)
60+
* scikit-learn(>=0.21)
6161
* keras 2 (optional)
6262
* tensorflow (optional)
6363

6464
Additionally, to run the examples, you need matplotlib(>=2.0.0) and
6565
pandas(>=0.22).
6666

67-
**imbalanced-learn 0.4 is the last version to support Python 2.7**
68-
6967
Installation
7068
~~~~~~~~~~~~
7169

appveyor.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ environment:
77
# We run the tests on 2 different target platforms for testing purpose only.
88
# We use miniconda versions of Python provided by appveyor windows images
99
matrix:
10-
- PYTHON: "C:\\Miniconda-x64"
11-
PYTHON_VERSION: "2.7"
12-
PYTHON_ARCH: "64"
13-
OPTIONAL_DEP: "pandas"
14-
15-
- PYTHON: "C:\\Miniconda"
16-
PYTHON_VERSION: "2.7"
17-
PYTHON_ARCH: "32"
18-
OPTIONAL_DEP: "pandas"
19-
2010
- PYTHON: "C:\\Miniconda36-x64"
2111
PYTHON_VERSION: "3.6"
2212
PYTHON_ARCH: "64"

build_tools/travis/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then
6464
# install.
6565
deactivate
6666
# Create a new virtualenv using system site packages for python, numpy
67-
virtualenv --system-site-packages testvenv
67+
virtualenv --system-site-packages --python=python3 testvenv
6868
source testvenv/bin/activate
6969

70-
pip install scikit-learn
71-
pip install pandas keras tensorflow
72-
pip install pytest pytest-cov codecov sphinx numpydoc
70+
pip3 install scikit-learn
71+
pip3 install pandas keras tensorflow
72+
pip3 install pytest pytest-cov codecov sphinx numpydoc
7373

7474
fi
7575

doc/conf.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import os
1616
import sys
1717
import sphinx_rtd_theme
18-
from sklearn.externals.six import u
1918

2019
# If extensions (or modules to document with autodoc) are in another directory,
2120
# add these directories to sys.path here. If the directory is relative to the
@@ -76,8 +75,8 @@
7675
master_doc = 'index'
7776

7877
# General information about the project.
79-
project = u('imbalanced-learn')
80-
copyright = u('2016 - 2017, G. Lemaitre, F. Nogueira, D. Oliveira, C. Aridas')
78+
project = 'imbalanced-learn'
79+
copyright = '2016 - 2017, G. Lemaitre, F. Nogueira, D. Oliveira, C. Aridas'
8180

8281
# The version info for the project you're documenting, acts as replacement for
8382
# |version| and |release|, also used in various other places throughout the
@@ -231,8 +230,8 @@
231230
# (source start file, target name, title,
232231
# author, documentclass [howto, manual, or own class]).
233232
latex_documents = [
234-
('index', 'imbalanced-learn.tex', u('imbalanced-learn Documentation'),
235-
u('G. Lemaitre, F. Nogueira, D. Oliveira, C. Aridas'), 'manual'),
233+
('index', 'imbalanced-learn.tex', 'imbalanced-learn Documentation',
234+
'G. Lemaitre, F. Nogueira, D. Oliveira, C. Aridas', 'manual'),
236235
]
237236

238237
# The name of an image file (relative to this directory) to place at the top of
@@ -278,8 +277,8 @@
278277

279278
# One entry per manual page. List of tuples
280279
# (source start file, name, description, authors, manual section).
281-
man_pages = [('index', 'imbalanced-learn', u'imbalanced-learn Documentation',
282-
[u'G. Lemaitre, F. Nogueira, D. Oliveira, C. Aridas'], 1)]
280+
man_pages = [('index', 'imbalanced-learn', 'imbalanced-learn Documentation',
281+
['G. Lemaitre, F. Nogueira, D. Oliveira, C. Aridas'], 1)]
283282

284283
# If true, show URL addresses after external links.
285284
# man_show_urls = False
@@ -290,8 +289,8 @@
290289
# (source start file, target name, title, author,
291290
# dir menu entry, description, category)
292291
texinfo_documents = [
293-
('index', 'imbalanced-learn', u'imbalanced-learn Documentation',
294-
u'G. Lemaitre, F. Nogueira, D. Oliveira, C. Aridas', 'imbalanced-learn',
292+
('index', 'imbalanced-learn', 'imbalanced-learn Documentation',
293+
'G. Lemaitre, F. Nogueira, D. Oliveira, C. Aridas', 'imbalanced-learn',
295294
'Toolbox for imbalanced dataset in machine learning.', 'Miscellaneous'),
296295
]
297296

@@ -332,6 +331,6 @@ def setup(app):
332331

333332
# The following is used by sphinx.ext.linkcode to provide links to github
334333
linkcode_resolve = make_linkcode_resolve('imblearn',
335-
u'https://github.com/scikit-learn-contrib/'
334+
'https://github.com/scikit-learn-contrib/'
336335
'imbalanced-learn/blob/{revision}/'
337336
'{package}/{path}#L{lineno}')

doc/install.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ Prerequisites
77

88
The imbalanced-learn package requires the following dependencies:
99

10-
* numpy (>=1.8.2)
11-
* scipy (>=0.13.3)
12-
* scikit-learn (>=0.20)
10+
* numpy (>=1.11)
11+
* scipy (>=0.17)
12+
* scikit-learn (>=0.21)
1313
* keras 2 (optional)
1414
* tensorflow (optional)
1515

16-
Our release policy is to follow the scikit-learn releases in order to
17-
synchronize the new feature. **imbalanced-learn 0.4 is the last version to
18-
support Python 2.7**
19-
2016
Install
2117
=======
2218

0 commit comments

Comments
 (0)