mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
530 stars 342 forks source link

About removing `jing` tool #830

Open fredgan opened 1 year ago

fredgan commented 1 year ago

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?

llhotka commented 1 year ago

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.

fredgan commented 1 year ago

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

Since it is maintained, we can keep it.

However,

@llhotka Thanks.

llhotka commented 1 year ago

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.