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-W12-1] HealthMate #1

Open
wants to merge 537 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
537 commits
Select commit Hold shift + click to select a range
50c7b7e
Remove unecessary import
ryan-txn Nov 2, 2024
0e762dc
Update user dummy data
ryan-txn Nov 2, 2024
dd0acbc
Merge pull request #109 from ryan-txn/Implement_Single_User_TimeStamp
ryryry-3302 Nov 2, 2024
cbfbe7b
Create recommender package
ryryry-3302 Nov 2, 2024
54f06e1
Merge branch 'AY2425S1-CS2113-W12-1:master' into 66-add-meal-option-r…
ryryry-3302 Nov 2, 2024
899fd30
create recipe map
ryryry-3302 Nov 2, 2024
6308bc2
create meal recommendations
ryryry-3302 Nov 2, 2024
35425f9
Test: create test cases
ryryry-3302 Nov 2, 2024
b04154b
Fix styles
ryryry-3302 Nov 2, 2024
d37a045
Add: Update commands
ryryry-3302 Nov 2, 2024
5d1758c
Feat: Add Weight timeline display
ryryry-3302 Nov 2, 2024
8cb9313
Test: Weight Entry Display test
ryryry-3302 Nov 2, 2024
3369dc2
Merge pull request #123 from ryryry-3302/66-add-meal-option-recommend…
kennethSty Nov 3, 2024
0be62b8
Bug fix historicCalories Test
Nov 3, 2024
9a4e6a4
update DG and UG
Nov 3, 2024
93ad68d
Fix test
Nov 3, 2024
5495e50
Merge pull request #126 from AY2425S1-CS2113-W12-1/updateDG
ryryry-3302 Nov 3, 2024
2329171
Merge branch 'master' into 60-timeline-of-weight-history
ryryry-3302 Nov 3, 2024
e4bf14c
Fix timestamp bug
Dri-water Nov 3, 2024
54bf3bb
Style: fix styling issue
ryryry-3302 Nov 3, 2024
c374167
Merge branch '60-timeline-of-weight-history' of https://github.com/ry…
ryryry-3302 Nov 3, 2024
c21e54c
Merge branch 'master' into fixTest
ryryry-3302 Nov 3, 2024
925c942
Merge pull request #124 from AY2425S1-CS2113-W12-1/fixTest
ryryry-3302 Nov 3, 2024
ce070d2
Merge pull request #128 from Dri-water/fix-timestamp
ryryry-3302 Nov 3, 2024
bc46d28
Merge branch 'master' into 60-timeline-of-weight-history
ryryry-3302 Nov 3, 2024
c67b0e2
Add JavaDoc header comments
Dri-water Nov 3, 2024
2e990a8
Merge pull request #127 from ryryry-3302/60-timeline-of-weight-history
Dri-water Nov 3, 2024
d5df415
Merge pull request #129 from Dri-water/header-comments
ryryry-3302 Nov 3, 2024
fb9612b
Docs: Claiming Worked on Code Lines
DarkDragoon2002 Nov 4, 2024
a378c40
Task: Add Assertions to make ChatParser more Defensive
DarkDragoon2002 Nov 4, 2024
641981e
Task: Abstracted Chat Parser and shifted Code to respective Commands
DarkDragoon2002 Nov 4, 2024
46016dc
Docs: JavaDoc Comments for all the Command Classes
DarkDragoon2002 Nov 4, 2024
5e38daf
Bug: Minor Bug Fix
DarkDragoon2002 Nov 4, 2024
32bcded
Test: Added Tests for Delete Commands and Today Calories
DarkDragoon2002 Nov 4, 2024
e7114fc
Fix: CheckStyle fixes
DarkDragoon2002 Nov 4, 2024
f028cef
Fix: Testing Bug Fix
DarkDragoon2002 Nov 4, 2024
8e5e077
Add author tags to UserHistoryTracker
Nov 5, 2024
4dcba5b
Make code more readable
Nov 5, 2024
d5173f6
Merge pull request #130 from DarkDragoon2002/Defensive-Coding
kennethSty Nov 5, 2024
219e6f7
Add more logging and make use of user stub in chatparser tests
Nov 5, 2024
b6e16d7
Add test for extracting timestamp from user input
Nov 5, 2024
64b8666
Add fail assertion to portion test
Nov 5, 2024
67fc0e3
Fix checkstyle issue
Nov 5, 2024
46d20a0
Fix import checkstyle violation
Nov 5, 2024
dfc79de
Add author tags
Nov 5, 2024
a12bf8c
Merge branch 'master' into addAuthorTags
kennethSty Nov 5, 2024
6bda28f
Resolve more conflicts for divergent upstream and local branch
Nov 5, 2024
acfd3e7
Merge pull request #131 from AY2425S1-CS2113-W12-1/addAuthorTags
Dri-water Nov 5, 2024
f75c538
Merge pull request #133 from AY2425S1-CS2113-W12-1/AddTags
Dri-water Nov 5, 2024
1c4fefa
Merge branch 'master' into PolishCode
Dri-water Nov 5, 2024
d7a19ed
Merge pull request #132 from AY2425S1-CS2113-W12-1/PolishCode
Dri-water Nov 5, 2024
df662b3
Add JavaDoc Comments
ryan-txn Nov 5, 2024
f048242
Merge pull request #134 from ryan-txn/AddJavaDocComments
kennethSty Nov 6, 2024
1dffc40
Remove unnecessary double reference to history trackers
Nov 6, 2024
7620fe0
Clean up ChatParser
Nov 6, 2024
dd22f5a
Add javadoc comments
Nov 6, 2024
b3fa7a5
Remove duplication and SLAP UserHistoryTracker methods
Nov 6, 2024
fd04c78
Update SD to create a new user profile
Nov 6, 2024
b9d0bb1
Fix checkstyle
Nov 6, 2024
b80da2d
Apply single responsibility principle to User class
Nov 6, 2024
cd9d0ba
Do houskeeping on core classes
Nov 6, 2024
30f97b6
Add User History Tracker Test class
ryan-txn Nov 6, 2024
b06ee56
Merge pull request #135 from AY2425S1-CS2113-W12-1/updateSQD
ryan-txn Nov 6, 2024
4de0401
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-1/tp …
ryan-txn Nov 6, 2024
d5da8bf
Add javadoc comments and author tags
ryan-txn Nov 6, 2024
e348782
Improve Cohesion and add updated class diagram
Nov 6, 2024
877a304
Update DG
Nov 6, 2024
1f48b06
Delete unused import
Nov 6, 2024
e42b46f
Add Loading userEntryList JUnit test
ryan-txn Nov 6, 2024
98f7016
Update PPP
Nov 6, 2024
e404cfa
Merge pull request #136 from AY2425S1-CS2113-W12-1/updateHighLevelClassD
ryan-txn Nov 6, 2024
ef2e659
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-1/tp …
ryan-txn Nov 6, 2024
10ee94c
Fix Checkstyle
ryan-txn Nov 6, 2024
fb11201
Merge pull request #137 from ryan-txn/AddUserDataJUnitTests
ryryry-3302 Nov 6, 2024
13538f5
Delete docs/images/askForUserDataSD.png
ryryry-3302 Nov 6, 2024
ab22833
Add files via upload
ryryry-3302 Nov 6, 2024
a1cf48b
Update DeveloperGuide.md
ryryry-3302 Nov 6, 2024
1d5fe39
Delete docs/images/readUserDataFromFileSD.png
ryryry-3302 Nov 6, 2024
eca1057
Update DeveloperGuide.md
ryryry-3302 Nov 6, 2024
ebf5969
Test: make code more defensive
ryryry-3302 Nov 6, 2024
cedea1c
Bug: fix for save meal
ryryry-3302 Nov 6, 2024
7a8c690
style
ryryry-3302 Nov 6, 2024
6393e43
Styling
ryryry-3302 Nov 6, 2024
077a8b1
Merge pull request #138 from AY2425S1-CS2113-W12-1/121-issue-in-askfo…
ryan-txn Nov 6, 2024
cf8123e
Merge pull request #140 from ryryry-3302/139-fix-and-misc-bugs
ryan-txn Nov 6, 2024
2635d44
Add Load User Entries SD
ryan-txn Nov 6, 2024
302a7f6
Add CurrentUserDataCommand
ryan-txn Nov 6, 2024
464a531
Update CommandMap test case
ryan-txn Nov 6, 2024
0d0641c
Merge pull request #142 from ryan-txn/AddCurrentUserDataCommand
ryryry-3302 Nov 7, 2024
047b7bd
Merge pull request #141 from ryan-txn/AddLoadUserEntryListSD
ryryry-3302 Nov 7, 2024
aeace06
Release: plus fix
ryryry-3302 Nov 7, 2024
5277018
Release
ryryry-3302 Nov 7, 2024
92fccfd
Fix
ryryry-3302 Nov 7, 2024
a9f1b66
Merge pull request #144 from ryryry-3302/143-make-release
kennethSty Nov 7, 2024
9e2e33a
Update UG
ryryry-3302 Nov 7, 2024
6e0932b
Add new commands and fix errors
Nov 7, 2024
6f7898f
Merge pull request #146 from ryryry-3302/145-update-userguide
kennethSty Nov 7, 2024
31a403d
Clean data files
Nov 7, 2024
1a64751
Add CreateFilleIfNotExists SD
ryan-txn Nov 7, 2024
8f8720b
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-1/tp …
ryan-txn Nov 7, 2024
e6ce804
Merge pull request #148 from ryan-txn/AddCreateFileIfNotExistsSD
ryryry-3302 Nov 7, 2024
135c76a
Fix ug
ryryry-3302 Nov 7, 2024
5d6aab2
Replace special characters to be stable in windows
Nov 7, 2024
260e1c7
Merge branch 'master' into AddNewCommandsUG
kennethSty Nov 7, 2024
ec37221
Merge pull request #147 from AY2425S1-CS2113-W12-1/AddNewCommandsUG
ryryry-3302 Nov 7, 2024
afe2093
Fix mealMenu sequence diagram
Dri-water Nov 7, 2024
06b980a
Merge branch 'master' into 145-update-userguide
ryryry-3302 Nov 7, 2024
75ba58d
Merge pull request #150 from Dri-water/mealMenuSD-update
ryryry-3302 Nov 7, 2024
b78db00
Merge pull request #149 from ryryry-3302/145-update-userguide
Dri-water Nov 7, 2024
e95db68
Fix: add identation
ryryry-3302 Nov 7, 2024
b853cc1
Merge pull request #151 from ryryry-3302/145-update-userguide
kennethSty Nov 7, 2024
c899c91
add sequence diagram
ryryry-3302 Nov 7, 2024
6e462c6
Update dg
ryryry-3302 Nov 7, 2024
bae1274
Bug: Gender Check Bug Fix in User Creation
DarkDragoon2002 Nov 7, 2024
ca48e46
Bug: Delete Commands gave wrong Error when file was empty
DarkDragoon2002 Nov 7, 2024
7081ffa
Fix: Fixed Testcases for delete commands
DarkDragoon2002 Nov 7, 2024
ed99cf3
Bug: Fixed add mealEntry with empty label
DarkDragoon2002 Nov 7, 2024
ba957ba
Bug + Doc: Fixed bug that allowed meal/mealEntry with "," to be saved…
DarkDragoon2002 Nov 7, 2024
147449d
Doc: Replaced And symbol with "and"
DarkDragoon2002 Nov 7, 2024
8642984
Update DeveloperGuide.md
DarkDragoon2002 Nov 7, 2024
3bf2cb5
Merge pull request #153 from ryryry-3302/152-update-dg
DarkDragoon2002 Nov 7, 2024
e7b3c32
Merge pull request #154 from DarkDragoon2002/Update-SD-and-Bug-Fix
ryryry-3302 Nov 7, 2024
fbe5acf
Fix issue 197
ryryry-3302 Nov 9, 2024
e161ff7
Fix typo in #182
ryryry-3302 Nov 9, 2024
4a1d1a5
Add silent load for syncing data across multiple runs
Nov 9, 2024
258fc74
Fix: #181
ryryry-3302 Nov 9, 2024
adf7334
Fix todayCalorieProgress test by ensuring implicit empty meal assumpt…
Nov 9, 2024
fd5fe8a
Fix: #189 non updating user data
ryryry-3302 Nov 9, 2024
e091bf1
Merge pull request #207 from AY2425S1-CS2113-W12-1/FixMultipleInstanc…
ryryry-3302 Nov 9, 2024
f9e2854
Merge branch 'master' into 197-fixing-easy-cosmetic-issues
ryryry-3302 Nov 9, 2024
25f0807
Merge pull request #208 from ryryry-3302/197-fixing-easy-cosmetic-issues
ryryry-3302 Nov 9, 2024
afce6aa
Fix: #172
ryryry-3302 Nov 9, 2024
ee236c2
Add max exceptions for height, weight and age
ryan-txn Nov 9, 2024
ec10e42
Fix data corruption bug
Nov 9, 2024
036b59c
Merge pull request #209 from ryan-txn/AddRealisticUserParams
kennethSty Nov 9, 2024
a29ac1b
Merge pull request #210 from AY2425S1-CS2113-W12-1/FixDataManipulatio…
ryan-txn Nov 9, 2024
d38d9e0
Fix 0 portion bug
Nov 9, 2024
a4ce2e7
Save log
Nov 9, 2024
6cc9640
Merge master into BugFix branch
Nov 9, 2024
d0494b6
Fix checkstyle issue
Nov 9, 2024
bc2251e
Delete unused import
Nov 9, 2024
e5e70bb
Merge pull request #211 from AY2425S1-CS2113-W12-1/FixZeroPortionsBug
Dri-water Nov 9, 2024
eae29b0
Add lower limit to HistoricCalorieProgressCommand number of days
ryan-txn Nov 9, 2024
4197e71
Fix Calories Bug
Nov 9, 2024
32d91b7
Improve duplicate meal option feedback and make duplication detection…
Nov 9, 2024
9006e10
Update UG
Nov 9, 2024
f9f7a38
Merge pull request #212 from ryan-txn/AddHistoricCalorieProgressComma…
kennethSty Nov 9, 2024
a82ee74
Merge pull request #213 from AY2425S1-CS2113-W12-1/CapitalLetterAndCa…
ryryry-3302 Nov 9, 2024
10bc07f
Update UG with correct log meals output
Nov 9, 2024
83b3fab
Fix HistoryTracker error messages
Dri-water Nov 9, 2024
9b490dd
Merge pull request #214 from AY2425S1-CS2113-W12-1/TimeFormatBug
ryryry-3302 Nov 9, 2024
f265ca3
Fix: #179
ryryry-3302 Nov 9, 2024
d964dcb
Bug: fix small bug related to #179
ryryry-3302 Nov 9, 2024
d990a20
Add early return if no csv file in HistoryTracker
Dri-water Nov 9, 2024
dbeb925
Merge pull request #215 from Dri-water/fix-HistoryTracker-error
Dri-water Nov 9, 2024
9fd14ac
Decentralize asking for user data to enable quicker recovery from fal…
Nov 9, 2024
9f47dcc
Fix userHistoryTracker test
Nov 9, 2024
0c72cb0
Fix: #180
ryryry-3302 Nov 9, 2024
d0a216b
Merge branch 'master' into ImproveAskForUserData
kennethSty Nov 9, 2024
2c73f87
Fix merge conflict
ryryry-3302 Nov 9, 2024
e39786d
Merge branch 'master' into 172-pe-dtester-a-explanation-too-brief-for…
ryryry-3302 Nov 9, 2024
00edf4f
Remove unused imports
Nov 9, 2024
0dee1f5
Test run
Nov 9, 2024
b0f37fd
Fix merge conflict
ryryry-3302 Nov 9, 2024
89ed662
Merge branch 'master' into 172-pe-dtester-a-explanation-too-brief-for…
ryryry-3302 Nov 9, 2024
9aff242
Merge pull request #216 from AY2425S1-CS2113-W12-1/ImproveAskForUserData
Dri-water Nov 9, 2024
c57f5ce
Merge branch 'master' into 172-pe-dtester-a-explanation-too-brief-for…
ryryry-3302 Nov 9, 2024
f115860
Fix
ryryry-3302 Nov 9, 2024
9ebe1ef
Merge pull request #217 from ryryry-3302/172-pe-dtester-a-explanation…
ryryry-3302 Nov 9, 2024
5e6d8a6
Add fallsback if progressbar characters unknown
Nov 9, 2024
d3072b7
Make progressbar universally stable by choosing standard characters
Nov 9, 2024
b35ce38
Merge branch 'master' into ProgressBarFallback
kennethSty Nov 9, 2024
62724be
Fix tests
Nov 9, 2024
24ea698
Merge pull request #218 from AY2425S1-CS2113-W12-1/ProgressBarFallback
ryryry-3302 Nov 9, 2024
e31c803
Add SQD, make UI system specific
Nov 9, 2024
f5a3f0e
Delete unused imports
Nov 9, 2024
3563dfa
Include user file for IO test
Nov 9, 2024
23930c4
Fix IO redirection test
Nov 9, 2024
7982dba
Merge pull request #219 from AY2425S1-CS2113-W12-1/UpdateSDDG_ProgUG
ryryry-3302 Nov 9, 2024
62fd932
Add User Guide Content Page
ryan-txn Nov 10, 2024
44f7432
Correct example used
ryan-txn Nov 10, 2024
3151c7d
Fix: Increase resolution of graph and add note in ug
ryryry-3302 Nov 10, 2024
cd81cd5
Merge pull request #220 from ryan-txn/AddUserGuideContentsPage
ryryry-3302 Nov 10, 2024
5f86f53
Fix: #196
ryryry-3302 Nov 10, 2024
c7e43c7
Fix: #193
ryryry-3302 Nov 10, 2024
38abeab
Fix: #168
ryryry-3302 Nov 10, 2024
0c51384
Style
ryryry-3302 Nov 10, 2024
49f85d2
Make name Optional for MealEntries for fast typists
Nov 11, 2024
4035591
Merge pull request #223 from AY2425S1-CS2113-W12-1/MakeNameOptionalAgain
ryryry-3302 Nov 11, 2024
9ab7f79
Merge pull request #222 from ryryry-3302/185-pe-dtester-a-the-feature…
kennethSty Nov 11, 2024
55288e2
Merge pull request #221 from ryryry-3302/183-pe-dtester-c-weight-time…
kennethSty Nov 11, 2024
810e22b
update PPP
ryryry-3302 Nov 11, 2024
94e9f84
Merge pull request #226 from ryryry-3302/224-ryan-update-ppp
kennethSty Nov 11, 2024
2eb86a0
Improve user feedback when user profile corrupted
Nov 11, 2024
3c44908
Update IO test
Nov 11, 2024
b9db32d
Strengthen User Data Parsing
ryan-txn Nov 11, 2024
22538b3
Merge pull request #227 from AY2425S1-CS2113-W12-1/RecoverUserAfterMo…
ryan-txn Nov 11, 2024
e97a3f8
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-1/tp …
ryan-txn Nov 11, 2024
c6a9c2f
Touch up message formats
ryan-txn Nov 11, 2024
75d2720
Remove unneeded imports, Reorder static variables
ryan-txn Nov 11, 2024
b8a2c0a
Merge pull request #228 from ryan-txn/StrengthenUserDataParsingCode
ryryry-3302 Nov 11, 2024
1ea665f
Add PPP
ryan-txn Nov 11, 2024
c270a25
Add Clear User Data Command
ryan-txn Nov 11, 2024
61fdb81
Fix mealMenu SD
Dri-water Nov 11, 2024
c590c8b
Merge pull request #229 from ryan-txn/AddRyanTxnPPP
ryryry-3302 Nov 11, 2024
f47d100
Merge pull request #231 from Dri-water/fix-mealMenuSD
ryryry-3302 Nov 11, 2024
fd91def
Bug: Added Max Desc Length Check to meals and mealEntries
DarkDragoon2002 Nov 11, 2024
8196a47
Fix: #192
ryryry-3302 Nov 11, 2024
ac83d12
Fix:
ryryry-3302 Nov 11, 2024
31071cd
Bug: Fixed target calories to be integer + more user friendly input f…
DarkDragoon2002 Nov 11, 2024
78bf295
Style: fix checkstyle
ryryry-3302 Nov 11, 2024
e6b6b7a
Bug: Disallowed Future Dates from being added in mealEntry
DarkDragoon2002 Nov 11, 2024
062d70c
Bug + Docs: Fixed ordering list commands and updated User Guide
DarkDragoon2002 Nov 11, 2024
f8848ec
Remove unused import
ryan-txn Nov 11, 2024
46c2560
Merge remote-tracking branch 'upstream/master' into AddClearUserDataC…
ryan-txn Nov 11, 2024
9572101
Fix: CheckStyle Fixes
DarkDragoon2002 Nov 11, 2024
32caf9c
Merge pull request #232 from ryryry-3302/make-commands-user-friendly-…
ryan-txn Nov 11, 2024
05a543b
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-1/tp …
ryan-txn Nov 11, 2024
d0a6311
Merge pull request #230 from ryan-txn/AddClearUserDataCommand
ryan-txn Nov 11, 2024
2bfdf20
Merge branch 'master' into Bug-Fixes-+-Update-Docs
DarkDragoon2002 Nov 11, 2024
61cf54a
Update Jonas PPP
Dri-water Nov 11, 2024
86b0001
Fix: Text-ui-test fixed
DarkDragoon2002 Nov 11, 2024
4af913a
Merge branch 'Bug-Fixes-+-Update-Docs' of https://github.com/DarkDrag…
DarkDragoon2002 Nov 11, 2024
76f8405
Fix PPP formatting
Dri-water Nov 11, 2024
d274c71
Merge pull request #234 from Dri-water/update-Jonas-PPP
ryryry-3302 Nov 11, 2024
d20204b
Fix: Fixed user_data.csv
DarkDragoon2002 Nov 11, 2024
52f047e
Merge pull request #233 from DarkDragoon2002/Bug-Fixes-+-Update-Docs
ryryry-3302 Nov 11, 2024
3af84a4
Fix: add documentation to add meal entry
ryryry-3302 Nov 11, 2024
c7063e4
Update PPP
Nov 11, 2024
dd6d71e
Docs: Updated Docs
DarkDragoon2002 Nov 11, 2024
56f3d10
Merge pull request #236 from ryryry-3302/235-add-mealentry-command-mi…
kennethSty Nov 11, 2024
8fb0631
Merge branch 'master' into UpdatePPPKenneth
kennethSty Nov 11, 2024
7489534
Merge pull request #238 from AY2425S1-CS2113-W12-1/UpdatePPPKenneth
ryryry-3302 Nov 11, 2024
2697e33
Merge pull request #237 from DarkDragoon2002/Update-Docs
ryryry-3302 Nov 11, 2024
984cade
change team name to lowercase
Nov 11, 2024
45a7adf
Fix: Renamed PPP according to submission guidelines
DarkDragoon2002 Nov 11, 2024
d417185
Fix: PPP Formatting
DarkDragoon2002 Nov 11, 2024
a92fd78
Shorten PPP
Nov 11, 2024
47a19f6
Merge pull request #239 from DarkDragoon2002/Update-Docs
kennethSty Nov 11, 2024
2797182
Merge pull request #240 from AY2425S1-CS2113-W12-1/makeNameLower
ryryry-3302 Nov 11, 2024
e99cff8
Fix final errors in PPP
Nov 11, 2024
6aa01d2
Add short description to HP
Nov 11, 2024
c50a65f
Merge pull request #241 from AY2425S1-CS2113-W12-1/makeNameLower
kennethSty Nov 12, 2024
859d76e
Fix formatting UG
Nov 12, 2024
cabe637
Correct errors, added details
Nov 12, 2024
5b5f4f1
Merge pull request #242 from AY2425S1-CS2113-W12-1/UpdateDGKenneth
ryryry-3302 Nov 12, 2024
1af38f0
Fix
ryryry-3302 Nov 12, 2024
060a260
Fix style
ryryry-3302 Nov 12, 2024
e42a2fa
Update test
ryryry-3302 Nov 12, 2024
c661dd8
Merge pull request #243 from ryryry-3302/235-add-mealentry-command-mi…
ryryry-3302 Nov 12, 2024
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: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ src/main/resources/docs/
*.iml
bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
3 changes: 3 additions & 0 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: HealthMate

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke project template
# HealthMate

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.

Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ test {
}

application {
mainClass.set("seedu.duke.Duke")
mainClass.set("seedu.healthmate.HealthMate")
}

shadowJar {
archiveBaseName.set("duke")
archiveBaseName.set("healthmate")
archiveClassifier.set("")
}

Expand All @@ -43,4 +43,5 @@ checkstyle {

run{
standardInput = System.in
enableAssertions = true
}
Empty file added data/meal_entries.csv
Empty file.
Empty file added data/meal_options.csv
Empty file.
5 changes: 5 additions & 0 deletions data/user_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
180.0
80.0
true
20
BULKING
14 changes: 7 additions & 7 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# About us

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)
Display | Name | Github Profile | Portfolio
--------|:---------------:|:-------------------------------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | Ryan Tan | [Github](https://github.com/ryan-txn) | [Portfolio](docs/team/ryan-txn.md)
![](https://via.placeholder.com/100.png?text=Photo) | Jonas Seet | [Github](https://github.com/dri-water) | [Portfolio](https://github.com/dri-water)
![](https://via.placeholder.com/100.png?text=Photo) | Ryan Leong | [Github](https://github.com/ryryry-3302) | [Portfolio](https://github.com/ryryry-3302)
![](https://via.placeholder.com/100.png?text=Photo) | Kenneth Styppa | [Github](https://github.com/kennethSty) | [Portfolio](https://github.com/kennethSty)
![](https://via.placeholder.com/100.png?text=Photo) | Deepan Krishnaa | [Github](https://github.com/DarkDragoon2002) | [Portfolio](https://github.com/DarkDragoon2002)
256 changes: 248 additions & 8 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,222 @@
# Developer Guide

## Acknowledgements

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
ChatParser structure inspired by:
[this repository](https://github.com/kennethSty/ip)
Calorie consumption bar inspired by
[this blogpost](https://medium.com/javarevisited/how-to-display-progressbar-on-the-standard-console-using-java-18f01d52b30e)

## Design & implementation
### High Level Class Design
The main classes of this implementation are:
- HealthMate
- ChatParser
- User
- MealList
- MealEntriesList
- Meal
- MealEntry
- HistoryTracker
- UI

In each class we focused on maintaining a tight abstraction barrier between classes.
This specifically includes adherance to the "Tell Don't Ask" principle which was enforced by
making most attributes of all classes above private and avoiding getter methods if possible.
The following diagram illustrates the resulting associations, methods and attributes.
For the sake of clarity, UI class is omitted since it is used across most classes to systematize any form of

Choose a reason for hiding this comment

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

would it be helpful to include a minimal/simple representation of the UI class in the high level class diagram to indicate dependency across all classes. this might improve clarity around UI interactions

Choose a reason for hiding this comment

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

likewise to previous reviewers, my belief is that some documentation of the UI component would be useful in order to provide clarity into possible outputs a user should receive. perhaps you could separate the UI diagram form the overarching diagram provided to retain the clarity your diagram currently has while still providing viewers with the information regarding the UI class.

printing output to the user.

Choose a reason for hiding this comment

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

although I understand that you mentioned Ui class is omitted for clarity, however my modest opinion is that Ui is crucial component to be documented. would a separate UI class diagram be useful?


![High Level CD](images/highLevelClassDiagram.jpg)

Choose a reason for hiding this comment

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

image

Should the class names be preceded with a colon?

Choose a reason for hiding this comment

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

Good separation of concerns between classes !


#### HealthMate
Comment on lines +38 to +39

Choose a reason for hiding this comment

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

Clear explanation of classes

Entry point to the application is the main function of HealthMate.
The HealthMate class contains a private ChatParser attribute. This attribute's run function initiates,
after an initial greeting to the user, the interaction process. In this process,
the user enters commands with additional information into his command line application.
The content of these commands is parsed by the ChatParser.

#### ChatParser
The ChatParser class, instantiated once per application run, manages HealthMates overal usage
flow through its main run() method.

It has two primary attributes:
- A `MealEntriesList` object called `mealEntries`
- Contains tracked calorie consumption
- A `MealList` object called `mealOptions`
- Contains meals that are presaved by the user for quick selection to track commonly consumed meals

These objects represent the application's underlying data with which the user interacts through the command line.
To ensure no unintended changes are done, the ChatParser class orchestrates the effects of the users prompts.
For saving these changes the ChatParser class makes use the `HistoryTracker` which facilitates the process of
storing (and loading) User data, mealEntries data and mealOptions data to their corresponding files.

More details on the implementation of ChatParser follows in the Feature Section.

#### MealList
The MealList class contains a private ArrayList of Meal object.
Further, it encapsulates behaviour to operate on this list of meals. Most notably,
this adding or deleting a Meal to/from the list.

#### MealEntriesList
The MealEntriesList class extends the MealList class. It overwrites the extractAndAppendMeal(...) method,
and additionally includes methods specifically tailored to providing helpul user feedback, as the MealEntries stored
within its instance, signify the users calorie consumption.
As a MealEntry object differs from a Meal object by the additional timestamp attribute, this includes
computations based on the time dimension. More specifically, the printDaysConsumptionBar() uses the UIs class'
methods in the background to visualize the percentage of a certain days total consumption versus the idaeal consumption
of a User class.

#### Meal
The Meal class encapsulates the concept of a meal. As the purpose of this application
is to track calorie consumption, this consists of a mandatory calorie entry. The meal's name attribute,
is however an Optional<String> allowing a case, where no meaningful label can be attached to a certain consumption.
![User SD](images/addMeal.png)

Choose a reason for hiding this comment

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

image
Image fails to load

Copy link

@kennethszj kennethszj Oct 31, 2024

Choose a reason for hiding this comment

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

image
the sequence for extractAndAppendMeal() is clear in showing that a meal object is created and appended.
Would it be clearer to describe what information is extracted? like what does this method extract (eg, name, calorie...)


#### MealEntry
The MealEntry class extends the meal class and contains an additional field timestamp.
This distinction was made, as objects of the Meal class will represent possible meal options to choose form,
while a mealEntry is a concrete calorie consumption the user wants to track. The latter makes a timestamp indispensible.

#### HealthGoal
The HealthGoal class manages a user's health goal and calculates target calorie intake based on user data such as height, weight, age, and gender.
It offers three main health goals: weight loss, steady state, and bulking, each with a corresponding calorie modification factor.
The class supports setting, storing, and retrieving the health goal.
Additionally, it provides a method to compute target calories using the Harris-Benedict Equation, modified by the current health goal.
This allows the class to adapt the calorie calculations according to the user's health objectives, making it versatile for various fitness plans.

#### User
The user class encapsulates all necessary information for computing an ideal daily calorie consumption.
This includes:
- Height (in cm): Double
- Weight (in cm): Double
- Age: Integer
- Gender: Boolean
- Health goal: HealthGoal
- Ideal calorie intake: Computed based on the information above
- Date: LocalDateTime specifying the date of the above information
More details follow in the Features section of this guide.

#### HistoryTracker
The HistoryTracker class is responsible for managing the persistence of data in the HealthMate application. It handles the saving and loading of user data, meal entries, and meal options to and from files. This class plays a crucial role in maintaining the application's state across different sessions.

Key features of the HistoryTracker class include:

1. Data Persistence:
- Saves user data, meal entries, and meal options to separate files.
- Loads existing data from these files when a new usage session is initiated.

2. File Management:
- Creates and manages the necessary files for storing application data.
- Handles file I/O operations, ensuring data integrity during read and write processes.

3. Data Formatting:
- Converts complex objects (like User, MealEntry, and Meal) into a format suitable for file storage.
- Deserializes stored data back into usable objects when loading the application state.

HistoryTracker allows for the persistance of user inputted data between sessions by storing it in a local csv file.

## Features

Choose a reason for hiding this comment

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

Could some Sequence Diagrams of the processing of Commands be shown?


This section will document the contributions made by each team member regarding the implementation or planned feature enhancements, detailing the design and thought processes behind them.

---
### Creating a User Profile
To create or load a user profile the `User` class provides the method `checkForUserData` which loads
saved user information if available from an existing file usingn the `HistoryTracker` or prompts the user

Choose a reason for hiding this comment

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

found a minor typo hehe , "using" is the correct spelling instead of "usingn"

to input new information for creating a new profile as shown in the sequence diagram below.
![User SD](images/userSequenceDiagram.jpg)

Choose a reason for hiding this comment

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

image Does the scanner instance exist prior to this point? If yes, there shouldnt be an activation bar for the constructor and in case it was newly created, perhaps there should be a call to the constructor?

Choose a reason for hiding this comment

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

image
Perhaps consider omitting info about file creation as it may not be relevant to the purpose of the sequence diagram

Choose a reason for hiding this comment

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

i agree with cnivedit about the Scanner instance's activation bar. additionally, if scanner is indeed reused across multiple interactions, would it make sense to show its initialisation outside the main sequence flow?

Choose a reason for hiding this comment

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

personally, this image used is quite blurry and the details are hard to see regardless of zoom. perhaps the team could consider making the diagram slightly easier on the eyes to improve user experience. another possible solution could be to break the diagram into smaller independent sections. as cnivedit mentioned, the file creation may not be the mos relevant to the creation of a user profile so can consider depicting file creation in a separate diagram.

Reference diagrams used
![User SD](images/askForUserDataSD.png)
Copy link

@kennethszj kennethszj Oct 31, 2024

Choose a reason for hiding this comment

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

image

in the sequence, "printString(...)" is used multiple times. would it be more readable to differentiate each print string with specific text or parameters? (eg, printstring(enter calorie:)). this could help viewers understand what actual prompt is displayed at each step.

![Read User SD](images/readUserDataFromFileSD.png)

Choose a reason for hiding this comment

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

Good decision to show two sub-diagrams for clarity; creating a new profile for new user, and loading saved file for existing user



{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
### ChatParser Input Handling
The 'ChatParser' class has the responsibility of parsing user input to steer the
application logic based on predefined commands specified in the `CommandMap' class.
Therefore, the ChatParser class acts as the main interface between user input and command execution.
This includes extracting and routing commands, as well as exception handling for
false input.

#### Feature Implementation
The `ChatParser class:`
1. Accepts user input. I.e. it reads input from the command line
2. Tokenizes commands and identifys one- and two-token commands
3. Routes commands based on the identified command tokens which are specified in the `CommandMap` class. This is done
using methods such as `multiCommandParsing` for 2-token commands and `run` which encapsulates the main loop of
user interaction until the exit command "bye" terminates the application.
4. Logs command routing and its effects on a high level to enable tracking of the application's activity.

#### Why It Is Implemented This Way
The ChatParser class was implemented in the above manner for three reasons:
1. It allows create one abstract unit for handling the responsibility of orchestrating usage flow.
2. As a high-level abstraction layer it improves readability by bundliing the overall application logic in one place.
3. Its modularity allows for easy extensions or modifications to `CommandMap` and `multiCommandParsing`.

#### Alternatives considered
Direct command handling in the main loop. Reduces the depth of the application,
but comes at the cost of reduced readability and higher cohesion.

#### Extensions for v.2.1
Seperating the responsibilities of reading and preprocessing user input from the responsibility
to steer command routing. This could improve the maintainability of the ChatParser class in the future.

### Command Handling with CommandMap Class

#### Overview

The `CommandMap` feature enhances the system's command handling by centralizing the lookup, and
storage of commands. It allows users to efficiently view commands usage within the HealthMate application.

#### Feature Implementation

The `CommandMap` class in the `seedu.healthmate.command` package maps command names to their corresponding
`Command` objects using a `HashMap<String, Command>`. This ensures fast retrieval and allows users to explore
commands with ease.

#### Why It Is Implemented This Way

Using a `HashMap` allows efficient command lookups with a constant time complexity of O(1). Centralizing all
commands within `CommandMap` simplifies the system's command handling process and makes it more maintainable as new
commands are added.

#### Alternatives Considered

An alternative was storing commands in a list and iterating through them sequentially to find the matching command.
However, this approach was less efficient for frequent lookups compared to the `HashMap`.

#### Proposed additions for v2.1

The `CommandMap` can be built upon to support saving and usage of user created scripts as commands. For example
using a user could possibly create an add morningRoutine command by creating a command that runs multiple add
mealEntry commands of their regular breakfast as well as triggering the updateUser data command.

#### Sequence Diagram TBD

1. **Command Lookup Process**: Illustrate the flow from when a user enters a command to when `CommandMap.
getCommandByName()` retrieves the command and the UI displays the results.
- Components: `UI`, `ChatParser`, `CommandMap`, `Command`.
- Highlight how `CommandMap` retrieves the appropriate command based on user input.

---

## Product scope
### Target user profile

{Describe the target user profile}
The target user profile for HealthMate includes:
- Health-conscious individuals who want to monitor their daily calorie intake
- People trying to lose weight or maintain a healthy weight
- Fitness enthusiasts who want to balance their calorie consumption with their exercise routines
- Individuals with specific dietary requirements or restrictions
- Anyone interested in developing better eating habits and nutritional awareness

### Value proposition

{Describe the value proposition: what problem does it solve?}
HealthMate solves the following problems:
- Difficulty in tracking daily calorie intake: Users can easily log their meals and snacks
- Lack of awareness about calorie consumption: The app provides visual representations of daily intake
- Inconvenience of manual calorie calculations: Pre-saved meal options make tracking quicker and more efficient
- Inability to see patterns in eating habits: Historical data allows users to analyze their consumption over time
- Struggle to maintain consistent healthy eating habits: Regular tracking encourages mindful eating and helps users stay accountable to their health goals

## User Stories

Expand All @@ -27,12 +227,52 @@

## Non-Functional Requirements

{Give non-functional requirements}
1. Usability: The command-line interface should be intuitive and easy to use, even for non-technical users.
2. Reliability: The application should not lose any user data during normal operation or unexpected shutdowns.
3. Compatibility: The application should run on common operating systems (Windows, macOS, Linux).
4. Maintainability: The code should be well-documented and follow clean code principles for easy future enhancements.
5. Portability: User data should be easily exportable and importable for backup purposes or switching devices.

## Glossary

* *glossary item* - Definition
* *Meal* - A food item or combination of food items consumed at one time, with associated calorie information.
* *MealEntry* - A record of a meal consumed by the user, including the meal details and a timestamp.
* *MealList* - A collection of pre-saved meals that users can quickly select from when logging their food intake.
* *MealEntriesList* - A chronological list of all meals consumed by the user.
* *ChatParser* - The component responsible for interpreting user commands and executing the appropriate actions.
* *HistoryTracker* - The component that manages the storage and retrieval of user data, meal entries, and meal options.
* *HealthGoal* - The class that manages functions pertaining to setting of user health goal as well calculating ideal caloric intake based on various factors.

## Instructions for manual testing

{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}
1. Installation and Setup:
- Ensure Java Runtime Environment (JRE) is installed on your system.
- Download the HealthMate application JAR file.
- Open a terminal or command prompt and navigate to the directory containing the JAR file.

2. Running the Application:
- Execute the command: `java -jar HealthMate.jar`
- Verify that the application starts and displays a welcome message.

3. Testing Basic Commands:
- Try entering the command `help` and verify that usage instructions are displayed.
- Test the `bye` command to ensure the application exits properly.

4. Adding a Meal:
- Use the command `add mealEntry [name] [calories]` (e.g., `add meal "Chicken Salad" 350`)
- Verify that the meal is added successfully and displayed in the meal list.

5. Logging a Meal Entry:
- Use the command `log meal [name/index] [portion]` (e.g., `log meal "Chicken Salad" 1`)
- Check that the meal entry is recorded with the current timestamp.

6. Show Historic Caloric Trend:
- Use the command `show historicCalories [no. of days]` (e.g., `show historicCalories 5`)
- Check that the calories added previously are shown and that all the stats displayed are correct

7. Testing Data Persistence:
- Exit the application using the `bye` command.
- Restart the application and check if previously added meals and logged entries are still present.

8. Error Handling:
- Try entering invalid commands or data to ensure the application handles errors gracefully and provides helpful error messages.

Choose a reason for hiding this comment

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

would it be favourable to show some examples?

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke
# HealthMate

{Give product intro here}

Expand Down
Loading
Loading