From da96737bd3d1ea9daf6a0548f89fcc664934dd6e Mon Sep 17 00:00:00 2001 From: JosePizarro3 Date: Tue, 24 Sep 2024 10:29:14 +0200 Subject: [PATCH] Restore configuration as it is indeed used --- src/nomad_simulations/schema_packages/model_system.py | 5 +++++ .../schema_packages/properties/band_structure.py | 5 +++++ .../schema_packages/properties/spectral_profile.py | 5 +++++ src/nomad_simulations/schema_packages/utils/utils.py | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/src/nomad_simulations/schema_packages/model_system.py b/src/nomad_simulations/schema_packages/model_system.py index 4804916d..0a1897d1 100644 --- a/src/nomad_simulations/schema_packages/model_system.py +++ b/src/nomad_simulations/schema_packages/model_system.py @@ -14,6 +14,7 @@ Surface, ) from nomad.atomutils import Formula, get_normalized_wyckoff, search_aflow_prototype +from nomad.config import config from nomad.datamodel.data import ArchiveSection from nomad.datamodel.metainfo.annotations import ELNAnnotation from nomad.datamodel.metainfo.basesections import Entity, System @@ -31,6 +32,10 @@ is_not_representative, ) +configuration = config.get_plugin_entry_point( + 'nomad_simulations.schema_packages:nomad_simulations_plugin' +) + class GeometricSpace(Entity): """ diff --git a/src/nomad_simulations/schema_packages/properties/band_structure.py b/src/nomad_simulations/schema_packages/properties/band_structure.py index a5f258a9..c5e169b0 100644 --- a/src/nomad_simulations/schema_packages/properties/band_structure.py +++ b/src/nomad_simulations/schema_packages/properties/band_structure.py @@ -2,6 +2,7 @@ import numpy as np import pint +from nomad.config import config from nomad.metainfo import Quantity, SubSection if TYPE_CHECKING: @@ -19,6 +20,10 @@ from nomad_simulations.schema_packages.properties.fermi_surface import FermiSurface from nomad_simulations.schema_packages.utils import get_sibling_section +configuration = config.get_plugin_entry_point( + 'nomad_simulations.schema_packages:nomad_simulations_plugin' +) + class BaseElectronicEigenvalues(PhysicalProperty): """ diff --git a/src/nomad_simulations/schema_packages/properties/spectral_profile.py b/src/nomad_simulations/schema_packages/properties/spectral_profile.py index b1ed076b..8078ff3d 100644 --- a/src/nomad_simulations/schema_packages/properties/spectral_profile.py +++ b/src/nomad_simulations/schema_packages/properties/spectral_profile.py @@ -2,6 +2,7 @@ import numpy as np import pint +from nomad.config import config from nomad.metainfo import MEnum, Quantity, SubSection if TYPE_CHECKING: @@ -15,6 +16,10 @@ from nomad_simulations.schema_packages.utils import get_sibling_section, get_variables from nomad_simulations.schema_packages.variables import Energy2 as Energy +configuration = config.get_plugin_entry_point( + 'nomad_simulations.schema_packages:nomad_simulations_plugin' +) + class SpectralProfile(PhysicalProperty): """ diff --git a/src/nomad_simulations/schema_packages/utils/utils.py b/src/nomad_simulations/schema_packages/utils/utils.py index 1c689933..1d40aa4a 100644 --- a/src/nomad_simulations/schema_packages/utils/utils.py +++ b/src/nomad_simulations/schema_packages/utils/utils.py @@ -2,6 +2,7 @@ from typing import TYPE_CHECKING import numpy as np +from nomad.config import config if TYPE_CHECKING: from typing import Optional @@ -9,6 +10,10 @@ from nomad.datamodel.data import ArchiveSection from structlog.stdlib import BoundLogger +configuration = config.get_plugin_entry_point( + 'nomad_simulations.schema_packages:nomad_simulations_plugin' +) + def get_sibling_section( section: 'ArchiveSection',