Added issue count generation#5
Conversation
hrkrshnn
left a comment
There was a problem hiding this comment.
Nice! Left a suggestion.
| for content in issue_dict[label]: | ||
| report.write(content.replace("\r\n", "\n")) | ||
|
|
||
| with open("severity_counts.sh", "w") as counts_file: |
There was a problem hiding this comment.
Did you miss committing this file here?
There was a problem hiding this comment.
I assume you have a bash script to replace summary.tex. An alternate approach is the following, split the file summary.tex into summary.tex and summary_table.tex.
Where summary.tex would include summary_table.tex. This script can directly generate summary_table.tex.
There was a problem hiding this comment.
I saw no need to commit the file because the script creates it from scratch. I tried to keep the repo as clean as possible.
I added a few lines in report-template's generate.sh file to load the vars set in severity_counts.sh and then replace some placeholders in the file. It doesn't replace the whole file. I'll take a look at this new summary_table.tex approach later.
All this should be temporary. I was trying to think about a more automated solution that doesn't require copying/moving files between folders.
There was a problem hiding this comment.
automated solution that doesn't require copying/moving files between folders.
Good idea. This is probably better. To give context, this script (compile-issues) came later. Initially, we were just writing everything in hackmd. Now, we just moved everything to GitHub.
| total_count = 0 | ||
| for label in SEVERITY_LABELS: | ||
| variable_name = label[10:].upper().replace(" ", "_") + "_COUNT=" | ||
| count = len(issue_dict[label]) |
There was a problem hiding this comment.
If label does not exist in issue_dict, this would throw, right? Can you add a check for this?
No description provided.