[Nexus] Announcing beta-version of the NXvalidate Python package

Jens Krüger Jens.Krueger at frm2.tum.de
Tue Sep 17 07:28:40 BST 2024


Hi Ray,

thanks for the information about the nxinspect tool and the effort you 
put into this project.

I have a question: Wouldn't it make sense to download all the 
definitions from the nexusformat.org

during the installation and use them locally instead of put them into 
the repo? I'm afraid,

that the sync between nexpy and nexusformat repos could be a big 
challenge in the future.

Best regards

Jens

Am 16.09.24 um 18:04 schrieb Osborn, Raymond via NeXus:
> I am happy to announce that we have just issued the first beta-release of NXvalidate (https://github.com/nexpy/nxvalidate), a new Python package used to inspect and validate NeXus files. It is currently available for installation on the PyPI server and the source code can be downloaded from Github. When it is more mature, it will be merged into the nexusformat package, with a GUI interface in NeXpy (https://nexpy.github.io/nexpy/). I hope to discuss this at the upcoming meeting of the NeXus International Advisory Committee and would welcome any feedback if you try it out before then. Please note that this is not a production release. Please post any issues to https://github.com/nexpy/nxvalidate/issues.
>
> Installation
> Released versions of nxvalidate can be installed using “pip install nxvalidate” and the source code can be downloaded from the NeXpy Git repository:
>
>      % git clone http://github.com/nexpy/nxvalidate.git
>
> Usage
> The nxvalidate package provides a single command-line script.
>
> % nxinspect -h
> usage: nxinspect [-h] [-f FILENAME] [-p PATH] [-a [APPLICATION]]
>                   [-b BASECLASS] [-i] [-w] [-e] [-v]
>
> Inspects and validates NeXus files.
>
> options:
>    -h, --help            show this help message and exit
>    -f FILENAME, --filename FILENAME
>                          name of the NeXus file to be validated
>    -p PATH, --path PATH
>                          path to group to be validated in the NeXus file
>    -b BASECLASS, --baseclass BASECLASS
>                          name of the base class to be listed
>    -a [APPLICATION], --application [APPLICATION]
>                          validate the NeXus file against its application definition
>    -i, --info            output info messages in addition to warnings and errors
>    -w, --warning         output info messages in addition to warnings and errors
>    -e, --error           output info messages in addition to warnings and errors
>    -v, --version         show program's version number and exit
>
> N.B., the command is “nxinspect,” rather than “nxvalidate” to avoid confusion with the existing “cnxvalidate” application (https://github.com/nexusformat/cnxvalidate).
>
> Examples
>
>    1.  To compare the contents of a NeXus file with the base classes defined by the NeXus standard and print conflicting fields or groups, type:
>
> % nxinspect -f <filename.nxs> -e
>
> The --info, --warning and --error switches control how much information is output. The default is --warning.
>
>    2.  To check whether the contents of the NeXus file conform to the required contents of the application definition specified in the file, type:
>
> % nxinspect -f <filename.nxs> -a
>
>    3.  To check whether the contents of the NeXus file conform to the required contents of an application definition file, type:
>
> % nxinspect -f <filename.nxs> -a <application.nxdl.xml>
>
>    4.  To print the contents of a base class, type:
>
> % nxinspect -b <base-class-name>
>
> With regards,
> Ray Osborn
> --
> Ray Osborn, Senior Scientist
> Materials Science Division
> Argonne National Laboratory
> Lemont, IL 60439, USA
> Phone: +1 (630) 252-9011
> Email: ROsborn at anl.gov
>
>
>
>
>
> _______________________________________________
> NeXus mailing list
> NeXus at nexusformat.org
> https://lists.nexusformat.org/mailman/listinfo/nexus

-- 
Dipl.-Phys. Jens Krüger
Leiter Gruppe Instrumentsteuerung
Head of Instrument control group

Technische Universität München
Forschungsneutronenquelle
Heinz Maier-Leibnitz (FRM II)
Lichtenberg-Str. 1
D-85748 Garching

Tel: + 49 (0)89 289 14716
Fax: + 49 (0)89 289 14620
mailto: jens.krueger at frm2.tum.de
https://www.frm2.tum.de
https://www.mlz-garching.de




More information about the NeXus mailing list