Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 813c06f

Browse files
[PARO-779] Prep for v2.2.1 release; remove six dependency (#65)
* RM no more six dependency * MAINT version bump to 2.2.1 * MAINT update changelog
1 parent e8b28ce commit 813c06f

10 files changed

+20
-16
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## Unreleased
66

7+
## 2.2.1 - 2020-06-30
8+
### Fix
9+
* [#65](https://github.com/civisanalytics/python-glmnet/pull/65)
10+
Remove `six` dependency entirely.
11+
712
## 2.2.0 - 2020-06-29
813
### Changed
914
* [#57](https://github.com/civisanalytics/python-glmnet/pull/57)

glmnet/linear.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
from .errors import _check_error_flag
1212
from _glmnet import elnet, spelnet, solns
13-
from .util import (_fix_lambda_path,
14-
_check_user_lambda,
15-
_interpolate_model,
16-
_score_lambda_path)
13+
from glmnet.util import (_fix_lambda_path,
14+
_check_user_lambda,
15+
_interpolate_model,
16+
_score_lambda_path)
1717

1818

1919
class ElasticNet(BaseEstimator):

glmnet/logistic.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
from .errors import _check_error_flag
1414
from _glmnet import lognet, splognet, lsolns
15-
from .util import (_fix_lambda_path,
16-
_check_user_lambda,
17-
_interpolate_model,
18-
_score_lambda_path)
15+
from glmnet.util import (_fix_lambda_path,
16+
_check_user_lambda,
17+
_interpolate_model,
18+
_score_lambda_path)
1919

2020

2121
class LogitNet(BaseEstimator):

glmnet/scorer.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
roc_auc_score, average_precision_score,
2222
precision_score, recall_score, log_loss)
2323
from sklearn.utils.multiclass import type_of_target
24-
import six
2524

2625

27-
class _BaseScorer(six.with_metaclass(ABCMeta, object)):
26+
class _BaseScorer(metaclass=ABCMeta):
2827
def __init__(self, score_func, sign, kwargs):
2928
self._kwargs = kwargs
3029
self._score_func = score_func
@@ -173,7 +172,7 @@ def _factory_args(self):
173172

174173

175174
def get_scorer(scoring):
176-
if isinstance(scoring, six.string_types):
175+
if isinstance(scoring, str):
177176
try:
178177
scorer = SCORERS[scoring]
179178
except KeyError:

glmnet/tests/__init__.py

Whitespace-only changes.

glmnet/tests/test_linear.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from sklearn.utils import estimator_checks
1010
from sklearn.utils.testing import ignore_warnings
1111

12-
from util import sanity_check_regression
12+
from glmnet.tests.util import sanity_check_regression
1313

1414
from glmnet import ElasticNet
1515

glmnet/tests/test_logistic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from sklearn.utils import estimator_checks, class_weight
1111
from sklearn.utils.testing import ignore_warnings
1212

13-
from util import sanity_check_logistic
13+
from glmnet.tests.util import sanity_check_logistic
1414

1515
from glmnet import LogitNet
1616

glmnet/tests/test_pandas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from sklearn.datasets import make_regression, make_classification
44
from glmnet import LogitNet, ElasticNet
55

6-
from util import sanity_check_logistic, sanity_check_regression
6+
from glmnet.tests.util import sanity_check_logistic, sanity_check_regression
77

88
pd = None
99
try:

glmnet/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from sklearn.exceptions import UndefinedMetricWarning
1010
from joblib import Parallel, delayed
1111

12-
from .scorer import check_scoring
12+
from glmnet.scorer import check_scoring
1313

1414

1515
def _score_lambda_path(est, X, y, groups, sample_weight, relative_penalties,

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
" \n $ pip install numpy")
1919

2020

21-
_VERSION = "2.2.0"
21+
_VERSION = "2.2.1"
2222

2323
f_compile_args = ['-ffixed-form', '-fdefault-real-8']
2424

0 commit comments

Comments
 (0)