Skip to content

Commit

Permalink
bring XML_NAMESPACES back to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspie committed Oct 18, 2024
1 parent 6e34ffd commit 9249732
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/pynxtools/nomad/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
from pynxtools.nexus.nexus import HandleNexus
from pynxtools.nomad.utils import __REPLACEMENT_FOR_NX
from pynxtools.nomad.utils import __remove_nx_for_nomad as remove_nx_for_nomad
from pynxtools.nomad.utils import XML_NAMESPACES


def _to_group_name(nx_node: ET.Element):
Expand Down
4 changes: 3 additions & 1 deletion src/pynxtools/nomad/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
from pynxtools import get_definitions_url
from pynxtools.definitions.dev_tools.utils.nxdl_utils import get_nexus_definitions_path
from pynxtools.nomad.utils import __REPLACEMENT_FOR_NX, __remove_nx_for_nomad
from pynxtools.nomad.utils import XML_NAMESPACES as __XML_NAMESPACES

# __URL_REGEXP from
# https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url
Expand All @@ -85,6 +84,9 @@
r'(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))'
)

# noinspection HttpUrlsUsage
XML_NAMESPACES = {"nx": "http://definition.nexusformat.org/nxdl/3.1"}

# TO DO the validation still show some problems. Most notably there are a few higher
# dimensional fields with non number types, which the metainfo does not support

Expand Down
3 changes: 0 additions & 3 deletions src/pynxtools/nomad/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

from typing import Optional

# noinspection HttpUrlsUsage
XML_NAMESPACES = {"nx": "http://definition.nexusformat.org/nxdl/3.1"}

__REPLACEMENT_FOR_NX = ""

# This is a list of NeXus group names that are not allowed because they are defined as quantities in the BaseSection class.
Expand Down

0 comments on commit 9249732

Please sign in to comment.