Refactor code that checks for field and group occurrences#249
Refactor code that checks for field and group occurrences#249rayosborn merged 5 commits intonexpy:mainfrom
Conversation
The specification of dimensions in the NXDL files contains some serious anomalies, which generate unnecessary warnings. They may now be viewed in the informational messages but not listed as warnings.
These are still strongly deprecated.
|
@takluyver, I have refactored the code that was included in your PR #247, because your fix was also useful in fixing the FieldValidator as well as the ApplicationValidator. The new version has now been merged into the main branch. If the new code no longer fixes your original issue, please let me know. If there are no problems, I will try to release this as a bug release in the next week. |
|
Thanks! I've given it a quick try and it seems to still do what I'm expecting. 👍 Demoting the dimension-related messages to INFO also hides the issue I had in #248. I hope you can get the issues with the spec worked out, though. |
rayosborn
left a comment
There was a problem hiding this comment.
Thanks for confirming. I think that the way that dimensions are defined within the NeXus standard will require a lot more thought. Many of the definitions in the base classes are far too restrictive and/or inconsistent with common usage, and fixing them to work with rigorous validation tools won't be trivial.
minOccurs,maxOccurs,optional, andrecommendedto a separate function.optionalandrecommendedattributes to the FieldValidator.signalandaxisattributes in NXfields to a warning.