-
Notifications
You must be signed in to change notification settings - Fork 8
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: can't validate NXDL file now #196
Comments
I'm running into this same issue with Is there a workaround that you would suggest for validating an NXDL XML file? |
Thanks for the bump on this. The documentation has a big TODO marking and this basic suggestion: user@host ~ $ xmllint --noout --schema nxdl.xsd base_classes/NXentry.nxdl.xml
base_classes/NXentry.nxdl.xml validates This works if your working directory is the root of the NeXus definitions repository, so the files Once this is re-implemented in punx, then punx will find those files and sub-directories for you. Internally, punx will call the library used by |
Here's a view of that directory on my local development workstation: (base) prjemian@zap:~/.../prjemian/punx$ ls ../../NeXus/definitions/
applications contributed_definitions jenkins_build manual package utils
base_classes COPYING legacy_docs nxdlTypes.xsd README.md www
build dev_tools LGPL.txt NXDL_VERSION requirements.txt
CHANGES.rst impatient-guide Makefile nxdl.xsd setup.cfg |
Here's how it should work (but fails now):
The code exists (from a previous revision), but has been parked out of distribution since the last refactoring. It will be coming back: (bluesky_2022_3) prjemian@zap:~/.../prjemian/punx$ git grep validate_xml
punx/ignore_now/main.py: result = validate.validate_xml(args.infile)
punx/ignore_now/nxdlstructure.py: validate.validate_xml(nxdl_file_name)
punx/ignore_now/validate.py: ~validate_xml
punx/ignore_now/validate.py:def validate_xml(xml_file_name):
punx/main.py: result = validate.validate_xml(args.infile)
punx/nxdl_manager.py:def validate_xml_tree(xml_tree):
punx/nxdl_manager.py: validate_xml_tree(lxml_tree)
punx/reserved_code.txt:# validate_xml_tree(self.lxml_tree)
punx/tests/test_nxdl_manager.py: nxdl_manager.validate_xml_tree(tree)
punx/tests/test_nxdl_manager.py: # nxdl_manager.validate_xml_tree(tree)
tests/ignore_now/validate_test.py_: def test_validate_xml___with_invalid_xml_file(self):
tests/ignore_now/validate_test.py_: punx.validate.validate_xml, self.test_file)
tests/ignore_now/validate_test.py_: def test_validate_xml___with_invalid_NXDL_file(self):
tests/ignore_now/validate_test.py_: punx.validate.validate_xml, |
Aha, this looks straightforward. Will give it a try with Thanks for pointing this out. :) |
It is an expected feature of punx that it be able to validate NXDL files. Today, this failed:
Noting this version:
The text was updated successfully, but these errors were encountered: