PyBaMM icon indicating copy to clipboard operation
PyBaMM copied to clipboard

Better option checking

Open rtimms opened this issue 1 year ago • 2 comments

The options checking doesn't always work as expected when options are tuples. For example, the following code performs checks if the option "particle size" is "distribution", but "particle size" can be a tuple, in which case the test doesn't run

        if options["particle size"] == "distribution":
            if options["lithium plating"] != "none":
                raise NotImplementedError(
                    "Lithium plating submodels do not yet support particle-size "
                    "distributions."
                )

The options should be converted to tuples first (where appropriate) and then checks performed on each index.

rtimms avatar Aug 31 '23 10:08 rtimms

Can i get the path for the same code?

Saswatsusmoy avatar Sep 15 '23 06:09 Saswatsusmoy

@rtimms Can you please review this and let me know if any more changes are required in the code.

Saswatsusmoy avatar Sep 16 '23 10:09 Saswatsusmoy