From bbcdabe4104b041b29eddbad2c6216ab929b4573 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sun, 29 May 2022 22:24:43 -0400 Subject: [PATCH] [Doc] Include all Python classes/functions in Sphinx --- doc/sphinx/cython/importing.rst | 6 --- doc/sphinx/cython/index.rst | 1 + doc/sphinx/cython/kinetics.rst | 11 +++++ doc/sphinx/cython/onedim.rst | 4 ++ doc/sphinx/cython/utilities.rst | 58 ++++++++++++++++++++++++++ doc/sphinx/cython/zerodim.rst | 2 + interfaces/cython/cantera/base.pyx | 3 +- interfaces/cython/cantera/kinetics.pyx | 4 +- 8 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 doc/sphinx/cython/utilities.rst diff --git a/doc/sphinx/cython/importing.rst b/doc/sphinx/cython/importing.rst index de0ee7708..c6e2a0eba 100644 --- a/doc/sphinx/cython/importing.rst +++ b/doc/sphinx/cython/importing.rst @@ -44,9 +44,3 @@ Representing Multiple States ---------------------------- .. autoclass:: SolutionArray - -Utility Functions ------------------ - -.. autofunction:: add_directory -.. autofunction:: get_data_directories diff --git a/doc/sphinx/cython/index.rst b/doc/sphinx/cython/index.rst index 46d64065c..e3ddbf046 100644 --- a/doc/sphinx/cython/index.rst +++ b/doc/sphinx/cython/index.rst @@ -15,3 +15,4 @@ Contents: zerodim onedim constants + utilities diff --git a/doc/sphinx/cython/kinetics.rst b/doc/sphinx/cython/kinetics.rst index 101f79d66..fd8861416 100644 --- a/doc/sphinx/cython/kinetics.rst +++ b/doc/sphinx/cython/kinetics.rst @@ -38,6 +38,17 @@ FalloffReaction .. autoclass:: FalloffReaction :no-undoc-members: +ChemicallyActivatedReaction +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. autoclass:: ChemicallyActivatedReaction + :no-undoc-members: + +CustomReaction +^^^^^^^^^^^^^^ +.. autoclass:: CustomReaction + :no-undoc-members: + + Reaction Rates -------------- diff --git a/doc/sphinx/cython/onedim.rst b/doc/sphinx/cython/onedim.rst index 7cace3e1f..6e77a508b 100644 --- a/doc/sphinx/cython/onedim.rst +++ b/doc/sphinx/cython/onedim.rst @@ -27,6 +27,10 @@ CounterflowPremixedFlame ^^^^^^^^^^^^^^^^^^^^^^^^ .. autoclass:: CounterflowPremixedFlame +CounterflowTwinPremixedFlame +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. autoclass:: CounterflowTwinPremixedFlame + ImpingingJet ^^^^^^^^^^^^ .. autoclass:: ImpingingJet diff --git a/doc/sphinx/cython/utilities.rst b/doc/sphinx/cython/utilities.rst new file mode 100644 index 000000000..b78564b2e --- /dev/null +++ b/doc/sphinx/cython/utilities.rst @@ -0,0 +1,58 @@ +.. py:currentmodule:: cantera + +Utilities +========= + +.. contents:: + :local: + +YAML Output +----------- + +YamlWriter +^^^^^^^^^^ +.. autoclass:: YamlWriter + +Unit Conversions +---------------- + +UnitSystem +^^^^^^^^^^ +.. autoclass:: UnitSystem + :no-undoc-members: + +Units +^^^^^ +.. autoclass:: Units + :no-undoc-members: + + +Global Functions +---------------- + +.. autofunction:: add_directory +.. autofunction:: get_data_directories +.. autofunction:: import_phases +.. autofunction:: appdelete +.. autofunction:: use_sparse + +.. autofunction:: make_deprecation_warnings_fatal +.. autofunction:: suppress_deprecation_warnings +.. autofunction:: suppress_thermo_warnings +.. autofunction:: use_legacy_rate_constants +.. autofunction:: debug_mode_enabled +.. autofunction:: add_module_directory + +Exceptions +---------- + +CanteraError +^^^^^^^^^^^^ +.. autoclass:: CanteraError + :no-undoc-members: + + +ThermoModelMethodError +^^^^^^^^^^^^^^^^^^^^^^ +.. autoclass:: ThermoModelMethodError + :no-undoc-members: diff --git a/doc/sphinx/cython/zerodim.rst b/doc/sphinx/cython/zerodim.rst index faf5d1454..775b0cfb9 100644 --- a/doc/sphinx/cython/zerodim.rst +++ b/doc/sphinx/cython/zerodim.rst @@ -13,6 +13,8 @@ Defining Functions .. autoclass:: Func1 +.. autoclass:: TabulatedFunction + Base Classes ------------ diff --git a/interfaces/cython/cantera/base.pyx b/interfaces/cython/cantera/base.pyx index d361ae656..b03e5e63d 100644 --- a/interfaces/cython/cantera/base.pyx +++ b/interfaces/cython/cantera/base.pyx @@ -337,7 +337,8 @@ cdef class _SolutionBase: output file :param units: A `UnitSystem` object or dictionary of the units to be used for - each dimension. See `YamlWriter.output_units`. + each dimension. + See `YamlWriter.output_units `. :param precision: For output floating point values, the maximum number of digits to the right of the decimal point. The default is 15 digits. diff --git a/interfaces/cython/cantera/kinetics.pyx b/interfaces/cython/cantera/kinetics.pyx index 3cfa70420..90090696e 100644 --- a/interfaces/cython/cantera/kinetics.pyx +++ b/interfaces/cython/cantera/kinetics.pyx @@ -370,7 +370,7 @@ cdef class Kinetics(_SolutionBase): The computed values include all temperature-dependent and pressure-dependent contributions. By default, third-body concentrations are only considered if they are part of the reaction rate definition; for a legacy implementation that - includes third-body concentrations @see Cantera::use_legacy_rate_constants(). + includes third-body concentrations, see `use_legacy_rate_constants`. """ def __get__(self): return get_reaction_array(self, kin_getFwdRateConstants) @@ -382,7 +382,7 @@ cdef class Kinetics(_SolutionBase): The computed values include all temperature-dependent and pressure-dependent contributions. By default, third-body concentrations are only considered if they are part of the reaction rate definition; for a legacy implementation that - includes third-body concentrations @see Cantera::use_legacy_rate_constants(). + includes third-body concentrations, see `use_legacy_rate_constants`. """ def __get__(self): return get_reaction_array(self, kin_getRevRateConstants)