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 match command #217

Merged
merged 17 commits into from
Oct 22, 2020
Merged

Conversation

keanecjy
Copy link

@keanecjy keanecjy commented Oct 21, 2020

  • Add match command for matching internships to appear in a pop-up window
  • To update the UI For the pop-up window

@keanecjy keanecjy added this to the v1.3 milestone Oct 21, 2020
@keanecjy keanecjy requested review from seanjyjy and a team October 21, 2020 09:07
@keanecjy keanecjy self-assigned this Oct 21, 2020
…into match-command

� Conflicts:
�	src/main/java/seedu/address/model/FilterableItemList.java
�	src/test/java/seedu/address/logic/parser/EditCommandParserTest.java
@codecov-io
Copy link

Codecov Report

Merging #217 into master will decrease coverage by 1.18%.
The diff coverage is 15.11%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #217      +/-   ##
============================================
- Coverage     48.35%   47.16%   -1.19%     
- Complexity      759      765       +6     
============================================
  Files           184      187       +3     
  Lines          3464     3547      +83     
  Branches        389      394       +5     
============================================
- Hits           1675     1673       -2     
- Misses         1689     1772      +83     
- Partials        100      102       +2     
Impacted Files Coverage Δ Complexity Δ
...ava/seedu/address/commons/util/CollectionUtil.java 58.33% <0.00%> (-29.17%) 5.00 <0.00> (ø)
...ava/seedu/address/logic/commands/MatchCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...seedu/address/logic/commands/util/CommandUtil.java 64.28% <ø> (ø) 13.00 <0.00> (ø)
...in/java/seedu/address/logic/parser/MainParser.java 75.00% <0.00%> (-3.95%) 11.00 <0.00> (ø)
...n/java/seedu/address/model/FilterableItemList.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...main/java/seedu/address/model/ItemListManager.java 77.77% <0.00%> (-2.23%) 13.00 <0.00> (ø)
...rc/main/java/seedu/address/model/ModelManager.java 52.00% <0.00%> (-1.07%) 29.00 <0.00> (ø)
...seedu/address/model/internship/InternshipItem.java 94.73% <0.00%> (-5.27%) 36.00 <0.00> (+1.00) ⬇️
src/main/java/seedu/address/ui/ExitDialog.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../main/java/seedu/address/ui/InternshipsWindow.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
... and 9 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 58ca2d3...8004423. Read the comment docs.

Copy link

@ZoroarkDarkrai ZoroarkDarkrai left a comment

Choose a reason for hiding this comment

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

Nice work, a few comments added.

src/main/java/seedu/address/ui/util/UiUtil.java Outdated Show resolved Hide resolved
src/main/java/seedu/address/ui/MainWindow.java Outdated Show resolved Hide resolved

public static final String MESSAGE_CONSTRAINTS = "Requirements should not be blank";

public static final String MESSAGE_CONSTRAINTS = "Requirement have a maximum of 2 words and not be blank";

Choose a reason for hiding this comment

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

I think i missed why is it limited to 2 words in particular?

Copy link

@seanjyjy seanjyjy Oct 21, 2020

Choose a reason for hiding this comment

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

We were discussing this previously and we decided that this allows an easier skill matching.

Because the user can key in any type of requirements which can be very long will definitely render the skill matching useless.

public boolean matches(List<String> skillList) {
assert skillList != null;
return requirements.stream().anyMatch(requirement ->
skillList.stream().anyMatch(skill -> skill.contains(requirement.toString())));

Choose a reason for hiding this comment

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

honestly I don't think this is a good idea?
suppose the requirement is "c" a common programming language, it will literally match with any word with a letter c (like cooking) or java with javascript, etc.

Copy link

Choose a reason for hiding this comment

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

@keanecjy maybe you could parse the skill title to [str1, str2, str3] then check if any of the substr matches your requirements? something to that effect

Copy link
Author

Choose a reason for hiding this comment

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

Good idea. Will update.

Copy link

@ZoroarkDarkrai ZoroarkDarkrai left a comment

Choose a reason for hiding this comment

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

LGTM!

@ZoroarkDarkrai ZoroarkDarkrai merged commit 830d9dd into AY2021S1-CS2103T-T15-4:master Oct 22, 2020
@keanecjy keanecjy linked an issue Oct 22, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a user who is looking for internships,
5 participants