Skip to content

Commit

Permalink
Remove chemistry dep warning (#4466)
Browse files Browse the repository at this point in the history
* Remove chemistry dep warning

* Fix changelog

* style: pre-commit fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
kratman and pre-commit-ci[bot] authored Sep 25, 2024
1 parent ffad85c commit 1390ea3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

- Added sensitivity calculation support for `pybamm.Simulation` and `pybamm.Experiment` ([#4415](https://github.com/pybamm-team/PyBaMM/pull/4415))
- Added OpenMP parallelization to IDAKLU solver for lists of input parameters ([#4449](https://github.com/pybamm-team/PyBaMM/pull/4449))
- Added phase-dependent particle options to LAM #4369
- Added phase-dependent particle options to LAM
([#4369](https://github.com/pybamm-team/PyBaMM/pull/4369))
- Added a lithium ion equivalent circuit model with split open circuit voltages for each electrode (`SplitOCVR`). ([#4330](https://github.com/pybamm-team/PyBaMM/pull/4330))

## Optimizations
Expand All @@ -18,6 +19,8 @@

## Breaking changes

- Removed the deprecation warning for the chemistry argument in
ParameterValues ([#4466](https://github.com/pybamm-team/PyBaMM/pull/4466))
- The parameters "... electrode OCP entropic change [V.K-1]" and "... electrode volume change" are now expected to be functions of stoichiometry only instead of functions of both stoichiometry and maximum concentration ([#4427](https://github.com/pybamm-team/PyBaMM/pull/4427))
- Renamed `set_events` function to `add_events_from` to better reflect its purpose. ([#4421](https://github.com/pybamm-team/PyBaMM/pull/4421))

Expand Down
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 @@ -37,12 +37,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

0 comments on commit 1390ea3

Please sign in to comment.