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

[Cloud7050] iP #532

Open
wants to merge 123 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
28ad2b8
Add Gradle support
May 24, 2020
ed6d4d2
Bump gradle and lib version
Eclipse-Dominator Aug 5, 2023
e8b3258
chore(gitignore): Trim gitignore
Cloud7050 Aug 31, 2023
cc7b41d
chore(md): Delete CONTRIBUTORS.md
Cloud7050 Aug 31, 2023
fb5add2
feat(): Rename Duke to Cloud
Cloud7050 Aug 31, 2023
0b33360
feat(Cloud): Change default text to greeting/farewell
Cloud7050 Aug 31, 2023
1d9a846
feat(Cloud): Command handler, docs, bye command, echo unknown commands
Cloud7050 Aug 31, 2023
304ec50
feat(Cloud): Commands to add TODOs, list TODOs
Cloud7050 Aug 31, 2023
2b43d5a
feat(): Trim private docs, create Todo class
Cloud7050 Aug 31, 2023
a76b0db
feat(Cloud): Extract first word, handle empty, display isDone
Cloud7050 Aug 31, 2023
1a28c69
ref(Todo): Rename done to complete
Cloud7050 Aug 31, 2023
6881b0d
feat(Cloud): Mark/unmark with error handling, trim comments
Cloud7050 Aug 31, 2023
f8ea187
feat(Cloud): Simplify error checking, change todo display
Cloud7050 Aug 31, 2023
dbc3b33
feat(todo): Move to todo package, simplify, create Deadline/Event
Cloud7050 Aug 31, 2023
9be3d20
style(): Fix accidental tabs, update VSCode settings for repo
Cloud7050 Aug 31, 2023
774a366
devfeat(Token): Create initial token handler
Cloud7050 Aug 31, 2023
21d63d0
ref(): Handle commands mostly as tokens
Cloud7050 Aug 31, 2023
0f15682
ref(): TokenManager, trim setters
Cloud7050 Aug 31, 2023
eddd8a2
devfeat(): Add type strings, Todo toString
Cloud7050 Aug 31, 2023
4fe1224
fix(TokenManager): Fix infinite removeTokens()
Cloud7050 Aug 31, 2023
e2b528a
ref(TokenManager): Store sub input without flag
Cloud7050 Aug 31, 2023
35067fb
feat(todo): Different Todo string representations
Cloud7050 Aug 31, 2023
b88606a
feat(Cloud): Create different Todos based on flags!
Cloud7050 Aug 31, 2023
4f1f3f6
chore(tests): Remove shell test script
Cloud7050 Sep 3, 2023
5610437
feat(src): Handle EOF, move packages
Cloud7050 Sep 3, 2023
811a80c
chore(gitignore): Trim, edit for tests
Cloud7050 Sep 3, 2023
e945188
devfeat(tests): Update for semi-auto test
Cloud7050 Sep 3, 2023
ca81c37
ref(todo): Improve toString()
Cloud7050 Sep 3, 2023
373f286
feat(src): Require command to add TODOs
Cloud7050 Sep 3, 2023
0e01257
devfeat(tests): Update inputs/outputs
Cloud7050 Sep 3, 2023
becf338
fix(): Use new MissingInputException, fix empty split() corner case
Cloud7050 Sep 3, 2023
541f6bc
ref(src): Use new @Nullable
Cloud7050 Sep 3, 2023
9a7cdee
feat(): TokenManager child classes, empty sub input exception
Cloud7050 Sep 3, 2023
59bb19f
feat(): Intelligent space handling!
Cloud7050 Sep 3, 2023
e161bc5
feat(): Add deletion, fix boundary error
Cloud7050 Sep 3, 2023
abb83ad
ref(src): Add CommandType enum!
Cloud7050 Sep 3, 2023
ed9c0c6
ref(src): Remove redundant default constructors
Cloud7050 Sep 7, 2023
bc86d2e
docs(src): Add missing public constructor docs
Cloud7050 Sep 7, 2023
c6eed14
chore(src): Restore src/main/java/ structure
Cloud7050 Sep 7, 2023
8d26682
ref(src): TodoManager to prepare for file storage
Cloud7050 Sep 11, 2023
69f990f
ref(): Rename TODO to Item, add Item parent class
Cloud7050 Sep 11, 2023
e7c1de2
fix(test): Fix new src path in test's javac
Cloud7050 Sep 11, 2023
badd237
ref(src): Rename task to item in package
Cloud7050 Sep 11, 2023
f2e99fb
chore(lib): Add org.json
Cloud7050 Sep 11, 2023
3818dd7
devfeat(src): Add export() item to JSON
Cloud7050 Sep 11, 2023
5681260
feat(src): Save to file with every item change
Cloud7050 Sep 11, 2023
b7153f7
feat(): Create directory if not exists. Gitignore
Cloud7050 Sep 11, 2023
8308678
docs(FileManager): JavaDoc
Cloud7050 Sep 11, 2023
c90a50a
feat(src): Read from file if exists
Cloud7050 Sep 11, 2023
bde28cb
fix(test): Update for lib & data folder
Cloud7050 Sep 11, 2023
09b9691
ref(src): Enums for ItemType, JSON Key
Cloud7050 Sep 11, 2023
07914d4
Merge branch 'branch-Level-7'
Cloud7050 Sep 11, 2023
996216e
FEAT(src): Handle real timestamps
Cloud7050 Sep 11, 2023
3befadd
feat(tests): Update tests for new timestamps
Cloud7050 Sep 11, 2023
a0fdfd2
Merge branch 'branch-Level-8'
Cloud7050 Sep 11, 2023
3349793
ref(src): Extract Ui class
Cloud7050 Sep 11, 2023
910bca7
ref(src): Extract Handler class
Cloud7050 Sep 11, 2023
4d16a80
ref(src): Singular package names
Cloud7050 Sep 11, 2023
8a692b5
ref(src): Split into Commands
Cloud7050 Sep 11, 2023
3a3d1d2
Merge branch 'add-gradle-support' of https://github.com/Cloud7050/ip
Cloud7050 Sep 12, 2023
d0d2b64
style(test): Cosmetic capitalisation
Cloud7050 Sep 12, 2023
1f39294
chore(gradle): Remove unix script
Cloud7050 Sep 12, 2023
6b463ae
chore(gitignore): Ignore .gradle/
Cloud7050 Sep 12, 2023
5df2d8e
devfeat(): Set up working gradle
Cloud7050 Sep 13, 2023
735bfd5
devfeat(test): Set up runnable dummy tests
Cloud7050 Sep 14, 2023
0baff58
devfeat(test): Add real tests
Cloud7050 Sep 14, 2023
8e5e69d
chore(gradle): Tweaks for jar
Cloud7050 Sep 14, 2023
929e65c
docs(src): Docs tweaks in root src dir
Cloud7050 Sep 14, 2023
c9fddc3
docs(FileStorage): Tweak docs
Cloud7050 Sep 14, 2023
1013ed1
feat(src): FindCommand
Cloud7050 Sep 14, 2023
6a981f3
devfeat(test): Update & fix overall test script
Cloud7050 Sep 14, 2023
e3b0f11
feat(FindCommand): No match message contains query
Cloud7050 Sep 14, 2023
d11ff49
Merge branch 'branch-A-JavaDoc'
Cloud7050 Sep 14, 2023
0712206
Merge branch 'branch-A-CodingStandard'
Cloud7050 Sep 14, 2023
dd837a3
Merge branch 'branch-Level-9'
Cloud7050 Sep 14, 2023
95daf36
devfeat(): Add initial checkstyle
Cloud7050 Sep 20, 2023
0b5a85f
chore(checkstyle): Tweak config
Cloud7050 Sep 20, 2023
69c2957
chore(gitignore): Ignore bin/ from VSCode build
Cloud7050 Sep 20, 2023
cecdeec
style(src): Fix checkstyle issues
Cloud7050 Sep 20, 2023
d1ba67a
Merge branch 'branch-A-CheckStyle'
Cloud7050 Sep 20, 2023
d8bb3d8
chore(gradle): Add JavaFX
Cloud7050 Sep 21, 2023
b48a507
feat(src): Launch UI with label
Cloud7050 Sep 21, 2023
6f4c459
feat(Ui): Add initial nodes with neat styling
Cloud7050 Sep 21, 2023
b5eaec2
deat(Ui): Initial event handlers
Cloud7050 Sep 21, 2023
1cd0649
chore(checkstyle): Allow lambda on nested newline
Cloud7050 Sep 21, 2023
8a65ca9
feat(): Directional message rows with images
Cloud7050 Sep 21, 2023
4cebf4f
feat(src): Add padding
Cloud7050 Sep 21, 2023
3e9daf6
style(checkstyle): Tweak formatting
Cloud7050 Sep 21, 2023
e50e606
ref(src): Rename to CloudApp
Cloud7050 Sep 21, 2023
3828a89
feat(view): Add template fxml with slight edits
Cloud7050 Sep 21, 2023
49cffd0
feat(fxml): Create new components
Cloud7050 Sep 21, 2023
e42feef
feat(fxml): Update views
Cloud7050 Sep 21, 2023
50ec32f
feat(): Run using FXML
Cloud7050 Sep 21, 2023
86355bf
fix(fxml): Fix events. Set lower API version
Cloud7050 Sep 21, 2023
54b73ea
fix(fxml): Fix alignment width bug
Cloud7050 Sep 21, 2023
fdb9b57
feat(src): Bring back isUser, not using flipping
Cloud7050 Sep 21, 2023
9a50a91
FEAT(): Hook real logic back up to UI
Cloud7050 Sep 21, 2023
9ec23bd
devfeat(checkstyle): Readd ParameterName but allow leading _
Cloud7050 Sep 21, 2023
5acbd95
Merge branch 'branch-Level-10'
Cloud7050 Sep 21, 2023
25d48ee
chore(): Scrap text-based tests
Cloud7050 Sep 21, 2023
baf4879
feat(): Use Java assertions
Cloud7050 Sep 21, 2023
70a2ccf
chore(gradle): Tidy config
Cloud7050 Sep 21, 2023
c00a210
Merge pull request #2 from Cloud7050/branch-A-Assertions
Cloud7050 Sep 21, 2023
0244d3e
Merge branch 'master' into branch-A-CodeQuality
Cloud7050 Sep 21, 2023
02b1845
Merge pull request #3 from Cloud7050/branch-A-CodeQuality
Cloud7050 Sep 21, 2023
4533db1
devfeat(github): Add action
Cloud7050 Sep 21, 2023
e2d717a
chore(gradle): Update gradlew and readd sh script
Cloud7050 Sep 21, 2023
8fd31e0
fix(gradle): Set executable bit of gradlew
Cloud7050 Sep 21, 2023
6dc36eb
devfeat(test): Support UTC tests
Cloud7050 Sep 21, 2023
b80e03f
chore(test): Remove unused import
Cloud7050 Sep 21, 2023
c75c6a4
fix(test): Fix timestamp for UTC variant
Cloud7050 Sep 21, 2023
d72feec
docs(): Add screenshot
Cloud7050 Sep 22, 2023
df6551d
docs(readme): Add image and UG link
Cloud7050 Sep 22, 2023
59c7896
docs(readme): Add alt link to GitHub Page
Cloud7050 Sep 22, 2023
8fdaaf9
docs(readme): Reorder paras due to tall image
Cloud7050 Sep 22, 2023
22e50cb
docs(readme): Add real user guide
Cloud7050 Sep 22, 2023
aae82a4
feat(src): Polish messages
Cloud7050 Sep 22, 2023
3a6835a
feat(fxml): Shrink profile pics
Cloud7050 Sep 22, 2023
749eba0
fix(fxml): Fix messages overflowing X
Cloud7050 Sep 22, 2023
e8ad23a
feat(): Change completion text to emoji
Cloud7050 Sep 22, 2023
2bb8116
Revert "feat(): Change completion text to emoji"
Cloud7050 Sep 22, 2023
af543d1
docs(): Update showcase image
Cloud7050 Sep 22, 2023
b64185d
docs(): Header capitalisation
Cloud7050 Sep 22, 2023
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
40 changes: 40 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Java CI

on: [push, pull_request]

jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}

steps:
-
name: Set up repository
uses: actions/checkout@master

-
name: Set up repository
uses: actions/checkout@master
with:
ref: master

-
name: Merge to master
run: git checkout --progress --force ${{ github.sha }}

-
name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

-
name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
java-package: jdk+fx

-
name: Build and check with Gradle
run: ./gradlew check
20 changes: 6 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# IDEA files
/.idea/
/out/
/*.iml
# Gradle
.gradle/
build/

# Gradle build files
/.gradle/
/build/
src/main/resources/docs/

# MacOS custom attributes files created by Finder
.DS_Store
*.iml
# VSCode
bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
# App
data/
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.tabSize": 4,
"java.checkstyle.configuration": "${workspaceFolder}\\config\\checkstyle\\checkstyle.xml",
"java.checkstyle.version": "10.2",
"java.checkstyle.properties": {
"config_loc": "${workspaceFolder}\\config\\checkstyle\\"
}
}
9 changes: 0 additions & 9 deletions CONTRIBUTORS.md

This file was deleted.

25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
# Duke project template
# The Cloud Chatbot

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 chatbot named **Cloud**. Its name has no relation to the actual cloud.

## Setting up in Intellij
Its user guide can be found [here](https://cloud7050.github.io/ip/) or [here](./docs/README.md).

Prerequisites: JDK 11, update Intellij to the most recent version.

1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first)
1. Open the project into Intellij as follows:
1. Click `Open`.
1. Select the project directory, and click `OK`.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 11** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
In the same dialog, set the **Project language level** field to the `SDK default` option.
3. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
```
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
![](./docs/Ui.png)
68 changes: 68 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
plugins {
id "application"
id "checkstyle"

id "com.github.johnrengelman.shadow" version "7.1.2"
}

repositories {
mavenCentral()
}

String versionJavaFx = "17.0.7";
String versionJUnit = "5.10.0";
dependencies {
implementation group: "org.openjfx", name: "javafx-base", version: versionJavaFx, classifier: "win"
implementation group: "org.openjfx", name: "javafx-base", version: versionJavaFx, classifier: "mac"
implementation group: "org.openjfx", name: "javafx-base", version: versionJavaFx, classifier: "linux"
implementation group: "org.openjfx", name: "javafx-controls", version: versionJavaFx, classifier: "win"
implementation group: "org.openjfx", name: "javafx-controls", version: versionJavaFx, classifier: "mac"
implementation group: "org.openjfx", name: "javafx-controls", version: versionJavaFx, classifier: "linux"
implementation group: "org.openjfx", name: "javafx-fxml", version: versionJavaFx, classifier: "win"
implementation group: "org.openjfx", name: "javafx-fxml", version: versionJavaFx, classifier: "mac"
implementation group: "org.openjfx", name: "javafx-fxml", version: versionJavaFx, classifier: "linux"
implementation group: "org.openjfx", name: "javafx-graphics", version: versionJavaFx, classifier: "win"
implementation group: "org.openjfx", name: "javafx-graphics", version: versionJavaFx, classifier: "mac"
implementation group: "org.openjfx", name: "javafx-graphics", version: versionJavaFx, classifier: "linux"

implementation group: "org.json", name: "json", version: "20230618"

testImplementation group: "org.junit.jupiter", name: "junit-jupiter-api", version: versionJUnit
testRuntimeOnly group: "org.junit.jupiter", name: "junit-jupiter-engine", version: versionJUnit
}



defaultTasks "clean", "build"

application {
mainClass = "com.cloud.chatbot.Cloud"
}

run {
enableAssertions true
}

test {
useJUnitPlatform()

// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.logging.TestLogging.html
testLogging {
events "passed", "skipped", "failed"

showExceptions true
showCauses true
showStackTraces true
exceptionFormat "full"
}
}

checkstyle {
toolVersion = "10.2"
}

shadowJar {
dependsOn "distZip", "distTar"

archiveFileName = "cloud.jar"
}
Loading