Skip to content

Commit f13715d

Browse files
committed
Another fix
1 parent ddeb5e7 commit f13715d

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/nomad_simulation_parsers/parsers/exciting/parser.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
LOGGER = get_logger(__name__)
3434

3535

36+
class ExcitingMetainfoParser(MetainfoParser):
37+
@property
38+
def logger(self):
39+
return LOGGER
40+
41+
3642
class InfoParser(TextParser):
3743
# TODO temporary fix for structlog unable to propagate logger
3844
@property
@@ -97,11 +103,21 @@ def get_atoms(self, source: dict[str, Any]) -> dict[str, Any]:
97103

98104

99105
class InputXMLParser(XMLParser):
106+
# TODO temporary fix for structlog unable to propagate logger
107+
@property
108+
def logger(self):
109+
return LOGGER
110+
100111
def get_xc_functionals(self, xc_funcs: dict[str, str]) -> list[dict[str, str]]:
101112
return [dict(libxc=val, type=key) for key, val in xc_funcs.items()]
102113

103114

104115
class BandstructureXMLParser(XMLParser):
116+
# TODO temporary fix for structlog unable to propagate logger
117+
@property
118+
def logger(self):
119+
return LOGGER
120+
105121
n_spin = 1
106122

107123
def get_bandstructures(self, source: dict[str, Any]) -> list[dict[str, Any]]:
@@ -123,6 +139,11 @@ def reshape_coords(self, source: list[str]) -> np.ndarray:
123139

124140

125141
class DosXMLParser(XMLParser):
142+
# TODO temporary fix for structlog unable to propagate logger
143+
@property
144+
def logger(self):
145+
return LOGGER
146+
126147
def to_float(self, source: list[str]) -> np.ndarray:
127148
return np.array(source, dtype=float)
128149

@@ -134,6 +155,11 @@ def get_dos(self, source: list[dict[str, Any]]) -> dict[str, Any]:
134155

135156

136157
class EigvalParser(TextParser):
158+
# TODO temporary fix for structlog unable to propagate logger
159+
@property
160+
def logger(self):
161+
return LOGGER
162+
137163
def get_eigenvalues(self, source: dict[str, Any]):
138164
eigs_occs = source.get('eigenvalues_occupancies')
139165
eigs = np.array([v.get('eigenvalues') for v in eigs_occs])

src/nomad_simulation_parsers/parsers/fhiaims/parser.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,19 @@
4040
from nomad_simulation_parsers.parsers.utils.general import (
4141
remove_mapping_annotations,
4242
search_files,
43-
with_logger,
4443
)
4544
from nomad_simulation_parsers.schema_packages import fhiaims
4645

4746
from .common import ControlParser, GeometryParser
4847

4948
LOGGER = get_logger(__name__)
5049

50+
# TODO temporary fix for structlog unable to propagate logger
51+
class FHIAimsMetainfoParser(MetainfoParser):
52+
@property
53+
def logger(self):
54+
return LOGGER
55+
5156

5257
class FHIAimsOutMappingParser(TextMappingParser):
5358
# TODO temporary fix for structlog unable to propagate logger

0 commit comments

Comments
 (0)