-
Notifications
You must be signed in to change notification settings - Fork 529
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
Reorganize online documentation #3382
Conversation
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.
This is really exciting! :) A few comments, but none of them should hold this up, I don't think.
TODO: this is a copy of "Abstract vs Concrete" from Getting Started. | ||
This should be expanded here. |
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.
Did you mean to leave this TODO in?
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 guess my real question here is should we duplicate that documentation in two places?
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.
Yes - I did mean to leave that TODO (as it is not done yet). Ideally, one section will talk about the philosophy of why we support both Abstract and Concrete modeling paradigms, and then we can (maybe) remove abstract from Getting started
Debugging Models | ||
================ | ||
|
||
TODO |
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.
Is it worth linking to the IDAES docs for the diagnostics toolbox here, at least? Also maybe to the contrib IIS utility?
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.
Yes. We should write that documentation. I mostly tried not to write any new documentation in this PR - just reorganize things. In this case, this was a new section that we talked about needing to add several times, so it made sense to put in the placeholder as part of this PR.
Pyomo Tutorial Examples | ||
======================= | ||
|
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.
Should this file be deleted? It's empty now, right?
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.
This file is being deleted. The content was merged into the main doc/OnlineDocs/index.rst
Alternative Solutions documentation add
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3382 +/- ##
==========================================
+ Coverage 81.93% 88.65% +6.71%
==========================================
Files 877 881 +4
Lines 99916 99770 -146
==========================================
+ Hits 81866 88447 +6581
+ Misses 18050 11323 -6727
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.
I found a few minor typos but otherwise I think this can be merged
>>> model = pyo.ConcreteModel() | ||
>>> model.x = pyo.Var() | ||
>>> model.y = pyo.Var() | ||
>>> c_list = list(model.component_objects(ctype=pyo.Var, descend_into=True)) | ||
>>> new = rename_components(model, component_list=c_list, prefix='special_') | ||
>>> str(new) | ||
"ComponentMap({'special_x (key=...)': 'x', 'special_y (key=...)': 'y'})" |
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.
Shouldn't this be in a doctest
block?
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.
It's not necessary. Things that look like Python interactive sessions in the Examples are automatically picked up / tested.
Fixes # .
Summary/Motivation:
This PR reorganizes the Pyomo online documentation to follow a Diataxis-inspired model.
Very little actual documentation changes: this PR was focused on getting the structure / layout correct and is intentionally leaving documentation updates to later (smaller) PRs. That said, there are a few significant documentation (and code) changes (itemized below).
Changes proposed in this PR:
alpha
formatliteralinclude::
links to be relative to the documentation root directoryConfigDict
numpysoc generationIntEnum
import pyomo.{*}
from__init__.py
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: