COVESA / COVESA/ifex

Improve user friendliness of json schema generator and validator

Open
#101 0 comments 0 reactions 0 assignees View on GitHub
good first issue quality
Dominant language
Python
Stars
24
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Either one of the two jobs can be done in isolation if you don't want to do both at the same time:

- Combine `ifex_to_json_schema.py` and `pretty_print_json.py` so that the first file outputs in "pretty" format right away. This involves changing the print statements to instead collect up the result into an internal string, which can then be passed to the json load+dump sequence.
- `validate.py` is very simple and throws an IndexError if no input file is provided, instead of writing a usage instruction. Modify validate.py to use the standard `argparse` python module, and give appropriate usage information.

(pretty_print_json.py has the same problem as validate.py, but instead of improving it, it would be better to combine it as proposed in the first bullet).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading ifex_to_json_schema.py, pretty_print_json.py, and validate.py to understand their current command-line behavior. Combine the schema generator with pretty printing so its output is formatted directly, and update validate.py to use argparse with useful usage information. Done means either requested improvement works without an IndexError when no input file is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.