This brings the fix for the protocol changes that removed some of the history fields into the JSON version of this module.
I'm really only bothering with this because the script that uses it is mentioned in the project README, which I am in the process of updating.
statistics.quantiles was not present in Python 3.7 or earlier, which is a problem on Windows if you want to run a binary optimized version of the protobuf package, since those are not currently being posted for Python 3.8 or later.
This change switches to use the weighted median function just with equal weights. It's a bit of overkill, but it also cuts out the mess that was working around deficiencies of the statistics.quantiles implementation.
This brings most of the history-related functionality implemented in the grpc scripts to the JSON version, but only for text output. It also renames parserJsonHistory.py to dish_json_text.py, which removes the last remaining complaint from pylint about module name not conforming to style conventions.
A lot of this is just duplicated code from dish_common and dish_grpc_text, just simplified a little where some of the flexibility wasn't needed.
This removes compatibility with Python 2.7, because I didn't feel like reimplementing statistics.pstdev and didn't think such compatibility was particularly important.
Move the "samples" stat out of the ping drop group of stats and into a new general stats group.
This way, it will make more sense if/when additional stat groups are added, since that stat will apply to all of them.
Moves the parsing logic that will be shared by some upcoming scripts out into a separate module.
There's still just as much duplication between the JSON parser and the grpc parser as there was before, but this should at least prevent further duplication of this logic.
This also adds some proper documentation for what each of the stats means.