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

Fixed examples in working_models.html to Run #2502

Merged
merged 4 commits into from
Aug 23, 2022
Merged

Conversation

MrGorbunov
Copy link
Contributor

Fixes # .

Code examples in docs now run verbatim

Summary/Motivation:

Two examples from the docs did not run when copy pasted

Changes proposed in this PR:

In working_models.rst:

  • 'summation' was used instead of 'pyo.summation'
  • An example script instantiated an optimizer twice. First with glpk and then with cplex. Removed the cplex.

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
Member

@jsiirola jsiirola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, but why didn't the doc tests catch the error?

@blnicho
Copy link
Member

blnicho commented Aug 22, 2022

This is good, but why didn't the doc tests catch the error?

I don't think we're running the test_examples.py script found here: https://github.com/Pyomo/pyomo/blob/main/doc/OnlineDocs/tests/test_examples.py. See issue #1950

@codecov
Copy link

codecov bot commented Aug 22, 2022

Codecov Report

Merging #2502 (1fdbbf6) into main (a4f58ab) will decrease coverage by 0.00%.
The diff coverage is n/a.

❗ Current head 1fdbbf6 differs from pull request most recent head 23bcabc. Consider uploading reports for the commit 23bcabc to get more accurate results

@@            Coverage Diff             @@
##             main    #2502      +/-   ##
==========================================
- Coverage   86.00%   86.00%   -0.01%     
==========================================
  Files         715      714       -1     
  Lines       80116    80107       -9     
==========================================
- Hits        68907    68898       -9     
  Misses      11209    11209              
Flag Coverage Δ
linux 83.43% <ø> (-0.01%) ⬇️
osx 73.75% <ø> (-0.01%) ⬇️
other 83.62% <ø> (-0.01%) ⬇️
win 80.59% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
pyomo/contrib/appsi/solvers/gurobi.py 84.76% <0.00%> (-0.04%) ⬇️
pyomo/common/shutdown.py

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jsiirola jsiirola merged commit dd78d36 into Pyomo:main Aug 23, 2022
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.

4 participants