Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
264 commits
Select commit Hold shift + click to select a range
d154cc5
level-02
noellimx Sep 6, 2021
d692440
level-02
noellimx Sep 6, 2021
545a308
level-02
noellimx Sep 6, 2021
43d81ed
level-02
noellimx Sep 6, 2021
71163fd
level-02
noellimx Sep 6, 2021
5c8a1b6
level-02
noellimx Sep 7, 2021
d3a7283
level-03
noellimx Sep 7, 2021
188d0fa
level-03
noellimx Sep 7, 2021
6741444
level-03
noellimx Sep 7, 2021
f916ae3
level-03
noellimx Sep 7, 2021
6be27be
level-03
noellimx Sep 7, 2021
0b8bfcd
level-04
noellimx Sep 7, 2021
c42fe4a
level-04
noellimx Sep 7, 2021
baf09eb
level-04
noellimx Sep 7, 2021
8b9b7fd
level-04
noellimx Sep 7, 2021
eb62de9
level-04
noellimx Sep 7, 2021
d124fea
level-04
noellimx Sep 7, 2021
dff796d
level-04
noellimx Sep 7, 2021
4b52908
level-04
noellimx Sep 7, 2021
b1bbab8
level-04
noellimx Sep 7, 2021
a08d6b4
fix
noellimx Sep 7, 2021
526aa62
level-04
noellimx Sep 7, 2021
789483b
add changelog
noellimx Sep 7, 2021
7fec9e9
-
noellimx Sep 21, 2021
2eef837
merge dev config and docs
noellimx Sep 21, 2021
0c87a3e
change test dir and test dependencies
noellimx Sep 21, 2021
f37df70
remove duke.coronet package
noellimx Sep 21, 2021
2b4306d
duke.coronet.dukeUtility -> duke.dukeUtility
noellimx Sep 21, 2021
80a4d37
duke.coronet.command -> duke.command
noellimx Sep 21, 2021
87227e7
test
noellimx Sep 21, 2021
e82790b
update docs
noellimx Sep 21, 2021
435fd3d
Merge pull request #6 from noellimx/branch-level-1
noellimx Sep 21, 2021
ca4e3f6
refactor with core test functionality maintained.
noellimx Sep 21, 2021
e5d8861
-
noellimx Sep 22, 2021
a77772a
- from ca4e3f672115dc64884656395279c372b9a04e52 as merge removed files
noellimx Sep 22, 2021
8fd65c5
Merge pull request #7 from noellimx/branch-level-2
noellimx Sep 22, 2021
be7afff
- merge with old branch-level-3
noellimx Sep 22, 2021
b9f2228
- add changelog
noellimx Sep 22, 2021
6a89a57
- add test
noellimx Sep 22, 2021
2627c46
- comply to test
noellimx Sep 22, 2021
9bd44b0
- update readme and todo
noellimx Sep 22, 2021
66a7cbd
- update package level test
noellimx Sep 22, 2021
15a23ac
- merge config, structure and docs from master
noellimx Sep 22, 2021
0a7d3ad
- refactor test
noellimx Sep 22, 2021
b210b64
remove whitespace
noellimx Sep 22, 2021
a96f5ad
rename test
noellimx Sep 22, 2021
bcd860b
- test for adding event
noellimx Sep 22, 2021
555332c
- test
noellimx Sep 22, 2021
d1d63d4
- fix test environment (maven requires surefire plugin for junit 5)
noellimx Sep 22, 2021
c81623f
- fix package-level test
noellimx Sep 22, 2021
3272e64
Merge pull request #8 from noellimx/branch-level-4
noellimx Sep 22, 2021
17d07f9
Task 5
noellimx Oct 8, 2021
79da7ec
Merge pull request #9 from noellimx/lvl-5
noellimx Oct 8, 2021
3e99b16
add todo list
noellimx Oct 8, 2021
e98bf98
- add support for delete command
noellimx Oct 8, 2021
bed2efe
- add test
noellimx Oct 8, 2021
25f8a5b
- add test
noellimx Oct 8, 2021
31deef9
add gif
noellimx Oct 8, 2021
78bf955
fix typo
noellimx Oct 8, 2021
81f3073
Merge pull request #10 from noellimx/lvl-6
noellimx Oct 8, 2021
1a6e7f2
- readme: update and fix
noellimx Oct 8, 2021
2848e1f
- add support for export
noellimx Oct 8, 2021
dd97ea6
- add test for export
noellimx Oct 8, 2021
4a5d7a1
- add support for import
noellimx Oct 9, 2021
3055006
- add text commands for import
noellimx Oct 9, 2021
27197d6
- add tests for import
noellimx Oct 9, 2021
d77235f
- fix tests to inject FileResourceManager object. FileResourceManager…
noellimx Oct 9, 2021
4edf1c8
fix test
noellimx Oct 9, 2021
d51ced6
show more verbose error
noellimx Oct 9, 2021
f11609f
- fix test with linux environment.
noellimx Oct 9, 2021
24d2966
- fix test with linux environment.
noellimx Oct 9, 2021
4d0c963
a
noellimx Oct 9, 2021
632b015
-
noellimx Oct 9, 2021
a3e0096
-
noellimx Oct 9, 2021
f7d2d9d
-
noellimx Oct 9, 2021
37edb43
-
noellimx Oct 9, 2021
6fdce42
- fix test with linux environment.
noellimx Oct 9, 2021
1cc341b
- fix test with environment.
noellimx Oct 9, 2021
7545740
- fix test with environment.
noellimx Oct 9, 2021
cd13f85
- fix test with environment.
noellimx Oct 9, 2021
c848431
- fix test with environment.
noellimx Oct 9, 2021
8bacf8d
Merge pull request #11 from noellimx/lvl-7
noellimx Oct 9, 2021
571e472
add readme
noellimx Oct 21, 2021
864a7b0
update changelog
noellimx Oct 21, 2021
e11bf61
- create tests
noellimx Oct 21, 2021
b3e7ca8
change Event._from to DateTime
noellimx Oct 21, 2021
0838ea5
change Event._to to type DateTime
noellimx Oct 21, 2021
08fa65f
change deadline.by to type DateTime
noellimx Oct 21, 2021
926278a
Merge pull request #12 from noellimx/lvl-8
noellimx Oct 21, 2021
8951a47
update readme
noellimx Oct 21, 2021
7f7cf8e
TaskManager - add feature to find tasks with keyword in description
noellimx Oct 21, 2021
416c075
add test
noellimx Oct 22, 2021
2fba906
pass test level 9
noellimx Oct 22, 2021
bedfb33
Merge pull request #14 from noellimx/lvl-9
noellimx Oct 22, 2021
66d0895
rename Test
noellimx Oct 22, 2021
74b0434
refactor
noellimx Oct 22, 2021
cd6ed18
refactor
noellimx Oct 22, 2021
0561f47
refactor export test
noellimx Oct 22, 2021
6c23f3a
refactor export test
noellimx Oct 22, 2021
5d646b7
Refactor test - decouple expected output from main code.
noellimx Oct 22, 2021
7f3ab11
Refactor test - decouple expected output from main code.
noellimx Oct 22, 2021
83be785
Refactor test - use helper
noellimx Oct 22, 2021
c05ab38
Refactor UiCommandFactory from abstract to normal class.
noellimx Oct 22, 2021
8574fcd
Refactor improve output helpers
noellimx Oct 22, 2021
173cb08
Refactor improve output helpers
noellimx Oct 22, 2021
90cd949
Refactor reorganise test cases
noellimx Oct 22, 2021
fe90769
Refactor reorganise test cases
noellimx Oct 22, 2021
86fff88
add checkstyle
noellimx Oct 22, 2021
2c349c3
conform to checkstyle
noellimx Oct 22, 2021
5f9fb64
partial refactor to comply checkstyle
noellimx Oct 22, 2021
523e5df
change object method parameter name to avoid conflict with object field
noellimx Oct 22, 2021
bc90ec5
checkstyle Compliance - imports ordering
noellimx Oct 22, 2021
57bc27d
checkstyle Compliance - CommandAddNewDeadline - imports ordering, lin…
noellimx Oct 22, 2021
bd589c3
checkstyle Compliance - package naming
noellimx Oct 22, 2021
bfb0b3e
checkstyle Compliance - imports ordering
noellimx Oct 22, 2021
1ad04e1
checkstyle Compliance - CommandAddNewToDo - imports ordering, javadoc
noellimx Oct 22, 2021
2011b1c
checkstyle Compliance - CommandDeleteTask - imports ordering, javadoc
noellimx Oct 22, 2021
250a50d
checkstyle Compliance
noellimx Oct 22, 2021
4f7dbd4
checkstyle Compliance
noellimx Oct 22, 2021
1087ec6
checkstyle Compliance
noellimx Oct 22, 2021
92b6f3d
checkstyle Compliance
noellimx Oct 22, 2021
3bf5840
checkstyle Compliance
noellimx Oct 22, 2021
31f512c
checkstyle Compliance
noellimx Oct 22, 2021
f15f845
checkstyle Compliance
noellimx Oct 22, 2021
4174737
checkstyle Compliance
noellimx Oct 22, 2021
6780a3c
checkstyle Compliance
noellimx Oct 22, 2021
efece8d
checkstyle Compliance
noellimx Oct 22, 2021
4e9adf5
checkstyle Compliance
noellimx Oct 22, 2021
0a4d0e5
checkstyle Compliance
noellimx Oct 22, 2021
a90a628
checkstyle Compliance
noellimx Oct 22, 2021
2a030a4
checkstyle Compliance
noellimx Oct 22, 2021
14f5d10
checkstyle Compliance
noellimx Oct 22, 2021
7b6e8c4
checkstyle Compliance
noellimx Oct 22, 2021
c96ed16
checkstyle Compliance
noellimx Oct 23, 2021
5fd0a4b
checkstyle Compliance
noellimx Oct 23, 2021
3fbbcde
refactor CommandExportTasksToFile
noellimx Oct 23, 2021
9547123
Change output response of a successful save to show saved file path.
noellimx Oct 23, 2021
0123e65
use helper
noellimx Oct 23, 2021
6a1e0fe
Merge pull request #15 from noellimx/cleanup
noellimx Oct 23, 2021
d0cc6db
use helper
noellimx Oct 23, 2021
397920f
Merge pull request #17 from noellimx/cleanup
noellimx Oct 23, 2021
d37561f
Show task id on todo and deadline creation
noellimx Oct 23, 2021
911fd3f
Show task id on event creation
noellimx Oct 23, 2021
930b8f1
- Display task id on event creation
noellimx Oct 23, 2021
b04c85f
- text command syntax errors handled as commands instead of exceptions
noellimx Oct 23, 2021
07c2404
- change list header column id
noellimx Oct 23, 2021
849c820
fix environment test
noellimx Oct 23, 2021
97fd382
Merge pull request #18 from noellimx/task-no-on-add
noellimx Oct 23, 2021
5ca8c65
- add test for toggle done status
noellimx Oct 23, 2021
0b9292a
- add feature to unmark task
noellimx Oct 23, 2021
fc78863
Merge pull request #19 from noellimx/feature-undone
noellimx Oct 23, 2021
c79bdf8
- update changelog
noellimx Oct 23, 2021
80d9522
- text command date format errors handled as commands instead of exce…
noellimx Oct 23, 2021
536e77d
- update readme
noellimx Oct 23, 2021
ead2f67
Feature - Projection for next 30 days
noellimx Oct 23, 2021
63c0f13
Feature - Projection for next 30 days
noellimx Oct 23, 2021
6f31b96
update todo
noellimx Oct 23, 2021
8ae3c01
Feature - Projection for next number of days
noellimx Oct 23, 2021
abc8138
Merge pull request #20 from noellimx/feature-projection
noellimx Oct 23, 2021
a1e7e29
Update Feature - Find keyword in description
noellimx Oct 23, 2021
f09feff
update readme
noellimx Oct 26, 2021
7efe907
create failing test
noellimx Oct 27, 2021
5959277
refactor - group tests into unit / integration
noellimx Oct 27, 2021
a774952
Feature - Statistics
noellimx Oct 27, 2021
ba3fcac
Feature - Statistics
noellimx Oct 27, 2021
8450cb2
Feature - Statistics
noellimx Oct 27, 2021
4fe0b35
Merge pull request #23 from noellimx/feature-stats
noellimx Oct 27, 2021
66790e7
Refactor
noellimx Oct 27, 2021
344f838
Refactor
noellimx Oct 27, 2021
457d267
Refactor
noellimx Oct 27, 2021
6218c5a
Fix test
noellimx Oct 27, 2021
37a51c1
Refactor
noellimx Oct 27, 2021
12b2cea
Feature - Scan
noellimx Oct 28, 2021
5802213
Feature - Scan
noellimx Oct 28, 2021
62aae41
Feature - Scan
noellimx Oct 28, 2021
705908a
set method as private
noellimx Oct 28, 2021
6dea1dd
update readme
noellimx Oct 28, 2021
d74b900
Merge pull request #25 from noellimx/scan
noellimx Oct 28, 2021
f69d723
Merge pull request #24 from noellimx/development
noellimx Oct 28, 2021
dfd5e49
change jar to NoelLim.jar
noellimx Oct 29, 2021
471dbf4
Change build path to NoelLim
noellimx Nov 1, 2021
5277d65
Change variable name
noellimx Nov 1, 2021
bb5af2d
Change class name
noellimx Nov 1, 2021
49b7529
update readme
noellimx Nov 1, 2021
5d2aabe
rearrange conditions
noellimx Nov 1, 2021
4630161
add a subclass CommandError
noellimx Nov 1, 2021
bc950d7
use argument 1 for error commands
noellimx Nov 1, 2021
3c80694
Refactor - Commands
noellimx Nov 1, 2021
1e3bacf
update .gitignore
noellimx Nov 1, 2021
a4c456f
Refactor - duplicate code
noellimx Nov 1, 2021
30e45b9
Refactor - Ui to call getResponse() from commands for output.
noellimx Nov 1, 2021
b0a907c
Refactor - rename output2 -> output
noellimx Nov 1, 2021
e68333c
remove unused class CommandError
noellimx Nov 1, 2021
424e1be
scan:duplicates - Change command output
noellimx Nov 3, 2021
7ff5eed
change prompt "stats all" to "stats:all"
noellimx Nov 3, 2021
6b0ff07
clean build dir first
noellimx Nov 3, 2021
1bd9d56
Run formatter
noellimx Nov 3, 2021
fac0e83
Refactor - TaskManager and TaskList
noellimx Nov 5, 2021
511f879
Refactor - remove Task::descContainsKeyword()
noellimx Nov 5, 2021
bc76dad
add docs
noellimx Nov 5, 2021
e4a3299
rearrange
noellimx Nov 5, 2021
1fc33ea
Refactor
noellimx Nov 5, 2021
0195858
Refactor
noellimx Nov 5, 2021
faa84a3
Refactor
noellimx Nov 5, 2021
4ccdf9f
Refactor
noellimx Nov 5, 2021
655d9c1
Refactor
noellimx Nov 5, 2021
eea402a
Refactor
noellimx Nov 5, 2021
6c0a777
Refactor
noellimx Nov 5, 2021
2f64448
Refactor
noellimx Nov 5, 2021
eb856b4
Refactor
noellimx Nov 5, 2021
ac48d3a
Refactor
noellimx Nov 5, 2021
44dfa92
Fix - ExportCommandFactory should be in commandfactory package
noellimx Nov 5, 2021
6a06bd3
Refactor - FileResourceManager::executeCommandSave
noellimx Nov 5, 2021
508aa61
Refactor
noellimx Nov 5, 2021
2f41560
Refactor
noellimx Nov 5, 2021
ab04ec5
formatting
noellimx Nov 5, 2021
6bfbe6a
Refactor
noellimx Nov 5, 2021
9eef817
Refactor
noellimx Nov 5, 2021
3002b08
javadoc
noellimx Nov 6, 2021
b5fa945
javadoc
noellimx Nov 6, 2021
39614c6
Refactor
noellimx Nov 6, 2021
a1411f4
javadoc
noellimx Nov 6, 2021
efd0b2c
javadoc
noellimx Nov 6, 2021
7539320
add assertions
noellimx Nov 6, 2021
a5675da
Remove constant from method parameter
noellimx Nov 6, 2021
102a4b8
Privatise object level helper method
noellimx Nov 6, 2021
8fec1d1
Rename
noellimx Nov 6, 2021
3852a4b
Merge pull request #27 from noellimx/development
noellimx Nov 6, 2021
59c3e52
Changelog - Finalize command list.
noellimx Nov 6, 2021
cc2b1f3
Docs - update readme and combine with CHANGELOG.md
noellimx Nov 6, 2021
b0471e3
readme formatting
noellimx Nov 6, 2021
39297af
change logo
noellimx Nov 6, 2021
8f854c2
readme format
noellimx Nov 6, 2021
9e909a8
readme format
noellimx Nov 6, 2021
209323c
readme format
noellimx Nov 6, 2021
1ff5a1c
Docs - javadoc
noellimx Nov 6, 2021
3dba270
typo
noellimx Nov 6, 2021
467cabc
Test
noellimx Nov 6, 2021
72abb91
Merge pull request #28 from noellimx/Documentation
noellimx Nov 6, 2021
497a01a
Reconfigure Build
noellimx Nov 6, 2021
0488c0e
Merge pull request #29 from noellimx/packaging
noellimx Nov 7, 2021
aa6eb4d
Rename Test
noellimx Nov 7, 2021
684fb9d
Add feature - See
noellimx Nov 7, 2021
7357c89
Run formatting
noellimx Nov 7, 2021
a85a0d0
Renaming
noellimx Nov 7, 2021
9c21b8c
Add feature - projection filter by incomplete status
noellimx Nov 7, 2021
4ee2e50
Refactor - use lambda for custom callback filter in task selections
noellimx Nov 7, 2021
144af5e
update docs
noellimx Nov 7, 2021
265bfb0
readme - crlf
noellimx Nov 7, 2021
aa73338
javadocs - line breaks between import package statements
noellimx Nov 7, 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
22 changes: 22 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: GitHub Actions Demo
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- name: Environment
run: |
echo "Event - ${{ github.event_name }}"
echo "Runner ${{ runner.os }}"
echo "The name of your branch - ${{ github.repository }}/${{ github.ref }}"
- name: checkout
uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Run deployment test using maven
run: .github/workflows/run-deployment-test.sh
- name: After run status
run: echo "🍏 This job's status is ${{ job.status }}."
42 changes: 42 additions & 0 deletions .github/workflows/run-deployment-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh

