Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conditional expression in txfunc.py #846

Merged
merged 3 commits into from
Jan 21, 2023

Conversation

jdebacker
Copy link
Member

This PR fixes a bug in a conditional expression in txfunc.py. Given the multiple conditions and the strict equality condition, conditions were not evaluated in the expected way (see this Stack Overflow thread on the precedence of & and ==).

@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2023

Codecov Report

Merging #846 (b65cf01) into master (1ac812b) will decrease coverage by 0.01%.
The diff coverage is 75.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #846      +/-   ##
==========================================
- Coverage   82.24%   82.23%   -0.01%     
==========================================
  Files          18       18              
  Lines        3981     3985       +4     
==========================================
+ Hits         3274     3277       +3     
- Misses        707      708       +1     
Flag Coverage Δ
unittests 82.23% <75.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
ogcore/txfunc.py 33.39% <ø> (ø)
ogcore/parameter_plots.py 80.99% <75.00%> (-0.05%) ⬇️

@jdebacker
Copy link
Member Author

@rickecon This PR is ready for review. Without the change, integration of the microsimulation model in OG-IND in PR #16 fails when it reaches this condition.

@rickecon
Copy link
Member

@jdebacker. Looks good to me.

@rickecon rickecon merged commit 8b374ce into PSLmodels:master Jan 21, 2023
@rickecon rickecon mentioned this pull request Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants