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

Update docs to use IDAES/examples instead of IDAES/examples-pse #1132

Merged
merged 24 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9ce05d6
Initial commit. Renamed 'nb' to 'notebooks' causing many file moves
dangunter Feb 2, 2023
99d1a92
from upstream
dangunter Mar 14, 2023
140d068
Changed IDAES examples URL to idaes/examples docs in RTD
dangunter Mar 14, 2023
f706863
Fix ref to get-examples
dangunter Mar 15, 2023
5149b78
Change hyperlink title
dangunter Mar 15, 2023
dcf9132
Shorten and correct text
dangunter Mar 15, 2023
dd1a58e
New examples installation instructions
dangunter Mar 15, 2023
31088f2
get-examples command will be removed
dangunter Mar 15, 2023
a7a55e2
get-examples command will be removed
dangunter Mar 15, 2023
fb72190
point at common installation instructions
dangunter Mar 15, 2023
4160c9d
remove unneeded steps
dangunter Mar 15, 2023
abb1e5a
renamed *.md to *.txt since .md implies a different markup syntax
dangunter Mar 15, 2023
160410d
better formatting for contents on first page
dangunter Mar 15, 2023
349ab26
Cleaner Diataxis table, fixed collaborating institutions
dangunter Mar 15, 2023
c2a24a3
Took out parenthetical title
dangunter Mar 15, 2023
0c4a8d8
Get contents higher up on the page
dangunter Mar 16, 2023
a69305c
Merge remote-tracking branch 'upstream/main' into examples-docs-issue…
dangunter Mar 16, 2023
7805132
tweak in instructions
dangunter Mar 16, 2023
bf0c836
Merge remote-tracking branch 'upstream/main' into examples-docs-issue…
dangunter Mar 17, 2023
3f0c8e5
minor formatting
dangunter Mar 18, 2023
cf6ba87
refresh docs build
dangunter Apr 20, 2023
23e24cd
epilog fix
dangunter Apr 20, 2023
2813f45
version happiness
dangunter Apr 21, 2023
4d5147b
Merge branch 'main' into examples-docs-issue1131
Apr 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from collections import namedtuple
import os
import sys

Expand Down Expand Up @@ -134,19 +135,28 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

# Global constants for supported Python versions
IDAES_PV_MIN, IDAES_PV_MAX, IDAES_PV_DEFAULT = "3.8", "3.11", "3.10"

# This block of text will be virtually present at the end of every file.
# Used here to define substitutions for re-used URLs, e.g. just add "|examples-site|" to
# any page and it will be replaced with the hyperlink and text shown below.
rst_epilog = """
.. |examples-site| replace:: `examples online documentation page`_
.. _examples online documentation page: https://idaes.github.io/examples-pse/latest/index.html

rst_epilog = f"""
.. |python-min| replace:: {IDAES_PV_MIN}
.. |python-max| replace:: {IDAES_PV_MAX}
.. |examples-site| replace:: `examples website`_
.. _examples website: https://idaes-examples.readthedocs.io/en/latest/
.. |github-issues| replace:: `Github issues page`_
.. _Github issues page: https://github.com/IDAES/idaes-pse/issues
"""


class RobustReplacements(dict):
"""These replacements are needed because the Sphinx replacements are
not expanded within code blocks.
"""

def __call__(self, app, docname, source):
text = source[0]
for to_replace, replace_with in self.items():
Expand All @@ -156,9 +166,9 @@ def __call__(self, app, docname, source):

_python_versions_replacements = RobustReplacements(
{
"|python-min|": "3.8",
"|python-max|": "3.11",
"|python-default|": "3.10",
"|python-min|": IDAES_PV_MIN,
"|python-max|": IDAES_PV_MAX,
"|python-default|": IDAES_PV_DEFAULT,
}
)

Expand Down
4 changes: 1 addition & 3 deletions docs/explanations/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ How do I...
-----------

... Run some examples?
First, install the examples with ``idaes get-examples``. Then, in the directory that
this created ("examples", by default), open the main Jupyter notebook with the command
``jupyter notebook notebook_index.ipynb``, and use it to navigate to the example(s) of your choice.
See :doc:`../tutorials/tutorials_examples`.

... Get more help?
Use the website to `register <https://idaes.org/register/>`_ for the IDAES support mailing list.
Expand Down
98 changes: 48 additions & 50 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,56 +1,54 @@
.. index::
pair: idaes;Home
.. Include 'entities' e.g. |middot|. See https://docutils.sourceforge.io/docs/ref/rst/definitions.html
.. include:: <isonum.txt>
.. include:: <isoamsa.txt>

Institute for the Design of Advanced Energy Systems (IDAES)
===========================================================

Project Goals
-------------
The Institute for the Design of Advanced Energy Systems (IDAES) will be the
world’s premier resource for the development and analysis of innovative
advanced energy systems through the use of process systems engineering tools
and approaches. IDAES and its capabilities will be applicable to the development
of the full range of advanced fossil energy systems, including chemical looping
and other transformational |CO2| capture technologies, as well as integration with
other new technologies such as supercritical |CO2|.
The Institute for Design of Advanced Energy Systems (IDAES) was originated to bring the most advanced modeling and optimization capabilities to the challenges of transforming and decarbonizing the world’s energy systems to make them environmentally sustainable while maintaining high reliability and low cost.
For more information about the project, see the `IDAES website`_.
See also :doc:`IDAES concepts <explanations/concepts>` in this documentation.

For a more detailed overview of the :term:`IDAES integrated platform <IDAES-IP>`, see :doc:`this page <explanations/concepts>`.

Contents
--------
.. list-table::
:class: index-table

* - Getting Started (Tutorials)
* :doc:`Installing IDAES for Users <tutorials/getting_started/index>`
* :doc:`Installing IDAES for Contributors <tutorials/advanced_install/index>`
* :doc:`IDAES Examples & Tutorials <tutorials/tutorials_examples>`
* - Getting Started
| :doc:`Installing IDAES <tutorials/getting_started/index>`
| |nbsp| :doc:`Windows <tutorials/getting_started/windows>`
|middot| :doc:`MacOS <tutorials/getting_started/mac_osx>`
|middot| :doc:`Linux <tutorials/getting_started/linux>`
| :doc:`Installing IDAES for Contributors <tutorials/advanced_install/index>`
|
| :doc:`IDAES Examples <tutorials/tutorials_examples>`
|rarrhk| `website <https://idaes-examples.readthedocs.io/en/latest/>`_
- How-To Guides
* :doc:`Setting up IDAES Models <how_to_guides/workflow/index>`
* :doc:`Developing Custom Models <how_to_guides/custom_models/general_model_development>`
* :doc:`Using IDAES Flowsheet Visualizer <how_to_guides/vis/index>`
* :doc:`Using the Data Management Framework <how_to_guides/data_management_framework/index>`
* :doc:`Installing Specific IDAES Versions <how_to_guides/versioned_idaes_install>`
| :doc:`Setting up IDAES Models <how_to_guides/workflow/index>`
| :doc:`Developing Custom Models <how_to_guides/custom_models/general_model_development>`
| :doc:`Using IDAES Flowsheet Visualizer <how_to_guides/vis/index>`
| :doc:`Installing Specific IDAES Versions <how_to_guides/versioned_idaes_install>`
* - Explanations
* :doc:`Why IDAES <explanations/why_idaes>`
* :doc:`Concepts <explanations/concepts>`
* :doc:`Components of IDAES <explanations/components/index>`
* :doc:`Conventions <explanations/conventions>`
* :doc:`Modeling Extensions <explanations/modeling_extensions/index>`
* :doc:`Related Packages <explanations/related_packages/index>`
* :doc:`FAQ <explanations/faq>`
* :doc:`License <explanations/license>`
* :doc:`Copyright <explanations/copyright>`
| :doc:`Why IDAES <explanations/why_idaes>`
| :doc:`Concepts <explanations/concepts>`
| :doc:`Components of IDAES <explanations/components/index>`
| :doc:`Conventions <explanations/conventions>`
| :doc:`Modeling Extensions <explanations/modeling_extensions/index>`
| :doc:`Related Packages <explanations/related_packages/index>`
| :doc:`FAQ <explanations/faq>`
| :doc:`License <explanations/license>` and
:doc:`Copyright <explanations/copyright>`
- Reference Guides
* :doc:`IDAES Model Libraries <reference_guides/model_libraries/index>`
* :doc:`IDAES Core <reference_guides/core/index>`
* :doc:`Model Scaling Toolbox <reference_guides/scaling>`
* :doc:`Initializing Models <reference_guides/initialization/index>`
* :doc:`Command-line interface tools <reference_guides/commands/index>`
* :doc:`Configuring IDAES <reference_guides/configuration>`
* :doc:`Logging Processing & Outputs <reference_guides/logging>`
* :doc:`Developing for IDAES <reference_guides/developer/index>`
* :doc:`IDAES grid integration application <reference_guides/apps/grid_integration/index>`
| :doc:`IDAES Model Libraries <reference_guides/model_libraries/index>`
| :doc:`IDAES Core <reference_guides/core/index>`
| :doc:`Model Scaling Toolbox <reference_guides/scaling>`
| :doc:`Initializing Models <reference_guides/initialization/index>`
|
| :doc:`Command-line tools <reference_guides/commands/index>`
| :doc:`Configuration <reference_guides/configuration>`
| :doc:`Logging Processing & Outputs <reference_guides/logging>`
| :doc:`Developing for IDAES <reference_guides/developer/index>`
| :doc:`Grid integration application <reference_guides/apps/grid_integration/index>`

.. toctree::
:hidden:
Expand All @@ -68,21 +66,21 @@ Collaborating institutions
The IDAES team is comprised of collaborators from the following institutions:

* National Energy Technology Laboratory (Lead)
* Sandia National Laboratory
* Sandia National Laboratories
* Lawrence Berkeley National Laboratory
* Carnegie-Mellon University (subcontract to LBNL)
* West Virginia University (subcontract to LBNL)
* University of Notre Dame (subcontract to LBNL)
* Carnegie-Mellon University
* West Virginia University
* University of Notre Dame
* Georgia Tech

Contact us
-----------
General, background and overview information is available at the `IDAES main
website <https://www.idaes.org>`_. Framework development happens at our `GitHub
repo <https://github.com/IDAES/idaes-pse>`_ where you can `report issues/bugs
<https://github.com/IDAES/idaes-pse/issues>`_ or `make contributions
<https://github.com/IDAES/idaes-pse/pulls>`_. For further enquiries, send an
email to: <idaes-support@idaes.org>
General, background and overview information is available at the `IDAES website`_.
Framework development happens at our `GitHub repo <https://github.com/IDAES/idaes-pse>`_ where you can `report issues/bugs <https://github.com/IDAES/idaes-pse/issues>`_ or `make contributions
<https://github.com/IDAES/idaes-pse/pulls>`_.
For further enquiries, send an email to: <idaes-support@idaes.org>

.. _IDAES website: https://idaes.org

Indices and tables
------------------
Expand Down
118 changes: 0 additions & 118 deletions docs/reference_guides/commands/get_examples.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/reference_guides/commands/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ each of which is described on a separate page below.
copyright
data_directory
env_info
get_examples
get_extensions
lib_directory
version
Expand Down
33 changes: 30 additions & 3 deletions docs/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,48 @@ h2 {
font-weight: bold;
color: rgb(64, 64, 64);
font-size: 110%;
margin-bottom: 0px;
}

/* --- Contents index-table changes --- */

/* Set table values to top align & add padding in index-table*/
.index-table.docutils tbody td {
.rst-content .index-table.docutils tbody tr.row-even td,
.rst-content .index-table.docutils tbody tr.row-odd td {
vertical-align: top;
padding-top: 16px;
padding: 0.8em;
background-color: #edf8e9;
border: 3px solid #e1e4e5;
font-size: 110%;
}
/* Reduce definition list padding inside the index table */
.rst-content .index-table.docutils tbody tr td dl {
margin: 0;
padding: 0;
}

/* Left align definitions inside index-tables */
.rst-content .index-table.docutils tbody tr td dl dd {
margin-left: 0.5em;
}

/* Make line-blocks in index tables less spaced out */
.rst-content .index-table.docutils .line-block {
line-height: 1.25em;
margin: 0;
}


/* Set defined list to more generic styling in index-table*/
.index-table dl:not(.docutils) dt {
font-size: 100%;
background: none;
color: #404040;
border-top: none;
}
/* --- end: Contents index-table changes --- */

*/
.simulated-codeblock.literal-block pre{
background: #eeffcc;
}
Expand Down Expand Up @@ -103,4 +129,5 @@ h2 {

.quickstart-toc.sidebar .sidebar-title{
text-align: center;
}
}

10 changes: 2 additions & 8 deletions docs/tutorials/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,7 @@ assuming that the installation was done using one of the methods described earli

idaes get-extensions --extra petsc

4. Finally, use the ``idaes get-examples`` command to install the most recent version of the IDAES examples compatible with the upgraded IDAES version.
4. Install the IDAES example Jupyter notebooks.

.. warning:: If the examples target installation directory is not empty, its contents, including examples installed with a previous IDAES version and other files, **will be overwritten without warning**.
To avoid losing data, **it is strongly recommended that you make a backup copy of any existing examples directory** before proceeding.
.. include:: install_templates/examples.txt

..

After creating a backup copy of the existing examples directory, run::

idaes get-examples
Loading