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

Add Aliasing support to ResiReg #101

Merged
merged 4 commits into from
Oct 24, 2020
Merged

Add Aliasing support to ResiReg #101

merged 4 commits into from
Oct 24, 2020

Conversation

mkeoliya
Copy link
Collaborator

@mkeoliya mkeoliya commented Oct 23, 2020

What this does

This PR adds aliasing to ResiReg, namely 3 commands:

  • alias : Adds an alias. Format: alias c/<command> a/<alias> e.g. alias c/rooms a/r
  • dealias : Deletes an alias. E.g. dealias c/rooms a/r
  • aliases : Lists all aliases. Format: aliases

How to test

  1. Launch the application.
  2. Type in the above 3 commands.
  3. Note that you can't have the same alias for different commands, an alias cannot be a command word, and undo/redo don't apply to alias commands (because they do not change the state of ResiReg).

Notes

Added a lot of testing in this PR. Note to team-mates: please add Integration tests for the commands you've added to ResiReg by this weekend - it takes a LOT of work.

Fixes #103

@mkeoliya mkeoliya added this to the v1.3 milestone Oct 23, 2020
@codecov-io
Copy link

codecov-io commented Oct 23, 2020

Codecov Report

Merging #101 into master will increase coverage by 4.72%.
The diff coverage is 85.44%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #101      +/-   ##
============================================
+ Coverage     55.74%   60.46%   +4.72%     
- Complexity      539      655     +116     
============================================
  Files           109      121      +12     
  Lines          2185     2446     +261     
  Branches        259      289      +30     
============================================
+ Hits           1218     1479     +261     
+ Misses          904      901       -3     
- Partials         63       66       +3     
Impacted Files Coverage Δ Complexity Δ
src/main/java/seedu/resireg/Main.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...main/java/seedu/resireg/commons/core/Messages.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
src/main/java/seedu/resireg/model/Model.java 100.00% <ø> (ø) 2.00 <0.00> (ø)
...resireg/logic/parser/DeleteAliasCommandParser.java 8.33% <8.33%> (ø) 1.00 <1.00> (?)
...c/main/java/seedu/resireg/logic/CommandMapper.java 82.05% <36.36%> (-17.95%) 4.00 <1.00> (ø)
...edu/resireg/storage/JsonSerializableUserPrefs.java 72.72% <72.72%> (ø) 2.00 <2.00> (?)
...rc/main/java/seedu/resireg/model/ModelManager.java 80.39% <75.00%> (+11.42%) 40.00 <7.00> (+12.00)
...va/seedu/resireg/storage/JsonUserPrefsStorage.java 80.00% <78.57%> (-7.50%) 7.00 <5.00> (+3.00) ⬇️
src/main/java/seedu/resireg/model/alias/Alias.java 80.00% <80.00%> (ø) 8.00 <8.00> (?)
...in/java/seedu/resireg/model/alias/CommandWord.java 83.33% <83.33%> (ø) 9.00 <9.00> (?)
... and 46 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 1b08afa...89da58f. Read the comment docs.

@chloelee767
Copy link

LGTM!

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.

Functionality increment: Aliasing.
3 participants