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

Improve Disjunction construction error for invalid types #3042

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

This addresses some confusion raised on SO, due to a poor error message generated when an IndexedDisjunct as part of the list of Disjuncts in a Disjunction rule. This improves the error message and adds tests.

Changes proposed in this PR:

  • Generate a sensible error message when returning non-DisjunctData components as part of a Disjunction rule
  • Add test of this behavior

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 Nov 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (15a7bff) 87.96% compared to head (98465f5) 87.96%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3042   +/-   ##
=======================================
  Coverage   87.96%   87.96%           
=======================================
  Files         770      770           
  Lines       90162    90164    +2     
=======================================
+ Hits        79310    79316    +6     
+ Misses      10852    10848    -4     
Flag Coverage Δ
linux 85.29% <100.00%> (+<0.01%) ⬆️
osx 75.11% <100.00%> (+<0.01%) ⬆️
other 85.47% <100.00%> (+<0.01%) ⬆️
win 82.54% <100.00%> (+<0.01%) ⬆️

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 05ac00c into Pyomo:main Nov 20, 2023
30 checks passed
@jsiirola jsiirola deleted the gdp-improve-error branch November 20, 2023 21:17
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.

2 participants