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

Migrate AddressBook -> ModuleBook #16

Merged
merged 25 commits into from
Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
af73025
added some images and changed AboutUs.adoc
CowSaysBaa Sep 29, 2019
a1954ad
updated photos and AboutUs.adoc
CowSaysBaa Sep 29, 2019
c56dff4
Added all photos and updated AboutUs.adoc
CowSaysBaa Sep 29, 2019
f3728b9
Merge branch 'master' of https://github.com/AY1920S1-CS2103T-W13-1/main
CowSaysBaa Sep 30, 2019
4fbefd0
Renamed Person to Module
CowSaysBaa Oct 8, 2019
6d54a93
Removed all unnecessary classes, created stub for AddCommand
CowSaysBaa Oct 8, 2019
0a64598
renamed some classes with person to modules
CowSaysBaa Oct 8, 2019
c7a7aae
Fixed checkstyle
CowSaysBaa Oct 8, 2019
97f6e74
Merge branch 'master' of https://github.com/AY1920S1-CS2103T-W13-1/main
CowSaysBaa Oct 9, 2019
5c86884
Merge branch 'skeleton-branch' of https://github.com/CowSaysBaa/main
CowSaysBaa Oct 9, 2019
bdebe4c
Remove tutorial.
CowSaysBaa Oct 9, 2019
1da41ee
Merge branch 'skeleton-branch' of https://github.com/CowSaysBaa/main …
CowSaysBaa Oct 9, 2019
0350c01
deleted tutorials
CowSaysBaa Oct 9, 2019
ec938e2
Resolved issues with naming and spacing
CowSaysBaa Oct 9, 2019
f77457f
Resolved whitespacing issue in JsonUtil.java
CowSaysBaa Oct 9, 2019
396df32
Rename address/person -> module
geshuming Oct 9, 2019
69b41a3
Rename main package address -> module
geshuming Oct 9, 2019
6533541
Update build.gradle
geshuming Oct 9, 2019
7b404b3
Rename test package address -> module
geshuming Oct 9, 2019
2142002
Overhaul test package for migration to ModuleBook
geshuming Oct 9, 2019
3a35df1
Modify help window constants
geshuming Oct 9, 2019
86a8e2e
Fix failing checkstyle issues
geshuming Oct 9, 2019
b2baba8
Rename address -> module in LogsCenter
geshuming Oct 9, 2019
f432e04
Remove setModule
geshuming Oct 9, 2019
fe898c4
Modify Module's identity fields
geshuming Oct 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {
}

// Specifies the entry point of the application
mainClassName = 'seedu.address.Main'
mainClassName = 'seedu.module.Main'

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand Down Expand Up @@ -67,7 +67,7 @@ dependencies {
}

shadowJar {
archiveName = 'addressbook.jar'
archiveName = 'modulebook.jar'

destinationDir = file("${buildDir}/jar/")
}
Expand Down Expand Up @@ -133,8 +133,8 @@ asciidoctor {
idprefix: '', // for compatibility with GitHub preview
idseparator: '-',
'site-root': "${sourceDir}", // must be the same as sourceDir, do not modify
'site-name': 'AddressBook-Level3',
'site-githuburl': 'https://github.com/se-edu/addressbook-level3',
'site-name': 'ModuleBook',
'site-githuburl': 'https://github.com/AY1920S1-CS2103T-W13-1/main',
'site-seedu': true, // delete this line if your project is not a fork (not a SE-EDU project)
]

Expand Down
1 change: 1 addition & 0 deletions docs/AboutUs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:imagesDir: images
:stylesDir: stylesheets


ModuleBook was developed by the https://ay1920s1-cs2103t-w13-1.github.io/main/[CS2103T-W13] team. +
We are a team based in the http://www.comp.nus.edu.sg[School of Computing, National University of Singapore].

Expand Down
18 changes: 9 additions & 9 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]

. `Logic` uses the `AddressBookParser` class to parse the user command.
. This results in a `Command` object which is executed by the `LogicManager`.
. The command execution can affect the `Model` (e.g. adding a person).
. The command execution can affect the `Model` (e.g. adding a module).
. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.
. In addition, the `CommandResult` object can also instruct the `Ui` to perform certain actions, such as displaying help to the user.

