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

[CS2113-T16-3] Expiry Eliminator #37

Open
wants to merge 513 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
513 commits
Select commit Hold shift + click to select a range
9a7fde3
Merge pull request #65 from vincentlauhl/BugfixCookedRecipe
vincentlauhl Oct 26, 2021
7d0ecb7
Sequence diagram for AddRecipe.
vincentlauhl Oct 26, 2021
3bf5955
Sequence diagram for CookedRecipeCommand
vincentlauhl Oct 26, 2021
a4dc818
Sequence diagram for DeleteRecipeCommand
vincentlauhl Oct 26, 2021
b7822e5
Sequence diagram for ListRecipesUserCanCookCommand
vincentlauhl Oct 26, 2021
397fb7e
Add .puml diagram for List command
JoshHDs Oct 26, 2021
f6754b9
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 26, 2021
b967c86
Merge branch 'master' into sequenceDiagram-branch
JoshHDs Oct 26, 2021
edd2f1b
Change Model to Data
vincentlauhl Oct 26, 2021
89fa7aa
Component diagram for Data
vincentlauhl Oct 26, 2021
f34d35a
Update Developer guide for AddRecipe, DeleteRecipe, ListRecipeUserCan…
vincentlauhl Oct 26, 2021
b3a3202
Add sequence diagram for DeleteExpiredIngredientsCommand.
JoshHDs Oct 26, 2021
d28aa17
Merge pull request #67 from vincentlauhl/DGUpdate2
JoshHDs Oct 26, 2021
bb267d3
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 26, 2021
2aef4e8
Merge branch 'master' into sequenceDiagram-branch
JoshHDs Oct 26, 2021
8c0a5cb
Update ListRecipesUserCanCookCommand such that it informs the user if…
vincentlauhl Oct 26, 2021
d80e0f3
Minor update to CookedRecipeCommand such that it updates the Ingredie…
vincentlauhl Oct 26, 2021
1dee2b7
Minor update to prepareCookedRecipe so that it displays the correct e…
vincentlauhl Oct 26, 2021
8918911
Add new test for ListRecipesUserCanCookCommand
vincentlauhl Oct 26, 2021
406935c
Merge pull request #68 from vincentlauhl/CheckExpiryDateForRecipesUse…
JoshHDs Oct 26, 2021
53bc9c0
Update sequence diagram for DeleteExpiredIngredients
JoshHDs Oct 26, 2021
2e4b20c
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 26, 2021
24d12f1
Merge branch 'master' into sequenceDiagram-branch
JoshHDs Oct 26, 2021
03a65d2
Update DG
JoshHDs Oct 26, 2021
d81f9b1
Merge pull request #69 from JoshHDs/sequenceDiagram-branch
JoshHDs Oct 26, 2021
73fe43f
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 26, 2021
51aece3
Add architecture diagram for storage
KairuiHu Oct 27, 2021
4a35ae2
Update code so that it saves the ingredients and recipes to the text …
vincentlauhl Oct 27, 2021
705949b
Change ListRecipesUserCanCookCommand so that it is consistent with Li…
vincentlauhl Oct 27, 2021
1c20e50
Merge pull request #73 from vincentlauhl/BugFix
KairuiHu Oct 27, 2021
910cea3
Reformat output in txt file to remove extra whitespace, and remove re…
KairuiHu Oct 27, 2021
5aaa382
Merge branch 'master' into branch-architecture
KairuiHu Oct 27, 2021
24e7223
Update help command
JoshHDs Oct 27, 2021
e83f97f
Merge pull request #72 from KairuiHu/branch-architecture
JoshHDs Oct 27, 2021
3611d9f
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 27, 2021
0aedd4d
Merge branch 'master' into bugFix-branch
JoshHDs Oct 27, 2021
cd06c81
Fix shopping list no units bug
JoshHDs Oct 27, 2021
268244e
Remove unnecessary imports and clean up code
bernardboey Oct 27, 2021
c7ae7c0
Modify code for LoadData to load ingredients and recipes with no units
KairuiHu Oct 27, 2021
cfb1572
Improve code quality
KairuiHu Oct 27, 2021
1c2000b
Fix test code
JoshHDs Oct 27, 2021
856c171
Merge pull request #76 from bernardboey/clean-up-code
bernardboey Oct 27, 2021
4c261b9
Merge pull request #77 from KairuiHu/branch-modifyLoadData
JoshHDs Oct 27, 2021
48ee788
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 27, 2021
e749937
Merge branch 'master' into bugFix-branch
JoshHDs Oct 27, 2021
81c0e4e
Merge pull request #75 from JoshHDs/bugFix-branch
JoshHDs Oct 27, 2021
fef0c70
Add class diagram for Parser
bernardboey Oct 27, 2021
55c2360
Add class diagram for parser to the developer guide
bernardboey Oct 27, 2021
6a40189
Prevent deletion of ingredient if it is used in a recipe
bernardboey Oct 27, 2021
a268dca
Polish usage messages
bernardboey Oct 27, 2021
de0004a
Update expected test output
bernardboey Oct 27, 2021
a191fef
Merge pull request #78 from bernardboey/v2.0
bernardboey Oct 27, 2021
f797e65
Change code such that it outputs the correct error message for Update…
vincentlauhl Oct 27, 2021
fb00b70
Merge pull request #79 from vincentlauhl/CorrectErrorMessageUpdateUnits
vincentlauhl Oct 27, 2021
4e27dda
Fix delete ingredient bug
bernardboey Oct 27, 2021
8f52249
Merge pull request #80 from bernardboey/v2.0-fix-bugs
bernardboey Oct 27, 2021
a4692e7
Remove TODO comments
bernardboey Oct 27, 2021
b5e5daf
Merge pull request #81 from bernardboey/v2.0-fix-bugs-2
bernardboey Oct 27, 2021
ee4a716
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 27, 2021
bfc775e
Change version of our app
vincentlauhl Oct 27, 2021
b185f7f
Add a few lines to UG
vincentlauhl Oct 27, 2021
8283e99
Update user guide
bernardboey Oct 27, 2021
517153f
Merge pull request #82 from vincentlauhl/UGUpdate1
vincentlauhl Oct 27, 2021
9892425
Merge pull request #83 from bernardboey/user-guide-1
bernardboey Oct 27, 2021
84c1cba
Add explanation of Parser to the developer guide
bernardboey Oct 28, 2021
061c812
Add sequence diagram for Parser
bernardboey Oct 28, 2021
7550aa3
Merge pull request #84 from bernardboey/developer-guide-2
bernardboey Oct 28, 2021
e6fd4e5
Add features in user guide and its comand summaries.
vincentlauhl Oct 28, 2021
d4a19a3
Update docs/DeveloperGuide.md
bernardboey Oct 28, 2021
1b23302
Update docs/DeveloperGuide.md
bernardboey Oct 28, 2021
18d6b89
Rename ArgParser class to ArgsParser
bernardboey Oct 28, 2021
4de2fd7
Add style.puml
bernardboey Oct 28, 2021
463ab4e
Add simplified class diagram for parser
bernardboey Oct 28, 2021
2a6898a
Extract arg parsers into separate class diagram
bernardboey Oct 28, 2021
d898c24
Modify class diagram for parser
bernardboey Oct 28, 2021
98627d3
Modify sequence diagram for parser
bernardboey Oct 28, 2021
4c4a742
Update developer guide
bernardboey Oct 28, 2021
0555d38
Clean up markdown files
bernardboey Oct 28, 2021
0eb1998
Merge pull request #86 from vincentlauhl/UGUpdate2
bernardboey Oct 28, 2021
f5e837b
Merge pull request #87 from bernardboey/developer-guide-3
bernardboey Oct 28, 2021
fa7d709
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 29, 2021
c398f2f
Update documentation
JoshHDs Oct 29, 2021
ed0ff3b
Merge pull request #88 from JoshHDs/UGV2-branch
JoshHDs Oct 29, 2021
2321860
Add features in User guide
KairuiHu Oct 29, 2021
abe557c
Merge branch 'master' into branch-userguide
KairuiHu Oct 29, 2021
d7bab59
Merge pull request #89 from KairuiHu/branch-userguide
KairuiHu Oct 29, 2021
792ba83
Add table of contents to user guide and developer guide
bernardboey Oct 29, 2021
b4d016b
Modify location of table of contents for user guide
bernardboey Oct 29, 2021
3bbb2c3
Update user guide
bernardboey Oct 29, 2021
6cadf5d
Merge pull request #90 from bernardboey/user-guide-2
bernardboey Oct 29, 2021
20b8ed7
Update ShoppingListCommand.java
bernardboey Oct 29, 2021
da3bd0c
Update AddRecipeCommand.java
bernardboey Oct 29, 2021
ea631b0
Update UpdateRecipeCommand.java
bernardboey Oct 29, 2021
cd133ae
Update UserGuide.md
bernardboey Oct 29, 2021
bf63cb8
Update UserGuide.md
bernardboey Oct 29, 2021
b2b3136
Update EXPECTED.TXT
bernardboey Oct 29, 2021
35d210c
Update UserGuide.md
bernardboey Oct 29, 2021
c0a3e65
Update .gitignore to ignore data folder
bernardboey Oct 29, 2021
5b32ab3
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp
JoshHDs Oct 30, 2021
3f6272d
Add repo sense compatibility code
JoshHDs Oct 31, 2021
1a0807d
Fix bugs from PED
JoshHDs Oct 31, 2021
897a415
Fix bugs from PE-D
JoshHDs Nov 1, 2021
7d2ca00
Fix code style issues
JoshHDs Nov 1, 2021
c46049f
Merge pull request #112 from JoshHDs/BugFix2-branch
JoshHDs Nov 1, 2021
998d8c8
Allow commands to be typed in upper or mixed case
bernardboey Nov 1, 2021
f39b7c3
Display error message instead of throwing runtime exception
bernardboey Nov 1, 2021
3e7473d
Improve error message if ingredient already exists
bernardboey Nov 1, 2021
6aeef41
Remove quantity and expiry date from AddIngredientCommand
bernardboey Nov 1, 2021
5205d79
Modify class diagram for parser to remove outdated prefixes
bernardboey Nov 1, 2021
86a6042
Prevent recipe and ingredient names from having special digits
bernardboey Nov 1, 2021
e0d0d55
Modify IO redirection tests
bernardboey Nov 1, 2021
eba9130
Merge pull request #113 from bernardboey/v2.1
bernardboey Nov 1, 2021
5c8bc30
Add example outputs to features
vincentlauhl Nov 3, 2021
8ad4320
Add description of add recipe feature.
vincentlauhl Nov 3, 2021
304655b
Update add recipe usage message.
vincentlauhl Nov 3, 2021
547fde4
Update message display format for DeleteRecipeCommandd
vincentlauhl Nov 3, 2021
09f0d67
Change assertion position to allow JUnit test to work properly.
vincentlauhl Nov 3, 2021
a627596
Simplify JUnit Test Utils functions and add java docs
vincentlauhl Nov 3, 2021
c0df5ed
Minor update to adhere to codestyle
vincentlauhl Nov 3, 2021
733b841
Update Expected.txt for tests to pass.
vincentlauhl Nov 3, 2021
a605b8c
Merge pull request #114 from vincentlauhl/UGAndJUnitUpdate
vincentlauhl Nov 3, 2021
9f08380
Update sequence diagrams
JoshHDs Nov 3, 2021
f6ef6f3
Merge branch 'master' into BugFix3-branch
JoshHDs Nov 3, 2021
a193ef4
Enable add ingredient for recipe later using udpate recipe, implement…
KairuiHu Nov 3, 2021
9279607
Improve code quality
KairuiHu Nov 3, 2021
902ddcc
Improve output format to pass the test
KairuiHu Nov 3, 2021
d227b01
Modify output format to pass the test
KairuiHu Nov 3, 2021
bbcbdd9
Change the output format
KairuiHu Nov 3, 2021
dda6bad
Merge pull request #115 from KairuiHu/branch-fixUpdate
JoshHDs Nov 3, 2021
94b1d2b
Update sequence diagrams
JoshHDs Nov 3, 2021
f36e258
Merge branch 'master' into BugFix3-branch
JoshHDs Nov 3, 2021
3bc5bc1
Merge pull request #116 from JoshHDs/BugFix3-branch
JoshHDs Nov 3, 2021
998d756
Update user guide with output examples
JoshHDs Nov 3, 2021
e1c4eb6
Merge pull request #117 from JoshHDs/BugFix4-branch
JoshHDs Nov 3, 2021
1e60210
Update bernardboey.md
bernardboey Nov 3, 2021
0c6d862
Update bernardboey.md
bernardboey Nov 3, 2021
37ec750
Update UserGuide.md
bernardboey Nov 4, 2021
7edea4c
Updates to UML diagrams for implemented features and design
vincentlauhl Nov 4, 2021
a19892b
Update PPP
vincentlauhl Nov 4, 2021
b49831b
Add authorship to AddRecipeCommand
vincentlauhl Nov 4, 2021
28a3a11
Add authorship to methods in Recipe
vincentlauhl Nov 4, 2021
6013b69
Use update recipe command to delete ingredients
KairuiHu Nov 4, 2021
1f8d077
Add authorship to Parser.
vincentlauhl Nov 4, 2021
e6b58bc
Improve code quality
KairuiHu Nov 4, 2021
f0642cb
Merge pull request #118 from KairuiHu/branch-CodeQuality
KairuiHu Nov 4, 2021
129eca0
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp …
vincentlauhl Nov 4, 2021
9c2d16b
Merge pull request #119 from vincentlauhl/DGUpdate3
vincentlauhl Nov 4, 2021
95e6579
Add manual testing section in the DG
JoshHDs Nov 6, 2021
9dc6cea
Add Joshua's PPP
JoshHDs Nov 6, 2021
99d0242
Modify IllegalValueException to allow storing of error message
bernardboey Nov 6, 2021
5a459c4
Remove unused code
bernardboey Nov 6, 2021
8caeff5
Add back assertion for removing ingredient batch based on expiry
bernardboey Nov 6, 2021
5d0b492
Prevent decrementing by zero quantity
bernardboey Nov 6, 2021
a706036
Prevent incrementing by zero quantity
bernardboey Nov 6, 2021
da0a975
Rename Recipe#add() to Recipe#addIngredient()
bernardboey Nov 6, 2021
2666e1a
Modify DuplicateDataException to allow storing of error message
bernardboey Nov 6, 2021
40b6f7f
Update Instructions for manual testing and some minor changes to DG
vincentlauhl Nov 7, 2021
9aa83a6
Add interactions of data component and update puml diagram.
vincentlauhl Nov 7, 2021
51a3110
Add PPP and a skeleton file for teammate.
vincentlauhl Nov 7, 2021
2c1dadf
Fix typo in DG
bernardboey Nov 7, 2021
c023599
Update Logic diagram
JoshHDs Nov 7, 2021
5e6d888
Modify OptionalArgPrefix constructor to use SingleArgPrefix as input
bernardboey Nov 7, 2021
e5086eb
Add PREFIX_UNIT and also trim command word(s)
bernardboey Nov 7, 2021
1763326
Add assertion to Ingredient#setUnit(unit)
bernardboey Nov 7, 2021
6d5011f
Extract error messages as variables
bernardboey Nov 7, 2021
46f074f
Modify ArgsParser to accept blank arguments
bernardboey Nov 7, 2021
cfa6233
Merge pull request #122 from JoshHDs/BugFix5-branch
JoshHDs Nov 7, 2021
909bb79
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp …
vincentlauhl Nov 7, 2021
b5647af
Merge pull request #120 from vincentlauhl/DGUpdate4
bernardboey Nov 7, 2021
1501a59
Merge pull request #124 from bernardboey/v2.1-fix-bugs
JoshHDs Nov 7, 2021
4afa843
Add ppp and update manual testing for DG
KairuiHu Nov 7, 2021
3a5d475
Add new line to pass the checkstyle test
KairuiHu Nov 7, 2021
878eafc
Merge pull request #125 from KairuiHu/branch-Document
KairuiHu Nov 7, 2021
6052c19
Add logging for features
vincentlauhl Nov 7, 2021
691054d
Add method to check if arraylist has duplicate ingredients and some r…
vincentlauhl Nov 7, 2021
fb1ba2b
Change position for expected and actual
vincentlauhl Nov 7, 2021
16dd514
Update code to adhere to coding standards.
vincentlauhl Nov 7, 2021
07e6358
Change method on checking for same ingredients.
vincentlauhl Nov 7, 2021
7c7248d
Merge pull request #126 from vincentlauhl/BugFixAndLogging
JoshHDs Nov 7, 2021
644bdb3
Update sequence diagram
JoshHDs Nov 7, 2021
3d785c8
Update AboutUs.md
bernardboey Nov 8, 2021
ddcfd78
Edit About us
JoshHDs Nov 8, 2021
6009f54
Merge branch 'master' into BugFix6-branch
JoshHDs Nov 8, 2021
9e21f00
Merge pull request #127 from JoshHDs/BugFix6-branch
JoshHDs Nov 8, 2021
997ba96
Fix bug in Joshhds PPP
JoshHDs Nov 8, 2021
d935437
Merge pull request #128 from JoshHDs/BugFix7-branch
JoshHDs Nov 8, 2021
df83faf
Fix bug in Joshhds PPP
JoshHDs Nov 8, 2021
a7f0ea5
Update AboutUs to show Github page and PPP
vincentlauhl Nov 8, 2021
54746bf
Merge pull request #129 from JoshHDs/BugFix8-branch
JoshHDs Nov 8, 2021
47b8da4
Merge branch 'master' of https://github.com/AY2122S1-CS2113-T16-3/tp …
vincentlauhl Nov 8, 2021
853dc42
Merge pull request #130 from vincentlauhl/PPPUpdate
vincentlauhl Nov 8, 2021
e6da899
Update PPP to keep to page limit
vincentlauhl Nov 8, 2021
245f223
Merge pull request #131 from vincentlauhl/PPPBugFix
vincentlauhl Nov 8, 2021
12b9e18
Update PPP to adhere to 2 page limit
vincentlauhl Nov 8, 2021
ececb0d
Merge pull request #132 from vincentlauhl/PPPBugFix2
vincentlauhl Nov 8, 2021
5797b00
Update PPP to adhere to 2 page limit
vincentlauhl Nov 8, 2021
5603c93
Merge pull request #133 from vincentlauhl/PPPBugFix3
vincentlauhl Nov 8, 2021
feb793f
Update DG and PPP
KairuiHu Nov 8, 2021
69c9a03
Merge pull request #134 from KairuiHu/branch-updateDG
KairuiHu Nov 8, 2021
4421b62
Add Architecture Diagram
JoshHDs Nov 8, 2021
79b71c6
Merge branch 'master' into BugFix9-branch
JoshHDs Nov 8, 2021
22247ae
Merge pull request #135 from JoshHDs/BugFix9-branch
JoshHDs Nov 8, 2021
1766004
Add new digrams and update UserGuide
KairuiHu Nov 8, 2021
983255b
Merge pull request #136 from KairuiHu/branch-updateUG
KairuiHu Nov 8, 2021
950eefd
Remove unused file
bernardboey Nov 8, 2021
bab69e7
Update PPP
bernardboey Nov 8, 2021
5fbf577
Clean up and add more links to PPP
bernardboey Nov 8, 2021
788d2e8
Merge pull request #137 from bernardboey/ppp-1
bernardboey Nov 8, 2021
6485fc2
Add sequence diagram to the DG
KairuiHu Nov 8, 2021
0f6f12e
Merge pull request #139 from KairuiHu/branch-AddNewDiagrams
KairuiHu Nov 8, 2021
e77799e
Update main README.md
bernardboey Nov 8, 2021
7ce4d23
Clean up AboutUs.md
bernardboey Nov 8, 2021
918b3d3
Change name to full name
bernardboey Nov 8, 2021
f7a7c7b
Improve grammar
KairuiHu Nov 8, 2021
4dfce94
Merge pull request #140 from KairuiHu/branch-Format
KairuiHu Nov 8, 2021
62178fa
Make the ppp more concise
KairuiHu Nov 8, 2021
a3475a6
Merge pull request #141 from KairuiHu/branch-ppp
KairuiHu Nov 8, 2021
7837517
reformat the ppp
KairuiHu Nov 8, 2021
59a9052
Merge pull request #142 from KairuiHu/branch-ppp1
KairuiHu Nov 8, 2021
908ce8e
Update user guide
bernardboey Nov 8, 2021
f49ff90
Add getFormattedUnit() method to IngredientStorage and Ingredient
bernardboey Nov 8, 2021
bc8c3e4
Display units in IncrementCommand and DecrementCommand
bernardboey Nov 8, 2021
7b992ce
Minor update to manual testing for launch.
vincentlauhl Nov 8, 2021
975b642
Update I/O redirection test
bernardboey Nov 8, 2021
f8aca22
Merge pull request #144 from vincentlauhl/MinorUgUpdate
vincentlauhl Nov 8, 2021
df49f94
Merge branch 'master' into documentation-1
bernardboey Nov 8, 2021
54c283c
Merge pull request #143 from bernardboey/documentation-1
bernardboey Nov 8, 2021
02392b1
Add authorship
KairuiHu Nov 8, 2021
80ad183
Merge pull request #145 from KairuiHu/branch-capitalization
KairuiHu Nov 8, 2021
10ceee8
Update user guide
bernardboey Nov 8, 2021
6f9ad3f
Fix spelling errors in DG
JoshHDs Nov 8, 2021
35c006e
Merge pull request #146 from JoshHDs/BugFix10-branch
JoshHDs Nov 8, 2021
a6b5695
Update to Instructions for Manual Testing for clarity
vincentlauhl Nov 8, 2021
8528bba
Minor update to PPP.
vincentlauhl Nov 8, 2021
aa9b18d
Merge pull request #147 from vincentlauhl/FinalDGUpdate
vincentlauhl Nov 8, 2021
8a43210
Update PPP
vincentlauhl Nov 8, 2021
cf0d786
Merge pull request #148 from vincentlauhl/PPPFinalUpdate
vincentlauhl Nov 8, 2021
b258272
Update ParserClassDiagram
bernardboey Nov 8, 2021
fc6a6f6
Update developer guide
bernardboey Nov 8, 2021
a7510b2
Update ParserClassDiagram
bernardboey Nov 8, 2021
7d66f0b
Merge pull request #150 from bernardboey/v2.1-2
bernardboey Nov 8, 2021
f792595
Add JavaDoc comments for Parser
bernardboey Nov 8, 2021
7c32d43
Add JavaDoc comments for ArgsParser
bernardboey Nov 8, 2021
cda11c2
Add more logging
bernardboey Nov 8, 2021
af89d33
Add more tests
bernardboey Nov 8, 2021
33b4835
Merge pull request #151 from bernardboey/v2.1-3
bernardboey Nov 8, 2021
eebcf59
Update bernardboey.md
bernardboey Nov 8, 2021
a6cc584
Update archiveClassifier version
bernardboey Nov 8, 2021
ab52185
Update bernardboey.md
bernardboey Nov 8, 2021
4348f5b
Update AddRecipeCommandTest.java
bernardboey Nov 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
/build/
src/main/resources/docs/

# Log files
/*.log.*

# MacOS custom attributes files created by Finder
.DS_Store
*.iml
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duke project template
# Expiry Eliminator

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.
This is a project based on Duke, which is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

## Setting up in Intellij

Expand All @@ -9,7 +9,7 @@ Prerequisites: JDK 11 (use the exact version), update Intellij to the most recen
1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.
* In the same dialog, you _may_ have to set the Project language level field to the SDK default option.
1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).
1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below:
1. **Verify the set up**: After the importing is complete, locate the `src/main/java/expiryeliminator/ExpiryEliminator.java` file, right-click it, and choose `Run ExpiryEliminator.main()`. If the setup is correct, you should see something like the below:
```
> Task :compileJava
> Task :processResources NO-SOURCE
Expand Down Expand Up @@ -40,7 +40,7 @@ Prerequisites: JDK 11 (use the exact version), update Intellij to the most recen

### JUnit tests

* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template.
* A skeleton JUnit test (`src/test/java/expiryeliminator/ExipiryEliminatorTest.java`) is provided with this project template.
* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).

## Checkstyle
Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@ test {
}

application {
mainClassName = "seedu.duke.Duke"
mainClassName = "expiryeliminator.ExpiryEliminator"
}

shadowJar {
archiveBaseName = "duke"
archiveClassifier = null
archiveBaseName = "expiryeliminator"
archiveClassifier = "v2.0"
}

checkstyle {
toolVersion = '8.23'
}

run{
run {
standardInput = System.in
enableAssertions = true;
}
11 changes: 6 additions & 5 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

Display | Name | Github Profile | Portfolio
--------|:----:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)

![](https://via.placeholder.com/100.png?text=Photo) | Bernard Boey | [Github](https://github.com/bernardboey) | [Portfolio](docs/team/bernardboey.md)
![](https://via.placeholder.com/100.png?text=Photo) | Joshua Dass | [Github](https://github.com/JoshHDs) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Vincent Lau Han Leong | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Kairui | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)

186 changes: 182 additions & 4 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,179 @@

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}

## Design & implementation
## Design

Choose a reason for hiding this comment

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

Would you consider including some class or object diagrams to illustrate how these components work?


{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
### Data
**API** : [Data.java](https://github.com/AY2122S1-CS2113-T16-3/tp/tree/master/src/main/java/expiryeliminator/data)

![](diagrams/Data.png)

Choose a reason for hiding this comment

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

Can consider adding a diagram showing the overall architecture of the application (i.e. include UI and storage components) to give readers a bigger picture.


- The `Data` Component,
- Stores a list of `Recipe` objects, in the form of `RecipeList`
- Stores a list of `IngredientStorage`, in the form of `IngredientRepository`
- Each `Recipe` has its ingredients and respective quantities stored in `IngredientQuantity`
- The `Ingredient Storage` separates a specific ingredient into batches of quantities,
according to the expiry date.
- `Ingredient` stores the information of the ingredients, which are its name and unit,

Choose a reason for hiding this comment

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

Can this line be phrased better?

Choose a reason for hiding this comment

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

May I know which part is causing you confusion, so that I can phrase it properly accordingly.

Thanks!

e.g. Chicken and grams.

### Parser

This is a (partial) class diagram of the Parser component. Note that the `Parser` class in actuality is dependent on
many of the classes depicted in the diagram: `SingleArgPrefix`, `MultipleArgPrefix`, `OptionalArgPrefix`,
`ExpiryDateParser`, `UnitParser`, `IngredientParser`, `QuantityParser`, `RecipeParser`. The dependencies have been
omitted from the diagram for simplicity.

![](diagrams/ParserClassDiagram.png)

Choose a reason for hiding this comment

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

Can increase the width of this diagram as the diagram is very small. Could also separate the two diagrams instead of putting it side by side

Choose a reason for hiding this comment

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

image
There are more details omitted in this class diagram like missing multiplicities. Perhaps you can consider adding them in as well.




## Implementation

Choose a reason for hiding this comment

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

Could a table of commands be added so that navigation through different commands would be easier?

This section describes how the features are implemented.

### List all Ingredients Feature
bernardboey marked this conversation as resolved.
Show resolved Hide resolved

The list ingredients feature is performed by `IngredientRepository`. It loops through all the different
ingredient storages, and concatenates them into a string which is shown as the output list. Below is the
sequence diagram for how list works.

![](diagrams/List.png)

Choose a reason for hiding this comment

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

Diagram is very clean and easy to understand, good job!


### List Expired Ingredients Feature

The list expired ingredients feature is performed by `IngredientRepository`. It loops through all the
ingredient storages. For each ingredient storage, it gets the type of ingredient being stored in that
storage, and creates an empty storage for that ingredient type to store the batches of that ingredient
that are expired. The code then loops through all the batches of that ingredients, and add the expired
batches to the expire ingredient storage. The expired ingredient storage is converted into a string and
is shown as the output. Below is the sequence diagram for how list expired ingredients works.
Comment on lines +113 to +118

Choose a reason for hiding this comment

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

Would it be clearer if this was in point form instead?


![](diagrams/ListIngredientsExpired.png)

### Delete Expired Ingredients Feature

The delete expired ingredients feature is performed by the `IngredientRepository`. It loops through all

Choose a reason for hiding this comment

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

Perhaps you can consider breaking down the explanation into points instead. Would make it clearer.

the ingredient storages. For each ingredient storage, it loops through all the batches of that ingredient.
If the batch has expired, it adds the expiry date of that batch to an array. After it has looped though
all the batches of a specific ingredient, it proceeds to remove all those ingredient batches from the
repository. This process then repeats for the next type of ingredient. Below is the sequence diagram for
how delete expired ingredients works.

![](diagrams/DeleteExpiredIngredients.png)

### View Ingredient Feature

The view ingredient feature is performed by the `IngredientRepository`. It finds if the ingredient
repository contains an ingredient with the same name as the user input, and return the storage of that
ingredient. The storage data is represented as a string that is shown as an output. Below is the sequence
diagram for how view ingredient works.

![](diagrams/ViewIngredient.png)

### Update Units Feature

The update units feature is performed by both the `IngredientRepository` and `RecipeList`. First, it finds
the ingredient storage of the ingredient and updates the units there. Then it finds the recipes which
contain the ingredient and updates the units there. Below is the sequence diagram for how update unit
works.

![](diagrams/UpdateUnits.png)

### Shopping List Feature

The shopping list feature is performed by the `IngredientRepository`. It loops through all the recipes
the user wants to cook and collates all the ingredients and quantities into totalIngredients. It then
loops through all the ingredient storages to see if there is enough ingredients. If there isn't it adds
the ingredient and respective quantity to the shopping list. It returns the shopping list as a String to
be shown as the output. Below is the sequence diagram for how the shopping list feature works.

![](diagrams/ShoppingList.png)

### Add Recipe Feature

The add recipe feature is performed by `RecipeList`. It adds a `Recipe` and its respective
ingredients to the `RecipeList`.

Here is the sequence diagram for how add recipe works if the correct input is given and
all ingredients exist in the `Ingredient Repository`.

![](diagrams/AddRecipe.png)

`Recipe` checks if an ingredient exists in the `Ingredient Repository` before
adding the ingredient into the `Recipe`. If it doesn't exist, `Recipe` adds
the ingredient into the `Ingredient Repository` without any quantity and expiry date,
and it reminds the user to update the units of the ingredients.

The reason for this implementation is so that the user doesn't have to manually add the ingredients,
as the ingredient has to be in the `Ingredient Repository` for the [cooked
recipe feature](#cooked-recipe-feature) to work

> **Note** : Here are a few cases where an error will be returned, and the `Recipe`
> will not be saved.
>
> - the `Recipe` already exists in the `RecipeList`,
> - A number less than 1 is entered for one of the quantity of the ingredients of the `Recipe`.
> - Two same ingredients in one `Recipe`.

<br/>

### Delete Recipe Feature

The delete recipe feature is performed by `RecipeList`. It deletes a `Recipe` from the `RecipeList`.

Here is the sequence diagram for how delete recipe works if the `Recipe` exists in the `RecipeList`.

![](diagrams/DeleteRecipe.png)

> **Note** : If the `Recipe` doesn't exist in the `RecipeList`, an error will be returned.

<br/>

### Cooked Recipe Feature

The cooked recipe feature is performed by `Recipe`. It deletes a certain quantity of ingredients in the
`Ingredient Repository` based on the quantities of ingredients in the `Recipe`.

Here is the sequence diagram for how cooked recipe works if the amount of ingredients in the `Ingredient Repository`
is sufficient to be deducted.

![](diagrams/CookedRecipe.png)

Choose a reason for hiding this comment

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

image
Are the entities shown at the bottom of the diagrams required? All your sequence diagrams above under Implementation have these.


The feature leaves the responsibility of dealing with expired ingredients to the user, and
will remove ingredients starting from the earliest batch of ingredients. (ingredients that
expire the soonest, including those that are already expired.)

> **Note** : Here are a few cases where an error will be returned, and the quantities of the ingredients in the
> `Ingredient Repository` will not be updated.
>
> - The `Recipe` does not exist in the `RecipeList`
> - There is insufficient ingredients in the `Ingredient Repository` for the `Recipe` to be cooked.

<br/>

###List Recipes User Can Cook Feature
bernardboey marked this conversation as resolved.
Show resolved Hide resolved

The list recipe user can cook feature is performed by the `ListRecipeUserCanCookCommand`.
It returns a list of recipes that the user can cook with the ingredients the user currently
have.

Here is the sequence diagram for how list recipe user can cook works

![](diagrams/ListRecipesUserCanCook.png)

The feature will indicate that the `Recipe` can be cooked even if some of the ingredients have
expired. However, it will inform the user that there are expiring ingredients. The responsibility
of dealing with expired ingredients is left to the user.

The feature will inform the user if there is insufficient ingredients to cook any `Recipe` or if
there is no `Recipe` in the `RecipeList`.

<br/>

## Product scope
### Target user profile

{Describe the target user profile}
Young adults who are living in their own home.

Choose a reason for hiding this comment

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

Can consider being more specific. e.g. young adults who cook often and needs to keep track of their ingredients.


### Value proposition

Expand All @@ -22,8 +186,22 @@

|Version| As a ... | I want to ... | So that I can ...|
|--------|----------|---------------|------------------|
|v1.0|user|add an ingredient|record what ingredients I have|
|v1.0|user|delete an ingredient|remove ingredients that I no longer have|
|v1.0|user|increment quantities for a particular ingredient|record how much of that ingredient I have|
|v1.0|user|decrement quantities for a particular ingredient|know how many ingredients are left|
|v1.0|user|list the ingredients with quantities and expiry dates|know the ingredients I have at a glance|
|v1.0|user|view the quantities for a particular ingredient|know how much of a specific ingredient I have|
|v1.0|user|list ingredients expiring within the week|know which ingredients I should use up first|
|v1.0|user|list ingredients that have expired already|know which ingredients to throw away|
|v1.0|user|add the expiry date for a specific ingredient|record when it must be used by|
|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|
|v1.0|user|add a recipe and its constituent ingredients|keep track of what I want to cook|
|v1.0|user|delete a recipe|retain only recipes I want|
|v2.0|user|be able to indicate that I have cooked a recipe|keep my ingredient repository accurate|
|v2.0|user|list recipes i can cook based on the ingredients I have|save time on checking the ingredients I have|
|v2.0|user|generate a shopping list for a particular recipe/recipes|know what ingredients to buy|
|v2.0|user|delete all ingredients that have expired at one go|all ingredients I keep track of are not expired|

## Non-Functional Requirements

Expand Down
41 changes: 32 additions & 9 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

{Give a product intro}
Expiry Eliminator (v1.0) is a desktop app for managing the freshness of ingredients in your kitchen and the recipes you want to cook, optimized for use via a Command Line Interface (CLI). If you can type fast, Expiry Eliminator can help you manage your ingredients and recipes quickly.

## Quick Start

Expand All @@ -15,19 +15,42 @@

{Give detailed description of each feature}

### Adding a todo: `todo`
Adds a new item to the list of todo items.
### Adding an ingredient: `add`

Format: `todo n/TODO_NAME d/DEADLINE`
Adds an ingredient to the ingredient repository.

* The `DEADLINE` can be in a natural language format.
* The `TODO_NAME` cannot contain punctuation.
Format: `add i/INGREDIENT [u/UNIT] [q/QUANTITY e/EXPIRY_DATE]

Example of usage:
- Unit is optional.
- Quantity and expiry date is optional, but you cannot have one and not the other (i.e. you either don't provide both quantity and expiry date, or you provide both quantity and expiry date).
- Expiry date must be in the format of `yyyy-mm-dd`.
- Quantity must be an integer.
- Note that ingredient names are case insensitive, and will be automatically stored in title case (e.g. `ReD aPplE` will be stored as `Red Apple`).
- Ingredient names must be unique.
- If the ingredient name already exists, an error message will be shown.

`todo n/Write the rest of the User Guide d/next week`
Example of usage:
- `add i/Red Apple`
- `add i/Salt u/g`
- `add i/Red Apple q/5 e/2021-10-08`
- `add i/Salt u/g q/1000 e/2021-01-01`

### Adding a recipe: `add recipe`

Adds a recipe with its respective ingredients to the database

Format: `add recipe r/RECIPE i/INGREDIENT q/QUANTITY i/INGREDIENT q/QUANTITY...`

- Adds a recipe and its INGREDIENT with the corresponding QUANTITY for each ingredient.
QUANTITY must be a non-negative integer with the corresponding units for ease of reference later on.
- The ingredient and recipe names are case insensitive (E.g.: ChiCkEN SoUP would be recorded as Chicken Soup)
- The recipe is added to the next item on the list
- The ingredients and the quantity can be added in any order, but the first ingredient will correspond to the first
quantity added, second ingredient to second quantity etc.

Example of usage:
`add recipe r/Chicken Soup i/Chicken q/300g i/Salt q/10g`

`todo n/Refactor the User Guide to remove passive voice d/13/04/2020`

## FAQ

Expand Down
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
Binary file added docs/diagrams/AddRecipe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions docs/diagrams/AddRecipe.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@startuml

Choose a reason for hiding this comment

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

this diagram is really big maybe u could split it into one logic diagram that calls the functions in a data diagram that only has the recipe class. then add another diagram just for the data diagram. the wording is way too small on this diagram

'https://plantuml.com/sequence-diagram

autonumber
box Logic
-> Parser: parseCommand(userInput)
activate Parser

create AddRecipeCommand
Parser -> AddRecipeCommand : AddRecipeCommand(recipe, ingredientNames, quantities)
activate AddRecipeCommand

return
return command

-> AddRecipeCommand : execute(ingredients,recipes)
activate AddRecipeCommand
end box

box Data
create Recipe
AddRecipeCommand -> Recipe : Recipe(name)
activate Recipe

return

loop all ingredients
AddRecipeCommand -> Recipe : add(ingredientName, quantity, ingredients)
activate Recipe
create IngredientQuantity
Recipe -> IngredientQuantity : IngredientQuantity(ingredientName, quantity)
activate IngredientQuantity
return
end

return

AddRecipeCommand -> RecipeList : add(recipe)
activate RecipeList
end box

return
return message
destroy AddRecipeCommand
@enduml
Binary file added docs/diagrams/CookedRecipe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading