Skip to content

Commit

Permalink
Include AnyMap in Python docs
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and ischoegl committed Apr 18, 2023
1 parent 22ddb16 commit b676438
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doc/sphinx/cython/utilities.rst
Expand Up @@ -6,8 +6,13 @@ Utilities
.. contents::
:local:

YAML Output
-----------
YAML Input/Output
-----------------

AnyMap
^^^^^^

.. autoclass:: AnyMap

YamlWriter
^^^^^^^^^^
Expand Down
2 changes: 2 additions & 0 deletions doc/sphinx/yaml/general.rst
Expand Up @@ -40,6 +40,8 @@ following structure::
- equation: A + C <=> 2 D
# Additional fields come after this

.. _sec-yaml-units:

Units
-----

Expand Down
7 changes: 7 additions & 0 deletions interfaces/cython/cantera/_utils.pyx
Expand Up @@ -155,6 +155,13 @@ cdef public PyObject* pyCanteraError = <PyObject*>CanteraError


cdef class AnyMap(dict):
"""
A key-value store representing objects defined in Cantera's YAML input format.
Extends the capabilities of a normal `dict` object by providing functions for
converting values between different unit systems. See :ref:`sec-yaml-units` for
details on how units are handled in YAML input files.
"""
def __cinit__(self, *args, **kwawrgs):
self.unitsystem = UnitSystem()

Expand Down

0 comments on commit b676438

Please sign in to comment.