Skip to content

MNT/CI drop python 3.5 #683

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

Merged
merged 4 commits into from
Feb 16, 2020
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
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@ env:

matrix:
include:
# This environment tests the using anaconda
# Ubuntu 14.04 environment
- env: DISTRIB="ubuntu" TEST_DOC="true" TEST_NUMPYDOC="false"
# Latest release
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
- env: PYTHON_VERSION="3.7"
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="master"
OPTIONAL_DEPS="keras" TEST_DOC="true" TEST_NUMPYDOC="false"
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
- env: PYTHON_VERSION="3.7"
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="master"
OPTIONAL_DEPS="tensorflow" TEST_DOC="true" TEST_NUMPYDOC="false"
- env: DISTRIB="conda" PYTHON_VERSION="3.7"
- env: PYTHON_VERSION="3.7"
NUMPY_VERSION="*" SCIPY_VERSION="*" SKLEARN_VERSION="master"
OPTIONAL_DEPS="false" TEST_DOC="false" TEST_NUMPYDOC="true"

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Dependencies
imbalanced-learn is tested to work under Python 3.6+.
The dependency requirements are based on the last scikit-learn release:

* scipy(>=0.17)
* numpy(>=1.11)
* scipy(>=0.19.1)
* numpy(>=1.13.3)
* scikit-learn(>=0.22)
* joblib(>=0.11)
* keras 2 (optional)
Expand Down
22 changes: 11 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
- job: linting
displayName: Linting
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
Expand All @@ -19,15 +19,15 @@ jobs:
- template: build_tools/azure/posix.yml
parameters:
name: Linux
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
dependsOn: [linting]
matrix:
# Linux environment to test that scikit-learn can be built against
# versions of numpy, scipy with ATLAS that comes with Ubuntu Xenial 16.04
# i.e. numpy 1.11 and scipy 0.17
py35_ubuntu_atlas:
# versions of numpy, scipy with ATLAS that comes with Ubuntu Bionic 18.04
# i.e. numpy 1.13.3 and scipy 0.19
py36_ubuntu_atlas:
DISTRIB: 'ubuntu'
PYTHON_VERSION: '3.5'
PYTHON_VERSION: '3.6'
JOBLIB_VERSION: '*'
# Linux environment to test the latest available dependencies and MKL.
pylatest_pip_openblas_pandas:
Expand Down Expand Up @@ -60,12 +60,12 @@ jobs:
- template: build_tools/azure/posix-32.yml
parameters:
name: Linux32
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
dependsOn: [linting]
matrix:
py35_ubuntu_atlas_32bit:
py36_ubuntu_atlas_32bit:
DISTRIB: 'ubuntu-32'
PYTHON_VERSION: '3.5'
PYTHON_VERSION: '3.6'
JOBLIB_VERSION: '*'
TEST_DOCSTRINGS: 'true'

Expand Down Expand Up @@ -100,6 +100,6 @@ jobs:
PYTEST_VERSION: '*'
COVERAGE: 'true'
CHECK_WARNINGS: 'true'
py35_pip_openblas_32bit:
PYTHON_VERSION: '3.5'
py36_pip_openblas_32bit:
PYTHON_VERSION: '3.6'
PYTHON_ARCH: '32'
5 changes: 3 additions & 2 deletions build_tools/azure/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e
set -x

UNAMESTR=`uname`

Expand Down Expand Up @@ -70,14 +71,14 @@ if [[ "$DISTRIB" == "conda" ]]; then
elif [[ "$DISTRIB" == "ubuntu" ]]; then
sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install python3-scipy libatlas3-base libatlas-base-dev libatlas-dev python3-virtualenv git
sudo apt-get install python3-scipy libatlas3-base libatlas-base-dev python3-virtualenv git
python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV
source $VIRTUALENV/bin/activate
python -m pip install pytest==$PYTEST_VERSION pytest-cov joblib cython
python -m pip install git+https://github.com/scikit-learn/scikit-learn.git
elif [[ "$DISTRIB" == "ubuntu-32" ]]; then
apt-get update
apt-get install -y python3-dev python3-scipy libatlas3-base libatlas-base-dev libatlas-dev python3-virtualenv git
apt-get install -y python3-dev python3-scipy libatlas3-base libatlas-base-dev python3-virtualenv git
python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV
source $VIRTUALENV/bin/activate
python -m pip install pytest==$PYTEST_VERSION pytest-cov joblib cython
Expand Down
2 changes: 1 addition & 1 deletion build_tools/azure/posix-32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
-e OMP_NUM_THREADS=$OMP_NUM_THREADS
-e OPENBLAS_NUM_THREADS=$OPENBLAS_NUM_THREADS
-e SKLEARN_SKIP_NETWORK_TESTS=$SKLEARN_SKIP_NETWORK_TESTS
i386/ubuntu:16.04
i386/ubuntu:18.04
sleep 1000000
displayName: 'Start container'
- script: >
Expand Down
76 changes: 31 additions & 45 deletions build_tools/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,57 +17,43 @@ export CXX=/usr/lib/ccache/g++
# ~60M is used by .ccache when compiling from scratch at the time of writing
ccache --max-size 100M --show-stats

if [[ "$DISTRIB" == "conda" ]]; then
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate

# Install miniconda
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
-O miniconda.sh
MINICONDA_PATH=/home/travis/miniconda
chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
export PATH=$MINICONDA_PATH/bin:$PATH
# Install miniconda
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
-O miniconda.sh
MINICONDA_PATH=/home/travis/miniconda
chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
export PATH=$MINICONDA_PATH/bin:$PATH

# Configure the conda environment and put it in the path using the
# provided versions
conda create -n testenv --yes python=$PYTHON_VERSION pip
source activate testenv
conda install --yes numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION
# Configure the conda environment and put it in the path using the
# provided versions
conda create -n testenv --yes python=$PYTHON_VERSION pip
source activate testenv

if [[ "$OPTIONAL_DEPS" == "keras" ]]; then
conda install --yes pandas keras tensorflow=1
KERAS_BACKEND=tensorflow
python -c "import keras.backend"
sed -i -e 's/"backend":[[:space:]]*"[^"]*/"backend":\ "'$KERAS_BACKEND'/g' ~/.keras/keras.json;
elif [[ "$OPTIONAL_DEPS" == "tensorflow" ]]; then
conda install --yes pandas tensorflow
fi
pip install --upgrade pip setuptools
echo "Installing numpy and scipy master wheels"
dev_url=https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com
pip install --pre --upgrade --timeout=60 -f $dev_url numpy scipy pandas cython
echo "Installing joblib master"
pip install https://github.com/joblib/joblib/archive/master.zip

if [[ "$SKLEARN_VERSION" == "master" ]]; then
pip install --pre -f https://sklearn-nightly.scdn8.secure.raxcdn.com scikit-learn
else
conda install --yes scikit-learn=$SKLEARN_VERSION
fi

conda install --yes pytest pytest-cov
pip install codecov
pip install -U git+https://github.com/numpy/numpydoc.git

elif [[ "$DISTRIB" == "ubuntu" ]]; then
# At the time of writing numpy 1.9.1 is included in the travis
# virtualenv but we want to use the numpy installed through apt-get
# install.
deactivate
# Create a new virtualenv using system site packages for python, numpy
virtualenv --system-site-packages --python=python3 testvenv
source testvenv/bin/activate
if [[ "$OPTIONAL_DEPS" == "keras" ]]; then
conda install --yes keras tensorflow=1
KERAS_BACKEND=tensorflow
python -c "import keras.backend"
sed -i -e 's/"backend":[[:space:]]*"[^"]*/"backend":\ "'$KERAS_BACKEND'/g' ~/.keras/keras.json;
elif [[ "$OPTIONAL_DEPS" == "tensorflow" ]]; then
conda install --yes tensorflow
fi

pip install --pre -f https://sklearn-nightly.scdn8.secure.raxcdn.com scikit-learn
pip3 install pandas
pip3 install pytest pytest-cov codecov sphinx numpydoc
pip install --pre --extra-index https://pypi.anaconda.org/scipy-wheels-nightly/simple scikit-learn

fi
conda install --yes pytest pytest-cov
pip install codecov
pip install -U git+https://github.com/numpy/numpydoc.git

python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
Expand Down
7 changes: 4 additions & 3 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ Prerequisites

The imbalanced-learn package requires the following dependencies:

* numpy (>=1.11)
* scipy (>=0.17)
* python (>=3.6)
* numpy (>=1.13.3)
* scipy (>=0.19.1)
* scikit-learn (>=0.22)
* keras 2 (optional)
* tensorflow (optional)

Install
=======

imbalanced-learn is currently available on the PyPi's reporitories and you can
imbalanced-learn is currently available on the PyPi's repositories and you can
install it via `pip`::

pip install -U imbalanced-learn
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8']
INSTALL_REQUIRES = [
'numpy>=1.11',
'scipy>=0.17',
'numpy>=1.13.3',
'scipy>=0.19.1',
'scikit-learn>=0.22',
'joblib>=0.11'
]
Expand Down