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 GH Action tests and CodeCov #99

Closed rickecon closed 3 months ago

rickecon commented 3 months ago

This PR:

cc: @jdebacker

rickecon commented 3 months ago

@jdebacker. These three test failures in the last three tests of the test_get_micro_data.py Linux Python 3.9 tests seem like legitimate failures.

tests/test_get_micro_data.py ........FFF
rickecon commented 3 months ago

I tried adding the windows-latest OS tests back into build_and_test.yml, but I got the same error as noted in Issue #78. I am removing the Windows OS tests again from build_and_test.yml.

Run pytest -m 'not local and not regression' --cov=./ --cov-report=xml
  pytest -m 'not local and not regression' --cov=./ --cov-report=xml
  shell: C:\Program Files\Git\bin\bash.EXE -l {0}
  env:
    INPUT_RUN_POST: true
    CONDA: C:\Users\runneradmin\miniconda[3](https://github.com/PSLmodels/OG-USA/actions/runs/8643695604/job/23698134190?pr=99#step:5:3)
    CONDA_PKGS_DIR: C:\Users\runneradmin\conda_pkgs_dir
C:\Users\runneradmin\miniconda3\envs\ogusa-dev\lib\site-packages\pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
WindowsError
codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.70%. Comparing base (9f1d02f) to head (415df86).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/99/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/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #99 +/- ## ========================================== + Coverage 70.32% 78.70% +8.37% ========================================== Files 22 11 -11 Lines 1365 850 -515 ========================================== - Hits 960 669 -291 + Misses 405 181 -224 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/99/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/99/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `78.70% <ø> (+8.37%)` | :arrow_up: | 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. [see 11 files with indirect coverage changes](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/99/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)
jdebacker commented 3 months ago

LGTM, thanks @rickecon! Ready for this to be merged?

rickecon commented 3 months ago

@jdebacker. Let me do one last check of a couple things. I still have this white whale of trying to get the Windows tests working again.

rickecon commented 3 months ago

@jdebacker. This PR is ready for your final review. I have made all the changes I am going to make. I spent hours trying to get the windows-latest tests added back in. But I got everything else in. All these tests should pass by 5pm ET.

rickecon commented 3 months ago

@jdebacker. All tests passed locally on my machine.

(ogusa-dev) richardevans@Richards-MacBook-Pro-2 OG-USA % pytest
======================= test session starts =========================
platform darwin -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.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, 111 warnings in 767.83s (0:12:47) ==================