[Examples] Remove building Python examples into the documentation

This commit is contained in:
Bryan W. Weber 2018-06-08 08:13:45 -04:00 committed by Ray Speth
parent 1b605133d8
commit 7b6d04c381
4 changed files with 0 additions and 82 deletions

View file

@ -143,31 +143,6 @@ if localenv['sphinx_docs']:
'${sphinx_cmd} -b html -d ${SPHINXBUILD}/doctrees ${SPHINXSRC} ${SPHINXBUILD}/html'))
env.Alias('sphinx', sphinxdocs)
# Python examples: Create individual documentation pages with the source
# for each example
example_root = Dir('#interfaces/cython/cantera/examples').abspath
indexenv = env.Clone()
for subdir in subdirs(example_root):
summaries = []
for f in mglob(env, pjoin(example_root, subdir), 'py'):
docname = 'examples/{0}_{1}'.format(subdir, f.name[:-3])
summaries.append(':doc:`{0} <{1}>`:'.format(f.name, docname))
summaries.append(extract_python_docstring(f.abspath))
summaries.append('')
tmpenv = env.Clone()
tmpenv['script_name'] = f.name
tmpenv['script_path'] = '../../../../interfaces/cython/cantera/examples/%s/%s' % (subdir, f.name)
b = tmpenv.SubstFile('#doc/sphinx/cython/{0}.rst'.format(docname),
'#doc/sphinx/cython/example-script.rst.in')
build(b)
localenv.Depends(sphinxdocs, b)
indexenv['python_{0}_examples'.format(subdir)] = '\n'.join(summaries)
b = indexenv.SubstFile('#doc/sphinx/cython/examples.rst',
'#doc/sphinx/cython/examples.rst.in')
build(b)
localenv.Depends(sphinxdocs, b)
# Create a list of MATLAB classes to document. This uses the NamedTuple
# structure defined at the top of the file. The @Data and @Utilities
# classes are fake classes for the purposes of documentation only. Each

View file

@ -1,8 +0,0 @@
:orphan:
.. _py-example-@script_name@:
@script_name@
=======================================================================
.. literalinclude:: @script_path@

View file

@ -1,48 +0,0 @@
.. _sec-cython-examples:
.. py:currentmodule:: cantera
Index of Python Examples
========================
This is an index of the examples included with the Cantera Python module. They
can be found in the `examples` subdirectory of the Cantera Python module's
installation directory. To determine the location of this directory, run the following in your Python interpreter::
import cantera.examples
print(cantera.examples.__path__)
Thermodynamics
--------------
@python_thermo_examples@
Kinetics
--------
@python_kinetics_examples@
Transport
---------
@python_transport_examples@
Reactor Networks
----------------
@python_reactors_examples@
One-dimensional Flames
----------------------
@python_onedim_examples@
Multiphase Mixtures
-------------------
@python_multiphase_examples@
Surface Chemistry
-----------------
@python_surface_chemistry_examples@

View file

@ -16,7 +16,6 @@ Contents:
zerodim
onedim
constants
examples
migrating
Application Examples as Jupyter Notebooks <https://github.com/Cantera/cantera-jupyter#cantera-jupyter>