Modify PyTA report messages#1356
Conversation
…y-report-messages
Coverage Report for CI Build 27581017533Coverage increased (+0.002%) to 90.931%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
david-yz-liu
left a comment
There was a problem hiding this comment.
@rachelzUT in addition to the inline comments I left, please also include a screenshot of the updated plaintext report
| flex: 1; | ||
| grid-template-columns: min-content 1fr; | ||
| grid-template-rows: min-content 1fr; | ||
| column-gap: 3rem; |
There was a problem hiding this comment.
Keep properties in alphabetical order
| } | ||
|
|
||
| .no-errors { | ||
| text-align: center; |
There was a problem hiding this comment.
keep properties in alphabetical order
| _PRE_LINE_NUM_SPACES = 0 | ||
|
|
||
| no_err_message = "No problems detected, good job!" | ||
| NO_ERR_EMOJIS = ["🎉", "🥳", "🌟", "👍", "👏", "😊", "🎊", "🙌", "🕺"] |
There was a problem hiding this comment.
As this is shared across the multiple reporters, define this and the no_err_message method in the base PythonTaReporter class
| result += style_msgs_result | ||
|
|
||
| if not (code_msgs_result or style_msgs_result): | ||
| result += self.no_err_message() |
There was a problem hiding this comment.
We need to also display this message if level == "error" and there are no code messages, even when there are style messages. (This is also true of the HTML Reporter, so please double-check that.)
There was a problem hiding this comment.
I made this change to plain_reporter.py. For the HTML reporter, the level argument doesn't appear to actually be utilized or affect the output, since the report is produced by display_messages which doesn't even accept level as an argument.
pyta/packages/python-ta/src/python_ta/reporters/html_reporter.py
Lines 55 to 60 in 39191ca
david-yz-liu
left a comment
There was a problem hiding this comment.
Nice work, @rachelzUT!
Proposed Changes
Edited the PythonTA reports (plain text and HTML) to not show sections with no errors and only show 'good job' message once when there are no errors in either section. This eliminates repeated messages, allowing for a simpler and clearer report. Additionally edited the 'good job' message to include a random emoji.
...
Screenshots of your changes (if applicable)
Type of Change
Checklist
Before opening your pull request:
After opening your pull request:
Questions and Comments
column-gapwas added to.main-gridinstylesheet.cssfor aesthetic purposes, otherwise the title/table of contents and errors sections are spaced together quite closely.Example of PyTA HTML report with no errors:

Example of PyTA plaintext report with no errors:
