pyang icon indicating copy to clipboard operation
pyang copied to clipboard

About removing `jing` tool

Open fredgan opened this issue 3 years ago • 3 comments

Hi @llhotka , I wonder if the jing tool is necessary for make test? This tool is too old and not maintained any longer. There are very few materials about this tool. Can we remove this tool from pyang?

fredgan avatar Nov 05 '22 17:11 fredgan

Jing isn't required, in fact it has to be selected by using the -j switch with yang2dsdl. The default RELAX NG validator is xmllint, but in my (not so recent) experience, it is much worse than jing, and the RELAX NG part wasn't finished when I last tried (which may be a decade ago, though).

I am also not sure that jing is unmaintained, the last release is from May 2022:

https://github.com/relaxng/jing-trang/releases/tag/V20220510

I can still get packages for Debian and Arch Linux.

Anyway, if you know about a good RELAX NG validator, it is quite easy to plug it in as a replacement.

llhotka avatar Nov 07 '22 13:11 llhotka

Sorry I found the wrong jing repo which has not been maintained since 2005.

Since it is maintained, we can keep it.

However,

  • The README has nothing introducing about jing. Should we add something introducing about it or linking to it? And if it can be installed in Windows platform?

  • make test will failed if it is not installed. Should we judge in the Makefile or other scripts if it is installed. Just warn something and skip the jing needed test cases.

@llhotka Thanks.

fredgan avatar Nov 07 '22 13:11 fredgan

Jing is used only in test_hello and test_json, I am not sure whether it was necessary. I am currently not able to run the tests myself, for some weird reason pyang fails on ModuleNotFoundError for module jaraco.functools. But you can try to run the tests without the -j switch, and if all tests pass, just remove it. Otherwise it would be good to document jing as a dependency for the development environment.

llhotka avatar Nov 07 '22 14:11 llhotka