diff --git a/CHANGELOG.md b/CHANGELOG.md index 212c341..81d2103 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) ## [Unreleased] +### Removed +- Dead module `philanthropy/preprocessing/_solicitation_window.py`. The + deprecated alias `SolicitationWindowTransformer` already resolved only + through `__getattr__` in `__init__.py`; the file was unimported and + dragged coverage to 0%. Closes #153. + ### Fixed - `GratefulPatientFeaturizer` now reports one fallback `general` service line per known donor when the encounter table omits the service-line column. diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index a571edf..c882b6b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -76,3 +76,4 @@ too; say so in the PR and it stays out. Not sure where to start? See [CONTRIBUTING.md](CONTRIBUTING.md) and the [good first issues](https://github.com/PhilanthroPy-Project/PhilanthroPy/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). +- [@haas26p-ctrl](https://github.com/haas26p-ctrl): deleted the unused `_solicitation_window` alias module ([#153](https://github.com/PhilanthroPy-Project/PhilanthroPy/issues/153)). diff --git a/philanthropy/preprocessing/__init__.py b/philanthropy/preprocessing/__init__.py index e7014fc..3b8e93e 100755 --- a/philanthropy/preprocessing/__init__.py +++ b/philanthropy/preprocessing/__init__.py @@ -37,8 +37,12 @@ ] +# Deprecated aliases resolve through __getattr__ (PEP 562) to the same class +# object as the canonical name — not a subclass — so isinstance/clone behave +# as before. They are removed in 1.0.0. No separate alias modules: those would +# be unimported dead code (the alias never loads them). _DEPRECATED_ALIASES = { - # alias -> (canonical name, module attribute) + # alias -> canonical attribute name in this module's globals() "SolicitationWindowTransformer": "DischargeToSolicitationWindowTransformer", } diff --git a/philanthropy/preprocessing/_solicitation_window.py b/philanthropy/preprocessing/_solicitation_window.py deleted file mode 100755 index 8eda91b..0000000 --- a/philanthropy/preprocessing/_solicitation_window.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -philanthropy.preprocessing._solicitation_window -================================================ -Deprecated alias for :class:`DischargeToSolicitationWindowTransformer`. - -Two public names for one transformer inflate the API surface without adding -capability, so the alias goes away in 1.0.0. It resolves to the same class -object rather than a subclass, so ``isinstance`` and ``clone`` behave exactly as -before; the deprecation warning is emitted on attribute access by the -subpackage's module-level ``__getattr__`` (PEP 562). -""" - -from ._discharge_window import DischargeToSolicitationWindowTransformer - -#: Deprecated. Use ``DischargeToSolicitationWindowTransformer``. -SolicitationWindowTransformer = DischargeToSolicitationWindowTransformer