Skip to content

Commit

Permalink
Merge branch 'master' into docs-dg-ppp
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/DeveloperGuide.md
  • Loading branch information
annoy-o-mus committed Apr 15, 2024
2 parents 6ce6ee7 + 1b5b54e commit f9c6ddb
Show file tree
Hide file tree
Showing 17 changed files with 370 additions and 135 deletions.
132 changes: 101 additions & 31 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ data storage so that you can review your past medication intake.
<br>
<div style="display: flex; justify-content: space-between; position: fixed; bottom: 0; left: 0; width: 100%;">
<div>
<a href="#command-summary">:up-down-arrow: Jump to Command Summary</a>
<a href="#command-summary">:arrow_up_down: Jump to Command Summary</a>
</div>
<div>
<a href="#table-of-contents">:up-down-arrow: Jump to Table of Contents</a>
<a href="#table-of-contents">:arrow_up_down: Jump to Table of Contents</a>
</div>
</div>
<div style="page-break-after: always;"></div>
Expand Down Expand Up @@ -277,7 +277,7 @@ Morning:
:information_source: <strong>Info: </strong>

If you want to mark the medication you have taken, you can refer to the <a href="#take-medication-take--l"><code>Take
Command</code></a> here.
Command</code></a>.

</div>

Expand Down Expand Up @@ -791,7 +791,7 @@ See the part on <a href="#editing-the-file">Editing the File</a> for warnings on

### Editing the file
The medication information are saved in a `.json` format while the daily medication information are saved
in the `.txt` format (two independent files). Advanced users can modify the text files directly.
in the `.txt` format (two independent files). Advanced users can modify either files directly.

<div class="danger-box">
:bangbang: <strong>Danger: </strong>
Expand Down Expand Up @@ -868,11 +868,22 @@ This folder resides at the same level as the `meditracker.jar` file.
To transfer the data, just copy/shift the `data` folder to the new computer,
making sure it is at the same level as the `.jar` file.

**Q**: Why does the program keep returning "Invalid index specified"?

