Remove unused functionality not used by PolicyEngine - #256
Merged
Conversation
This is a major breaking change that removes all functionality not actively used by PolicyEngine repositories, significantly simplifying the package. Kept: - MicroDataFrame class - MicroSeries class (including .gini() method) - MicroSeriesGroupBy and MicroDataFrameGroupBy classes Removed: - All standalone modules: agg, concat, constants, custom_taxes, income_measures, inequality, io, poverty, tax, ubi, utils, weighted - _optional module (no longer needed) - Associated test files for deleted modules - Test for concat functionality in test_microseries_dataframe.py The package now focuses solely on providing weighted pandas-like data structures that PolicyEngine depends on for microsimulation and inequality calculations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update gini.ipynb to use MicroSeries.gini() instead of removed mdf.gini() - Add missing newlines to __init__.py and changelog_entry.yaml 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Bump version to 1.0.0 for major breaking change - Update package description to focus on weighted DataFrames/Series - Rewrite README with clearer overview and usage examples - Update badges to point to PolicyEngine organization - Update maintainer email to max@policyengine.org 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
It's a standard Python tool that doesn't need to be explicitly listed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update black target-version to py313 - Update all CI workflows to use Python 3.13 as main version - Test against Python 3.9, 3.10, 3.11, 3.12, and 3.13 in CI - Remove taxcalc from CI install commands (already removed) - Python 3.13 is the current bugfix version (released Oct 2023) - Python 3.9 is the oldest version with security support This change is enabled by the removal of taxcalc dependency. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
This PR removes all functionality not actively used by PolicyEngine repositories, significantly simplifying the package to focus on its core purpose.
What's kept
Based on analysis of PolicyEngine repositories, only the following are actively used:
What's removed
All standalone modules and their associated tests:
agg.py- aggregation functionsconcat.py- concatenation utilitiesconstants.py- various constantscustom_taxes.py- custom tax calculationsincome_measures.py- income measure calculationsinequality.py- standalone inequality functionsio.py- I/O utilitiespoverty.py- standalone poverty functionstax.py- tax calculationsubi.py- UBI calculationsutils.py- utility functionsweighted.py- standalone weighted operations_optional.py- optional dependency management (no longer needed)taxcalc.py- all taxcalc functionality (previously removed)Breaking changes
This is a major breaking change (v1.0.0) that removes most of the package's functionality. Users who depend on the removed features will need to stay on v0.x or implement the functionality themselves.
Benefits
Issues resolved
This PR closes the following issues by removing the problematic functionality:
Closes #255
Closes #252 (Move to python-13 - taxcalc dependency removed)
Closes #143 (taxcalc vs taxbrain - no longer relevant)
Closes #141 (weighting.ipynb taxcalc_helpers - taxcalc removed)
Closes #116 (Move functions out of utils.py - utils.py removed)
Closes #110 (Finish recalculate() - taxcalc.py removed)
Closes #111 (Add test for recalculate() - taxcalc.py removed)
Closes #109 (calc_df group_vars - calc_df removed)
Closes #185 (Deprecate add_weighted_quantiles - weighted.py removed)
Closes #184 (concat DataFrames - concat.py removed)
Closes #177 (Test aggregate functions - agg.py removed)
Closes #163 (groupby arg to poverty functions - poverty.py removed)
Closes #144 (year argument to fpl - poverty.py removed)
Closes #145 (Update fpl to 2020 - poverty.py removed)
Closes #146 (state argument to fpl - poverty.py removed)
Closes #107 (add_weighted_quantiles negatives - weighted.py removed)
Closes #100 (add_weighted_metrics warning - function removed)
Closes #95 (Remove read_stata_zip - io.py removed)
🤖 Generated with Claude Code