[Nexus] Update to NXValidate

Osborn, Raymond rosborn at anl.gov
Tue Oct 15 19:14:14 BST 2024


I have released v0.3 of NXValidate<https://github.com/nexpy/nxvalidate> (actually v0.3.3.b1), whose functionality is now, I believe, reasonably complete, at least in my internal tests. I am making the announcement, which will be my last before it moves out of the beta-development phase, because I would appreciate feedback from the community on any issues you encounter with your own NeXus files. NXValidate has two goals. One is to provide a useful tool to both users and developers in assessing the quality of their NeXus files. The second is to identify possible issues with the NeXus definitions themselves that are not sufficiently rigorous or sufficiently general, and therefore require discussion by the NIAC.

There are two kinds of issues that I would particularly value, both of which can be posted on the issues page<https://github.com/nexpy/nxvalidate/issues> (https://github.com/nexpy/nxvalidate/issues<https://urldefense.us/v3/__https:/github.com/nexpy/nxvalidate/issues__;!!G_uCfscf7eWS!ZrpO0GKgTXNHZ9fW3QAfDHRNKRYPfkArM2utz9Co2R7T33T-9I-ZhIwJ9LzNQgMIVyYdryT6U3mVr2srh-2f0Q$>).


  1.  If you encounter any bugs in the package, please post the relevant tracebacks.
  2.  If NXValidate generates warnings or error messages about the contents of your NeXus files that you believe are incorrect (or should be incorrect), please post those as well.

NXValidate attempts to make a rigorous comparison of each NeXus file to the base class or application definitions, as specified in the NXDL files maintained by the NIAC. Incorrect warnings could result from imprecision or errors in the NXDL files themselves. If I conclude that your issue is due to problems in the NXDL files, and not a bug in NXValidate,I will raise the issue with the NIAC on Github or at our next meeting.

The latest version incorporates some of the decisions taken at the recent NIAC meeting in Grenoble.


  1.  It was agreed that base classes can inherit from the NXobject base class. This allows fields and groups that are allowed in all other base classes, e.g., NXcollection groups, to be defined within the NXobject NXDL file. This is implemented in the NXDL files stored by the package, so the inheritance won’t work with your own copies of the definitions.
  2.  The NIAC approved a mechanism for defining name patterns, such as “FIELDNAME_errors”, with an attribute ‘nameType=”partial”’. These patterns are now recognized by NXValidate.

This version has several new features:


  1.  Improved formatting including colorized warnings and errors.
  2.  Support for the symbol tables stored in each NXDL file. These store values, such as dimension sizes, that are common to multiple fields.
  3.  Validation of links in application definitions.

You can install the latest version using:

% pip install nxvalidate==0.3.3b1

Usage instructions are available at https://github.com/nexpy/nxvalidate.

With regards,
Ray Osborn
--
Ray Osborn, Senior Scientist
Materials Science Division
Argonne National Laboratory
Lemont, IL 60439, USA
Phone: +1 (630) 252-9011<tel:+16302529011>
Email: ROsborn at anl.gov<mailto:ROsborn at anl.gov>







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nexusformat.org/pipermail/nexus/attachments/20241015/ab5c9847/attachment.htm>


More information about the NeXus mailing list