PSLmodels / OG-USA

Overlapping-generations macroeconomic model for evaluating fiscal policy in the United States
https://pslmodels.github.io/OG-USA/
Creative Commons Zero v1.0 Universal
19 stars 34 forks source link

Update file calls in calibration modules #112

Closed rickecon closed 1 month ago

rickecon commented 1 month ago

This PR:

I ran all the tests on my local machine and they all passed. And I verified that I could run a modified run_og_usa.py run script from a Jupyter notebook that was not in the branch structures of my OG-USA repository.

cc: @jdebacker

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 54.09836% with 28 lines in your changes missing coverage. Please review.

Project coverage is 73.29%. Comparing base (60f204f) to head (379ebdf).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112/graphs/tree.svg?width=650&height=150&src=pr&token=XOLXIKEL86&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #112 +/- ## ========================================== - Coverage 75.49% 73.29% -2.21% ========================================== Files 11 11 Lines 857 865 +8 ========================================== - Hits 647 634 -13 - Misses 210 231 +21 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112/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-USA/pull/112/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `73.29% <54.09%> (-2.21%)` | :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](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [ogusa/constants.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112?src=pr&el=tree&filepath=ogusa%2Fconstants.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvY29uc3RhbnRzLnB5) | `100.00% <100.00%> (ø)` | | | [ogusa/income.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112?src=pr&el=tree&filepath=ogusa%2Fincome.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvaW5jb21lLnB5) | `100.00% <100.00%> (ø)` | | | [ogusa/calibrate.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112?src=pr&el=tree&filepath=ogusa%2Fcalibrate.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvY2FsaWJyYXRlLnB5) | `37.32% <66.66%> (-0.09%)` | :arrow_down: | | [ogusa/psid\_data\_setup.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112?src=pr&el=tree&filepath=ogusa%2Fpsid_data_setup.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvcHNpZF9kYXRhX3NldHVwLnB5) | `98.85% <80.00%> (-1.15%)` | :arrow_down: | | [ogusa/transfer\_distribution.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112?src=pr&el=tree&filepath=ogusa%2Ftransfer_distribution.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvdHJhbnNmZXJfZGlzdHJpYnV0aW9uLnB5) | `50.00% <38.88%> (-12.80%)` | :arrow_down: | | [ogusa/bequest\_transmission.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112?src=pr&el=tree&filepath=ogusa%2Fbequest_transmission.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvYmVxdWVzdF90cmFuc21pc3Npb24ucHk=) | `44.44% <35.00%> (-12.08%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/112/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)
rickecon commented 1 month ago

@jdebacker. Here is the output of running all the tests locally on my machine.

(ogusa-dev) richardevans@Richards-MacBook-Pro-2 OG-USA % pytest
============================= test session starts ==============================
platform darwin -- Python 3.11.9, pytest-8.2.0, pluggy-1.5.0
rootdir: /Users/richardevans/Docs/Economics/OSE/OG-USA
configfile: pytest.ini
testpaths: ./tests
plugins: cov-5.0.0, xdist-3.5.0
collected 37 items                                                             

tests/test_calibrate.py ....                                             [ 10%]
tests/test_get_micro_data.py ..............                              [ 48%]
tests/test_income.py ............                                        [ 81%]
tests/test_psid_data_setup.py ...                                        [ 89%]
tests/test_run_example.py .                                              [ 91%]
tests/test_utils.py .                                                    [ 94%]
tests/test_wealth.py ..                                                  [100%]
================= 37 passed, 110 warnings in 678.02s (0:11:18) =================
rickecon commented 1 month ago

@jdebacker. I merged your PR to my branch. This PR is now ready for final review.

jdebacker commented 1 month ago

thank you @rickecon! Merging.