Skip to content

Commit

Permalink
1.1.1 release: idaes-dev/1.1_rel branch as of 620fc94
Browse files Browse the repository at this point in the history
  • Loading branch information
ksbeattie committed Jun 7, 2019
1 parent d3aa0da commit 5a54a62
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 31 deletions.
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ALL: iapws95 cubic_eos functions

# can add contrib and core ... if needed
# Make it slightly easier to compile external functions and build docs
# The external functions all require the ASL, so set the ASL_BUILD environment
# variable to point to the ASL build and this should be good to go.

# for now iapws95 is the only one, but soon cubicEOS will be here too
ALL: iapws95 cubic_eos functions

iapws95:
$(MAKE) -C ./idaes/property_models/iapws95
Expand All @@ -24,12 +24,10 @@ functions_clean:

clean: iapws95_clean cubic_eos_clean functions_clean


# Couldn't help throwing this in
docs: docs_html

docs_html:
$(MAKE) -C ./docs_rst html
$(MAKE) -C ./docs html

docs_clean:
$(MAKE) -C ./docs_rst clean
$(MAKE) -C ./docs clean
40 changes: 27 additions & 13 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Makefile for Sphinx documentation
#

# Make sure readthedocs uses bash
SHELL := /bin/bash

# You can set these variables from the command line.
# DATE = $(shell date +%Y-%m-%d_%H%M%S)
SPHINXOPTS = -w sphinx-errors.txt -T
Expand Down Expand Up @@ -103,21 +106,32 @@ tutorial_setup:
@mkdir -p $(BUILDDIR)/tutorials
@mkdir -p ./tutorials

tutorial_nb: ../examples/workshops/Module_*/*.ipynb
@for f in $^ ; do \
echo "** Execute and convert: $$f"; \
n=`basename $$f .ipynb`; \
m=`echo $$n | cut -d_ -f2`; \
cmd="jupyter nbconvert --to html -y --output-dir=./tutorials $$f"; \
$$cmd --execute 2>/dev/null; \
[ $$? -ne 0 ] && echo "** Execute notebook failed: creating static" && $$cmd; \
echo "Tutorial Module $$m: $$t\n==================================================\n" > ./tutorials/$$n.rst; \
echo ".. raw:: html\n :file: $$n.html\n" >> ./tutorials/$$n.rst; \
done
tutorial_nb: ../examples/workshops/Module_*/*_Solution.ipynb
@for nbfile in $^ ; do \
echo "** Execute and convert: $$nbfile"; \
name=$$(basename $$nbfile .ipynb); \
title=$$(echo $$name | sed "s/_/ /g"); \
cmd="jupyter nbconvert --to html_embed -y --output-dir=./tutorials $$nbfile"; \
if [[ -n "$${READTHEDOCS+x}" ]]; then \
echo "Generating static tutorials for ReadTheDocs..."; \
echo " $$cmd"; \
$$cmd; \
else \
$$cmd --execute 2>/dev/null; \
if [[ "$$?" -ne 0 ]]; then \
echo "** Execute notebook failed: creating static"; \
$${cmd}; \
fi; \
fi; \
echo -e "$${title}:\n==================================================\n" > ./tutorials/$${name}.rst; \
echo -e ".. raw:: html\n :file: $${name}.html\n" >> ./tutorials/$${name}.rst; \
done \

