From 6b84e662c5f923d542829b35a9c8d6b03a48a052 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 20 Mar 2021 09:30:50 +0100 Subject: [PATCH] v0.1.0 --- README.md | 6 ++---- deprecate/__init__.py | 2 +- tests/test_functions.py | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 434a425..9eb41cf 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,9 @@ --- The common use-case is moving your functions across codebase or outsourcing some functionalities to new packages. -For most of these cases you want to hold some compatibility, so you cannot simply remove past function, - and also for some time you want to warn users that functionality they have been using is moved - and not it in deprecated in favour of another function (which shall be used instead) and soon it will be removed completely. +For most of these cases, you want to hold some compatibility, so you cannot simply remove past function, and also for some time you want to warn users that functionality they have been using is moved and not it is deprecated in favor of another function (which shall be used instead) and soon it will be removed completely. -Another good aspect is to do not overwhelm user with to many warning, so per function/class this warning is raised only N times in the preferable stream. +Another good aspect is to do not overwhelm a user with too many warnings, so per function/class, this warning is raised only N times in the preferable stream (warning, logger, etc.). ## Installation diff --git a/deprecate/__init__.py b/deprecate/__init__.py index 32d6872..61ee1e8 100644 --- a/deprecate/__init__.py +++ b/deprecate/__init__.py @@ -1,6 +1,6 @@ import os -__version__ = "0.1.0rc2" +__version__ = "0.1.0" __docs__ = "Deprecation tooling" __author__ = "Jiri Borovec" __author_email__ = "jiri.borovec@fel.cvut.cz" diff --git a/tests/test_functions.py b/tests/test_functions.py index cc3a2ae..3f9c071 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -129,8 +129,8 @@ def depr_accuracy_map(preds: list, truth=(0, 1, 1, 2)) -> float: pass -@deprecated(target=accuracy_score, args_mapping={'preds': 'y_pred', 'any': None}) -def depr_accuracy_skip(preds: list, y_true=(0, 1, 1, 2), any: float = 1.23) -> float: +@deprecated(target=accuracy_score, args_mapping={'preds': 'y_pred', 'yeah_arg': None}) +def depr_accuracy_skip(preds: list, y_true=(0, 1, 1, 2), yeah_arg: float = 1.23) -> float: pass