Skip to content
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

Some optional field is considered mandatory #238

Open
biochem-fan opened this issue Sep 7, 2023 · 2 comments
Open

Some optional field is considered mandatory #238

biochem-fan opened this issue Sep 7, 2023 · 2 comments

Comments

@biochem-fan
Copy link

I am writing a converter from EIGER's "nearly" NeXus into full NeXus for a chemical crystallography beamline BL40XU at SPring-8. When I run punx validate on my files, it complains that some fields are missing.

/entry@None ERROR    NXDL field                   NXmx:title not found                                                        
/entry@None ERROR    NXDL field                   NXmx:end_time not found

However, these are optional, as indicated by minOccurs=0 in the definition.

Why are they considered mandatory?

My converter and the steps to reproduce the issue is in https://github.com/dials/dials_scratch/tree/master/tn/SPring-8-BL40XU.

CC: @phyy-nx

@prjemian
Copy link
Owner

prjemian commented Sep 8, 2023

Not sure about that. Was suspecting it might be due to differing versions of the NXmx standard, yet that line of the NXmx definition has not changed in the last 9 years. I assume you are using the default version of the definitions that ships with punx, v2018.5. That version, posted less than 9 years ago, has the same minOccurs="0".

Next, I'll make a test case for this.

@biochem-fan
Copy link
Author

Thank you very much for investigation. The test case can be regenerated by my script linked above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants