-
Notifications
You must be signed in to change notification settings - Fork 115
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
E2451. Reimplement feedback_response_map.rb #144
Open
TiptonG
wants to merge
32
commits into
expertiza:main
Choose a base branch
from
ssdaniel1824:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Present for convenient review of old material, and for use in case of the spec file (our project likely will not include a test revamp)
Trying to get existing tests to pass for a good baseline
Adding necessary factory methods commenting out elements that do not exist in reimplementation back end yet.
Separate self.feedback_response_map functionality across several private methods to reduce complexity. NOTES: * These changes are in line with the documentation, with the only exception being that self.get_feedback_authors() requires an argument I did not forsee * These changes are untested * The variable names might want to be changed in the future, for the time being I stuck largely with what was there already * Some of the code might want to be displayed better in the future, the "next if" section on line 126 still vexes me.
Add header comments to all methods without them. Add inner comments to the private methods used in self.feedback_response_report NEXT STEPS: * Remove unnecessary comments from self.feedback_response_report * Rework self.varying_rubrics_report to have dynamic dictionary
The old self.varying_rubrics_report has been commented out, and changed to self.varying_rubrics_report_old The new self.varying_rubrics_report starts with an empty dictionary, and has the keys added to it when a new one appears (the value is initialized to an empty array if the value is initially missing, that is what ||= does). I added a note above line 141, since I'm not sure if it's interacting the way we want it to... but that WAS the logic of the existing function, so I don't want to touch it. This change is untested, I have not ran the tests in a while, and do not want to go through the hassle of docker at the moment. PLEASE LET ME KNOW if these changes do not work.
Removed colons on lines 116, 132. Also removed the return keyword in lines 128, 150, 180. Lastly, added a comment mentioning that a "next if" keyword should be changed to "next unless", in line 141.
Removed an extra colon in line 169, as well as the comment made in the previous commit. All changes were suggested by RuboCop. There is one error that rubocop notes, "Lint/Syntax: unexpected token kEND" at line 151, for the "end" keyword. I am unsure of how to remove this rubocop offense. Moved the @temp_response_map_ids into the 2 helper methods, varying_rubrics_report and static_rubrics_report
Commented out unneeded lines, fixed indent and spacing problems, and added a "next" to an "unless" statement at line 166.
The next before unless breaks everything, despite one of the code smell tools thinking that it is necessary.
Remove old code comments, since I got the screenshots with them that I want. Disable rubocop AbcSize metrics for the email method, since that is not our concern per the project description.
Generalizes return case to return ALL values of key-value pairs in the dictionary IN KEY ORDER.
Mock Final PR
Original content--Segway PR
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Descriptions / Recap
Changes to the Model:
get_feedback_authors
,varying_rubrics_report
,static_rubrics_report
).varying_rubrics_report
to use a more streamlined data structure (2D array instead of 3 separate arrays), then generalized this data structure to adapt to more than three rounds (now able to adapt to all numeric rounds).next if
vsunless in
what is nowself.static_rubrics_report
) into a consistent variation for maintainability.temp_review_response_map_ids
toreview_response_map_ids
,temp_review_responses
toreview_responses
(in the helper method), andall_review_response_ids_round_one/two/three
toall_review_response_ids_rounds
get_title
totitle
to adhere to rubocop guidelinesfeedback_reponse_map
modelChanges to the Spec Test:
assignment_team.rb
andassignment_team_analytic.rb
as the existing spec tests depended on those 2 files. No changes were made to these files other than commenting outinclude Scoring
inassignment_team.rb
response
,course
,institution
, androle
feedback_reponse_map
spec test as well as both factory filesOther Changes:
type
andcalibrate_to
fields to theresponse_maps
schema since those existed in expertiza/expertiza but not reimplementation-back-endResources:
Wiki Link:
Test Explanation / Demo Video Link: