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

Implement find contact command for ContactList #257

Merged
merged 6 commits into from
Oct 20, 2020

Conversation

jonasngs
Copy link
Collaborator

Fixes #240

This PR relates to the implementation of a command to find a contact in the ContactList by name, following the earlier PR for Contact and ContactList refactoring.

The following classes were added:

  1. FindContactCommand: to handle the finding of a Contact from the ContactList by name.
  2. FindContactParser: to handle parsing of user input for a command to find a contact by name. This class is responsible for error handling when the user provides invalid or incorrect arguments.

The following classes were modified:

  1. AddressBookParser: Add a case to handle find contact command .

@jonasngs jonasngs added type.Task Something that needs to be done, but not a story, bug, or an epic. priority.High Must do type.code A piece of code to be used labels Oct 18, 2020
@jonasngs jonasngs added this to the V1.3 milestone Oct 18, 2020
@jonasngs jonasngs self-assigned this Oct 18, 2020
Copy link
Collaborator

@MatthiasLHK MatthiasLHK left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@michael-setia michael-setia left a comment

Choose a reason for hiding this comment

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

The implementation is similar with the rest of the code. Overall, looks great to merge 👍

@codecov-io
Copy link

Codecov Report

Merging #257 into master will decrease coverage by 1.75%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #257      +/-   ##
============================================
- Coverage     28.49%   26.73%   -1.76%     
+ Complexity      312      308       -4     
============================================
  Files           138      143       +5     
  Lines          2218     2334     +116     
  Branches        249      261      +12     
============================================
- Hits            632      624       -8     
- Misses         1532     1655     +123     
- Partials         54       55       +1     
Impacted Files Coverage Δ Complexity Δ
...main/java/seedu/address/commons/core/Messages.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...java/seedu/address/logic/commands/FindCommand.java 55.55% <0.00%> (ø) 5.00 <0.00> (ø)
...edu/address/logic/commands/FindContactCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../seedu/address/logic/parser/FindContactParser.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...a/seedu/address/logic/parser/ModuleListParser.java 56.00% <0.00%> (-2.34%) 10.00 <0.00> (ø)
...ain/java/seedu/address/storage/StorageManager.java 0.00% <0.00%> (-44.45%) 0.00% <0.00%> (-4.00%)
...rc/main/java/seedu/address/logic/LogicManager.java 0.00% <0.00%> (-35.00%) 0.00% <0.00%> (-2.00%)
src/main/java/seedu/address/MainApp.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...java/seedu/address/storage/JsonAdaptedContact.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9349d73...80349a1. Read the comment docs.

@jonasngs jonasngs merged commit 80b61ed into AY2021S1-CS2103T-F12-3:master Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.High Must do type.code A piece of code to be used 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.

Contact List: Implement a command to find a contact in the contact list by name
4 participants