Skip to content

Commit 44ac642

Browse files
hayesallchkoar
authored andcommitted
[MRG] πŸ‘½ Maintenance for imblearn.show_versions(), fix Travis build (#591)
* πŸ‘½ Maintenance for `imblearn.show_versions()` Drop `get_blas_info()` vendored from sklearn Fix unit tests to reflect the fix * πŸ’š Fixing pep8 requirements Fix `imblearn.utils._show_versions` by shortening a line Fix test case to reflect this change * ⬆️ sklearn version and conda debugging information Bump `SKLEARN_VERSION="0.21.3"` in `.travis.yml` Add conda config and debugging options to `install.sh` * ⬇️ Setting `SKLEARN_VERSION` back to `0.21.2` * Removing a line to restart build
1 parent e1be869 commit 44ac642

File tree

3 files changed

+9
-26
lines changed

3 files changed

+9
-26
lines changed

β€Žbuild_tools/travis/install.shβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ if [[ "$DISTRIB" == "conda" ]]; then
2828
MINICONDA_PATH=/home/travis/miniconda
2929
chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
3030
export PATH=$MINICONDA_PATH/bin:$PATH
31-
conda install --yes conda=4.6
31+
conda config --set always_yes yes --set changeps1 no
32+
conda install conda=4.6
33+
conda update -q conda
34+
conda info -a
3235

3336
# Configure the conda environment and put it in the path using the
3437
# provided versions

β€Žimblearn/utils/_show_versions.pyβ€Ž

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,51 +59,38 @@ def show_versions(github=False):
5959
If true, wrap system info with GitHub markup.
6060
"""
6161

62-
from sklearn.utils._show_versions import (
63-
_get_sys_info,
64-
_get_blas_info,
65-
)
62+
from sklearn.utils._show_versions import _get_sys_info
6663

6764
_sys_info = _get_sys_info()
68-
_blas_info = _get_blas_info()
6965
_deps_info = _get_deps_info()
7066
_github_markup = (
7167
"<details>"
72-
"<summary>System, BLAS, and Dependencies</summary>\n\n"
68+
"<summary>System, Dependency Information</summary>\n\n"
7369
"**System Information**\n\n"
7470
"{0}\n"
75-
"**BLAS**\n\n"
76-
"{1}\n"
7771
"**Python Dependencies**\n\n"
78-
"{2}\n"
72+
"{1}\n"
7973
"</details>"
8074
)
8175

8276
if github:
8377

8478
_sys_markup = ""
85-
_blas_markup = ""
8679
_deps_markup = ""
8780

8881
for k, stat in _sys_info.items():
8982
_sys_markup += "* {k:<10}: `{stat}`\n".format(k=k, stat=stat)
90-
for k, stat in _blas_info.items():
91-
_blas_markup += "* {k:<10}: `{stat}`\n".format(k=k, stat=stat)
9283
for k, stat in _deps_info.items():
9384
_deps_markup += "* {k:<10}: `{stat}`\n".format(k=k, stat=stat)
9485

95-
print(_github_markup.format(_sys_markup, _blas_markup, _deps_markup))
86+
print(_github_markup.format(_sys_markup, _deps_markup))
9687

9788
else:
9889

9990
print("\nSystem:")
10091
for k, stat in _sys_info.items():
10192
print("{k:>11}: {stat}".format(k=k, stat=stat))
10293

103-
print("\nBLAS:")
104-
for k, stat in _blas_info.items():
105-
print("{k:>11}: {stat}".format(k=k, stat=stat))
106-
10794
print("\nPython dependencies:")
10895
for k, stat in _deps_info.items():
10996
print("{k:>11}: {stat}".format(k=k, stat=stat))

β€Žimblearn/utils/tests/test_show_versions.pyβ€Ž

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ def test_show_versions_default(capsys):
2424
assert "python" in out
2525
assert "executable" in out
2626
assert "machine" in out
27-
assert "macros" in out
28-
assert "lib_dirs" in out
29-
assert "cblas_libs" in out
3027
assert "pip" in out
3128
assert "setuptools" in out
3229
assert "imblearn" in out
@@ -42,15 +39,11 @@ def test_show_versions_default(capsys):
4239
def test_show_versions_github(capsys):
4340
show_versions(github=True)
4441
out, err = capsys.readouterr()
45-
assert "<details><summary>System, BLAS, and Dependencies</summary>" in out
42+
assert "<details><summary>System, Dependency Information</summary>" in out
4643
assert "**System Information**" in out
4744
assert "* python" in out
4845
assert "* executable" in out
4946
assert "* machine" in out
50-
assert "**BLAS**" in out
51-
assert "* macros" in out
52-
assert "* lib_dirs" in out
53-
assert "* cblas_libs" in out
5447
assert "**Python Dependencies**" in out
5548
assert "* pip" in out
5649
assert "* setuptools" in out

0 commit comments

Comments
Β (0)