Skip to content
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

Update Sort to include attribute Faculty #89

Merged
merged 9 commits into from
Mar 17, 2024

Conversation

whitesnowx
Copy link
Collaborator

@whitesnowx whitesnowx commented Mar 16, 2024

closes #83

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.68%. Comparing base (cb25534) to head (2fb1e20).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #89      +/-   ##
============================================
+ Coverage     79.57%   79.68%   +0.11%     
- Complexity      574      579       +5     
============================================
  Files            89       90       +1     
  Lines          1733     1738       +5     
  Branches        178      179       +1     
============================================
+ Hits           1379     1385       +6     
+ Misses          321      320       -1     
  Partials         33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@whitesnowx whitesnowx linked an issue Mar 16, 2024 that may be closed by this pull request
7 tasks
@whitesnowx whitesnowx self-assigned this Mar 16, 2024
@whitesnowx whitesnowx added type.Task Something that needs to be done, but not a story, bug, or an epic. priority.High Must do labels Mar 16, 2024
@@ -43,6 +44,7 @@ public void equals() {
assertFalse(nameSortCommand.equals(new SortCommand(MODULE_COMPARATOR)));
assertFalse(nameSortCommand.equals(new SortCommand(VENUE_COMPARATOR)));
assertFalse(nameSortCommand.equals(new SortCommand(PHONE_COMPARATOR)));
assertFalse(nameSortCommand.equals(new SortCommand(FACULTY_COMPARATOR)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to arrage in alphabetic order

Copy link
Collaborator Author

@whitesnowx whitesnowx Mar 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think better to follow person's order, for readability? Also following how edit and add did their ordering.

Update: currently changed to person's order

assertParseSuccess(parser, "" + PREFIX_VENUE, new SortCommand(VENUE_COMPARATOR));
assertParseSuccess(parser, "" + PREFIX_FACULTY, new SortCommand(FACULTY_COMPARATOR));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to arrange in alphabetic order

@JerryWang0000 JerryWang0000 linked an issue Mar 16, 2024 that may be closed by this pull request
2 tasks
@whitesnowx whitesnowx added this to the v1.2 milestone Mar 17, 2024
Copy link
Collaborator

@iynixil iynixil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! minor edits to make in future PR

Comment on lines 109 to 112
public static List<Person> getTypicalPersons() {
return new ArrayList<>(Arrays.asList(ALICE, BENSON, CARL, CLARA, DANIEL, ELLE, FIONA, GEORGE, KAFKA, NATASHA));
return new ArrayList<>(Arrays.asList(ALICE, BENSON, CARL, CLARA, DANIEL, ELLE, FIONA, GEORGE, KAFKA, NATASHA,
LEONARDO, MICHAEL));
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ordering here is not in alphabetical order, next time we can edit this too

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted: #97

Comment on lines +69 to +81
public static final Person KAFKA = new PersonBuilder().withName("Kafka Apache").withPhone("9452413")
.withEmail("[email protected]").withModule("CS2102").withFaculty("Business")
.withVenue("pteruges avenue").withTags("classmate").withAvailabilities("FRIDAY").build();
public static final Person NATASHA = new PersonBuilder().withName("Natasha Harrower").withPhone("8019394")
.withEmail("[email protected]").withModule("CS2102")
.withFaculty("Computing").withVenue("underworld avenue")
.withTags("classmate").withAvailabilities("FRIDAY").build();
public static final Person LEONARDO = new PersonBuilder().withName("Leonardo DiCaprio").withPhone("88472234")
.withEmail("[email protected]").withModule("TS2237")
.withFaculty("Arts and Social Sciences").withVenue("LT13").build();
public static final Person MICHAEL = new PersonBuilder().withName("Michael Jackson").withPhone("92347123")
.withEmail("[email protected]").withModule("MUA1163")
.withFaculty("Music").withVenue("YSTCM-SR9").build();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good move to add our manually added testing data here, forgot about CLARA though, next time can edit!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted: #97

@iynixil iynixil merged commit c3aaaa9 into AY2324S2-CS2103-F08-3:master Mar 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.High Must do type.Task Something that needs to be done, but not a story, bug, or an epic.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update code to Use Faculty in SortCommand and all relevant codes Implement Sort functionality for contacts
3 participants