Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 20, 2021
1 parent 737bd44 commit 6b84e66
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion deprecate/__init__.py
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 6b84e66

Please sign in to comment.