JSON Output for RBTools Status Command

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

ryankang
RBTools
master
11521
rbtools, students

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
added new method to print JSON to stream object and tests to ensure it works properly
each summary is added as a json object to a list in summaries
moved definition of summaries to before if statement so that if no requests are found, there still exists a summaries key
fixed extra spaces in no line
Removed setting status because it is done in __init__ by checking for errosr
Importing kgb instead of specific package inside kgb
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. 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
-
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
-
added new method to print JSON to stream object and tests to ensure it works properly
-
added new global command --json
-
added conditional at the end of command cycle to print JSON is enabled
-
added method to append to classes and tests to ensure items are appended correctly
-
added new method to add errors to existing errors key or create a new one
-
each summary is added as a json object to a list in summaries
-
moved definition of summaries to before if statement so that if no requests are found, there still exists a summaries key
+
each summary is added as a json object to a list in summaries
+
moved definition of summaries to before if statement so that if no requests are found, there still exists a summaries key

Diff:

Revision 2 (+31 -5)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

ryankang
ryankang
ryankang
ryankang
ryankang
ryankang
Review request changed

Summary:

-[WIP] JSON Output for RBTools Status Command
+JSON Output for RBTools Status Command

Commits:

Summary
-
each summary is added as a json object to a list in summaries
-
moved definition of summaries to before if statement so that if no requests are found, there still exists a summaries key
-
fixed extra spaces in no line
-
Removed setting status because it is done in __init__ by checking for errosr
+
added new method to print JSON to stream object and tests to ensure it works properly
+
each summary is added as a json object to a list in summaries
+
moved definition of summaries to before if statement so that if no requests are found, there still exists a summaries key
+
fixed extra spaces in no line
+
Removed setting status because it is done in __init__ by checking for errosr
+
Importing kgb instead of specific package inside kgb

Depends On:

+11521 - JSON wrapper which inputs to a dictionary and outputs a JSON object

Groups:

+students

Diff:

Revision 7 (+34 -12)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...