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

Model: When adding Entry, replace empty Title or Description with extracted info #76

Merged
merged 19 commits into from
Mar 19, 2019

Conversation

rlrh
Copy link

@rlrh rlrh commented Mar 17, 2019

Resolves #47

Summary of changes:

  • Modify AddCommand#execute to replace empty Title or Description with best candidates extracted from given Entry's content
    • 1st choice: user input
    • 2nd choice: information extracted by processing through Crux
    • 3rd choice: information extracted by parsing through Jsoup
    • 4th choice: information extracted just from URL
  • Add new dependency: Apache Commons Text - used for string processing
  • Add utility methods StringUtil#getFirstNWords and StringUtil#getFirstNWordsWithEllipsis
  • Add isEmpty method to Title and Description
  • Add tests for AddCommand's new implementation in AddCommandTest with new entries in TypicalEntries and test files in resources
  • Add integration tests in AddCommandIntegrationTest

@rlrh rlrh added this to the v1.2 milestone Mar 17, 2019
@rlrh rlrh self-assigned this Mar 17, 2019
@coveralls
Copy link

coveralls commented Mar 17, 2019

Pull Request Test Coverage Report for Build 306

  • 69 of 75 (92.0%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.06%) to 92.829%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/seedu/address/commons/util/StringUtil.java 8 10 80.0%
src/main/java/seedu/address/logic/commands/AddCommand.java 50 54 92.59%
Totals Coverage Status
Change from base Build 260: -0.06%
Covered Lines: 1670
Relevant Lines: 1799

💛 - Coveralls

@rlrh rlrh changed the title Model: When adding Entry, fill in missing fields by extracting information from its content Model: When adding Entry, replace empty Title or Description with extracted info Mar 19, 2019
Copy link

@epicfailname epicfailname left a comment

Choose a reason for hiding this comment

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

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.

None yet

5 participants