Skip to content

Commit fd11e32

Browse files
committed
Merge remote-tracking branch 'upstream/master' into safe-level
2 parents 609c4fc + afbf781 commit fd11e32

File tree

12 files changed

+37
-44
lines changed

12 files changed

+37
-44
lines changed

.circleci/config.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ jobs:
55
docker:
66
- image: circleci/python:3.6.1
77
environment:
8-
- USERNAME: "scikit-learn-contrib"
9-
- DOC_REPO: "imbalanced-learn"
8+
- USERNAME: "glemaitre"
9+
- ORGANIZATION: "imbalanced-learn"
10+
- DOC_REPO: "imbalanced-learn.github.io"
1011
- DOC_URL: ""
1112
- EMAIL: "g.lemaitre58@gmail.com"
1213
- MINICONDA_PATH: ~/miniconda
1314
- CONDA_ENV_NAME: testenv
1415
- PYTHON_VERSION: 3
1516
steps:
17+
- add_ssh_keys:
18+
fingerprints:
19+
- "34:ea:b1:d9:b1:e2:5d:79:81:c4:d0:39:ca:85:e1:ef"
1620
- checkout
1721
- run: ./build_tools/circle/checkout_merge_commit.sh
1822
- run: ./build_tools/circle/build_doc.sh
@@ -27,11 +31,11 @@ jobs:
2731
- attach_workspace:
2832
at: doc/_build/html
2933
- run: ls -ltrh doc/_build/html
30-
# - deploy:
31-
# command: |
32-
# if [[ "${CIRCLE_BRANCH}" =~ ^master$|^[0-9]+\.[0-9]+\.X$ ]]; then
33-
# bash ./build_tools/circle/push_doc.sh doc/_build/html
34-
# fi
34+
- deploy:
35+
command: |
36+
if [[ "${CIRCLE_BRANCH}" =~ ^master$|^[0-9]+\.[0-9]+\.X$ ]]; then
37+
bash ./build_tools/circle/push_doc.sh doc/_build/html
38+
fi
3539
filters:
3640
branches:
3741
ignore: gh-pages

.readthedocs.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.. _scikit-learn-contrib: https://github.com/scikit-learn-contrib
66

7-
|Travis|_ |AppVeyor|_ |Codecov|_ |CircleCI|_ |ReadTheDocs|_ |PythonVersion|_ |Pypi|_ |Gitter|_
7+
|Travis|_ |AppVeyor|_ |Codecov|_ |CircleCI|_ |PythonVersion|_ |Pypi|_ |Gitter|_
88

99
.. |Travis| image:: https://travis-ci.org/scikit-learn-contrib/imbalanced-learn.svg?branch=master
1010
.. _Travis: https://travis-ci.org/scikit-learn-contrib/imbalanced-learn
@@ -18,9 +18,6 @@
1818
.. |CircleCI| image:: https://circleci.com/gh/scikit-learn-contrib/imbalanced-learn.svg?style=shield&circle-token=:circle-token
1919
.. _CircleCI: https://circleci.com/gh/scikit-learn-contrib/imbalanced-learn/tree/master
2020

21-
.. |ReadTheDocs| image:: https://readthedocs.org/projects/imbalanced-learn/badge/?version=latest
22-
.. _ReadTheDocs: https://imbalanced-learn.readthedocs.io/en/latest/?badge=latest
23-
2421
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/imbalanced-learn.svg
2522
.. _PythonVersion: https://img.shields.io/pypi/pyversions/imbalanced-learn.svg
2623

build_tools/circle/build_doc.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ fi
7474

7575
MAKE_TARGET=html
7676

77+
# Installing required system packages to support the rendering of math
78+
# notation in the HTML documentation
79+
sudo -E apt-get -yq update
80+
sudo -E apt-get -yq remove texlive-binaries --purge
81+
sudo -E apt-get -yq --no-install-suggests --no-install-recommends \
82+
install dvipng texlive-latex-base texlive-latex-extra \
83+
texlive-latex-recommended texlive-fonts-recommended \
84+
latexmk gsfonts ccache
85+
7786
# deactivate circleci virtualenv and setup a miniconda env instead
7887
if [[ `type -t deactivate` ]]; then
7988
deactivate

build_tools/circle/push_doc.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ MSG="Pushing the docs to $dir/ for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1"
2727

2828
cd $HOME
2929
if [ ! -d $DOC_REPO ];
30-
then git clone --depth 1 --no-checkout -b gh-pages "git@github.com:"$USERNAME"/"$DOC_REPO".git";
30+
then git clone --depth 1 --no-checkout -b master "git@github.com:"$ORGANIZATION"/"$DOC_REPO".git";
3131
fi
3232
cd $DOC_REPO
3333
git config core.sparseCheckout true
3434
echo $dir > .git/info/sparse-checkout
35-
git checkout gh-pages
36-
git reset --hard origin/gh-pages
35+
git checkout master
36+
git reset --hard origin/master
3737
git rm -rf $dir/ && rm -rf $dir/
3838
cp -R $GENERATED_DOC_DIR $dir
3939
touch $dir/.nojekyll
@@ -42,6 +42,6 @@ git config --global user.name $USERNAME
4242
git config --global push.default matching
4343
git add -f $dir/
4444
git commit -m "$MSG" $dir
45-
git push origin gh-pages
45+
git push origin master
4646

4747
echo $MSG

doc/conf.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,8 @@
4646
# see https://github.com/numpy/numpydoc/issues/69
4747
numpydoc_show_class_members = False
4848

49-
# pngmath / imgmath compatibility layer for different sphinx versions
50-
import sphinx
51-
from distutils.version import LooseVersion
52-
if LooseVersion(sphinx.__version__) < LooseVersion('1.4'):
53-
extensions.append('sphinx.ext.pngmath')
54-
else:
55-
extensions.append('sphinx.ext.imgmath')
49+
extensions.append('sphinx.ext.imgmath')
50+
imgmath_image_format = 'svg'
5651

5752
autodoc_default_flags = ['members', 'inherited-members']
5853

@@ -138,7 +133,7 @@
138133
# Theme options are theme-specific and customize the look and feel of a theme
139134
# further. For a list of options available for each theme, see the
140135
# documentation.
141-
# html_theme_options = {'prev_next_buttons_location': None}
136+
# html_theme_options = {}
142137

143138
# Add any paths that contain custom themes here, relative to this directory.
144139
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

doc/whats_new/v0.6.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _changes_0_6:
22

33
Version 0.6.0 (under-development)
4-
================================+
4+
=================================
55

66
Changelog
77
---------
@@ -12,7 +12,7 @@ Changed models
1212
The following models might give some different sampling due to changes in
1313
scikit-learn:
1414

15-
- :class:`imblearn.under_sampling.ClusterCentroid`
15+
- :class:`imblearn.under_sampling.ClusterCentroids`
1616
- :class:`imblearn.under_sampling.InstanceHardnessThreshold`
1717

1818
Maintenance

examples/plot_outlier_rejections.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def outlier_rejection(X, y):
8888
"""This will be our function used to resample our dataset."""
8989
model = IsolationForest(max_samples=100,
9090
contamination=0.4,
91-
random_state=rng,
92-
behaviour='new')
91+
random_state=rng)
9392
model.fit(X)
9493
y_pred = model.predict(X)
9594
return X[y_pred == 1], y[y_pred == 1]

imblearn/ensemble/_forest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ class BalancedRandomForestClassifier(RandomForestClassifier):
204204
ccp_alpha : non-negative float, optional (default=0.0)
205205
Complexity parameter used for Minimal Cost-Complexity Pruning. The
206206
subtree with the largest cost complexity that is smaller than
207-
``ccp_alpha`` will be chosen. By default, no pruning is performed. See
208-
:ref:`minimal_cost_complexity_pruning` for details.
207+
``ccp_alpha`` will be chosen. By default, no pruning is performed.
209208
210209
.. versionadded:: 0.22
211210
Added in `scikit-learn` in 0.22

imblearn/metrics/_classification.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ def specificity_score(
395395
"""Compute the specificity
396396
397397
The specificity is the ratio ``tn / (tn + fp)`` where ``tn`` is the number
398-
of true negatives and ``fn`` the number of false negatives. The specificity
399-
quantifies the ability to avoid false positives_[1].
398+
of true negatives and ``fp`` the number of false positives. The specificity
399+
quantifies the ability to avoid false positives.
400400
401401
The best value is 1 and the worst value is 0.
402402

imblearn/over_sampling/_smote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ class SMOTENC(SMOTE):
867867
868868
See
869869
:ref:`sphx_glr_auto_examples_over-sampling_plot_comparison_over_sampling.py`,
870-
and :ref:`sphx_glr_auto_examples_over-sampling_plot_smote.py`.
870+
and :ref:`sphx_glr_auto_examples_over-sampling_plot_illustration_generation_sample.py`.
871871
872872
See also
873873
--------

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
'Operating System :: Unix',
3434
'Operating System :: MacOS',
3535
'Programming Language :: Python :: 3.6',
36-
'Programming Language :: Python :: 3.7']
36+
'Programming Language :: Python :: 3.7',
37+
'Programming Language :: Python :: 3.8']
3738
INSTALL_REQUIRES = [
3839
'numpy>=1.11',
3940
'scipy>=0.17',

0 commit comments

Comments
 (0)