-
Notifications
You must be signed in to change notification settings - Fork 10
Mark namefitted group as undocumented #570
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
Mark namefitted group as undocumented #570
Conversation
…e with documented keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to work, however it forces now the NAME[instance] notation also for variadic Fields. In fact, I support this, as previously namefitting was sometimes not correct.
One improvement I suggest is to add a separate clause for NXcollections. These can as I understand it appear anywhere:
"This is the NXcollection class which can appear anywhere underneath NXentry"
I used NXroot before to write nexus files w/o schema. These give warnings now, see igor-reader tests. Maybe this is fine. |
Mpes test failures are all with PROCESS_MPES, which should be removed anyways, so this will be resolved later. |
Ah no, NXroot contains NXentry. The issue is that we need ENTRY[scan...]/DATA[data]/DATA[data] now. |
Fix for checking of undocumented keys
…s' into 563-bug-converter-does-not-warn-if-variadic-concept-name-is-invalid
@lukaspie I reset this to merge to master to run tests. |
@rettigl I implemented what we discussed today, i.e. you need to give the concept name if you want to use a variadic concept. Note that we still need to do namefitting because we have the additional constraint of the Validation tests are passing now, but the plugin tests are still failing. Some of that is related to the addittional checks we are running now (like the type of the
Note that for pynxtools-mpes, I get Will continue next week. |
Excellent, thanks. I already briefly looked into the mpes errors. The calibration error comes because in the referenced definitions, it is calibrated_AXIS for some reason, instead of calibrated_exis in NXcalibration. Not sure where that came from. The other issue I think is also with the config file, I will start an appdate branch. |
Checking of group attributes was not properly handled, because the "@" was not removed in the keys dict. I changed the logic now that the @ should be in the dict for all attributes. What is still not working now is the proper handling of @url, because it is considered a concept rather than a name. This should be hopefully fixed by the new nameType code, I assume? |
@rettigl why was you last commit (25e0013) neccessary? I think we can just do:
With the early-return, we will prefer direct name match over concept match anyway. |
This might also work. With the code before there were randomly different behaviors, as the elements in the list appear randomly ordered. So we need to parse all emements before we can make a decision. the code above should also work, I guess. The missing documentation for data/energy/@type here: https://github.com/FAIRmat-NFDI/pynxtools/actions/runs/13865392531/job/38803289191#step:9:230 was due to the wrong mapping of AXISNAME[energy] to AXISNAME rather than energy. |
Ok, the new version also seems to work (indeed, my old code was not iterating all nodes before making a decisions, but this is fixed now). From what I can tell, all the remanining issues with the plugin tests are either solved by using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. Merge here, and close the others
@rettigl with this PR, we get an "is written without documentation" warning if a variadic concept name is used that is not part of the application definition.
I decided to reuse the undocumented warning here because this can be turned off with a flag in the CLI call of dataconverter. So if somebody is sure that they want to use this namefit anyway, we can just allow that by passing the `ignore-undocumented´ flag.
Fixes #563