Remove the deprecations scheduled for 0.8.0 - #229
Merged
Merged
Conversation
0.7.0 and 0.7.1 both shipped DeprecationWarnings saying these go in 0.8.0, which satisfies the "one full published minor" rule in RELEASING.md: - philanthropy.utils.make_donor_dataset is gone; import it from philanthropy.datasets. - WealthScreeningImputerKNN(group_col_idx=...) and group_imputers_ are gone. Per-group and global KNN fits were measured bit-identical, so the parameter bought nothing; passing it is now a TypeError. - FiscalYearGroupedSplitter(drop_repeat_donors=...) now defaults to True. Fiscal years alone now raise a ValueError that names both fixes: pass donor ids as a second groups column, or drop_repeat_donors=False for a time-varying target. The two leakage experiment scripts relied on the old default and now pass False explicitly; the synthetic one still reproduces its documented +0.126. The deprecation registry, the splitter tests and the reference page's Deprecations section are updated to match.
Merged
shivamlalakiya
added a commit
that referenced
this pull request
Sep 24, 2026
Bump pyproject.toml and CITATION.cff to 0.8.0, cut the dated [0.8.0] section in CHANGELOG.md with a Breaking heading for the three removals from #229, and point SECURITY.md and the API reference at 0.8.x. Notebook 04 now installs the published wheel (philanthropy[viz]>=0.8.0), the same pattern as notebooks 02 and 03, so its Colab badge works once 0.8.0 is on PyPI. The tutorial page drops its install-from-GitHub note. The changelog cut also folds a second '### Added' block that merge=union had left inside Unreleased into the first one, and moves a test-coverage bullet from Fixed to Added.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.7.0 and 0.7.1 both shipped
DeprecationWarnings saying these go in 0.8.0. That meets the "one full published minor of overlap" rule in RELEASING.md, so this clears them ahead of the 0.8.0 release. Three breaking changes, all listed under Unreleased in CHANGELOG.md and in the Deprecations section of the API reference.Removed
philanthropy.utils.make_donor_dataset. Import it fromphilanthropy.datasets, which has been the canonical path since 0.7.0.WealthScreeningImputerKNN(group_col_idx=...)and itsgroup_imputers_attribute. Per-group and global KNN fits were measured bit-identical, so the parameter bought nothing. Passing it is now aTypeError.tests/test_knn_group_stratification.pyonly exercised that parameter (its header said it would go in 0.8.0), so it is deleted, and the contract test intest_documented_contracts.pynow asserts the removal instead.Changed
FiscalYearGroupedSplitter(drop_repeat_donors=...)now defaults toTrue. Each test fold drops donors already seen in its training rows, which is the safe default for a static per-donor label. It needsgroupsas(n_samples, 2)(fiscal year, donor id). Code that passes fiscal years alone now gets aValueErrorthat names both fixes: add donor ids, or passdrop_repeat_donors=Falsefor a time-varying target, which gives exactly the 0.7.x behaviour. The"warn"sentinel is gone, soreprnow readsdrop_repeat_donors=True.Callers updated:
scripts/leakage_experiment.pyandscripts/real_data_leakage_experiment.pyrelied on the old default with a time-varying target, so they now passdrop_repeat_donors=False. The synthetic script still reproduces its documented numbers (whole-history 0.750, +0.126 inflation). Nothing else in the package, docs or notebooks relied on the default: notebooks 02 and 04 andrender_leakage_chart.pyalready passFalse.Deprecation registry: the three rows are removed from
tests/test_deprecations.py, so the AST meta-test still matches the two remaining shims (get_legacy_feature_names_out, removed in 0.9.0, and theSolicitationWindowTransformeralias, removed in 1.0.0).Verified locally:
make ci(2074 passed, coverage 98.49%),make riskcov,pytest --nbmake examples/notebooks(4 passed), the changed test files with-W error::DeprecationWarning, andmkdocs build --strict.The version bump and pinning notebook 04's install line to
>=0.8.0come in a separate release PR.