Skip to content

Commit

Permalink
Merge pull request #2393 from pybamm-team/remove-deprecations
Browse files Browse the repository at this point in the history
remove deprecations >1 year old
  • Loading branch information
valentinsulzer authored Oct 21, 2022
2 parents 6928516 + eb2e148 commit 58879c8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
5 changes: 0 additions & 5 deletions pybamm/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ def __init__(
current = self._parameter_values.get("Current function [A]")
if isinstance(current, pybamm.Interpolant):
self.operating_mode = "drive cycle"
elif isinstance(current, tuple):
raise NotImplementedError(
"Drive cycle from data has been deprecated. "
+ "Define an Interpolant instead."
)
else:
self.operating_mode = "without experiment"
if C_rate:
Expand Down
11 changes: 0 additions & 11 deletions pybamm/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,6 @@ def __getitem__(self, key):
try:
return super().__getitem__(key)
except KeyError:
if "negative electrode sei" in key.lower():
raise KeyError(
f"'{key}' not found. All SEI parameters have been "
"renamed from '...negative electrode SEI...' to '...SEI...'"
)
if "negative electrode lithium plating" in key.lower():
raise KeyError(
f"'{key}' not found. All lithium plating parameters have been "
"renamed from '...negative electrode lithium plating...' "
"to '...lithium plating...'"
)
best_matches = self.get_best_matches(key)
raise KeyError(f"'{key}' not found. Best matches are {best_matches}")

Expand Down
8 changes: 0 additions & 8 deletions tests/unit/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,6 @@ def test_create_gif(self):

os.remove("plot.gif")

def test_drive_cycle_data(self):
model = pybamm.lithium_ion.SPM()
param = model.default_parameter_values
param["Current function [A]"] = "[current data]US06"

with self.assertRaisesRegex(NotImplementedError, "Drive cycle from data"):
pybamm.Simulation(model, parameter_values=param)

def test_drive_cycle_interpolant(self):
model = pybamm.lithium_ion.SPM()
param = model.default_parameter_values
Expand Down
10 changes: 0 additions & 10 deletions tests/unit/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@ def test_fuzzy_dict(self):
self.assertEqual(d["test"], 1)
with self.assertRaisesRegex(KeyError, "'test3' not found. Best matches are "):
d.__getitem__("test3")
with self.assertRaisesRegex(
KeyError, "'negative electrode SEI current' not found. All SEI parameters"
):
d.__getitem__("negative electrode SEI current")
with self.assertRaisesRegex(
KeyError,
"'negative electrode lithium plating current' not found. "
"All lithium plating parameters",
):
d.__getitem__("negative electrode lithium plating current")

def test_get_parameters_filepath(self):
tempfile_obj = tempfile.NamedTemporaryFile("w", dir=".")
Expand Down

0 comments on commit 58879c8

Please sign in to comment.