xarpes 0.3.4__py3-none-any.whl → 0.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
xarpes/__init__.py CHANGED
@@ -1,6 +1,36 @@
1
- __version__ = '0.3.4'
1
+ __version__ = "0.5.0"
2
2
 
3
- from .spectral import *
4
- from .distributions import *
5
- from .functions import *
6
- from .plotting import *
3
+ from importlib import import_module
4
+
5
+ from .settings_parameters import parameter_settings
6
+ from .settings_plots import plot_settings
7
+
8
+
9
+ _LAZY_ATTR_MODULES = (
10
+ "bandmap",
11
+ "mdcs",
12
+ "selfenergies",
13
+ "distributions",
14
+ "functions",
15
+ "plotting",
16
+ "constants",
17
+ )
18
+
19
+
20
+ def __getattr__(name):
21
+ try:
22
+ return globals()[name]
23
+ except KeyError:
24
+ pass
25
+
26
+ for module in _LAZY_ATTR_MODULES:
27
+ mod = import_module(f"{__name__}.{module}")
28
+ if hasattr(mod, name):
29
+ obj = getattr(mod, name)
30
+ globals()[name] = obj
31
+ return obj
32
+
33
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
34
+
35
+
36
+ __all__ = ["__version__", "parameter_settings", "plot_settings"]