Expand Down Expand Up @@ -173,18 +173,18 @@ Step 1. The user launches the application for the first time. The `VersionedAddr

image::UndoRedoState0.png[]

Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state.
Step 2. The user executes `delete 5` command to delete the 5th module in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state.

image::UndoRedoState1.png[]

Step 3. The user executes `add n/David ...` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`.
Step 3. The user executes `add n/David ...` to add a new module. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`.

image::UndoRedoState2.png[]

[NOTE]
If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`.

Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state.
Step 4. The user now decides that adding the module was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state.

image::UndoRedoState3.png[]

Expand Down Expand Up @@ -222,7 +222,7 @@ image::CommitActivityDiagram.png[]
** Pros: Easy to implement.
** Cons: May have performance issues in terms of memory usage.
* **Alternative 2:** Individual command knows how to undo/redo by itself.
** Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).
** Pros: Will use less memory (e.g. for `delete`, just save the module being deleted).
** Cons: We must ensure that the implementation of each individual command are correct.

===== Aspect: Data structure to support the undo/redo commands
Expand Down Expand Up @@ -451,15 +451,15 @@ These instructions only provide a starting point for testers to work on; testers

_{ more test cases ... }_

=== Deleting a person
=== Deleting a module

. Deleting a person while all persons are listed
. Deleting a module while all modules are listed

.. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
.. Prerequisites: List all modules using the `list` command. Multiple modules in the list.
.. Test case: `delete 1` +
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
.. Test case: `delete 0` +
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
Expected: No module is deleted. Error details shown in the status message. Status bar remains the same.
.. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) _{give more}_ +
Expected: Similar to previous.

Expand Down
4 changes: 2 additions & 2 deletions docs/LearningOutcomes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ What other user stories do you think AddressBook should support? Add those user
=== Exercise: Add a 'Rename tag' use case

* Add a use case to the `DeveloperGuide.adoc` to cover the case of _renaming of an existing tag_.
e.g. rename the tag `friends` to `buddies` (i.e. all persons who had the `friends` tag will now have
e.g. rename the tag `friends` to `buddies` (i.e. all modules who had the `friends` tag will now have
a `buddies` tag instead)
Assume that AddressBook confirms the change with the user before carrying out the operation.

Expand Down Expand Up @@ -108,7 +108,7 @@ image::PrintableInterface.png[width=400]
String getPrintableString(Printable... printables) {
----
+
The above method can be used to get a printable string representing a bunch of person details.
The above method can be used to get a printable string representing a bunch of module details.
For example, you should be able to call that method like this:
+
[source,java]
Expand Down
20 changes: 9 additions & 11 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Format: `add MODULE_CODE`
[TIP]
Modules are imported from Nusmods database


Examples:

* `add cs2103t`
Expand All @@ -89,29 +90,27 @@ Format: `list`
////
=== Editing a person : `edit`

Edits an existing person in the address book. +
Edits an existing module in the address book. +
Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]...`

****
* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index *must be a positive integer* 1, 2, 3, ...
* Edits the module at the specified `INDEX`. The index refers to the index number shown in the displayed module list. The index *must be a positive integer* 1, 2, 3, ...
* At least one of the optional fields must be provided.
* Existing values will be updated to the input values.
* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative.
* You can remove all the person's tags by typing `t/` without specifying any tags after it.
* When editing tags, the existing tags of the module will be removed i.e adding of tags is not cumulative.
* You can remove all the module's tags by typing `t/` without specifying any tags after it.
****

Examples:

* `edit 1 p/91234567 e/johndoe@example.com` +
Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.
Edits the phone number and email address of the 1st module to be `91234567` and `johndoe@example.com` respectively.
* `edit 2 n/Betsy Crower t/` +
Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.
////
Edits the name of the 2nd module to be `Betsy Crower` and clears all existing tags.

=== Locating modules by name: `find`

=== Locating a module: `find`

Displays all modules that match the given keywords. +
Finds modules whose names contain any of the given keywords. +
Format: `find KEYWORD [MORE_KEYWORDS]`

****
Expand Down Expand Up @@ -150,7 +149,6 @@ Examples:
Deletes the 1st person in the results of the `find` command.
////


// end::delete[]

////
Expand Down
117 changes: 0 additions & 117 deletions docs/tutorials/RemovingFields.adoc

This file was deleted.