tutorial_imgs: ../examples/workshops/Module_*/*.png
@echo "** Copy images from ../examples/workshops/* to $(BUILDDIR)/tutorials"
@for f in $^; do cp $$f $(BUILDDIR)/tutorials; done
@for f in $^; do \
cp $$f $(BUILDDIR)/tutorials; \
done

###
# End of tutorials section
Expand Down Expand Up @@ -316,4 +330,4 @@ dummy:
@echo "Build finished. Dummy builder generates no files."

.PHONY: dummy pseudoxml xml clean allclean apidoc htmlnote \
tutorial_setup tutorial_solns tutoral_probs tutorial_imgs
tutorial_setup tutorial_solns tutoral_probs tutorial_imgs
24 changes: 22 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,30 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import subprocess
import sys

# For importing from idaes.<modules..>
sys.path.insert(0, os.path.abspath('..'))

# If running on readthedocs, then run `make apidoc tutorials` to at least
# generate static versions of the tutorial notebooks.
if os.environ.get('READTHEDOCS', None):
sys.stdout.write('Running `make apidoc tutorials`\n')
sys.stdout.flush()
try:
ret = subprocess.call('make apidoc tutorials', shell=True)
if ret < 0:
sys.stderr.write(f'make failed: {ret}\n')
sys.stderr.flush()
else:
sys.stdout.write('Done with `make apidoc tutorials`\n')
sys.stdout.flush()
except OSError as ose:
sys.stderr.write(f'make execution failed: {ose}\n')
sys.stderr.flush()


# For Read the Docs theme
import sphinx_rtd_theme

Expand Down Expand Up @@ -77,9 +96,9 @@
# built documents.
#
# The short X.Y version.
version = u'1.1.0rc2'
version = u'1.1.1'
# The full version, including alpha/beta/rc tags.
release = u'1.1.0rc2'
release = u'1.1.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -363,3 +382,4 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}

11 changes: 6 additions & 5 deletions docs/install/linux-full.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Obtain the source code for IDAES from GitHub:
git clone https://github.com/IDAES/idaes-pse.git
Download and compile the AMPL Solver Library (ASL) and external property functions;
this is required for steam properties and cubic equations of state. This step is
optional, but highly recommended.
Download and compile the AMPL Solver Library (ASL) and compile external property
functions; this is required for steam properties and cubic equations of state.
This step is optional, but highly recommended.

.. code-block:: sh
Expand All @@ -73,10 +73,12 @@ optional, but highly recommended.
cd solvers
./configure
make
export ASL_BUILD=`pwd`/solvers/sys.x86_64.Linux
export ASL_BUILD=`pwd`/sys.`uname -m`.`uname -s`
cd <IDAES source main directory>
make
.. note:: If you get an error about ``funcadd.h`` not being found, either ``ASL_BUILD`` is not set correctly or the ASL did not compile properly.

Install the required Python packages:

.. code-block:: sh
Expand Down Expand Up @@ -121,4 +123,3 @@ without them.
The AMPL solver library (ASL) is required, and can be downloaded from
from https://ampl.com/netlib/ampl/solvers.tgz. Documentation is available at
https://ampl.com/resources/hooking-your-solver-to-ampl/.

2 changes: 1 addition & 1 deletion docs/install/windows-full.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ compiled.
2. Set the ASL_BUILD environment variable (the directory may differ depending on the
architecture and replace ``.../src`` with the actual location of your src directory)::

export ASL_BUILD=/c/.../src/solvers/sys.x86_64.MINGW64_NT-10.0
export ASL_BUILD=/c/.../src/solvers/sys.`uname -m`.`uname -s`

3. Go to the IDAES directory (replace ``/c/idaes_dir`` with the location
of the IDAES files)::
Expand Down
2 changes: 1 addition & 1 deletion idaes/ver.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __init__(self, *args):


#: Package's version as an object
package_version = Version(1, 1, 0, "candidate", 4)
package_version = Version(1, 1, 1)

#: Package's version as a simple string
__version__ = str(package_version)
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ alabaster>=0.7.7
bokeh==0.12.9
bunch
jupyter
jupyter_contrib_nbextensions # For nbconvert --to html_embed
networkx
#pyomo
pytest
Expand All @@ -14,7 +15,7 @@ sympy
toml
# Need Sphinx >=1.74 due to bug #4897
# See: https://github.com/sphinx-doc/sphinx/issues/4897
Sphinx>=1.7.4
Sphinx==1.8.5
sphinx-rtd-theme>=0.1.9
sphinxcontrib-napoleon>=0.5.0
sphinx-argparse
Expand Down

0 comments on commit 5a54a62

Please sign in to comment.