Skip to content

Commit

Permalink
MAINT drop python 2 and upgrade scikit-learn 0.21 (scikit-learn-contr…
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre authored Jun 7, 2019
1 parent 77cad85 commit e12aab3
Show file tree
Hide file tree
Showing 57 changed files with 322 additions and 224 deletions.
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# make it explicit that we favor the new container-based travis workers
dist: trusty
dist: xenial
sudo: false

language: python
Expand All @@ -16,8 +16,8 @@ cache:
addons:
apt:
packages:
- python-numpy
- python-scipy
- python3-numpy
- python3-scipy
env:
global:
# Directory where tests are run from
Expand All @@ -32,12 +32,10 @@ matrix:
# Ubuntu 14.04 environment
- env: DISTRIB="ubuntu"
# Latest release
- env: DISTRIB="conda" PYTHON_VERSION="2.7"
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.20"
- env: DISTRIB="conda" PYTHON_VERSION="3.6"
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="0.20"
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="0.21"
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.20"
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.21"
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="master"
allow_failures:
Expand Down
12 changes: 5 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,18 @@ Installation
Dependencies
~~~~~~~~~~~~

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

* scipy(>=0.13.3)
* numpy(>=1.8.2)
* scikit-learn(>=0.20)
* scipy(>=0.17)
* numpy(>=1.11)
* scikit-learn(>=0.21)
* keras 2 (optional)
* tensorflow (optional)

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

**imbalanced-learn 0.4 is the last version to support Python 2.7**

Installation
~~~~~~~~~~~~

Expand Down
10 changes: 0 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ environment:
# We run the tests on 2 different target platforms for testing purpose only.
# We use miniconda versions of Python provided by appveyor windows images
matrix:
- PYTHON: "C:\\Miniconda-x64"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
OPTIONAL_DEP: "pandas"

- PYTHON: "C:\\Miniconda"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
OPTIONAL_DEP: "pandas"

- PYTHON: "C:\\Miniconda36-x64"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
Expand Down
8 changes: 4 additions & 4 deletions build_tools/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then
# install.
deactivate
# Create a new virtualenv using system site packages for python, numpy
virtualenv --system-site-packages testvenv
virtualenv --system-site-packages --python=python3 testvenv
source testvenv/bin/activate

pip install scikit-learn
pip install pandas keras tensorflow
pip install pytest pytest-cov codecov sphinx numpydoc
pip3 install scikit-learn
pip3 install pandas keras tensorflow
pip3 install pytest pytest-cov codecov sphinx numpydoc

fi

Expand Down
19 changes: 9 additions & 10 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import os
import sys
import sphinx_rtd_theme
from sklearn.externals.six import u

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

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

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

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

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

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

Expand Down Expand Up @@ -332,6 +331,6 @@ def setup(app):

# The following is used by sphinx.ext.linkcode to provide links to github
linkcode_resolve = make_linkcode_resolve('imblearn',
u'https://github.com/scikit-learn-contrib/'
'https://github.com/scikit-learn-contrib/'
'imbalanced-learn/blob/{revision}/'
'{package}/{path}#L{lineno}')
10 changes: 3 additions & 7 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ Prerequisites

The imbalanced-learn package requires the following dependencies:

* numpy (>=1.8.2)
* scipy (>=0.13.3)
* scikit-learn (>=0.20)
* numpy (>=1.11)
* scipy (>=0.17)
* scikit-learn (>=0.21)
* keras 2 (optional)
* tensorflow (optional)

Our release policy is to follow the scikit-learn releases in order to
synchronize the new feature. **imbalanced-learn 0.4 is the last version to
support Python 2.7**

Install
=======

Expand Down
Loading

0 comments on commit e12aab3

Please sign in to comment.