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

[Bug]: Validation Error if @URL is required for the NeXus definition #469

Open
RonHildebrandt opened this issue Nov 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@RonHildebrandt
Copy link
Contributor

RonHildebrandt commented Nov 21, 2024

Contact Details

@RonHildebrandt

What happened?

This was found for NXraman here

Thats, as far as I know, the only NeXus defnition, which has @url required as attribute.
Though, this is written attribute is written automatically written afterwards. At some point, the check is done before this automatic writing of the @URL attribute for the definition.

This results in a warning, which is bad for CI/CD or similar.

Relevant log output

(.py39) ron@hlp135:~/2_pynxtools/2_make_multiformat_raman_reader/pynxtools-raman/src/pynxtools_raman_multiformat$ dataconverter eln_data.yaml Si-wafer-Raman-Spectrum-1.txt config_file.json --reader raman_multi --nxdl NXraman --output output_raman.nxs
Using raman_multi reader to convert the given files:  
• eln_data.yaml
• Si-wafer-Raman-Spectrum-1.txt
• config_file.json
Config file already set. Replaced by the new file config_file.json.
Config file already set. Replaced by the new file config_file.json.
WARNING: Missing attribute: "/ENTRY[entry]/definition/@URL"
The output file generated: output_raman.nxs.
@RonHildebrandt RonHildebrandt added the bug Something isn't working label Nov 21, 2024
@RonHildebrandt RonHildebrandt self-assigned this Nov 21, 2024
@lukaspie
Copy link
Collaborator

I think this is related to the uppercase nature of @URL. In NXentry, that should be set to have nameType="specified" to indicate that it always has to be URL and not be namefitted.

The problem comes here where it checks that URL is not already a direct child and it fails because we try to namefit URL with uppercase URL and this is not allowed.

So the solution is to change the nameType of definition/@URL in NXentry and eventuall in NXoptical_spectroscopy to nameType="specified". I added to the respective issue in the NIAC repo here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants