Skip to content

Commit

Permalink
Merge pull request pybamm-team#2584 from pybamm-team/spyder-entry-points
Browse files Browse the repository at this point in the history
pybamm-team#2534 fix spyder entry points
  • Loading branch information
valentinsulzer authored Dec 28, 2022
2 parents 5c750ff + c0eb90a commit 9b139b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

## Bug fixes

- Fixed bug with `EntryPoints` in Spyder IDE ([#2584](https://github.com/pybamm-team/PyBaMM/pull/2584))
- Fixed electrolyte conservation when options {"surface form": "algebraic"} are used
- Fixed "constant concentration" electrolyte model so that "porosity times concentration" is conserved when porosity changes ([#2529](https://github.com/pybamm-team/PyBaMM/pull/2529))
- Fix installation on `Google Colab` (`pybtex` and `Colab` issue) ([#2526](https://github.com/pybamm-team/PyBaMM/pull/2526))
Expand Down
4 changes: 3 additions & 1 deletion pybamm/parameters/parameter_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def __load_entry_point__(self, key) -> callable:
if key not in self.__all_parameter_sets:
raise KeyError(f"Unknown parameter set: {key}")
ps = self.__all_parameter_sets[key]
if isinstance(ps, importlib_metadata.EntryPoint):
try:
ps = self.__all_parameter_sets[key] = ps.load()
except AttributeError:
pass
return ps

def __iter__(self):
Expand Down

0 comments on commit 9b139b8

Please sign in to comment.