PyBaMM icon indicating copy to clipboard operation
PyBaMM copied to clipboard

Expose parameter management function

Open rtimms opened this issue 4 years ago • 3 comments

The parameter command line interface requires users to use bash. However, there are some python functions defined in parameters_cli.py that we could expose so that e.g. instead of

%%bash
pybamm_edit_parameter lithium_ion

you can just do

pybamm.edit_parameter(["lithium_ion"])

directly in python.

rtimms avatar Sep 29 '21 12:09 rtimms

Update this notebook too

rtimms avatar Sep 29 '21 12:09 rtimms

Working on this issue@rtimms

soma2000-lang avatar Feb 12 '22 12:02 soma2000-lang

@Saransh-cpp @tinosulzer ,I will have to edit the edit_parameter function in the cli_parameter.py

soma2000-lang avatar Mar 18 '22 04:03 soma2000-lang

You can already do

from pybamm.parameters_cli import edit_parameter
edit_parameter(["lithium_ion"])

so it's just a matter of importing edit_parameter in the __init__.py in the pybamm directory.

We should also add captions to the training videos where we talk about the CLI showing the new method (which will be useful for windows users).

rtimms avatar Sep 23 '22 08:09 rtimms

edit_parameter function will be removed now that all parameters are specified by single python files, which makes it pretty intuitive how to specify your own (to be done after #2334 is merged)

valentinsulzer avatar Oct 05 '22 20:10 valentinsulzer