Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove chemistry dep warning #4466

Merged
merged 5 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/pybamm/parameters/parameter_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,7 @@ class ParameterValues:

"""

def __init__(self, values, chemistry=None):
if chemistry is not None:
raise ValueError(
"The 'chemistry' keyword argument has been deprecated. "
"Call `ParameterValues` with a dictionary dictionary of "
"parameter values, or the name of a parameter set (string), "
"as the single argument, e.g. `ParameterValues('Chen2020')`.",
)

def __init__(self, values):
# add physical constants as default values
self._dict_items = pybamm.FuzzyDict(
{
Expand Down
6 changes: 0 additions & 6 deletions tests/unit/test_parameters/test_parameter_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ def test_init(self):
param = pybamm.ParameterValues({"a": 1, "chemistry": "lithium-ion"})
assert "chemistry" not in param.keys()

# chemistry kwarg removed
with pytest.raises(
ValueError, match="'chemistry' keyword argument has been deprecated"
):
pybamm.ParameterValues(None, chemistry="lithium-ion")

# junk param values rejected
with pytest.raises(ValueError, match="'Junk' is not a valid parameter set."):
pybamm.ParameterValues("Junk")
Expand Down
Loading