JSON Output for RBTools Status Command

Review Request #11541 — Created March 20, 2021 and submitted

Information

RBTools
master

Reviewers

Depends on JSON output object from r#11521. Adding information
that goes into rows of the status table into a JSON object. If no requests
are found the array remains empty. Also adds info if format_results is
called.

Ran unit tests in Commands and passed all tests

Summary ID
added new method to print JSON to stream object and tests to ensure it works properly
25df4d28942b92a8a571329ce54f43e57b46c8bc
each summary is added as a json object to a list in summaries
675fa33dbdf470e4495e932a90482bacab2ead93
moved definition of summaries to before if statement so that if no requests are found, there still exists a summaries key
3d10681f8240fa5053af5dad2e1648db8bede9b3
fixed extra spaces in no line
46632b15806c44edddf1bfc46fc56b7bfa3d62a7
Removed setting status because it is done in __init__ by checking for errosr
592bf7da19c2e27eeea64dfa0adae7252953d0ff
Importing kgb instead of specific package inside kgb
b06f922afd219110b044a97519632fd6ae919458
Description From Last Updated

The diff of this includes the changes from your other review request. You probably want to post and explicitly specify …

daviddavid

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
  1. 
      
  2. Show all issues

    The diff of this includes the changes from your other review request.

    You probably want to post and explicitly specify which commits you want to include. For example, to include just the latest two commits:

    rbt post -r 11541 HEAD^^..HEAD

    If you have two branch tips, you can also do:

    rbt post -r 11541 json-branch..json-status-branch

  3. 
      
ryankang
Review request changed

Commits:

Summary ID
added JSON wrapper class to main.py which inputs to a dictionary and outputs a JSON object. Added tests for JSON wrapper functionality in test_main.py
9bfcd1b986f5b42603b0809c7d78b638f6cee848
added new method to print JSON to stream object and tests to ensure it works properly
fbd48ac58a17e2f8d9feb7a219f66d061eed989c
added new global command --json
9cf5b3f5bb931691494dfb7922a5a0c910ea8a2d
added conditional at the end of command cycle to print JSON is enabled
2876f2452d8b0655055e362ef6684de8b8e32ae7
added method to append to classes and tests to ensure items are appended correctly
bcf004f831c02cbb35dfb5dc3d61b5e3406af2b5
added new method to add errors to existing errors key or create a new one
195b6bf5193604d04511431c6761790a033fb74f
each summary is added as a json object to a list in summaries
0972da07e52fc7a97b1afd350a473f451476441c
moved definition of summaries to before if statement so that if no requests are found, there still exists a summaries key
1279e6b76c47cc0091fd769275a778b412875817
each summary is added as a json object to a list in summaries
0972da07e52fc7a97b1afd350a473f451476441c
moved definition of summaries to before if statement so that if no requests are found, there still exists a summaries key
1279e6b76c47cc0091fd769275a778b412875817

Diff:

Revision 2 (+31 -5)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

ryankang
ryankang
ryankang
ryankang
ryankang
ryankang
ryankang
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (82a7118)
Loading...