From 289b60f83a7cb786bce5130354dab89f3aa14426 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sat, 12 Oct 2024 08:37:44 +0100 Subject: [PATCH 1/3] Fix preferences import - left over from hyperspy split --- exspy/_misc/eels/hartree_slater_gos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exspy/_misc/eels/hartree_slater_gos.py b/exspy/_misc/eels/hartree_slater_gos.py index d57ca0431..c9c3a3a1b 100644 --- a/exspy/_misc/eels/hartree_slater_gos.py +++ b/exspy/_misc/eels/hartree_slater_gos.py @@ -22,7 +22,7 @@ import numpy as np from scipy import constants -from hyperspy.defaults_parser import preferences +from exspy._defaults_parser import preferences from exspy._misc.eels.base_gos import TabulatedGOS From 72f43a4e3935823bb5f1021f9fb5927649ce96ae Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sat, 12 Oct 2024 09:05:46 +0100 Subject: [PATCH 2/3] Add deprecated `exspy.misc.elements.elements` since atomap uses it... --- exspy/misc/elements.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/exspy/misc/elements.py b/exspy/misc/elements.py index 0d367a2b4..42f43d7e2 100644 --- a/exspy/misc/elements.py +++ b/exspy/misc/elements.py @@ -6,10 +6,11 @@ from exspy._misc.elements import elements_db +# atomap still using elements +elements = elements_db -__all__ = [ - "elements_db", -] + +__all__ = ["elements_db", "elements"] def __dir__(): From 1f65ac5a4db64641c69d63bffc5a1583f4489557 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sat, 12 Oct 2024 09:58:40 +0100 Subject: [PATCH 3/3] Add changelog entry --- upcoming_changes/90.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 upcoming_changes/90.bugfix.rst diff --git a/upcoming_changes/90.bugfix.rst b/upcoming_changes/90.bugfix.rst new file mode 100644 index 000000000..9b82a7d03 --- /dev/null +++ b/upcoming_changes/90.bugfix.rst @@ -0,0 +1 @@ +Fix preferences import when using Hartree-Slater GOS and re-introduce undocumented import used by ``atomap``. \ No newline at end of file