8000 Fixes interface for failing nomad tests by domna · Pull Request #119 · FAIRmat-NFDI/pynxtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixes interface for failing nomad tests #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions pynxtools/nexus/nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,12 @@ def process_node(hdf_node, hdf_path, parser, logger, doc=True):
logger.debug(f'value: {val[0]} {"..." if len(val) > 1 else ""}')
(req_str, nxdef, nxdl_path) = \
get_nxdl_doc(hdf_info, logger, doc, attr=key)
if parser is not None and 'NOT IN SCHEMA' not in req_str and 'None' not in req_str:
if (
parser is not None
and req_str is not None
and 'NOT IN SCHEMA' not in req_str
and 'None' not in req_str
):
parser({"hdf_info": hdf_info,
"nxdef": nxdef,
"nxdl_path": nxdl_path,
Expand Down Expand Up @@ -1325,7 +1330,11 @@ def full_visit(self, root, hdf_node, name, func):
def process_nexus_master_file(self, parser):
"""Process a nexus master file by processing all its nodes and their attributes"""
self.parser = parser
self.in_file = h5py.File(self.input_file_name, 'r')
self.in_file = h5py.File(
self.input_file_name[0]
if isinstance(self.input_file_name, list)
else self.input_file_name, 'r'
)
self.full_visit(self.in_file, self.in_file, '', self.visit_node)
if self.d_inq_nd is None and self.c_inq_nd is None:
get_default_plotable(self.in_file, self.logger)
Expand Down
0