replacement_rate_adjustment in steady-state#1053
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1053 +/- ##
==========================================
+ Coverage 72.50% 72.69% +0.19%
==========================================
Files 21 21
Lines 5085 5084 -1
==========================================
+ Hits 3687 3696 +9
+ Misses 1398 1388 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR applies the replacement_rate_adjustment parameter to steady-state pension calculations, ensuring consistent scaling of replacement rates across different calculation methods. The change addresses a gap where the adjustment was not being applied to steady-state pension amounts.
- Updates
pension.SS_amountfunction to applyreplacement_rate_adjustmentto steady-state calculations - Refactors logging configuration by centralizing it in a new
config.pymodule - Removes scattered verbose parameters and debug print statements
Reviewed Changes
Copilot reviewed 7 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ogcore/pensions.py | Applies replacement rate adjustment to steady-state pension calculations and removes debug prints |
| ogcore/config.py | Centralizes logging configuration with new module |
| ogcore/household.py | Replaces local logging setup with centralized config import |
| ogcore/TPI.py | Removes verbose parameter from run_TPI function |
| ogcore/SS.py | Removes verbose parameter from run_SS function and fixes logging syntax |
| tests/test_household.py | Adds parameter adjustment for replacement rate in test setup |
| examples/run_ogcore_example.py | Removes manual verbosity settings |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ) | ||
| logging.info(f"GE loop errors = ", [f"{error:.3e}" for error in errors]) | ||
| error_string = [f"{error:.3e}" for error in errors] | ||
| logging.info(f"GE loop errors = {error_string}") |
There was a problem hiding this comment.
The logging statement will print the list representation instead of a clean format. Consider using ', '.join(error_string) to format the errors properly.
| logging.info(f"GE loop errors = {error_string}") | |
| logging.info(f"GE loop errors = {', '.join(error_string)}") |
|
@rickecon This PR is ready for your review. I would recommend running the example script from this branch so we get another verification of it running as expected. |
This PR updates the
pension.SS_amountfunction to apply thereplacement_rate_adjustmentparameter to steady-state pension amounts.