|
21 | 21 | import lxml.etree as ET |
22 | 22 | import numpy as np |
23 | 23 |
|
| 24 | +DEBUG_PYNXTOOLS_WITH_NOMAD = False |
| 25 | + |
| 26 | + |
24 | 27 | try: |
25 | 28 | from ase.data import chemical_symbols |
26 | 29 | from nomad.atomutils import Formula |
|
41 | 44 | import pynxtools.nomad.schema as nexus_schema |
42 | 45 | from pynxtools.nexus.nexus import HandleNexus |
43 | 46 | from pynxtools.nomad.utils import __FIELD_STATISTICS as FIELD_STATISTICS |
44 | | -from pynxtools.nomad.utils import __REPLACEMENT_FOR_NX |
| 47 | +from pynxtools.nomad.utils import __REPLACEMENT_FOR_NX, get_quantity_base_name |
45 | 48 | from pynxtools.nomad.utils import __rename_nx_for_nomad as rename_nx_for_nomad |
46 | | -from pynxtools.nomad.utils import get_quantity_base_name |
47 | 49 |
|
48 | 50 |
|
49 | 51 | def _to_group_name(nx_node: ET.Element): |
@@ -126,7 +128,7 @@ def _to_section( |
126 | 128 |
|
127 | 129 | def _get_value(hdf_node): |
128 | 130 | """ |
129 | | - Get value from hdl5 node |
| 131 | + Get value from hdf5 node |
130 | 132 | """ |
131 | 133 |
|
132 | 134 | hdf_value = hdf_node[...] |
@@ -520,6 +522,13 @@ def parse( |
520 | 522 | logger=None, |
521 | 523 | child_archives: Dict[str, EntryArchive] = None, |
522 | 524 | ) -> None: |
| 525 | + if DEBUG_PYNXTOOLS_WITH_NOMAD: |
| 526 | + import debugpy # will connect to debugger if in debug mode |
| 527 | + |
| 528 | + debugpy.debug_this_thread() |
| 529 | + # now one can anywhere place a manual breakpoint like e.g. so |
| 530 | + # debugpy.breakpoint() |
| 531 | + |
523 | 532 | self.archive = archive |
524 | 533 | self.nx_root = nexus_schema.Root() # type: ignore # pylint: disable=no-member |
525 | 534 |
|
|
0 commit comments