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

Refactor Logic component to use enum factory pattern #72

Merged

Conversation

yisiox
Copy link

@yisiox yisiox commented Mar 10, 2024

Closes #63

Aim to reduce the number of files that need to be changed to add a new command.

Number of files in Logic reduced.

Moved CliSyntax and Prefix functionality into fields.

Rewrote tests for command parsing.

yisiox added 6 commits March 10, 2024 02:55
All exceptions within CommandType::createCommand are changed to a lower
level IllegalArgumentException while the entry point rethrows a higher
level ParseException.

Delete all command parser tests

Removed all command parser tests pending new tests written for command
classes which encapsulate the parsing functionality.
Copy link

codecov bot commented Mar 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.56%. Comparing base (3674f9f) to head (cd46d3d).

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #72   +/-   ##
=========================================
  Coverage     74.56%   74.56%           
+ Complexity      397      388    -9     
=========================================
  Files            70       66    -4     
  Lines          1270     1274    +4     
  Branches        104      103    -1     
=========================================
+ Hits            947      950    +3     
- Misses          292      295    +3     
+ Partials         31       29    -2     

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

@yisiox yisiox marked this pull request as ready for review March 10, 2024 18:33
Copy link

@aureliony aureliony left a comment

Choose a reason for hiding this comment

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

Great work on the refactorization! I have made some minor suggestions to improve the code further.

@aureliony aureliony added this to the v1.2 milestone Mar 11, 2024
@aureliony aureliony merged commit 06250eb into AY2324S2-CS2103T-W12-3:master Mar 16, 2024
5 checks passed
@aureliony aureliony modified the milestones: v1.2, v1.2b Mar 19, 2024
aureliony pushed a commit that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor AddressBookParser.java
2 participants