Tools specification#457
Conversation
6270b2a to
16750ab
Compare
|
@ziuziakowska mentioned that we should probably use a Python library to validate this: https://python-jsonschema.readthedocs.io/en/stable/validate/ |
| gtkwave | ||
| openfpgaloader | ||
| openocd | ||
| nodejs |
There was a problem hiding this comment.
I'm not very keen on adding nodejs as a dependency only for the json schema validation. I suggesting using either python or compiled tools, a few options are:
- jsonschema-cli: a Rust binary and can be installed with nix.
- check-jsonschema: a Python script that can be installed with uv.
- Our own script based on opentitan json schema linter.
There was a problem hiding this comment.
I've gone for the Python checking although I didn't know about the check-jsonschema.
There was a problem hiding this comment.
The check-jsonschema script doesn't allow downloading a JSON file from the internet. Not sure if you would prefer a wget and then a check-jsonschema call or the Python script that I have now prepared in the utilities folder.
There was a problem hiding this comment.
Using wget would requirer a wrapper script? Then It would be better to use check-jsonschema as a python lib and use request to donwload the JSON.
There was a problem hiding this comment.
Are you happy with my current script that uses jsonschema directly or should I move to check-jsonschema?
engdoreis
left a comment
There was a problem hiding this comment.
This is a good feature but I left a comment about the dependencies.
48fd8bc to
c3271dd
Compare
This adds a file called tool_data.json which specifies all the tools that we are dependent on. The commit also valides this against a standard schema defined here: https://github.com/marnovandermaas/tool-schema/blob/main/tool_schema.json It also checks the schema using a Python library.
There was a problem hiding this comment.
Since you're not using nodejs anymore this file can be removed.
| { | ||
| "name": "Verilator", | ||
| "vendor": "Veripool", | ||
| "version": "v5.0.40", |
There was a problem hiding this comment.
| "version": "v5.0.40", | |
| "version": "v5.040", |
What tools do we need for Mocha and validate this against our schema.
Closes: #439