Conversation
note this is a first attempt, these generated files do not pass cnxvalidate yet as more work needs to be done
|
Hi, maybe a README file in the new nxdl folder? It could describe the nxdl_to_hdf5.py program and method used to generate the files, and even the current state of validation. |
|
good |
|
yep will do, I am on holidays for a week so I will address this when I am back. |
|
ok I finally got around to getting this code to work, I have added some minor documentation and output from my code as well as the output from nxvalidate on each file. I am no longer generating the definitions for base_classes so only doing definitions in applications and contributed_definitions, however only definitions that contain an NXentry will be generated (in contributed_definitions). The only real issue with generating the files is the link target syntax, nxvalidate will complain if it isnt exactly how it appears and the targets that are specified in the definition files are meant to be human readable guides as opposed to exact (or is that an invalid assumption?), the simplest would be to have the link target use the exact naming specified in its definition but I'm not sure how much resistance to that there might be to requiring definitions to do this. |
these changes do not fully support the generation of data specified with a rank that uses an expression it prints a Note to let the user know, and also doesn't die when it comes across the expression
|
Feedback from code camp:
|
- rename groups to untitled_groupname - Include autogenerated files, but note the specific nexusformat/definitions release used to generate them. - Add doc strings as attributes. - Add readme field at the top. Include url back to example data. Also note the non-NeXus decorations that serve to help the user, such as required=True and the addition of the doc strings.
|
Following a review the following changes were requested:
|
|
I looked more into the grabbing what the current release of the definitions is for the local repo (to be used in the README data field of the generated file) and it looks like to me that the file NXDL_VERSION in the main directory of definitions does indicate the correct release tag of the repo, when I checkout different tags the contents of this file track correctly. The file contains a single string which is the release tag, @phyy-nx you were getting a different result yesterday so I am just wondering if I am missing something. |
|
NXcanSAS was tagged since the version described in the file. Perhaps that
was the confusion. The file describes the last NXDL release.
…On Wed, Oct 21, 2020, 11:15 AM RussBerg ***@***.***> wrote:
I looked more into the grabbing what the current release of the
definitions is for the local repo (to be used in the README data field of
the generated file) and it looks like to me that the file *NXDL_VERSION*
in the main directory of definitions does indicate the correct release tag
of the repo, when I checkout different tags the contents of this file track
correctly. The file contains a single string which is the release tag,
@phyy-nx <https://github.com/phyy-nx> you were getting a different result
yesterday so I am just wondering if I am missing something.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARMUMEVWMTGS64UI2Y5KX3SL4CKDANCNFSM4KNMUUCQ>
.
|
|
ok then I will continue to use the NXDL_VERSION in the local repo for the version tag |
- rename NX_class in attributes to 'type' for data types
- add a prefix (EX_) to the attributes that are from auto generation (required, doc)
- get the latest release tag from git for version of the definitions to be used in README (no change was required)
When I run the new code, the readme says v2020.1, but I'd expect it to say something like 'latest', 'master', or something, because the definitions have changed a lot since v2020.1. It's a minor issue though. I'd say this is fine as is. |
benajamin
left a comment
There was a problem hiding this comment.
I think this is an enormous improvement on the current state of NeXus examples. One thing that I would like added (but merging is not dependent on), is to properly add the @axes and @{axis}_indices attributes on the NXdata group that describe the dimension scales of the plotable dataset(s). NXstxm had none, while NXcanSAS had lots of appropriate attributes, but without the correct values. It might take some work on the AppDef nxdl files to get this working properly and I would prefer to get the current version merged and then make a new issue to later/next work on improving the NXdata groups.
|
Most common ERROR flagged by punx validate is missing 12 instances of output: review.txt Q: What are the NXentry groups named? |
prjemian
left a comment
There was a problem hiding this comment.
Problems as noted with some /@default values (named group does not exist).
|
nice catch @prjemian ! |
prjemian
left a comment
There was a problem hiding this comment.
All HDF5 files pass NeXus validation with punx (note that punx does not validate application definitions yet so this is not the deepest analysis possible).
Generates example NeXus data files from the NXDL specifications, per #17.
Note this is a first attempt, these generated files do not pass cnxvalidate yet as more work needs to be done