-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Context
PR #1435 fixes the fiscal year parameter conversion range by extending it from 2015-2025 to 2015-2040. This is a simple fix but requires pre-computing values for all 26 years at startup.
Proposed Enhancement
Explore converting fiscal year parameters on-the-fly rather than pre-computing them. This would:
- Remove the year range limit entirely - No need to extend the range for future projections
- Potentially improve startup time - No pre-computation needed for all years
- Simplify the code - Just convert January 1 queries to April 30 dynamically
Attempted Implementation
An initial attempt at this approach was made in PR #1434 by:
- Adding
convert_instant_to_fiscal_year()function - Overriding
get_parameters_at_instant()inCountryTaxBenefitSystem - Making
convert_to_fiscal_year_parameters()a no-op
However, this broke 24 existing tests because it changed parameter lookup behavior for ALL dates, not just annual queries.
PR #1434 contains the work-in-progress on-the-fly implementation - it can be used as a starting point.
Investigation Needed
- Understand why the on-the-fly approach broke existing tests
- Determine if on-the-fly conversion can be safely implemented
- Consider performance implications
- Evaluate backward compatibility concerns
References
- PR Extend fiscal year parameter conversion to 2040 #1435: Simple fix (extend range to 2040) ✅
- PR [Draft] Fix fiscal year parameter handling (on-the-fly approach - needs work) #1434: On-the-fly approach (work-in-progress implementation for this issue)
Metadata
Metadata
Assignees
Labels
No labels