**A**: Please make sure you are referring to the correct list. MediTracker uses [`list -t all`](#all-medications)
and [`list -t today`](#daily-medications) commands to display all medications and medications to be taken for the day,
respectively. You may also use the `<command> -h` to see how the command works.

<br>

<div style="page-break-after: always;"></div>

## Glossary
| Term | Explanation |
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| .json | JSON stands for JavaScript Object Notation, which is used to save **all** medications added by the user. |
| .txt | It represents a text file that contains plain text in the form of lines. <br/>Medications to be taken for a particular day is saved in the text file, and a new text file is created at the start of the day. |
| Flags | Most commands in MediTracker uses the flags with the "-" to recognise values within certain fields. Eg. `-n`, `-a`, `-l`, etc. |

<br>

Expand Down
2 changes: 1 addition & 1 deletion docs/diagrams/AddCommand.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ participant "<<class>>\n MedicationManager" as MedicationManager
participant "<<class>>\n DailyMedicationManager" as DailyMedicationManager
participant "<<class>>\n Ui" as Ui

User -> AddCommand: new AddCommand(arguments)
User -> AddCommand ** : new AddCommand(arguments)
activate AddCommand
AddCommand -> ArgumentList: parse(arguments)
activate ArgumentList
Expand Down
34 changes: 34 additions & 0 deletions docs/diagrams/AddToSubLists.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@startuml
'https://plantuml.com/sequence-diagram
actor User

participant "<<class>>\n :DailyMedicationManager" as DailyMedicationManager
participant "period:Period" as Period
participant "medication:Medication" as Medication

User -> DailyMedicationManager: addToSublists(medication)
activate DailyMedicationManager
loop all periods
DailyMedicationManager -> Period: gePeriod()
activate Period
return period
deactivate Period
DailyMedicationManager -> Medication: getDosage(), getName()
activate Medication
return dosage, name
deactivate Medication
DailyMedicationManager -> "dailyMedication:DailyMedication" as DailyMeds ** : new DailyMedication(name, dosage, period)
activate DailyMeds
return dailyMedication
deactivate DailyMeds
DailyMedicationManager -> DailyMedicationManager: addDailyMedication(dailyMedication)
activate DailyMedicationManager
return
participant "<<class>>\n :FileReaderWriter" as FileReaderWriter
DailyMedicationManager -> FileReaderWriter: saveDailyMedicationData(null)
activate FileReaderWriter
return true
end
DailyMedicationManager --> User
deactivate DailyMedicationManager
@enduml
48 changes: 48 additions & 0 deletions docs/diagrams/ListCommand.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@startuml
'https://plantuml.com/sequence-diagram

actor User

participant ":ListCommand" as LC
participant "ARGUMENT_LIST:ArgumentList" as AL

User -> LC ** : new \nListCommand\n(argument)
activate LC
LC -> AL: parse(argument)
activate AL
AL -> "parsedArguments:ArgumentParser" as AP ** : new ArgumentParser(argument)
activate AP
return argumentParser.parsedArguments
return parsedArguments
deactivate AP
deactivate AL

participant ":ArgumentName" as AN
participant "<<class>>\n :MedicationManager" as MM
participant "<<class>>\n :DailyMedicationManager" as DM
participant "<<class>>\n :Ui" as UI
LC -> AN: parsedArguments.get()
return listTypeString
LC -> LC: execute()
activate LC
alt listTypeString.equals("all")
LC -> MM: printAllMeds()
activate MM
return
deactivate MM
else listTypeString.equals("today")
LC -> DM: printTodayMeds()
activate DM
return
deactivate DM
else else
LC -> UI: showErrorMessage("Unknown list type")
activate UI
return
deactivate UI
end
LC --> LC
deactivate LC
LC --> User
deactivate LC
@enduml
65 changes: 33 additions & 32 deletions docs/diagrams/ViewCommand.puml
Original file line number Diff line number Diff line change
@@ -1,52 +1,53 @@
@startuml

actor User
actor User #e67678
title View Command Sequence Diagram
participant ":ViewCommand" as ViewCommand
participant ":ArgumentList" as ArgumentList
participant "ARGUMENT_LIST:ArgumentList" as ArgumentList
participant ":ArgumentParser" as ArgumentParser
participant ":ArgumentName" as ArgumentName
participant "<<class>>\n MedicationManager" as MedicationManager
participant "<<class>>\n Ui" as Ui

User --> ViewCommand: new ViewCommand(args)
User --> ViewCommand ** : new ViewCommand(argument)
activate ViewCommand
ViewCommand -> ArgumentList: parse(args)

activate ArgumentList
ArgumentList -> ArgumentParser: parse(args)
deactivate ArgumentList

activate ArgumentParser
ArgumentParser --> ViewCommand: return parsedArgs
ViewCommand -> ArgumentList: parse(argument)
activate ArgumentList #e67678
ArgumentList -> ArgumentParser ** : New ArgumentParser(argument)
activate ArgumentParser #a67671
ArgumentParser --[#red]> ArgumentList: parsedArguments
deactivate ArgumentParser
ArgumentList --[#red]> ViewCommand: parsedArguments
deactivate ArgumentList

alt #transparent oneParsedArgs
ViewCommand -> ViewCommand: execute(medication)
activate ViewCommand #65c2a6
ViewCommand -> ViewCommand: <font color=blue> execute(medication)
activate ViewCommand #65c2a6

ViewCommand -> MedicationManager: printSpecificMedication(medication)
activate MedicationManager #d192d0
MedicationManager -> MedicationManager: getMedication(medication)
alt oneParsedArgument
ViewCommand -> MedicationManager: printSpecificMedication(medication)
activate MedicationManager #d192d0
MedicationManager -> MedicationManager: getMedication(medication)

MedicationManager -> Ui: printSpecificMed(medicationDetails)
activate Ui #c6d67e
Ui --[#red]> MedicationManager: <font color=red><b>return
MedicationManager --[#red]> ViewCommand: <font color=red><b>return
deactivate MedicationManager
MedicationManager -> Ui: <font color=blue> printSpecificMed(medicationDetails)
activate Ui #c6d67e
Ui --[#red]> MedicationManager: <font color=red>
MedicationManager --[#red]> ViewCommand: <font color=red>
deactivate MedicationManager

ViewCommand -> Ui: showSuccessMessage("Medication details has been retrieved")
Ui --[#red]> ViewCommand: <font color=red><b>return
deactivate Ui
ViewCommand -> Ui: showSuccessMessage("Medication details has been retrieved")
Ui --[#red]> ViewCommand: <font color=red>
deactivate Ui

else #transparent more\nThanOne\nParsed\nArgs
ViewCommand -> Ui: showErrorMessage("You can only have one flag!")
activate Ui #c6d67e
Ui --[#blue]> ViewCommand: <font color=blue><b>return
deactivate Ui
end
else #transparent more\nThanOne\nParsed\nArgs
ViewCommand -> Ui: showErrorMessage("You can only have one flag!")
activate Ui #c6d67e
Ui --[#red]> ViewCommand: <font color=red>
deactivate Ui
end

ViewCommand --[#blue]> ViewCommand
deactivate ViewCommand
User <-- ViewCommand
User <[#red]-- ViewCommand
deactivate ViewCommand

@enduml
Binary file modified docs/images/AddCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/AddToSubLists.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ListCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ViewCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 89 additions & 26 deletions docs/team/e0958902.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,101 @@
# Eric Sim Chong Li - Project Portfolio Page

## MediTracker

## Overview
The following contains my contribution summary and pull request reviews.
The following contains my contribution summary and pull request reviews on our product, MediTracker.
MediTracker is a command-line interface application where it allows users to keep track of their
daily medications and get reminded of low quantity and nearing expiry medications.<br>

<!-- TOC -->
* [Overview](#overview)
* [Summary of Contributions](#summary-of-contributions)
* [Code Contributed](#code-contributed)
* [Enhancements implemented](#enhancements-implemented)
* [Developer Guide Contributions](#developer-guide-contributions)
* [User Guide Contributions](#user-guide-contributions)
* [Review/mentoring contributions](#reviewmentoring-contributions)
* [Team-based tasks and contributions beyond the project team](#team-based-tasks-and-contributions-beyond-the-project-team)
<!-- TOC -->

<br>

<div style="page-break-after: always;"></div>

### Summary of Contributions
- Created relevant milestones labels
- Map some of the user stories to issues
- Reviewed multiple pull requests (PR)
- Added guide on how to improve on ListCommand in the developer guide
- Issue #49: list all medications from 'MedicationManager'
- Issue #15: Show detailed view of a medication
- Issue #162: Update view feature to have more supported flags
- Issue #175: Fix `IndexOutOfBoundsException` for `view` command (Related issues: #171, #169, #165, #152)
- Issue #153: Fix `NumberFormatException` for `view` command
- Issue #181: Fix unaligned medication list output (Related issue: #166)
- Issue #214: Fix User Guide to explicitly state the requirements for every flag
- Issue #202: Fix Expiry date issues (Related Issued: #192, #188, #187, #186, #161)
- Created relevant tags and milestones.
- Map some of the user stories to issues.
- Reviewed multiple pull requests (PR).
- Added guide on how to improve on ListCommand and ViewCommand in the developer guide.
- [PR #49:](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/49) List all medications from 'MedicationManager'.
- [PR #15:](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/127) Show detailed view of a medication.
- [PR #206](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/206)
- Update view feature to have more supported flags.
- Fix `IndexOutOfBoundsException` for `view` command <br>
(Related issues: #171, #169, #165, #152).
- Fix `NumberFormatException` for `view` command.
- Fix unaligned medication list output (Related issue: #166).
- [PR #214:](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/214)
Fix User Guide to explicitly state the requirements for every flag.
- [PR #202:](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/220)
Fix Expiry date issues (Related Issues: #192, #188, #187, #186, #161).<br>

### Code Contributed
Here is the [RepoSense link](https://nus-cs2113-ay2324s2.github.io/tp-dashboard/?search=e0958902&breakdown=true)
of my code contributions.<br>

### Enhancements implemented
- Implemented the ListCommand to query relevant fields in the Medication Manager
containing the medication list. e.g `list -t all`.
- Implemented the ViewCommand to display all relevant fields of a medication,
where it supports different flags with its argument. e.g `view -e 2025`.
- Performed JUnit tests on the methods used in List and View Commands.
- Ensured that the User Guide is consistent across all commands/features.<br>

### Developer Guide Contributions
- Information on how ListCommand works and how to use it.
- Relevant user stories done in milestone v1.0
- Information on how ListCommand and ViewCommand works, and how to use it.
- Included relevant diagrams to illustrate how ListCommand and ViewCommand works.
- Relevant user stories done in milestones.<br>

### User Guide Contributions
- Updated user guide to include listing of all medications
- Updated user guide to include viewing of specific medications
- Ensured that the formatting, alignment, and consistency is in place across all pages
- Updated user guide to include listing of all medications.
- Updated user guide to include viewing of specific medications.
- Ensured that the formatting, alignment, and consistency is in place across all pages.

### PR Reviews
#9, #18, #20, #23, #53, #73, #75, #84, #88,
#89, #90, #95, #98, #115, #116, #126, #127,
#129, #134, #139, #210, #212, #213, #238,
#239, #243
<br>

### Team-based tasks
- Created relevant tags and milestones.
<div style="page-break-after: always;"></div>

### Review/mentoring contributions
- [#9](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/17) Add JavaDoc and other documentation to Ui.
- [#18](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/18) Created class to test for searching medication from external database.
- [#20](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/20) feat: Mark medication taken.
- [#23](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/23) Misc: change package name and update PR Template.
- [#53](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/53) Add medication info into daily.
- [#73](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/73) refactor: Modify Ui to be static.
- [#75](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/75) feat: More flags for Add command, Exception Handling and Double casting
- [#84](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/84) Separate daily medications to sub lists.
- [#88](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/88) Update list all medication.
- [#89](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/89) DG: Adds DG from Lin Htet.
- [#90](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/90) DG: Add DG by kyuichyi.
- [#95](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/95) feat: Add take untake enhancements.
- [#98](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/98) Update style: styling update.
- [#115](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/115) test: add tests for search command functionality
- [#116](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/116) Obj for each sub list.
- [#126](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/126) refactor: Remove prompt from Argument classes.
- [#127](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/127) Query specific medication.
- [#129](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/129) fix(bug): ModifyCommand handle erroneous data and fix AddCommand error handling.
- [#134](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/134) Updates UG: Lin Htet.
- [#139](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/139) docs: Update DG for Add command with sequence diagram.
- [#210](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/210) fix: Fix Add Command PE-D issues.
- [#212](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/212) docs: Update Dev Guide based on comments.
- [#213](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/213) Improve logging: Song Xuan.
- [#238](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/238) docs: Update search in UG.
- [#239](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/239) style: fix style.
- [#243](https://github.com/AY2324S2-CS2113T-T09-1/tp/pull/243) test: Add modify tests.

### Team-based tasks and contributions beyond the project team
- Created relevant tags and milestones to have a soft and hard deadline.
- Answered some questions in the forum and encouraged others to join and verify.
- Ensured that assertions is enabled in Gradle.
- Polish up the consistency of sections in User .
- Polish up the consistency of sections in the User Guide.<br>
10 changes: 8 additions & 2 deletions docs/team/t0nylin.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,26 @@ The following contains my contribution summary and pull request reviews.
- Issue #198: Specifying the correct list index to refer when using take command
- Issue #201: Stating the usage of -h in list command
- Issue #200: Stating in UG that entering the command word alone with print the help message
- Issue #147: Abidance to a stricter checkstyle


### Developer Guide Contributions
- Added some user stories into the table
- Added a sequence diagram for how a medication is added into dailyMedicationManager
- Added command guide for how list -t today -m/-a/-e will print
- Explained how the time ranges affects the addition of each medication into their sub lists
- Explained how the time ranges affect the addition of each medication into their sub lists
- Added more user stories for v2.0 and v.21
- Added a Glossary section

### User Guide Contributions
- Summary of list for the Daily Medication
- Added breakdown of sub lists within the Daily Medication list
- Helped to construct clearer instructions in UG, especially issues found from PE-D
- Added a Glossary section

### PR Reviews
#4, #5, #8, #10, #54, #56, #57, #68, #75, #78, #85, #88, #133, #135, #144, #207, #213 #223
#4, #5, #8, #10, #54, #56, #57, #68, #75, #78, #85, #88, #133, #135, #144, #207, #213, #223,
#229, #242, #247, #248

### Team-based tasks
- Book room for weekly project meetings
Expand Down
Loading

0 comments on commit f9c6ddb

Please sign in to comment.