PSLmodels / OG-Core

An overlapping generations model framework for evaluating fiscal policies.
https://pslmodels.github.io/OG-Core/
Creative Commons Zero v1.0 Universal
68 stars 119 forks source link

Updates to `plot_2D_taxfunc` #881

Closed jdebacker closed 1 year ago

jdebacker commented 1 year ago

This PR updates the parameter_plots.plot_2D_taxfunc() function to:

  1. Compute weighted averages property with the new NumPy API
  2. Remove unnecessarily printed diagnostics
  3. Work with the "mono2D" functions.

The PR will address Issue #847 and Issue #867.

codecov-commenter commented 1 year ago

Codecov Report

Merging #881 (507abcd) into master (0b48a79) will decrease coverage by 0.06%. Report is 5 commits behind head on master. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/881/graphs/tree.svg?width=650&height=150&src=pr&token=98mQCVhspd&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/881?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #881 +/- ## ========================================== - Coverage 79.98% 79.92% -0.06% ========================================== Files 18 18 Lines 4157 4155 -2 ========================================== - Hits 3325 3321 -4 - Misses 832 834 +2 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/881/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/881/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `79.92% <100.00%> (-0.06%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/881?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [ogcore/TPI.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/881?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL1RQSS5weQ==) | `93.04% <ø> (ø)` | | | [ogcore/parameter\_plots.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/881?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL3BhcmFtZXRlcl9wbG90cy5weQ==) | `80.58% <100.00%> (-0.50%)` | :arrow_down: |
rickecon commented 1 year ago

@jdebacker. All the changes in here look good. Just do the following:

jdebacker commented 1 year ago

@rickecon Formatting changes made. Let me know if you think this PR needs anything else. Thanks!

rickecon commented 1 year ago

This looks great. Thanks, @jdebacker. Merging.