HARK
HARK copied to clipboard
Add more parameter types to `Parameters`
I have been playing with the core.Parameters class and really like it. One limitation is that it restricts the class of parameters that can be time-varying. This PR adds support for a few more classes: booleans, distributions, and functions.
You can imagine passing time-varying parameters of this class if, for instance you want:
- To indicate whether an agent is
retired = True | Falsefor some meaningful change in its income process. - To have a time varying distribution for income shocks. Maybe this period they are normal, and the next they are lognormal.
- To have a time varying tax function.
I have used this class in my ongoing work and have been very happy with it.
- [x] Tests for new functionality/models or Tests to reproduce the bug-fix in code.
- [x] Updated documentation of features that add new functionality.
- [x] Update CHANGELOG.md with major/minor changes.
@alanlujan91 should this change be reflected in other parts of the code like, say, https://github.com/econ-ark/HARK/blob/6a73c4f32a52ff9404f731761c3b754c1f85d650/HARK/core.py#L95 ?
Not sure this needs a test?
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 71.69%. Comparing base (
bbb07a5) to head (7417c54).
:exclamation: Current head 7417c54 differs from pull request most recent head 8fb9040. Consider uploading reports for the commit 8fb9040 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #1387 +/- ##
==========================================
+ Coverage 71.53% 71.69% +0.15%
==========================================
Files 83 84 +1
Lines 13938 13939 +1
==========================================
+ Hits 9971 9993 +22
+ Misses 3967 3946 -21
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@MridulS is there a way for pre-commit to automatically upload changes?
There is pre-commit.ci but it makes changes to the PR branch and you need to make sure the contributors are pulling in all changes before making any new changes locally. I would just strongly suggest to new contributors to use pre-commit locally :)
well, somehow my pre-commit is different than the one in github actions?? @MridulS
MAC hates me. And I hate it too. It's the same tests as in https://github.com/econ-ark/HARK/pull/1415
Will come back to this when that's merged
This PR was blocked by some unrelated logistical thing. Now its only conflict is the CHANGELOG.
Can this be fixed and merged now?
I'll try to look at this in the morning. I thought it still had a (non-trivial) outstanding issue.
On Tue, Jun 25, 2024, 7:38 PM Sebastian Benthall @.***> wrote:
This PR was blocked by some unrelated logistical thing. Now its only conflict is the CHANGELOG.
Can this be fixed and merged now?
— Reply to this email directly, view it on GitHub https://github.com/econ-ark/HARK/pull/1387#issuecomment-2190207349, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKRAFPECECNYOSMUO6NPCLZJH5QVAVCNFSM6AAAAABDV3AKYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJQGIYDOMZUHE . You are receiving this because your review was requested.Message ID: @.***>
GitHub is hanging on its automatic merge check. I'm trying to get this in now.