You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add JSON output for easy parsing of r.colors.out output.
Describe the solution you'd like
Adding option format, it would be something like format=plain for the current output format and format=json for the JSON output. There is a newly added parson library to GRASS (#3028), so it should be used here.
Also, if you could provide a specific test that generates this output, I can use it to test my changes. Additionally, can you tell me how to test the changes overall, including some commands for integration tests?
Thanks for looking into this! I suggest to review r.colors.out documentation. You can try to write a simple test with pytest, see notes and look up some existing examples, e.g. in r.mask.status or v.dissolve. Similarly to r.mask.status example, you would create a small temporary raster and run r.colors.out on that one.
For the JSON support, look at some examples a GSoC student did this year to keep it consistent.
Add JSON output for easy parsing of r.colors.out output.
Describe the solution you'd like
Adding option format, it would be something like format=plain for the current output format and format=json for the JSON output. There is a newly added parson library to GRASS (#3028), so it should be used here.
See also discussion in #3019.
A test should be included.
A possible JSON layout could be:
The text was updated successfully, but these errors were encountered: