-
Notifications
You must be signed in to change notification settings - Fork 461
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
[Clarence Chew] iP #37
Open
clarence-chew
wants to merge
78
commits into
nus-cs2103-AY2223S1:master
Choose a base branch
from
clarence-chew:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Text entered by the user is stored and can be displayed.
Add EXPECTED output for testing
We need a common interchange format for Tasks to interact with files. We also need a way to extend the testing to deal with the case where the file is missing. Let's add common String[] method getAsStringArray() format for Tasks. To make it easier to make the tasks, let's also add TaskFactory to utilise the Factory design pattern. Let's come up with a new encoding for the file. As Base64 methods are available in Java 11, this can be done by encoding string information for each file in Base64, and separated with commas on a single line. Let's run the test twice, once after deleting the duke.txt file and once after not deleting the file. This would allow us to do regression testing in both cases.
# Conflicts: # src/main/java/Deadline.java # src/main/java/Event.java
Packaging is good for organisation. Another thing we need to do while packaging is to update runtest.bat to compile code within the packages.
# Conflicts: # src/main/java/duke/Parser.java # src/main/java/duke/task/TaskList.java
# Conflicts: # src/main/java/duke/ConsoleUi.java # src/main/java/duke/task/Task.java
Improve code quality
CommandMatcher is actually a subclass of StringMatcher<DukeResponse>. By abstracting this out, more opportunities to use this pattern to parse strings reveal themselves. This includes detecting keywords. Let's take StringMatcher out of CommandMatcher and make it a superclass.
The code previously only supported a small number of date formats. However, some date formats may need some processing to understand. Adding natural dates makes the application more user-friendly. Let's * Increase the scope of parsing of dates by building an entire parsing tool, spanning days of the week, months, years, times, dates. * Write tests for the parsing of dates.
Notes are great to have. To also ensure the code is cleaned, let's also * Package exceptions * Package notes * Add tests to integration tests * Maintain the same note/task numbers to aid in modification and deletion
Add extensions into the chatbot
The code has two "delete" commands. It isn't deleterious, since the command detection is via running a Predicate to check, but it would be nice to remove it to make the code cleaner. Let's delete the delete for cleaner code.
The code needs better testing and documentation. Let's * update the files compiled for runtest * add console mode option to Launcher * clean up the documentation for one function in ParsedDateTime
Mac has this issue where double-clicked apps cannot make files in the same directory. By changing instructions of how Mac users are to use the application, this would improve user experience.
This may be the cause of why it failed automated smoke tests. Let's remove it to check if it is the issue.
This resolves #3.
Some Booleans in ParsedDateTime are replaced with better names. Methods in Parser are shortened by writing individual methods in Commands to create each command separately. The other files have documentation updates. As a side effect, the test cases available only reschedule to years instead of times.
The UI squashes and hides the text, making it unusable. Removing the prefHeight property here helps make the UI usable.
There are lots of extra references to Duke. Let's replace them with more generic names/Anthea depending on which is more appropriate.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Anthea
Ever felt you wanted to track your life better? Feeling confused about what you want to do?
Not you, although you are the star of the show here, I mean you, dear reader.
Anthea is a chatbot that helps you keep track of your tasks.
Don't worry, you can access their filesystem if you need to record things for them.
I'll help. For the people you are helping to track their tasks, they would also help you notice bugs.
Such is how it goes when it's code made by humans. You know that, don't you? You are made with Java, which looks something like this:
Yeah, that is in the code. There are also various prompts that you could respond to as well, such as
list
to list down all the tasksfind
to search for tasks containing a keyworddelete
to remove tasksmark
andunmark
to keep track of tasks.Something like this:
I think you are getting it. 😄