-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streaming output frontend #1622
Conversation
…aming-output-frontend
…b/Autolab into streaming-output-frontend
Looks like the changes here would conflict with #1643 -- I modified the |
Visually, the remarks and all makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and it works. Left some comments, but I will approve it because it's functionally OK.
@@ -575,7 +575,7 @@ def viewFeedback | |||
redirect_to(action: "index") && return | |||
end | |||
@jsonFeedback = parseFeedback(@score.feedback) | |||
@scoreHash = parseScore(@score.feedback) unless @jsonFeedback.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may. I know why is the nil check removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with it there, it wasn't possible to get any of the score info from parseScore unless a json config file was specified for semantic; there's only one small part in parseScore that relies on having @jsonFeedback
set, so I just added a nil check there instead so the rest of the function could run
@@ -594,7 +594,7 @@ def parseScore(feedback) | |||
|
|||
score_hash = JSON.parse(feedback) | |||
score_hash = score_hash["scores"] | |||
if @jsonFeedback.key?("_scores_order") == false | |||
if @jsonFeedback && @jsonFeedback.key?("_scores_order") == false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: You could perhaps use ruby's safe navigator:
https://mitrev.net/ruby/2015/11/13/the-operator-in-ruby/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: if @jsonFeedback
is nil
then @jsonFeedback&.key?("_scores_order")
would be nil
, which is not the same as false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it also relies on the behavior of nil
ANDed, which is also not very ideal.
@@ -868,6 +868,7 @@ def valid_asmt_tar(tar_extract) | |||
tar_extract.each do |entry| | |||
pathname = entry.full_name | |||
next if pathname.start_with? "." | |||
next if pathname.start_with? "PaxHeader" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does PaxHeaders stand for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a file that gets added on mac... none of the autograders I tar'ed directly on mac would run without it, so I added it in for now to run, but I think we could look for a better way of handling something like this in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a comment on it? so that next time people who look at this code would know
hmmm yeah I at one point did consider just removing it, but I decided to leave it in because for non-autograded problems, there's no other way to see the score for that problem on the page. Would you suggest just hiding it if it's autograded and showing it otherwise? Or updating the styling to make it less prominent? @victorhuangwq |
I'm wondering if we could hide it for autograded problems, and show it for non-autograded problems |
Done! @victorhuangwq |
Description
Updates the feedback interface to show more details about a submission:
Problem with autograder score:
Problem without autograder score:
Scrolled to bottom of page:
Side panel with lots of problem categories:
Motivation and Context
How Has This Been Tested?
{"scores": {...}}
format) -> displays output, but doesn't have a score breakdownTypes of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting