Skip to content

Commit

Permalink
docs: fix typo in parameter set docs
Browse files Browse the repository at this point in the history
Fix typo identified in #2452
Added emphasis on the need to install / reinstall the package
  • Loading branch information
awadell1 committed Nov 18, 2022
1 parent c544b6d commit 1afe006
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions docs/source/parameters/parameter_sets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Adding Parameter Sets
*********************

Parameter sets can be added to PyBaMM by creating a python package, and
registering a `entry point`_ to ``pybamm_parameter_sets``. At a minimum, the
registering a `entry point`_ to ``pybamm_parameter_set``. At a minimum, the
package (``cell_parameters``) should consist of the following::

cell_parameters
Expand Down Expand Up @@ -46,18 +46,33 @@ For an example, see the `Marquis2019`_ parameter sets.
...
}
Then register ``get_parameter_values`` to ``pybamm_parameter_sets`` in ``pyproject.toml``:
Then register ``get_parameter_values`` to ``pybamm_parameter_set`` in ``pyproject.toml``:

.. code-block:: toml
[project.entry-points.pybamm_parameter_sets]
[project.entry-points.pybamm_parameter_set]
cell_alpha = "cell_parameters.cell_alpha:get_parameter_values"
If you are using ``setup.py`` or ``setup.cfg`` to setup your package, please
see SetupTools' documentation for registering `entry points`_.

.. _entry points: https://setuptools.pypa.io/en/latest/userguide/entry_point.html#entry-points-for-plugins

Finally install you package (``python -m pip install .``), to complete the process.
You will need to reinstall your package every time you add a new parameter set.
If you're actively editing the parameter set it may be helpful to install in
editing mode (``python -m pip install -e .``) instead.

Once successfully registered, your parameter set will appear within the contents
of ``pybamm.parameter_sets``, along with any other bundled or installed
third-party parameter sets.

.. doctest::

>>> import pybamm
>>> list(pybamm.parameter_sets)
['Ai2020', 'Chen2020', ...]

If you're willing to open-source your parameter set,
`let us know`_, and we can add an entry to
:ref:`third-party-parameter-sets`.
Expand All @@ -70,7 +85,7 @@ If you're willing to open-source your parameter set,
Third-Party Parameter Sets
**************************

Registered a new parameter set to ``pybamm_parameter_sets``?
Registered a new parameter set to ``pybamm_parameter_set``?
`Let us know`_, and we'll update our list.

.. _bundled-parameter-sets:
Expand Down

0 comments on commit 1afe006

Please sign in to comment.