cps-org / cps

Common Package Specification — A cross-tool mechanism for locating software dependencies
https://cps-org.github.io/cps/
Other
91 stars 8 forks source link

Improve JSON schema #64

Open mwoehlke opened 1 month ago

mwoehlke commented 1 month ago

Add a link to the JSON schema from the main documentation. Pretty-print said schema and add format and default, with the latter also moving to the "machine readable" block in the primary documentation. Add custom Pygments style to reflect the coloring used elsewhere in the documentation, and "fix" the language of the sample CPS file. Factor out some duplicated code. Fix some flake8 warnings.

mwoehlke commented 1 month ago

FYI @autoantwort, this should fix a couple of the issues you raised. I'd appreciate if you can verify whether I did it right; thanks!

LecrisUT commented 5 days ago

A suggestion, why not invert the generator to have rst be generated from json-schema (with sphinx-jsonschema). Reasoning is that the json schema can be much more powerful, e.g. checking sem-version, conditional dependencies, etc. which are less intuitive to define in the rst format. JSON format is of course rather cumbersome to navigate, so maybe having it in a yaml file would be better