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

Commit

Permalink
[PARO-779] Prep for v2.2.1 release; remove six dependency (#65)
Browse files Browse the repository at this point in the history
* RM no more six dependency

* MAINT version bump to 2.2.1

* MAINT update changelog
  • Loading branch information
jacksonlee-civis authored Jun 30, 2020
1 parent e8b28ce commit 813c06f
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

## 2.2.1 - 2020-06-30
### Fix
* [#65](https://github.com/civisanalytics/python-glmnet/pull/65)
Remove `six` dependency entirely.

## 2.2.0 - 2020-06-29
### Changed
* [#57](https://github.com/civisanalytics/python-glmnet/pull/57)
Expand Down
8 changes: 4 additions & 4 deletions glmnet/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

from .errors import _check_error_flag
from _glmnet import elnet, spelnet, solns
from .util import (_fix_lambda_path,
_check_user_lambda,
_interpolate_model,
_score_lambda_path)
from glmnet.util import (_fix_lambda_path,
_check_user_lambda,
_interpolate_model,
_score_lambda_path)


class ElasticNet(BaseEstimator):
Expand Down
8 changes: 4 additions & 4 deletions glmnet/logistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

from .errors import _check_error_flag
from _glmnet import lognet, splognet, lsolns
from .util import (_fix_lambda_path,
_check_user_lambda,
_interpolate_model,
_score_lambda_path)
from glmnet.util import (_fix_lambda_path,
_check_user_lambda,
_interpolate_model,
_score_lambda_path)


class LogitNet(BaseEstimator):
Expand Down
5 changes: 2 additions & 3 deletions glmnet/scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
roc_auc_score, average_precision_score,
precision_score, recall_score, log_loss)
from sklearn.utils.multiclass import type_of_target
import six


class _BaseScorer(six.with_metaclass(ABCMeta, object)):
class _BaseScorer(metaclass=ABCMeta):
def __init__(self, score_func, sign, kwargs):
self._kwargs = kwargs
self._score_func = score_func
Expand Down Expand Up @@ -173,7 +172,7 @@ def _factory_args(self):


def get_scorer(scoring):
if isinstance(scoring, six.string_types):
if isinstance(scoring, str):
try:
scorer = SCORERS[scoring]
except KeyError:
Expand Down
Empty file added glmnet/tests/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion glmnet/tests/test_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from sklearn.utils import estimator_checks
from sklearn.utils.testing import ignore_warnings

from util import sanity_check_regression
from glmnet.tests.util import sanity_check_regression

from glmnet import ElasticNet

Expand Down
2 changes: 1 addition & 1 deletion glmnet/tests/test_logistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from sklearn.utils import estimator_checks, class_weight
from sklearn.utils.testing import ignore_warnings

from util import sanity_check_logistic
from glmnet.tests.util import sanity_check_logistic

from glmnet import LogitNet

Expand Down
2 changes: 1 addition & 1 deletion glmnet/tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from sklearn.datasets import make_regression, make_classification
from glmnet import LogitNet, ElasticNet

from util import sanity_check_logistic, sanity_check_regression
from glmnet.tests.util import sanity_check_logistic, sanity_check_regression

pd = None
try:
Expand Down
2 changes: 1 addition & 1 deletion glmnet/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from sklearn.exceptions import UndefinedMetricWarning
from joblib import Parallel, delayed

from .scorer import check_scoring
from glmnet.scorer import check_scoring


def _score_lambda_path(est, X, y, groups, sample_weight, relative_penalties,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
" \n $ pip install numpy")


_VERSION = "2.2.0"
_VERSION = "2.2.1"

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

Expand Down

0 comments on commit 813c06f

Please sign in to comment.