-
Notifications
You must be signed in to change notification settings - Fork 560
Add automated testing of OnlineDocs examples #3080
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
Conversation
| filtered = [] | ||
| deprecated = None | ||
| for line in lines: | ||
| # Ignore all deprecation warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know why we would want to ignore deprecation warnings, but do we really want to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm torn. This was added ages ago so that we didn't have to update Book baselines as frequently. Is it better to keep updating the baselines with the deprecation warning (noting that the baseline would have to be updated twice: once when the deprecation was added, and again after the next release (when the version is updated)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thought for why it's worth the effort is that we become starkly aware of when we are deprecating something that is mentioned in the book. It's one of those "debt vs. clear knowledge" arguments.
(catches pyutilib's incompatibility with python 3.12)
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3080 +/- ##
==========================================
+ Coverage 88.09% 88.26% +0.16%
==========================================
Files 775 832 +57
Lines 91549 92451 +902
==========================================
+ Hits 80652 81599 +947
+ Misses 10897 10852 -45
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, git is showing this as new instead of renamed. I'm confused as to why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto with this one. Weird.
| @@ -33,35 +33,6 @@ | |||
| print(EXPR.expression_to_string(e, labeler=NumericLabeler('x'))) | |||
| # @ex2 | |||
|
|
|||
| # --------------------------------------------- | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious - why remove this expression example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ex3: the example won't run:
standardize=has not been a valid argument for 6 years. - ex4:
clone_counteris deprecated (and nonfunctional), so we don't want to continue to advertise it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Our docs are up to date, we swear."
Fixes #2547, fixes #1950
Summary/Motivation:
The test driver for exercising the
literalincludeexamples was broken for many years. This PR refactors the Pyomo Book test driver so that it can be directly re-used for testing the OnlineDocspyfiles that areliteralincluded. These tests are now active and added to the GHA and Jenkins jobs.As a result, numerous examples and baselines needed to be updated to track changes in core over the last ~6 years. In addition, this does a minor overhaul of the "managing expressions" section to update it to reflect the current implementation.
Changes proposed in this PR:
pyomo/docto GHA and Jenkins driversLegal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: