-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Separate common.datatransfer package into sub-packages #6355 #6453
Separate common.datatransfer package into sub-packages #6355 #6453
Conversation
dc9cab4
to
9856630
Compare
e72c19f
to
6c15188
Compare
Ready for review @wkurniawan07 |
Could someone review this first before I resolve the merge conflicts? I keep resolving and it keeps going out of sync :( |
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.
Two preliminary changes requested. I apologize if this requires you to undo many of your hard work!
import teammates.common.datatransfer.CourseDetailsBundle; | ||
import teammates.common.datatransfer.StudentAttributes; | ||
import teammates.common.datatransfer.TeamDetailsBundle; | ||
import teammates.common.datatransfer.attributes.CourseDetailsBundle; |
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.
*Bundle
should not be under attributes
sub-package. This sub-package should be strictly for *Attributes
.
import teammates.common.datatransfer.CommentStatus; | ||
import teammates.common.datatransfer.InstructorAttributes; | ||
import teammates.common.datatransfer.attributes.InstructorAttributes; | ||
import teammates.common.datatransfer.misc.CommentParticipantType; |
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.
Perhaps the category misc
should not be used, and anything not falling under questions
and attributes
should be in the datatransfer
package instead. Something like:
teammates.common.datatransfer: uncategorised/others
.attributes: *Attributes
.questions: *QuestionDetails, *ResponseDetails
If anything, this minimizes the changeset of this PR, and there is no significant loss (if any) in organization. Do you have any opinion on this?
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.
Hmm that's alright too, i put the *bundle files into .attributes because they seem to be importing mostly attribute files
@samsontmr you need to update with the latest |
475b653
to
17a2542
Compare
Omg the merge appears to have messed up my changes again |
4f48ae4
to
f9a2060
Compare
import teammates.common.datatransfer.questions.FeedbackRubricQuestionDetails; | ||
import teammates.common.datatransfer.questions.FeedbackRubricResponseDetails; | ||
import teammates.common.datatransfer.questions.FeedbackTextQuestionDetails; | ||
import teammates.common.datatransfer.questions.FeedbackTextResponseDetails; |
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.
This is a sign that this class should be under .questions
sub-package.
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.
Got it, should FeedbackQuestionBundle be under attributes, questions or bundles then?
@@ -4,6 +4,8 @@ | |||
import java.util.List; | |||
import java.util.Map; | |||
|
|||
import teammates.common.datatransfer.attributes.FeedbackQuestionAttributes; | |||
import teammates.common.datatransfer.attributes.FeedbackResponseAttributes; |
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.
This is the base class of Feedback*QuestionDetails
; should be under .questions
?
@@ -1,5 +1,8 @@ | |||
package teammates.common.datatransfer; | |||
|
|||
import teammates.common.datatransfer.attributes.FeedbackQuestionAttributes; | |||
import teammates.common.datatransfer.attributes.FeedbackResponseAttributes; | |||
|
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.
Similarly, this is the base class for Feedback*ResponseDetails
.
@wkurniawan07 Ready for review |
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.
@samsontmr sorry to make you undo-ing your hard work again, but I don't think we should have bundles
sub-package yet as of now because the boundaries between that and the base datatransfer
package is not so clear. In comparison, the other two subpackages attributes
and questions
have clear-cut boundaries.
f2afee7
to
d41746b
Compare
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.
I may be wrong, but these classes should not be in .questions
sub-package:
FeedbackQuestionBundle.java
FeedbackSessionQuestionsBundle.java
FeedbackSessionResponseStatus.java
Other than that, this looks good.
d0e7e95
to
51d17e0
Compare
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.
Looks good, thanks for your perseverance 👍
And I apologize for changing my mind so many times 😅
Fixes #6355
Problem
teammates.common.datatransfer
is presently too cluttered.Solution
Move files ending with Attributes into .attributes sub package, files related to Questions, Responses into .questions sub package, remaining into .misc sub package.