Skip to content

Commit c0a4208

Browse files
authored
MAINT: bump the version of scikit-learn 0.20rc1
1 parent fe51ca3 commit c0a4208

26 files changed

+207
-288
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ matrix:
3333
- env: DISTRIB="ubuntu"
3434
# Latest release
3535
- env: DISTRIB="conda" PYTHON_VERSION="2.7"
36-
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.19.0"
37-
- env: DISTRIB="conda" PYTHON_VERSION="3.5"
38-
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.19.0"
36+
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.20rc"
3937
- env: DISTRIB="conda" PYTHON_VERSION="3.6"
40-
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.19.0"
38+
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.20rc"
39+
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
40+
NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" SKLEARN_VERSION="0.20rc"
4141
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
4242
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="master"
4343
allow_failures:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ tools:
9898

9999
- Code with good unittest coverage (at least 80%), check with:
100100

101-
$ pip install nose coverage
102-
$ nosetests --with-coverage path/to/tests_for_package
101+
$ pip install pytest pytest-cov
102+
$ pytest --cov=imblearn imblearn
103103

104104
- No pyflakes warnings, check with:
105105

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ clean:
1313
rm -rf examples/.ipynb_checkpoints
1414

1515
test-code:
16-
py.test imblearn
16+
pytest imblearn
1717

1818
test-doc:
19-
py.test doc/*.rst
19+
pytest doc/*.rst
2020

2121
test-coverage:
2222
rm -rf coverage .coverage
23-
py.test --cov=imblearn imblearn
23+
pytest --cov=imblearn imblearn
2424

2525
test: test-coverage test-doc
2626

README.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,20 @@ Installation
4949
Dependencies
5050
~~~~~~~~~~~~
5151

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

5555
* scipy(>=0.13.3)
5656
* numpy(>=1.8.2)
57-
* scikit-learn(>=0.19.0)
57+
* scikit-learn(>=0.20)
5858
* keras 2 (optional)
5959
* tensorflow (optional)
6060

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

64+
**imbalanced-learn 0.4 is the last version to support Python 2.7**
65+
6466
Installation
6567
~~~~~~~~~~~~
6668

@@ -87,7 +89,7 @@ Or install using pip and GitHub::
8789
Testing
8890
~~~~~~~
8991

90-
After installation, you can use `nose` to run the test suite::
92+
After installation, you can use `pytest` to run the test suite::
9193

9294
make coverage
9395

appveyor.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ environment:
88
# We use miniconda versions of Python provided by appveyor windows images
99
matrix:
1010
- PYTHON: "C:\\Miniconda-x64"
11-
PYTHON_VERSION: "2.7.x"
11+
PYTHON_VERSION: "2.7"
1212
PYTHON_ARCH: "64"
1313
OPTIONAL_DEP: "pandas"
1414

1515
- PYTHON: "C:\\Miniconda"
16-
PYTHON_VERSION: "2.7.x"
16+
PYTHON_VERSION: "2.7"
1717
PYTHON_ARCH: "32"
1818
OPTIONAL_DEP: "pandas"
1919

20-
- PYTHON: "C:\\Miniconda35-x64"
21-
PYTHON_VERSION: "3.5.x"
20+
- PYTHON: "C:\\Miniconda36-x64"
21+
PYTHON_VERSION: "3.6"
2222
PYTHON_ARCH: "64"
2323
OPTIONAL_DEP: "pandas keras tensorflow"
2424

2525
- PYTHON: "C:\\Miniconda36-x64"
26-
PYTHON_VERSION: "3.6.x"
26+
PYTHON_VERSION: "3.7"
2727
PYTHON_ARCH: "64"
28-
OPTIONAL_DEP: "pandas keras tensorflow"
28+
OPTIONAL_DEP: "pandas"
2929

3030
- PYTHON: "C:\\Miniconda36"
31-
PYTHON_VERSION: "3.6.x"
31+
PYTHON_VERSION: "3.7"
3232
PYTHON_ARCH: "32"
3333
OPTIONAL_DEP: "pandas"
3434

@@ -37,11 +37,14 @@ install:
3737
# Add Library/bin directory to fix issue
3838
# https://github.com/conda/conda/issues/1753
3939
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PYTHON%\\Library\\bin;%PATH%"
40-
- conda install pip scipy numpy scikit-learn=0.19 -y -q
40+
- conda update conda -y -q
41+
- conda create -n testenv --yes python=%PYTHON_VERSION% pip
42+
- activate testenv
43+
- conda install scipy numpy -y -q
44+
- pip install --pre scikit-learn
4145
- "conda install %OPTIONAL_DEP% -y -q"
4246
- conda install pytest pytest-cov -y -q
4347
- pip install codecov
44-
- conda install nose -y -q # FIXME: remove this line when using sklearn > 0.19
4548
- pip install .
4649

4750
test_script:

build_tools/circle/build_doc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ conda create -n $CONDA_ENV_NAME --yes --quiet python=3
9292
source activate $CONDA_ENV_NAME
9393

9494
conda install --yes pip numpy scipy scikit-learn pillow matplotlib sphinx \
95-
sphinx_rtd_theme numpydoc pandas keras nose
95+
sphinx_rtd_theme numpydoc pandas keras
9696
pip install -U git+https://github.com/sphinx-gallery/sphinx-gallery.git
9797

9898
# Build and install imbalanced-learn in dev mode

build_tools/travis/after_success.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
set -e
88

99
# Need to run covdecov from a git checkout, so we copy .coverage
10-
# from TEST_DIR where nosetests has been run
10+
# from TEST_DIR where pytest has been run
1111
cd $TRAVIS_BUILD_DIR
1212
# Ignore covdecov failures as the covdecov server is not
1313
# very reliable but we don't want travis to report a failure

build_tools/travis/install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if [[ "$DISTRIB" == "conda" ]]; then
4040
source activate testenv
4141
conda install --yes numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION
4242

43-
if [[ $PYTHON_VERSION == "3.6" ]]; then
43+
if [[ $PYTHON_VERSION == "3.7" ]]; then
4444
conda install --yes pandas
4545
conda install --yes -c conda-forge keras
4646
KERAS_BACKEND=tensorflow
@@ -52,12 +52,11 @@ if [[ "$DISTRIB" == "conda" ]]; then
5252
conda install --yes cython
5353
pip install -U git+https://github.com/scikit-learn/scikit-learn.git
5454
else
55-
conda install --yes scikit-learn=$SKLEARN_VERSION
55+
conda install --yes scikit-learn=$SKLEARN_VERSION -c conda-forge/label/rc -c conda-forge
5656
fi
5757

58-
conda install --yes nose pytest pytest-cov
59-
# Install nose-timer via pip
60-
pip install nose-timer codecov
58+
conda install --yes pytest pytest-cov
59+
pip install codecov
6160

6261
elif [[ "$DISTRIB" == "ubuntu" ]]; then
6362
# At the time of writing numpy 1.9.1 is included in the travis
@@ -67,9 +66,10 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then
6766
# Create a new virtualenv using system site packages for python, numpy
6867
virtualenv --system-site-packages testvenv
6968
source testvenv/bin/activate
70-
pip install scikit-learn
69+
70+
pip install --pre scikit-learn
7171
pip install pandas keras tensorflow
72-
pip install nose nose-timer pytest pytest-cov codecov sphinx numpydoc
72+
pip install pytest pytest-cov codecov sphinx numpydoc
7373

7474
fi
7575

build_tools/travis/test_script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ run_tests(){
1212
# Get into a temp directory to run test from the installed scikit learn and
1313
# check if we do not leave artifacts
1414
mkdir -p $TEST_DIR
15-
# We need the setup.cfg for the nose settings
15+
# We need the setup.cfg for the pytest settings
1616
cp setup.cfg $TEST_DIR
1717
cd $TEST_DIR
1818

@@ -21,7 +21,7 @@ run_tests(){
2121
python -c "import scipy; print('scipy %s' % scipy.__version__)"
2222
python -c "import multiprocessing as mp; print('%d CPUs' % mp.cpu_count())"
2323

24-
py.test --cov=$MODULE -r sx --pyargs $MODULE
24+
pytest --cov=$MODULE -r sx --pyargs $MODULE
2525

2626
# Test doc
2727
cd $OLDPWD

doc/install.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ The imbalanced-learn package requires the following dependencies:
99

1010
* numpy (>=1.8.2)
1111
* scipy (>=0.13.3)
12-
* scikit-learn (>=0.19.0)
12+
* scikit-learn (>=0.20)
1313
* keras 2 (optional)
1414
* tensorflow (optional)
1515

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

1920
Install
2021
=======
@@ -50,6 +51,10 @@ You wish to test the coverage of your version::
5051

5152
$ make coverage
5253

54+
You can also use `pytest`::
55+
56+
$ pytest imblearn -v
57+
5358
Contribute
5459
==========
5560

0 commit comments

Comments
 (0)