# clean build dir
rm -rf target


curl -sL https://www-eu.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip -o maven.zip
sudo apt-get update
sudo apt-get -y install unzip
unzip -d /usr/share maven.zip
rm maven.zip

mvnlnk=/usr/bin/mvn
if [ ! -L $(mvnlnk) ]; then
sudo rm $(mvnlnk)
fi

sudo ln -s /usr/share/apache-maven-3.6.3/bin/mvn /usr/bin/mvn
echo "M2_HOME=/usr/share/apache-maven-3.6.3" | sudo tee -a /etc/environment

# source code test
mvn clean
mvn install
mvn compile
mvn test

# package into jar
mvn package
# test jar output
java -jar NoelLim/Duke.jar < ./src/test/resources/linux-test/input.txt > ./src/test/resources/linux-test/actual.txt

cmp --print-chars ./src/test/resources/linux-test/actual.txt ./src/test/resources/linux-test/expected.txt
if [ $? -eq 0 ]
then
echo "Test result: PASSED"
exit 0
else
cat ./src/test/resources/linux-test/actual.txt
cat ./src/test/resources/linux-test/expected.txt
echo "Test result: FAILED"
exit 1
fi
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,29 @@
/.idea/
/out/
/*.iml
/lib

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

# Maven build files
/NoelLim
/target

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

# Generated files
/src/main/resources/*
!/src/main/resources/data/*

# Test
/text-ui-test/ACTUAL.txt
text-ui-test/EXPECTED-UNIX.TXT
/src/test/resources/generated/*
/src/test/resources/test-output/actual.txt
/src/test/resources/linux-test
85 changes: 61 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,61 @@
# Duke project template

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.

## Setting up in Intellij

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/logo.png)

# Duke
A cli-chatbot task manager.

# Requirements

For production you will need JDK 11 support and maven for build. Source code is tested on Linux/Catalina.

# Run

Clone the repo.

## Test

### With Local Github Action
```act``` test

### With Maven

```mvn test```

### Build

In root of repository,

```mvn package``` package \
```./NoelLim/Duke.jar``` generated jar is single executable fatty \
```java -jar ./NoelLim/Duke.jar``` run jar

# Command List

`[*]` - unknown command

`todo [description]` add ToDo \
`deadline [description] /by [date:dateOption]` add Deadline \
`event [description] /at [from:dateOption]-[to:dateOption]` add Event

- dateOption formats
- Input year, month and day : "20201231"
- Input year, month, day, hour, minutes : "20201231 23:59"

`delete [id]` delete task by id \
`done [id]` set task as done \
`undone [id]` set task as not done

`see [id]` see task

`list` list tasks \
`find [keyword]` query tasks with keyword in description

`stats:all` summary of tasks

`projection [days]` projection for next days \
`projection:yet [days]` projection for next days (only show incomplete tasks)

`scan:duplicates` check for tasks with same description

`bye` exit input loop \
`save` save tasks to file

Loading