PSLmodels / OG-Core

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

Scatter in `inner_loop` #916

Closed jdebacker closed 4 months ago

jdebacker commented 5 months ago

The PR adds another scatter in the inner_loop function. This gets the SS unit tests passing (the issue being when calling a particular function the global p_scatter was None).

However, this may add an unnecessary scattering of the parameters object.

@talumbau, what do you think?

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 90.55118% with 12 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (scatter_once@04e3212). Click here to learn what that means.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/916/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/916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## scatter_once #916 +/- ## =============================================== Coverage ? 73.47% =============================================== Files ? 19 Lines ? 4618 Branches ? 0 =============================================== Hits ? 3393 Misses ? 1225 Partials ? 0 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/916/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/916/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `73.47% <90.55%> (?)` | | 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-Core/pull/916?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [ogcore/SS.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL1NTLnB5) | `72.04% <100.00%> (ø)` | | | [ogcore/output\_plots.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL291dHB1dF9wbG90cy5weQ==) | `96.51% <100.00%> (ø)` | | | [ogcore/output\_tables.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL291dHB1dF90YWJsZXMucHk=) | `96.81% <100.00%> (ø)` | | | [ogcore/parameter\_plots.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL3BhcmFtZXRlcl9wbG90cy5weQ==) | `82.41% <100.00%> (ø)` | | | [ogcore/utils.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL3V0aWxzLnB5) | `88.47% <78.94%> (ø)` | |