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 RangeSet.__len__ when defined by floats #3119

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

jsiirola
Copy link
Member

@jsiirola jsiirola commented Feb 1, 2024

Fixes # .

Summary/Motivation:

This resolves an error where RangeSet.__len__() raised an exception when the RangeSet was defined by float endpoints.

Changes proposed in this PR:

  • Ensure that the result from RangeSet.__len__() is cast to an int
  • Add a test exercising the observed error

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b41d3ae) 88.28% compared to head (714edcd) 88.29%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3119   +/-   ##
=======================================
  Coverage   88.28%   88.29%           
=======================================
  Files         832      832           
  Lines       92234    92234           
=======================================
+ Hits        81430    81438    +8     
+ Misses      10804    10796    -8     
Flag Coverage Δ
linux 86.05% <100.00%> (+<0.01%) ⬆️
osx 75.55% <100.00%> (ø)
other 86.22% <100.00%> (ø)
win 83.45% <100.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jsiirola jsiirola merged commit 835a2df into Pyomo:main Feb 2, 2024
33 checks passed
@jsiirola jsiirola deleted the rangeset-len-fix branch February 2, 2024 01:32
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