From ae6d3dd11c8f6c2c16ebc3941492047dd931195d Mon Sep 17 00:00:00 2001 From: radhikaraman20 <89432698+radhikaraman20@users.noreply.github.com> Date: Thu, 28 Oct 2021 20:12:49 -0400 Subject: [PATCH 001/205] Update open and closed issues badge --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 82770df3..a6214113 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ [![DOI](https://zenodo.org/badge/404911045.svg)](https://zenodo.org/badge/latestdoi/404911045) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -![GitHub issues](https://img.shields.io/github/issues-raw/ivbhatt/Simplii) -![Github closes issues](https://img.shields.io/github/issues-closed-raw/ivbhatt/Simplii) -![Github pull requests](https://img.shields.io/github/issues-pr/ivbhatt/Simplii) +![GitHub issues](https://img.shields.io/github/issues-raw/deekay2310/Simplii) +![Github closes issues](https://img.shields.io/github/issues-closed-raw/deekay2310/Simplii) +![Github pull requests](https://img.shields.io/github/issues-pr/deekay2310/Simplii) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Build Status](https://app.travis-ci.com/UnnatiPrema/Simplii.svg?branch=main)](https://app.travis-ci.com/UnnatiPrema/Simplii) ## Why schedule tasks on this app? From 5b7ee984b779e0edfca7f47cc2608a6e893e307c Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar <62984587+PrakruthiSomashekar@users.noreply.github.com> Date: Sun, 31 Oct 2021 15:34:02 -0400 Subject: [PATCH 002/205] Add code coverage badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 82770df3..a79bc180 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ ![Github pull requests](https://img.shields.io/github/issues-pr/ivbhatt/Simplii) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Build Status](https://app.travis-ci.com/UnnatiPrema/Simplii.svg?branch=main)](https://app.travis-ci.com/UnnatiPrema/Simplii) +[![codecov](https://codecov.io/gh/deekay2310/Simplii/branch/main/graph/badge.svg?token=9ZXVRIPHLO)](https://codecov.io/gh/deekay2310/Simplii) ## Why schedule tasks on this app? Do you feel that your basic task scheduling apps should also track your mood and suggest a task accordingly? We hear it. We are trying to build a tool that will enable fast execution of our tasks under any mood. `Simplii` parameterizes emotions, deadlines, task difficulty and moods to suggest a task to be done keeping you at your productive best. From b084c418955f984d6e2e85f4b137b88668f49f7a Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 16:18:25 -0400 Subject: [PATCH 003/205] Add workflow files --- .github/workflows/close_as_a_feature.yml | 14 +++++++++++ .github/workflows/code_cov.yml | 32 ++++++++++++++++++++++++ .github/workflows/code_formatter.yml | 29 +++++++++++++++++++++ .github/workflows/style_checker.yml | 7 ++++++ .github/workflows/unit_test.yml | 27 ++++++++++++++++++++ 5 files changed, 109 insertions(+) create mode 100644 .github/workflows/close_as_a_feature.yml create mode 100644 .github/workflows/code_cov.yml create mode 100644 .github/workflows/code_formatter.yml create mode 100644 .github/workflows/style_checker.yml create mode 100644 .github/workflows/unit_test.yml diff --git a/.github/workflows/close_as_a_feature.yml b/.github/workflows/close_as_a_feature.yml new file mode 100644 index 00000000..6eca22b3 --- /dev/null +++ b/.github/workflows/close_as_a_feature.yml @@ -0,0 +1,14 @@ +name: Close as a feature +on: + issues: + types: [labeled] + +jobs: + build: + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - name: Close Issue + uses: peter-evans/close-issue@v1 + if: contains(github.event.issue.labels.*.name, 'feature') \ No newline at end of file diff --git a/.github/workflows/code_cov.yml b/.github/workflows/code_cov.yml new file mode 100644 index 00000000..81ca188d --- /dev/null +++ b/.github/workflows/code_cov.yml @@ -0,0 +1,32 @@ +name: Running Code Coverage +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install Python 3.9.7 + uses: actions/setup-python@v1 + with: + python-version: 3.9.7 + - name: Install dependencies + run: | + pip install pytest-cov + pip install -r requirements.txt + echo requirements installed + - name: Run the tests + run: | + cd test + pytest --cov=./ + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: 18a8beea-4407-498f-8b15-990517519ac2 \ No newline at end of file diff --git a/.github/workflows/code_formatter.yml b/.github/workflows/code_formatter.yml new file mode 100644 index 00000000..08986fd5 --- /dev/null +++ b/.github/workflows/code_formatter.yml @@ -0,0 +1,29 @@ +name: Format +on: + pull_request: + branches: [main] + paths: + - '**.py' +jobs: + autoyapf: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + ref: ${{ github.head_ref }} + - name: autoyapf + id: autoyapf + uses: mritunjaysharma394/autoyapf@v2 + with: + args: --style pep8 --recursive --in-place . + - name: Check for modified files + id: git-check + run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) + - name: Push changes + if: steps.git-check.outputs.modified == 'true' + run: | + git config --global user.name 'PrakruthiSomashekar' + git config --global user.email 'prakruthi1796@gmail.com' + git remote set-url origin https://x-access-token:${{ secrets.GIT_TOKEN }}@github.com/${{ deekay2310/Simplii }} + git commit -am "Automated autoyapf fixes" + git push \ No newline at end of file diff --git a/.github/workflows/style_checker.yml b/.github/workflows/style_checker.yml new file mode 100644 index 00000000..69d7bd9d --- /dev/null +++ b/.github/workflows/style_checker.yml @@ -0,0 +1,7 @@ +on: push +name: Python Style Checker +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: andymckay/pycodestyle-action@0.1.3 \ No newline at end of file diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml new file mode 100644 index 00000000..e6c29eee --- /dev/null +++ b/.github/workflows/unit_test.yml @@ -0,0 +1,27 @@ +name: Run Tests On Push +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Python 3.9.7 + uses: actions/setup-python@v1 + with: + python-version: 3.9.7 + - name: Install dependencies + run: | + pip install -r requirements.txt + echo requirements installed + - name: Run tests + run: | + cd test + pip install pytest + pytest \ No newline at end of file From bff987f6248939cb59b1920c6336566ca87bcd34 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 16:26:07 -0400 Subject: [PATCH 004/205] Add Badges --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index a79bc180..de417bfb 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,44 @@ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Build Status](https://app.travis-ci.com/UnnatiPrema/Simplii.svg?branch=main)](https://app.travis-ci.com/UnnatiPrema/Simplii) [![codecov](https://codecov.io/gh/deekay2310/Simplii/branch/main/graph/badge.svg?token=9ZXVRIPHLO)](https://codecov.io/gh/deekay2310/Simplii) +![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/unit_test.yml/badge.svg) +![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/style_checker.yml/badge.svg) +![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/main.yml/badge.svg) +![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/code_cov.yml/badge.svg) +![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/close_as_a_feature.yml/badge.svg) + + +cheapBuy forks + + +gcheapBuy stars + + +cheapBuy issues + + +cheapBuy issues closed + + +cheapBuy pull-requests + + + + + + + + + + + + + + + + + + ## Why schedule tasks on this app? Do you feel that your basic task scheduling apps should also track your mood and suggest a task accordingly? We hear it. We are trying to build a tool that will enable fast execution of our tasks under any mood. `Simplii` parameterizes emotions, deadlines, task difficulty and moods to suggest a task to be done keeping you at your productive best. From 46440db75cc68702248eb8b0236f418e2c222d39 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 16:27:34 -0400 Subject: [PATCH 005/205] Add break --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index de417bfb..c009e969 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,8 @@ - + +
## Why schedule tasks on this app? Do you feel that your basic task scheduling apps should also track your mood and suggest a task accordingly? We hear it. We are trying to build a tool that will enable fast execution of our tasks under any mood. `Simplii` parameterizes emotions, deadlines, task difficulty and moods to suggest a task to be done keeping you at your productive best. From df6fc7ae398c900c69b80cab890c78ba7c84da7c Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 16:41:17 -0400 Subject: [PATCH 006/205] Add issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ README.md | 6 ++++ 3 files changed, 64 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..272cbd70 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/README.md b/README.md index c009e969..84865a2e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,12 @@
+

+ Report Bug + / + Request Feature +

+ ## Why schedule tasks on this app? Do you feel that your basic task scheduling apps should also track your mood and suggest a task accordingly? We hear it. We are trying to build a tool that will enable fast execution of our tasks under any mood. `Simplii` parameterizes emotions, deadlines, task difficulty and moods to suggest a task to be done keeping you at your productive best. From 02eb22fe4ea96f9d024fa872692d3e885d2a15c4 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 16:43:54 -0400 Subject: [PATCH 007/205] Add break --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 84865a2e..1aceec45 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@
+

Report Bug / From b80bb64946814a2b4d9f235c87f55e07b93d1bc8 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 16:55:46 -0400 Subject: [PATCH 008/205] Remove duplicates --- README.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1aceec45..f29ea76b 100644 --- a/README.md +++ b/README.md @@ -16,19 +16,10 @@ ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/close_as_a_feature.yml/badge.svg) -cheapBuy forks +Simplii forks -gcheapBuy stars - - -cheapBuy issues - - -cheapBuy issues closed - - -cheapBuy pull-requests +Simplii stars From 06aa4b54feb8badbb83bb79c31613ba520f67a13 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 17:01:33 -0400 Subject: [PATCH 009/205] Refactor --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f29ea76b..ebe1cdc9 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,6 @@ [![DOI](https://zenodo.org/badge/404911045.svg)](https://zenodo.org/badge/latestdoi/404911045) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -![GitHub issues](https://img.shields.io/github/issues-raw/ivbhatt/Simplii) -![Github closes issues](https://img.shields.io/github/issues-closed-raw/ivbhatt/Simplii) -![Github pull requests](https://img.shields.io/github/issues-pr/ivbhatt/Simplii) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Build Status](https://app.travis-ci.com/UnnatiPrema/Simplii.svg?branch=main)](https://app.travis-ci.com/UnnatiPrema/Simplii) [![codecov](https://codecov.io/gh/deekay2310/Simplii/branch/main/graph/badge.svg?token=9ZXVRIPHLO)](https://codecov.io/gh/deekay2310/Simplii) @@ -21,6 +18,15 @@ Simplii stars + +Simplii issues + + +Simplii issues closed + + +cheapBuy pull-requests + From 0a4cd79f0bfcfac0b1820d42714f7a88aa3222c4 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 17:24:23 -0400 Subject: [PATCH 010/205] Remove Token --- .github/workflows/code_cov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_cov.yml b/.github/workflows/code_cov.yml index 81ca188d..4471fc13 100644 --- a/.github/workflows/code_cov.yml +++ b/.github/workflows/code_cov.yml @@ -29,4 +29,4 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: - token: 18a8beea-4407-498f-8b15-990517519ac2 \ No newline at end of file + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From 5a8c695cf88a2a403ade166b35841e031d801ebd Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 19:08:50 -0400 Subject: [PATCH 011/205] Create test directory --- test.py => test/test.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test.py => test/test.py (100%) diff --git a/test.py b/test/test.py similarity index 100% rename from test.py rename to test/test.py From a7533985fad5a75360597381028d4162b23f894f Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 19:17:42 -0400 Subject: [PATCH 012/205] Rename file --- test/{test.py => test_app.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{test.py => test_app.py} (100%) diff --git a/test/test.py b/test/test_app.py similarity index 100% rename from test/test.py rename to test/test_app.py From 3dcb5b8a4c0435234fd0651ce539c7342edb7e37 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 19:23:29 -0400 Subject: [PATCH 013/205] Refactor --- test/test_app.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/test_app.py b/test/test_app.py index e0cfb5f3..1b140c42 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -1,9 +1,8 @@ - import unittest -from app import app -from app import add_new_task +import app import requests + class TestModule(unittest.TestCase): def test_home(self): @@ -13,21 +12,23 @@ def test_home(self): def test_add_task(self): tester = app.test_client(self) - inp = {"taskName":"dummy_task","deadline":"2021-03-30T21:08","estimateInput":1,"taskType":"physical",'quant/verbal':"NA","contentconsump":"NA","difficulty":"3"} + inp = {"taskName": "dummy_task", "deadline": "2021-03-30T21:08", "estimateInput": 1, "taskType": "physical", + 'quant/verbal': "NA", "contentconsump": "NA", "difficulty": "3"} response = requests.post("http://127.0.0.1:5000/add_task", data=inp) self.assertEqual(response.status_code, 200) def test_delete_task(self): tester = app.test_client(self) - inp = {"id" : "23"} + inp = {"id": "23"} response = requests.post("http://127.0.0.1:5000/delete_task", data=inp) self.assertEqual(response.status_code, 200) def test_update_user_info(self): tester = app.test_client(self) - inp = {"name" : "user1", "email":"user1@gmail.com","emailChoose":"user1@gmail.com"} + inp = {"name": "user1", "email": "user1@gmail.com", "emailChoose": "user1@gmail.com"} response = requests.post("http://127.0.0.1:5000/update_user_info", data=inp) self.assertEqual(response.status_code, 200) + if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() From 5445476a5e5f32e66bbd859ae3ab24926e460683 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 19:37:11 -0400 Subject: [PATCH 014/205] Refactor --- app.py => code/app.py | 10 +++++----- test/test_app.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) rename app.py => code/app.py (91%) diff --git a/app.py b/code/app.py similarity index 91% rename from app.py rename to code/app.py index e01061f0..61a9297c 100644 --- a/app.py +++ b/code/app.py @@ -13,15 +13,15 @@ app = Flask(__name__) """Global constant to store directory path""" -TODO_TASKS_PATH = os.path.join("static", "tasks", "todo") -COMPLETED_TASKS_PATH = os.path.join("static", "tasks", "completed") +TODO_TASKS_PATH = os.path.join("../static", "tasks", "todo") +COMPLETED_TASKS_PATH = os.path.join("../static", "tasks", "completed") """List declaration for storing the quotes and authors """ ALL_QUOTES = [] ALL_AUTHORS = [] """Loading our code dataset in memory""" -with open(os.path.join("static", "quotes.csv"), "r", encoding="utf-8") as csv_file: +with open(os.path.join("../static", "quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) for row in reader: @@ -33,7 +33,7 @@ def refresh_data(): """This function loads all the data required to display the home page from file-system.""" ##### Load user information from file - with open(os.path.join("static", "user_information.json"), "r", encoding="utf-8") as json_file: + with open(os.path.join("../static", "user_information.json"), "r", encoding="utf-8") as json_file: json_data = json.load(json_file) initialized = json_data["initialized"] @@ -96,7 +96,7 @@ def update_user_information(): new_info["initialized"] = "yes" new_info["email_notifications"] = user_information["emailChoose"] - with open(os.path.join("static", "user_information.json"), "w", encoding="utf-8") as json_file: + with open(os.path.join("../static", "user_information.json"), "w", encoding="utf-8") as json_file: json.dump(new_info, json_file) return redirect("/") diff --git a/test/test_app.py b/test/test_app.py index 1b140c42..651d9865 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -1,5 +1,5 @@ import unittest -import app +from code.app import app import requests From 0bf7a28439285a40175c7b75893663e709186148 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Sun, 31 Oct 2021 19:38:31 -0400 Subject: [PATCH 015/205] Add init --- code/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 code/__init__.py diff --git a/code/__init__.py b/code/__init__.py new file mode 100644 index 00000000..e69de29b From 0f8532147165a8f3be8e8cb7c574ae8021a19ca9 Mon Sep 17 00:00:00 2001 From: Dev Kumar Date: Sun, 31 Oct 2021 19:53:01 -0400 Subject: [PATCH 016/205] Update test.py --- test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index e0cfb5f3..ce6683f5 100644 --- a/test.py +++ b/test.py @@ -1,6 +1,6 @@ import unittest -from app import app +#from app import app from app import add_new_task import requests @@ -30,4 +30,4 @@ def test_update_user_info(self): self.assertEqual(response.status_code, 200) if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() From e7e5e4a461551a4c11ca2592f01245dc1d1cf67f Mon Sep 17 00:00:00 2001 From: Dev Kumar Date: Sun, 31 Oct 2021 19:54:44 -0400 Subject: [PATCH 017/205] Update test.py --- test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index ce6683f5..39310ba2 100644 --- a/test.py +++ b/test.py @@ -1,7 +1,7 @@ import unittest -#from app import app -from app import add_new_task +from app import * +#from app import add_new_task import requests class TestModule(unittest.TestCase): From abdaf1fa82bab72b1ecd30a459c24464c6508213 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 15:25:48 -0400 Subject: [PATCH 018/205] test --- test/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_app.py b/test/test_app.py index 651d9865..13a2b97b 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -1,5 +1,5 @@ import unittest -from code.app import app +from code import app import requests From f2a86443ad018ee903a1043c15395bce96e4e652 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 15:31:46 -0400 Subject: [PATCH 019/205] Corrected indentation --- test/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_app.py b/test/test_app.py index 62e6c898..13a2b97b 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -31,4 +31,4 @@ def test_update_user_info(self): if __name__ == "__main__": - unittest.main() + unittest.main() From 752c06e6977943678f0ce3cc4125f0b83c4c83f5 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:02:42 -0400 Subject: [PATCH 020/205] refactor --- .travis.yml | 2 +- test/__init__.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 test/__init__.py diff --git a/.travis.yml b/.travis.yml index 07ac783f..c2a7bcaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ install: script: - flask run & - sleep 5 - - python -m unittest + - python -m unittest test diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 00000000..e69de29b From a183839d33bddeff10007f6dc98d9af36b1d017d Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:07:08 -0400 Subject: [PATCH 021/205] add command --- .github/workflows/unit_test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index e6c29eee..89dcc125 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -22,6 +22,5 @@ jobs: echo requirements installed - name: Run tests run: | - cd test - pip install pytest - pytest \ No newline at end of file + cd test + python -m unittest test \ No newline at end of file From a87c4df2beb8f8a5bd80d00ad0139d6591b9511c Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:11:53 -0400 Subject: [PATCH 022/205] test --- test/test_app.py | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/test/test_app.py b/test/test_app.py index 13a2b97b..03ff32bc 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -5,29 +5,30 @@ class TestModule(unittest.TestCase): - def test_home(self): - tester = app.test_client(self) - response = tester.get("/", content_type='html/text') - self.assertEqual(response.status_code, 200) - - def test_add_task(self): - tester = app.test_client(self) - inp = {"taskName": "dummy_task", "deadline": "2021-03-30T21:08", "estimateInput": 1, "taskType": "physical", - 'quant/verbal': "NA", "contentconsump": "NA", "difficulty": "3"} - response = requests.post("http://127.0.0.1:5000/add_task", data=inp) - self.assertEqual(response.status_code, 200) - - def test_delete_task(self): - tester = app.test_client(self) - inp = {"id": "23"} - response = requests.post("http://127.0.0.1:5000/delete_task", data=inp) - self.assertEqual(response.status_code, 200) - - def test_update_user_info(self): - tester = app.test_client(self) - inp = {"name": "user1", "email": "user1@gmail.com", "emailChoose": "user1@gmail.com"} - response = requests.post("http://127.0.0.1:5000/update_user_info", data=inp) - self.assertEqual(response.status_code, 200) + def test_home(self): + print("") + # tester = app.test_client(self) + # response = tester.get("/", content_type='html/text') + # self.assertEqual(response.status_code, 200) + # + # def test_add_task(self): + # tester = app.test_client(self) + # inp = {"taskName": "dummy_task", "deadline": "2021-03-30T21:08", "estimateInput": 1, "taskType": "physical", + # 'quant/verbal': "NA", "contentconsump": "NA", "difficulty": "3"} + # response = requests.post("http://127.0.0.1:5000/add_task", data=inp) + # self.assertEqual(response.status_code, 200) + # + # def test_delete_task(self): + # tester = app.test_client(self) + # inp = {"id": "23"} + # response = requests.post("http://127.0.0.1:5000/delete_task", data=inp) + # self.assertEqual(response.status_code, 200) + # + # def test_update_user_info(self): + # tester = app.test_client(self) + # inp = {"name": "user1", "email": "user1@gmail.com", "emailChoose": "user1@gmail.com"} + # response = requests.post("http://127.0.0.1:5000/update_user_info", data=inp) + # self.assertEqual(response.status_code, 200) if __name__ == "__main__": From 030b704a54872e8ddab3f14b8f185f56a3c926c6 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:13:21 -0400 Subject: [PATCH 023/205] change import --- test/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_app.py b/test/test_app.py index 03ff32bc..0bf1f231 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -1,5 +1,5 @@ import unittest -from code import app +import code import requests From 58ad124c1f0d9d222daf6625c3c0f74b1c519315 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:17:22 -0400 Subject: [PATCH 024/205] Added requests --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 37837a81..8f9a75db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ itsdangerous==2.0.1 Jinja2==3.0.1 MarkupSafe==2.0.1 Werkzeug==2.0.1 +requests==2.26.0 From 7d21b93e27c3a4265382f842064bfb9fbc26a7a2 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:31:25 -0400 Subject: [PATCH 025/205] test --- code/code/__init__.py | 0 code/{ => code}/app.py | 10 +++++----- test/test_app.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 code/code/__init__.py rename code/{ => code}/app.py (91%) diff --git a/code/code/__init__.py b/code/code/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/code/app.py b/code/code/app.py similarity index 91% rename from code/app.py rename to code/code/app.py index 61a9297c..06e735db 100644 --- a/code/app.py +++ b/code/code/app.py @@ -13,15 +13,15 @@ app = Flask(__name__) """Global constant to store directory path""" -TODO_TASKS_PATH = os.path.join("../static", "tasks", "todo") -COMPLETED_TASKS_PATH = os.path.join("../static", "tasks", "completed") +TODO_TASKS_PATH = os.path.join("../../static", "tasks", "todo") +COMPLETED_TASKS_PATH = os.path.join("../../static", "tasks", "completed") """List declaration for storing the quotes and authors """ ALL_QUOTES = [] ALL_AUTHORS = [] """Loading our code dataset in memory""" -with open(os.path.join("../static", "quotes.csv"), "r", encoding="utf-8") as csv_file: +with open(os.path.join("../../static", "quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) for row in reader: @@ -33,7 +33,7 @@ def refresh_data(): """This function loads all the data required to display the home page from file-system.""" ##### Load user information from file - with open(os.path.join("../static", "user_information.json"), "r", encoding="utf-8") as json_file: + with open(os.path.join("../../static", "user_information.json"), "r", encoding="utf-8") as json_file: json_data = json.load(json_file) initialized = json_data["initialized"] @@ -96,7 +96,7 @@ def update_user_information(): new_info["initialized"] = "yes" new_info["email_notifications"] = user_information["emailChoose"] - with open(os.path.join("../static", "user_information.json"), "w", encoding="utf-8") as json_file: + with open(os.path.join("../../static", "user_information.json"), "w", encoding="utf-8") as json_file: json.dump(new_info, json_file) return redirect("/") diff --git a/test/test_app.py b/test/test_app.py index 0bf1f231..9a7dd6b8 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -1,12 +1,12 @@ import unittest -import code +from code.code import app import requests class TestModule(unittest.TestCase): - def test_home(self): - print("") + def test_home(self): + print() # tester = app.test_client(self) # response = tester.get("/", content_type='html/text') # self.assertEqual(response.status_code, 200) From b47dc37dbb8bc26928f65a20d6070a1c8827b605 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:34:44 -0400 Subject: [PATCH 026/205] test --- test/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_app.py b/test/test_app.py index 9a7dd6b8..8c946e8f 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -1,5 +1,5 @@ import unittest -from code.code import app +from code import app import requests From c1bc510ec6c7afccbe748cebc570b3cb0da7b82e Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:39:40 -0400 Subject: [PATCH 027/205] package refactor --- .travis.yml | 2 +- code/{code => }/app.py | 10 +++++----- code/{code => test}/__init__.py | 0 {test => code/test}/test_app.py | 0 test/__init__.py | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename code/{code => }/app.py (91%) rename code/{code => test}/__init__.py (100%) rename {test => code/test}/test_app.py (100%) delete mode 100644 test/__init__.py diff --git a/.travis.yml b/.travis.yml index c2a7bcaa..2092ed29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ install: script: - flask run & - sleep 5 - - python -m unittest test + - python -m unittest code/test diff --git a/code/code/app.py b/code/app.py similarity index 91% rename from code/code/app.py rename to code/app.py index 06e735db..61a9297c 100644 --- a/code/code/app.py +++ b/code/app.py @@ -13,15 +13,15 @@ app = Flask(__name__) """Global constant to store directory path""" -TODO_TASKS_PATH = os.path.join("../../static", "tasks", "todo") -COMPLETED_TASKS_PATH = os.path.join("../../static", "tasks", "completed") +TODO_TASKS_PATH = os.path.join("../static", "tasks", "todo") +COMPLETED_TASKS_PATH = os.path.join("../static", "tasks", "completed") """List declaration for storing the quotes and authors """ ALL_QUOTES = [] ALL_AUTHORS = [] """Loading our code dataset in memory""" -with open(os.path.join("../../static", "quotes.csv"), "r", encoding="utf-8") as csv_file: +with open(os.path.join("../static", "quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) for row in reader: @@ -33,7 +33,7 @@ def refresh_data(): """This function loads all the data required to display the home page from file-system.""" ##### Load user information from file - with open(os.path.join("../../static", "user_information.json"), "r", encoding="utf-8") as json_file: + with open(os.path.join("../static", "user_information.json"), "r", encoding="utf-8") as json_file: json_data = json.load(json_file) initialized = json_data["initialized"] @@ -96,7 +96,7 @@ def update_user_information(): new_info["initialized"] = "yes" new_info["email_notifications"] = user_information["emailChoose"] - with open(os.path.join("../../static", "user_information.json"), "w", encoding="utf-8") as json_file: + with open(os.path.join("../static", "user_information.json"), "w", encoding="utf-8") as json_file: json.dump(new_info, json_file) return redirect("/") diff --git a/code/code/__init__.py b/code/test/__init__.py similarity index 100% rename from code/code/__init__.py rename to code/test/__init__.py diff --git a/test/test_app.py b/code/test/test_app.py similarity index 100% rename from test/test_app.py rename to code/test/test_app.py diff --git a/test/__init__.py b/test/__init__.py deleted file mode 100644 index e69de29b..00000000 From ab43994dbb5705714594fd19ea285eecd4fe2226 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:47:14 -0400 Subject: [PATCH 028/205] refactor --- {code/test => test}/__init__.py | 0 {code/test => test}/test_app.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {code/test => test}/__init__.py (100%) rename {code/test => test}/test_app.py (97%) diff --git a/code/test/__init__.py b/test/__init__.py similarity index 100% rename from code/test/__init__.py rename to test/__init__.py diff --git a/code/test/test_app.py b/test/test_app.py similarity index 97% rename from code/test/test_app.py rename to test/test_app.py index 8c946e8f..35a98087 100644 --- a/code/test/test_app.py +++ b/test/test_app.py @@ -1,5 +1,5 @@ import unittest -from code import app +from code import refresh_data import requests From 424ff8bc84561224d2f870f8081ec3f38e42a692 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 16:50:24 -0400 Subject: [PATCH 029/205] test --- {code => src}/__init__.py | 0 {code => src}/app.py | 0 test/test_app.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename {code => src}/__init__.py (100%) rename {code => src}/app.py (100%) diff --git a/code/__init__.py b/src/__init__.py similarity index 100% rename from code/__init__.py rename to src/__init__.py diff --git a/code/app.py b/src/app.py similarity index 100% rename from code/app.py rename to src/app.py diff --git a/test/test_app.py b/test/test_app.py index 35a98087..6412897c 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -1,5 +1,5 @@ import unittest -from code import refresh_data +from src import app import requests From 558ae69a263c4f8a787bb618292f71eb4ecd34bc Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 17:00:23 -0400 Subject: [PATCH 030/205] change path --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 61a9297c..c1bfe334 100644 --- a/src/app.py +++ b/src/app.py @@ -21,7 +21,7 @@ ALL_AUTHORS = [] """Loading our code dataset in memory""" -with open(os.path.join("../static", "quotes.csv"), "r", encoding="utf-8") as csv_file: +with open(os.path.join("static", "quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) for row in reader: From 31a0c7731fed8e6c4a99080bdbb7703983fe6b6b Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 17:16:45 -0400 Subject: [PATCH 031/205] refactor --- src/app.py | 4 +- src/quotes.csv | 259 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 261 insertions(+), 2 deletions(-) create mode 100644 src/quotes.csv diff --git a/src/app.py b/src/app.py index c1bfe334..73d51a97 100644 --- a/src/app.py +++ b/src/app.py @@ -11,7 +11,7 @@ app = Flask(__name__) - +print(os.path) """Global constant to store directory path""" TODO_TASKS_PATH = os.path.join("../static", "tasks", "todo") COMPLETED_TASKS_PATH = os.path.join("../static", "tasks", "completed") @@ -21,7 +21,7 @@ ALL_AUTHORS = [] """Loading our code dataset in memory""" -with open(os.path.join("static", "quotes.csv"), "r", encoding="utf-8") as csv_file: +with open(os.path.join("src","quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) for row in reader: diff --git a/src/quotes.csv b/src/quotes.csv new file mode 100644 index 00000000..36b6971a --- /dev/null +++ b/src/quotes.csv @@ -0,0 +1,259 @@ +"Author","Quote" +"Thomas Edison","Genius is one percent inspiration and ninety-nine percent perspiration." +"Yogi Berra","You can observe a lot just by watching." +"Abraham Lincoln","A house divided against itself cannot stand." +"Johann Wolfgang von Goethe","Difficulties increase the nearer we get to the goal." +"Byron Pulsifer","Fate is in your hands and no one elses" +"Lao Tzu","Be the chief but never the lord." +"Carl Sandburg","Nothing happens unless first we dream." +"Aristotle","Well begun is half done." +"Yogi Berra","Life is a learning experience, only if you learn." +"Margaret Sangster","Self-complacency is fatal to progress." +"Buddha","Peace comes from within. Do not seek it without." +"Byron Pulsifer","What you give is what you get." +"Iris Murdoch","We can only learn to love by loving." +"Karen Clark","Life is change. Growth is optional. Choose wisely." +"Wayne Dyer","You'll see it when you believe it." +"","Today is the tomorrow we worried about yesterday." +"","It's easier to see the mistakes on someone else's paper." +"","Every man dies. Not every man really lives." +"Lao Tzu","To lead people walk behind them." +"William Shakespeare","Having nothing, nothing can he lose." +"Henry J. Kaiser","Trouble is only opportunity in work clothes." +"Publilius Syrus","A rolling stone gathers no moss." +"Napoleon Hill","Ideas are the beginning points of all fortunes." +"Donald Trump","Everything in life is luck." +"Lao Tzu","Doing nothing is better than being busy doing nothing." +"Benjamin Spock","Trust yourself. You know more than you think you do." +"Confucius","Study the past, if you would divine the future." +"","The day is already blessed, find peace within it." +"Sigmund Freud","From error to error one discovers the entire truth." +"Benjamin Franklin","Well done is better than well said." +"Ella Williams","Bite off more than you can chew, then chew it." +"Buddha","Work out your own salvation. Do not depend on others." +"Benjamin Franklin","One today is worth two tomorrows." +"Christopher Reeve","Once you choose hope, anythings possible." +"Albert Einstein","God always takes the simplest way." +"Charles Kettering","One fails forward toward success." +"","From small beginnings come great things." +"Chinese proverb","Learning is a treasure that will follow its owner everywhere" +"Socrates","Be as you wish to seem." +"V. Naipaul","The world is always in movement." +"John Wooden","Never mistake activity for achievement." +"Haddon Robinson","What worries you masters you." +"Pearl Buck","One faces the future with ones past." +"Brian Tracy","Goals are the fuel in the furnace of achievement." +"Leonardo da Vinci","Who sows virtue reaps honour." +"Dalai Lama","Be kind whenever possible. It is always possible." +"Chinese proverb","Talk doesn't cook rice." +"Buddha","He is able who thinks he is able." +"Larry Elder","A goal without a plan is just a wish." +"Michael Korda","To succeed, we must first believe that we can." +"Albert Einstein","Learn from yesterday, live for today, hope for tomorrow." +"James Lowell","A weed is no more than a flower in disguise." +"Yoda","Do, or do not. There is no try." +"Harriet Beecher Stowe","All serious daring starts from within." +"Byron Pulsifer","The best teacher is experience learned from failures." +"Murray Gell-Mann","Think how hard physics would be if particles could think." +"John Lennon","Love is the flower you've got to let grow." +"Napoleon Hill","Don't wait. The time will never be just right." +"Pericles","Time is the wisest counsellor of all." +"Napoleon Hill","You give before you get." +"Socrates","Wisdom begins in wonder." +"Baltasar Gracian","Without courage, wisdom bears no fruit." +"Aristotle","Change in all things is sweet." +"Byron Pulsifer","What you fear is that which requires action to overcome." +"Cullen Hightower","When performance exceeds ambition, the overlap is called success." +"African proverb","When deeds speak, words are nothing." +"Wayne Dyer","Real magic in relationships means an absence of judgement of others." +"Albert Einstein","I never think of the future. It comes soon enough." +"Ralph Emerson","Skill to do comes of doing." +"Sophocles","Wisdom is the supreme part of happiness." +"Maya Angelou","I believe that every person is born with talent." +"Abraham Lincoln","Important principles may, and must, be inflexible." +"Richard Evans","The undertaking of a new action brings new strength." +"Ralph Emerson","The years teach much which the days never know." +"Ralph Emerson","Our distrust is very expensive." +"Bodhidharma","All know the way; few actually walk it." +"Johann Wolfgang von Goethe","Great talent finds happiness in execution." +"Michelangelo","Faith in oneself is the best and safest course." +"Winston Churchill","Courage is going from failure to failure without losing enthusiasm." +"Leo Tolstoy","The two most powerful warriors are patience and time." +"Lao Tzu","Anticipate the difficult by managing the easy." +"Buddha","Those who are free of resentful thoughts surely find peace." +"Sophocles","A short saying often contains much wisdom." +"","It takes both sunshine and rain to make a rainbow." +"","A beautiful thing is never perfect." +"Princess Diana","Only do what your heart tells you." +"John Pierrakos","Life is movement-we breathe, we eat, we walk, we move!" +"Eleanor Roosevelt","No one can make you feel inferior without your consent." +"Richard Bach","Argue for your limitations, and sure enough theyre yours." +"Seneca","Luck is what happens when preparation meets opportunity." +"Napoleon Bonaparte","Victory belongs to the most persevering." +"William Shakespeare","Love all, trust a few, do wrong to none." +"Richard Bach","In order to win, you must expect to win." +"Napoleon Hill","A goal is a dream with a deadline." +"Napoleon Hill","You can do it if you believe you can!" +"Bo Jackson","Set your goals high, and don't stop till you get there." +"","Every new day is another chance to change your life." +"Thich Nhat Hanh","Smile, breathe, and go slowly." +"Liberace","Nobody will believe in you unless you believe in yourself." +"William Arthur Ward","Do more than dream: work." +"Seneca","No man was ever wise by chance." +"","Some pursue happiness, others create it." +"William Shakespeare","He that is giddy thinks the world turns round." +"Ellen Gilchrist","Don't ruin the present with the ruined past." +"Albert Schweitzer","Do something wonderful, people may imitate it." +"","We do what we do because we believe." +"Eleanor Roosevelt","Do one thing every day that scares you." +"Byron Pulsifer","If you cannot be silent be brilliant and thoughtful." +"Carl Jung","Who looks outside, dreams; who looks inside, awakes." +"Buddha","What we think, we become." +"Lord Herbert","The shortest answer is doing." +"Leonardo da Vinci","All our knowledge has its origins in our perceptions." +"","The harder you fall, the higher you bounce." +"Anne Wilson Schaef","Trusting our intuition often saves us from disaster." +"Sojourner Truth","Truth is powerful and it prevails." +"Elizabeth Browning","Light tomorrow with today!" +"German proverb","Silence is a fence around wisdom." +"Madame de Stael","Society develops wit, but its contemplation alone forms genius." +"Richard Bach","The simplest things are often the truest." +"","Everyone smiles in the same language." +"Bernadette Devlin","Yesterday I dared to struggle. Today I dare to win." +"Napoleon Hill","No alibi will save you from accepting the responsibility." +"Walt Disney","If you can dream it, you can do it." +"Buddha","It is better to travel well than to arrive." +"Anais Nin","Life shrinks or expands in proportion to one's courage." +"Sun Tzu","You have to believe in yourself." +"Wayne Dyer","Our intention creates our reality." +"Confucius","Silence is a true friend who never betrays." +"Johann Wolfgang von Goethe","Character develops itself in the stream of life." +"American proverb","From little acorns mighty oaks do grow." +"Jon Kabat-Zinn","You can't stop the waves, but you can learn to surf." +"Gustave Flaubert","Reality does not conform to the ideal, but confirms it." +"William Shakespeare","Speak low, if you speak love." +"Johann Wolfgang von Goethe","A really great talent finds its happiness in execution." +"John Lennon","Reality leaves a lot to the imagination." +"Seneca","The greatest remedy for anger is delay." +"Pearl Buck","Growth itself contains the germ of happiness." +"Leonardo da Vinci","Nothing strengthens authority so much as silence." +"Confucius","Wherever you go, go with all your heart." +"Albert Einstein","The only real valuable thing is intuition." +"Ralph Emerson","Good luck is another name for tenacity of purpose." +"Sylvia Voirol","Rainbows apologize for angry skies." +"","Friendship isn't a big thing. It's a million little things." +"Theophrastus","Time is the most valuable thing a man can spend." +"Tony Robbins","Whatever happens, take responsibility." +"Oscar Wilde","Experience is simply the name we give our mistakes." +"Wayne Dyer","I think and that is all that I am." +"Gloria Steinem","If the shoe doesn't fit, must we change the foot?" +"Marcus Aurelius","Each day provides its own gifts." +"Publilius Syrus","While we stop to think, we often miss our opportunity." +"Bernard Shaw","Life isn't about finding yourself. Life is about creating yourself." +"Richard Bach","To bring anything into your life, imagine that it's already there." +"German proverb","Begin to weave and God will give you the thread." +"Confucius","The more you know yourself, the more you forgive yourself." +"Mary Bethune","Without faith, nothing is possible. With it, nothing is impossible." +"Albert Einstein","Once we accept our limits, we go beyond them." +"","Don't be pushed by your problems; be led by your dreams." +"Brian Tracy","Whatever we expect with confidence becomes our own self-fulfilling prophecy." +"Pablo Picasso","Everything you can imagine is real." +"Usman Asif","Fear is a darkroom where negatives develop." +"Napoleon Bonaparte","The truest wisdom is a resolute determination." +"Victor Hugo","Life is the flower for which love is the honey." +"Epictetus","Freedom is the right to live as we wish." +"","Change your thoughts, change your life!" +"Robert Heller","Never ignore a gut feeling, but never believe that it's enough." +"Marcus Aurelius","Loss is nothing else but change,and change is Natures delight." +"Byron Pulsifer","Someone is special only if you tell them." +"Thich Nhat Hanh","There is no way to happiness, happiness is the way." +"Lao Tzu","He who talks more is sooner exhausted." +"Lao Tzu","He who is contented is rich." +"Plutarch","What we achieve inwardly will change outer reality." +"Ralph Waldo Emerson","Our strength grows out of our weaknesses." +"Mahatma Gandhi","We must become the change we want to see." +"Napoleon Hill","Happiness is found in doing, not merely possessing." +"","Put your future in good hands : your own." +"Wit","We choose our destiny in the way we treat others." +"Voltaire","No snowflake in an avalanche ever feels responsible." +"Virgil","Fortune favours the brave." +"Joseph Stalin","I believe in one thing only, the power of human will." +"Robert Frost","The best way out is always through." +"Seneca","The mind unlearns with difficulty what it has long learned." +"Abraham Lincoln","I destroy my enemies when I make them my friends." +"Thomas Fuller","No garden is without its weeds." +"Elbert Hubbard","There is no failure except in no longer trying." +"Turkish proverb","Kind words will unlock an iron door." +"Hugh Miller","Problems are only opportunities with thorns on them." +"A. Powell Davies","Life is just a chance to grow a soul." +"Johann Wolfgang von Goethe","Mountains cannot be surmounted except by winding paths." +"Thich Nhat Hanh","May our hearts garden of awakening bloom with hundreds of flowers." +"John Dryden","Fortune befriends the bold." +"Friedrich von Schiller","Keep true to the dreams of thy youth." +"Mike Ditka","You're never a loser until you quit trying." +"Immanuel Kant","Science is organized knowledge. Wisdom is organized life." +"Johann Wolfgang von Goethe","Knowing is not enough; we must apply!" +"Richard Bach","Strong beliefs win strong men, and then make them stronger." +"Albert Camus","Autumn is a second spring when every leaf is a flower." +"Toni Morrison","If you surrender to the wind, you can ride it." +"Helen Keller","Keep yourself to the sunshine and you cannot see the shadow." +"Paulo Coelho","Write your plans in pencil and give God the eraser." +"Pablo Picasso","Inspiration exists, but it has to find us working." +"Jonathan Kozol","Pick battles big enough to matter, small enough to win." +"Janis Joplin","Don't compromise yourself. You are all you've got." +"Sophocles","A short saying oft contains much wisdom." +"Epictetus","Difficulties are things that show a person what they are." +"Honore de Balzac","When you doubt your power, you give power to your doubt." +"Ovid","The cause is hidden. The effect is visible to all." +"Francis Bacon","A prudent question is one half of wisdom." +"Tony Robbins","The path to success is to take massive, determined action." +"Manuel Puig","I allow my intuition to lead my path." +"William R. Inge","Nature takes away any faculty that is not used." +"Epictetus","If you wish to be a writer, write." +"Wayne Dyer","There is no way to prosperity, prosperity is the way." +"Jim Rohn","Either you run the day or the day runs you." +"Publilius Syrus","Better be ignorant of a matter than half know it." +"Oprah Winfrey","Follow your instincts. That is where true wisdom manifests itself." +"Benjamin Franklin","There never was a good knife made of bad steel." +"Anatole France","To accomplish great things, we must dream as well as act." +"Saint Augustine","Patience is the companion of wisdom." +"Buddha","The mind is everything. What you think you become." +"Voltaire","To enjoy life, we must touch much of it lightly." +"Maya Lin","To fly, we have to have resistance." +"Blaise Pascal","The heart has its reasons which reason knows not of." +"William Shakespeare","Be great in act, as you have been in thought." +"Napoleon Bonaparte","Imagination rules the world." +"Blaise Pascal","Kind words do not cost much. Yet they accomplish much." +"Michelangelo","There is no greater harm than that of time wasted." +"Jonas Salk","Intuition will tell the thinking mind where to look next." +"","Worry gives a small thing a big shadow." +"Napoleon Hill","Fears are nothing more than a state of mind." +"Lao Tzu","The journey of a thousand miles begins with one step." +"Peter Drucker","Efficiency is doing things right; effectiveness is doing the right things." +"Luisa Sigea","Blaze with the fire that is never extinguished." +"Dr. Seuss","Don't cry because it's over. Smile because it happened." +"Jason Fried","No is easier to do. Yes is easier to say." +"Confucius","To be wrong is nothing unless you continue to remember it." +"Babe Ruth","Yesterdays home runs don't win today's games." +"Carlyle","Silence is deep as Eternity, Speech is shallow as Time." +"Leo F. Buscaglia","Don't smother each other. No one can grow in the shade." +"Lao Tzu","An ant on the move does more than a dozing ox" +"Indira Gandhi","You can't shake hands with a clenched fist." +"Plato","A good decision is based on knowledge and not on numbers." +"Confucius","The cautious seldom err." +"Frederick Douglass","If there is no struggle, there is no progress." +"Willa Cather","Where there is great love, there are always miracles." +"John Lennon","Time you enjoy wasting, was not wasted." +"Richard Bach","Every problem has a gift for you in its hands." +"Jean de la Fontaine","Sadness flies away on the wings of time." +"Publilius Syrus","I have often regretted my speech, never my silence." +"Thomas Jefferson","Never put off till tomorrow what you can do today." +"Thomas Dewar","Minds are like parachutes. They only function when open." +"George Patton","If a man does his best, what else is there?" +"Benjamin Disraeli","The secret of success is constancy to purpose." +"Ralph Emerson","Life is a progress, and not a station." +"Horace Friess","All seasons are beautiful for the person who carries happiness within." +"Elbert Hubbard","To avoid criticism, do nothing, say nothing, be nothing." +"Ovid","All things change; nothing perishes." +"Haynes Bayly","Absence makes the heart grow fonder." +"Lauren Bacall","Imagination is the highest kite one can fly." \ No newline at end of file From f4a6b6cccf3d2e1562f129d0164a92284b84df66 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Mon, 1 Nov 2021 17:23:41 -0400 Subject: [PATCH 032/205] refactor --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 73d51a97..ea98ea3b 100644 --- a/src/app.py +++ b/src/app.py @@ -21,7 +21,7 @@ ALL_AUTHORS = [] """Loading our code dataset in memory""" -with open(os.path.join("src","quotes.csv"), "r", encoding="utf-8") as csv_file: +with open(os.path.join("/../static","quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) for row in reader: From 643b69db5d75c537bd3a1793b594366283f9c5b2 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 14:16:09 -0400 Subject: [PATCH 033/205] trial --- src/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app.py b/src/app.py index ea98ea3b..eafd128e 100644 --- a/src/app.py +++ b/src/app.py @@ -20,8 +20,9 @@ ALL_QUOTES = [] ALL_AUTHORS = [] -"""Loading our code dataset in memory""" -with open(os.path.join("/../static","quotes.csv"), "r", encoding="utf-8") as csv_file: +"""Loading our code dataset in memory""" +package_dir = os.path.dirname(os.path.abspath(__file__)) +with open(os.path.join(package_dir,"quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) for row in reader: From 6f96d9b01460d767d4e5f0e45569ec622e1722e7 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 14:27:02 -0400 Subject: [PATCH 034/205] Add tests --- src/app.py | 1 - test/test_app.py | 49 ++++++++++++++++++++++++------------------------ 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/app.py b/src/app.py index eafd128e..05fa7d1f 100644 --- a/src/app.py +++ b/src/app.py @@ -11,7 +11,6 @@ app = Flask(__name__) -print(os.path) """Global constant to store directory path""" TODO_TASKS_PATH = os.path.join("../static", "tasks", "todo") COMPLETED_TASKS_PATH = os.path.join("../static", "tasks", "completed") diff --git a/test/test_app.py b/test/test_app.py index 6412897c..baa6ea39 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -1,34 +1,33 @@ import unittest -from src import app +from src.app import app import requests class TestModule(unittest.TestCase): - def test_home(self): - print() - # tester = app.test_client(self) - # response = tester.get("/", content_type='html/text') - # self.assertEqual(response.status_code, 200) - # - # def test_add_task(self): - # tester = app.test_client(self) - # inp = {"taskName": "dummy_task", "deadline": "2021-03-30T21:08", "estimateInput": 1, "taskType": "physical", - # 'quant/verbal': "NA", "contentconsump": "NA", "difficulty": "3"} - # response = requests.post("http://127.0.0.1:5000/add_task", data=inp) - # self.assertEqual(response.status_code, 200) - # - # def test_delete_task(self): - # tester = app.test_client(self) - # inp = {"id": "23"} - # response = requests.post("http://127.0.0.1:5000/delete_task", data=inp) - # self.assertEqual(response.status_code, 200) - # - # def test_update_user_info(self): - # tester = app.test_client(self) - # inp = {"name": "user1", "email": "user1@gmail.com", "emailChoose": "user1@gmail.com"} - # response = requests.post("http://127.0.0.1:5000/update_user_info", data=inp) - # self.assertEqual(response.status_code, 200) + def test_home(self): + tester = app.test_client(self) + response = tester.get("/", content_type='html/text') + self.assertEqual(response.status_code, 200) + + def test_add_task(self): + tester = app.test_client(self) + inp = {"taskName": "dummy_task", "deadline": "2021-03-30T21:08", "estimateInput": 1, "taskType": "physical", + 'quant/verbal': "NA", "contentconsump": "NA", "difficulty": "3"} + response = requests.post("http://127.0.0.1:5000/add_task", data=inp) + self.assertEqual(response.status_code, 200) + + def test_delete_task(self): + tester = app.test_client(self) + inp = {"id": "23"} + response = requests.post("http://127.0.0.1:5000/delete_task", data=inp) + self.assertEqual(response.status_code, 200) + + def test_update_user_info(self): + tester = app.test_client(self) + inp = {"name": "user1", "email": "user1@gmail.com", "emailChoose": "user1@gmail.com"} + response = requests.post("http://127.0.0.1:5000/update_user_info", data=inp) + self.assertEqual(response.status_code, 200) if __name__ == "__main__": From f697aa55f3ce17609c5fe05e0ffd28c7c5031557 Mon Sep 17 00:00:00 2001 From: radhikaraman20 <89432698+radhikaraman20@users.noreply.github.com> Date: Tue, 2 Nov 2021 14:35:27 -0400 Subject: [PATCH 035/205] Create conn_test.py --- conn_test.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 conn_test.py diff --git a/conn_test.py b/conn_test.py new file mode 100644 index 00000000..a679e84d --- /dev/null +++ b/conn_test.py @@ -0,0 +1,40 @@ +import pymongo +import datetime +import bcrypt + +from pymongo import MongoClient + +#MongoDB connection using cluster's connection string +client = pymongo.MongoClient("mongodb+srv://radhika:Radhika1997@simplii.tvhh1.mongodb.net/simplii?retryWrites=true&w=majority") + +#database to which connections are to be made +db = client.simplii + +#testing of password hashing for security purposes +password = "abcd1234" +hashAndSalt = bcrypt.hashpw(password.encode(), bcrypt.gensalt()) +print(hashAndSalt) +# save "hashAndSalt" in database + +# To check: +# password = userInput +valid = bcrypt.checkpw(password.encode(), hashAndSalt) +print(valid) + +#testing of sample/dummy data insertion +#input to be taken from login/sign up form once created +''' +user1 = { + "user_id": "Radhika20", + "first_name":"Radhika", + "last_name":"Raman", + "email_id":"rbraman@ncsu.edu", + "password":"sdfsdf" +} + +testUserInfo = db.testUserInfo +result = testUserInfo.insert_one(user1) +print(f"User 1: {result.inserted_id}") + +''' + From 6c7bd1aef80d1e1f8ea6a4ea237261019956f3fc Mon Sep 17 00:00:00 2001 From: radhikaraman20 <89432698+radhikaraman20@users.noreply.github.com> Date: Tue, 2 Nov 2021 14:47:37 -0400 Subject: [PATCH 036/205] Update conn_test.py --- conn_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conn_test.py b/conn_test.py index a679e84d..39a43727 100644 --- a/conn_test.py +++ b/conn_test.py @@ -7,7 +7,7 @@ #MongoDB connection using cluster's connection string client = pymongo.MongoClient("mongodb+srv://radhika:Radhika1997@simplii.tvhh1.mongodb.net/simplii?retryWrites=true&w=majority") -#database to which connections are to be made +#database to which connections are to be made, here the name of our database is "simplii" db = client.simplii #testing of password hashing for security purposes @@ -32,6 +32,7 @@ "password":"sdfsdf" } + testUserInfo = db.testUserInfo result = testUserInfo.insert_one(user1) print(f"User 1: {result.inserted_id}") From c4c4966368372f03014c99fd8a5d952124ceb1d5 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:27:55 -0400 Subject: [PATCH 037/205] test --- .travis.yml | 2 +- src/app.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2092ed29..c2a7bcaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ install: script: - flask run & - sleep 5 - - python -m unittest code/test + - python -m unittest test diff --git a/src/app.py b/src/app.py index 05fa7d1f..1114e590 100644 --- a/src/app.py +++ b/src/app.py @@ -162,4 +162,4 @@ def delete_task_byID(): return redirect("/") if __name__ == "__main__": - app.run(debug = True) + app.run(debug=True) From ce88cddd5bf261cc3ee4c1d01af817dd24635cf3 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:30:41 -0400 Subject: [PATCH 038/205] removed no hop --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c2a7bcaa..2c3480d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,6 @@ install: - pip install -r requirements.txt - pip install requests script: - - flask run & + - flask run - sleep 5 - python -m unittest test From 8a4f04886003f600d246c7d06bf5c3e25db99ca8 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:34:02 -0400 Subject: [PATCH 039/205] add run --- .github/workflows/unit_test.yml | 1 + .travis.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 89dcc125..24a7aaba 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -23,4 +23,5 @@ jobs: - name: Run tests run: | cd test + flask run python -m unittest test \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2c3480d8..cc1bc83b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,6 @@ install: - pip install -r requirements.txt - pip install requests script: - - flask run + - flask run - sleep 5 - python -m unittest test From 39ffea8e97ce6dfcce0082df241ce8307f8668ef Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:35:09 -0400 Subject: [PATCH 040/205] refactor --- .github/workflows/unit_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 24a7aaba..cc85dc7a 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -22,6 +22,6 @@ jobs: echo requirements installed - name: Run tests run: | + flask run & cd test - flask run python -m unittest test \ No newline at end of file From cf7c63864c01861a03e36a3749efa2b0028ec4b6 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:37:15 -0400 Subject: [PATCH 041/205] add sleep --- .github/workflows/unit_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index cc85dc7a..3c9dfabf 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -23,5 +23,6 @@ jobs: - name: Run tests run: | flask run & + sleep 5 cd test python -m unittest test \ No newline at end of file From 5524df162951b20ca099d09b08a830d163c4f665 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:45:09 -0400 Subject: [PATCH 042/205] Add flask run --- .github/workflows/python-app.yml | 2 ++ README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index e559e1cb..3d005317 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -33,4 +33,6 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | + flask run & + sleep 5 pytest diff --git a/README.md b/README.md index ebe1cdc9..c2dbcd8d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![codecov](https://codecov.io/gh/deekay2310/Simplii/branch/main/graph/badge.svg?token=9ZXVRIPHLO)](https://codecov.io/gh/deekay2310/Simplii) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/unit_test.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/style_checker.yml/badge.svg) -![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/main.yml/badge.svg) +![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/python-app.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/code_cov.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/close_as_a_feature.yml/badge.svg) From 64a777001f6fe79f8189a37d3d3d124d91688764 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:47:10 -0400 Subject: [PATCH 043/205] test --- .github/workflows/python-app.yml | 3 ++- .github/workflows/unit_test.yml | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3d005317..71045d9a 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -33,6 +33,7 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - flask run & + cd src + python app.py sleep 5 pytest diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 3c9dfabf..89dcc125 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -22,7 +22,5 @@ jobs: echo requirements installed - name: Run tests run: | - flask run & - sleep 5 cd test python -m unittest test \ No newline at end of file From e18f406dd86b41c9ad57e1896026e6005e0ce52e Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:49:08 -0400 Subject: [PATCH 044/205] test --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 71045d9a..6e86c204 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -34,6 +34,6 @@ jobs: - name: Test with pytest run: | cd src - python app.py + python app.py & sleep 5 pytest From c4595b11804dd9907b24c8659ff9062b3f602272 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:52:12 -0400 Subject: [PATCH 045/205] cmd --- .github/workflows/python-app.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 6e86c204..c2a51bac 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -36,4 +36,5 @@ jobs: cd src python app.py & sleep 5 - pytest + cd ../test + python -m unittest test From e2725bbc9800fad761debb6949dc49a293cb242f Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 15:56:35 -0400 Subject: [PATCH 046/205] refactor --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index c2a51bac..99761297 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -37,4 +37,4 @@ jobs: python app.py & sleep 5 cd ../test - python -m unittest test + python test_app.py From fbb3bd0b990c0f5a5a96997606ffe0241f3709b0 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:12:27 -0400 Subject: [PATCH 047/205] commit --- .github/workflows/python-app.yml | 4 +- src/quotes.csv | 259 ------------------------------- test/test_app.py | 2 + 3 files changed, 4 insertions(+), 261 deletions(-) delete mode 100644 src/quotes.csv diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 99761297..ac6e7d71 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -36,5 +36,5 @@ jobs: cd src python app.py & sleep 5 - cd ../test - python test_app.py + cd .. + pytest diff --git a/src/quotes.csv b/src/quotes.csv deleted file mode 100644 index 36b6971a..00000000 --- a/src/quotes.csv +++ /dev/null @@ -1,259 +0,0 @@ -"Author","Quote" -"Thomas Edison","Genius is one percent inspiration and ninety-nine percent perspiration." -"Yogi Berra","You can observe a lot just by watching." -"Abraham Lincoln","A house divided against itself cannot stand." -"Johann Wolfgang von Goethe","Difficulties increase the nearer we get to the goal." -"Byron Pulsifer","Fate is in your hands and no one elses" -"Lao Tzu","Be the chief but never the lord." -"Carl Sandburg","Nothing happens unless first we dream." -"Aristotle","Well begun is half done." -"Yogi Berra","Life is a learning experience, only if you learn." -"Margaret Sangster","Self-complacency is fatal to progress." -"Buddha","Peace comes from within. Do not seek it without." -"Byron Pulsifer","What you give is what you get." -"Iris Murdoch","We can only learn to love by loving." -"Karen Clark","Life is change. Growth is optional. Choose wisely." -"Wayne Dyer","You'll see it when you believe it." -"","Today is the tomorrow we worried about yesterday." -"","It's easier to see the mistakes on someone else's paper." -"","Every man dies. Not every man really lives." -"Lao Tzu","To lead people walk behind them." -"William Shakespeare","Having nothing, nothing can he lose." -"Henry J. Kaiser","Trouble is only opportunity in work clothes." -"Publilius Syrus","A rolling stone gathers no moss." -"Napoleon Hill","Ideas are the beginning points of all fortunes." -"Donald Trump","Everything in life is luck." -"Lao Tzu","Doing nothing is better than being busy doing nothing." -"Benjamin Spock","Trust yourself. You know more than you think you do." -"Confucius","Study the past, if you would divine the future." -"","The day is already blessed, find peace within it." -"Sigmund Freud","From error to error one discovers the entire truth." -"Benjamin Franklin","Well done is better than well said." -"Ella Williams","Bite off more than you can chew, then chew it." -"Buddha","Work out your own salvation. Do not depend on others." -"Benjamin Franklin","One today is worth two tomorrows." -"Christopher Reeve","Once you choose hope, anythings possible." -"Albert Einstein","God always takes the simplest way." -"Charles Kettering","One fails forward toward success." -"","From small beginnings come great things." -"Chinese proverb","Learning is a treasure that will follow its owner everywhere" -"Socrates","Be as you wish to seem." -"V. Naipaul","The world is always in movement." -"John Wooden","Never mistake activity for achievement." -"Haddon Robinson","What worries you masters you." -"Pearl Buck","One faces the future with ones past." -"Brian Tracy","Goals are the fuel in the furnace of achievement." -"Leonardo da Vinci","Who sows virtue reaps honour." -"Dalai Lama","Be kind whenever possible. It is always possible." -"Chinese proverb","Talk doesn't cook rice." -"Buddha","He is able who thinks he is able." -"Larry Elder","A goal without a plan is just a wish." -"Michael Korda","To succeed, we must first believe that we can." -"Albert Einstein","Learn from yesterday, live for today, hope for tomorrow." -"James Lowell","A weed is no more than a flower in disguise." -"Yoda","Do, or do not. There is no try." -"Harriet Beecher Stowe","All serious daring starts from within." -"Byron Pulsifer","The best teacher is experience learned from failures." -"Murray Gell-Mann","Think how hard physics would be if particles could think." -"John Lennon","Love is the flower you've got to let grow." -"Napoleon Hill","Don't wait. The time will never be just right." -"Pericles","Time is the wisest counsellor of all." -"Napoleon Hill","You give before you get." -"Socrates","Wisdom begins in wonder." -"Baltasar Gracian","Without courage, wisdom bears no fruit." -"Aristotle","Change in all things is sweet." -"Byron Pulsifer","What you fear is that which requires action to overcome." -"Cullen Hightower","When performance exceeds ambition, the overlap is called success." -"African proverb","When deeds speak, words are nothing." -"Wayne Dyer","Real magic in relationships means an absence of judgement of others." -"Albert Einstein","I never think of the future. It comes soon enough." -"Ralph Emerson","Skill to do comes of doing." -"Sophocles","Wisdom is the supreme part of happiness." -"Maya Angelou","I believe that every person is born with talent." -"Abraham Lincoln","Important principles may, and must, be inflexible." -"Richard Evans","The undertaking of a new action brings new strength." -"Ralph Emerson","The years teach much which the days never know." -"Ralph Emerson","Our distrust is very expensive." -"Bodhidharma","All know the way; few actually walk it." -"Johann Wolfgang von Goethe","Great talent finds happiness in execution." -"Michelangelo","Faith in oneself is the best and safest course." -"Winston Churchill","Courage is going from failure to failure without losing enthusiasm." -"Leo Tolstoy","The two most powerful warriors are patience and time." -"Lao Tzu","Anticipate the difficult by managing the easy." -"Buddha","Those who are free of resentful thoughts surely find peace." -"Sophocles","A short saying often contains much wisdom." -"","It takes both sunshine and rain to make a rainbow." -"","A beautiful thing is never perfect." -"Princess Diana","Only do what your heart tells you." -"John Pierrakos","Life is movement-we breathe, we eat, we walk, we move!" -"Eleanor Roosevelt","No one can make you feel inferior without your consent." -"Richard Bach","Argue for your limitations, and sure enough theyre yours." -"Seneca","Luck is what happens when preparation meets opportunity." -"Napoleon Bonaparte","Victory belongs to the most persevering." -"William Shakespeare","Love all, trust a few, do wrong to none." -"Richard Bach","In order to win, you must expect to win." -"Napoleon Hill","A goal is a dream with a deadline." -"Napoleon Hill","You can do it if you believe you can!" -"Bo Jackson","Set your goals high, and don't stop till you get there." -"","Every new day is another chance to change your life." -"Thich Nhat Hanh","Smile, breathe, and go slowly." -"Liberace","Nobody will believe in you unless you believe in yourself." -"William Arthur Ward","Do more than dream: work." -"Seneca","No man was ever wise by chance." -"","Some pursue happiness, others create it." -"William Shakespeare","He that is giddy thinks the world turns round." -"Ellen Gilchrist","Don't ruin the present with the ruined past." -"Albert Schweitzer","Do something wonderful, people may imitate it." -"","We do what we do because we believe." -"Eleanor Roosevelt","Do one thing every day that scares you." -"Byron Pulsifer","If you cannot be silent be brilliant and thoughtful." -"Carl Jung","Who looks outside, dreams; who looks inside, awakes." -"Buddha","What we think, we become." -"Lord Herbert","The shortest answer is doing." -"Leonardo da Vinci","All our knowledge has its origins in our perceptions." -"","The harder you fall, the higher you bounce." -"Anne Wilson Schaef","Trusting our intuition often saves us from disaster." -"Sojourner Truth","Truth is powerful and it prevails." -"Elizabeth Browning","Light tomorrow with today!" -"German proverb","Silence is a fence around wisdom." -"Madame de Stael","Society develops wit, but its contemplation alone forms genius." -"Richard Bach","The simplest things are often the truest." -"","Everyone smiles in the same language." -"Bernadette Devlin","Yesterday I dared to struggle. Today I dare to win." -"Napoleon Hill","No alibi will save you from accepting the responsibility." -"Walt Disney","If you can dream it, you can do it." -"Buddha","It is better to travel well than to arrive." -"Anais Nin","Life shrinks or expands in proportion to one's courage." -"Sun Tzu","You have to believe in yourself." -"Wayne Dyer","Our intention creates our reality." -"Confucius","Silence is a true friend who never betrays." -"Johann Wolfgang von Goethe","Character develops itself in the stream of life." -"American proverb","From little acorns mighty oaks do grow." -"Jon Kabat-Zinn","You can't stop the waves, but you can learn to surf." -"Gustave Flaubert","Reality does not conform to the ideal, but confirms it." -"William Shakespeare","Speak low, if you speak love." -"Johann Wolfgang von Goethe","A really great talent finds its happiness in execution." -"John Lennon","Reality leaves a lot to the imagination." -"Seneca","The greatest remedy for anger is delay." -"Pearl Buck","Growth itself contains the germ of happiness." -"Leonardo da Vinci","Nothing strengthens authority so much as silence." -"Confucius","Wherever you go, go with all your heart." -"Albert Einstein","The only real valuable thing is intuition." -"Ralph Emerson","Good luck is another name for tenacity of purpose." -"Sylvia Voirol","Rainbows apologize for angry skies." -"","Friendship isn't a big thing. It's a million little things." -"Theophrastus","Time is the most valuable thing a man can spend." -"Tony Robbins","Whatever happens, take responsibility." -"Oscar Wilde","Experience is simply the name we give our mistakes." -"Wayne Dyer","I think and that is all that I am." -"Gloria Steinem","If the shoe doesn't fit, must we change the foot?" -"Marcus Aurelius","Each day provides its own gifts." -"Publilius Syrus","While we stop to think, we often miss our opportunity." -"Bernard Shaw","Life isn't about finding yourself. Life is about creating yourself." -"Richard Bach","To bring anything into your life, imagine that it's already there." -"German proverb","Begin to weave and God will give you the thread." -"Confucius","The more you know yourself, the more you forgive yourself." -"Mary Bethune","Without faith, nothing is possible. With it, nothing is impossible." -"Albert Einstein","Once we accept our limits, we go beyond them." -"","Don't be pushed by your problems; be led by your dreams." -"Brian Tracy","Whatever we expect with confidence becomes our own self-fulfilling prophecy." -"Pablo Picasso","Everything you can imagine is real." -"Usman Asif","Fear is a darkroom where negatives develop." -"Napoleon Bonaparte","The truest wisdom is a resolute determination." -"Victor Hugo","Life is the flower for which love is the honey." -"Epictetus","Freedom is the right to live as we wish." -"","Change your thoughts, change your life!" -"Robert Heller","Never ignore a gut feeling, but never believe that it's enough." -"Marcus Aurelius","Loss is nothing else but change,and change is Natures delight." -"Byron Pulsifer","Someone is special only if you tell them." -"Thich Nhat Hanh","There is no way to happiness, happiness is the way." -"Lao Tzu","He who talks more is sooner exhausted." -"Lao Tzu","He who is contented is rich." -"Plutarch","What we achieve inwardly will change outer reality." -"Ralph Waldo Emerson","Our strength grows out of our weaknesses." -"Mahatma Gandhi","We must become the change we want to see." -"Napoleon Hill","Happiness is found in doing, not merely possessing." -"","Put your future in good hands : your own." -"Wit","We choose our destiny in the way we treat others." -"Voltaire","No snowflake in an avalanche ever feels responsible." -"Virgil","Fortune favours the brave." -"Joseph Stalin","I believe in one thing only, the power of human will." -"Robert Frost","The best way out is always through." -"Seneca","The mind unlearns with difficulty what it has long learned." -"Abraham Lincoln","I destroy my enemies when I make them my friends." -"Thomas Fuller","No garden is without its weeds." -"Elbert Hubbard","There is no failure except in no longer trying." -"Turkish proverb","Kind words will unlock an iron door." -"Hugh Miller","Problems are only opportunities with thorns on them." -"A. Powell Davies","Life is just a chance to grow a soul." -"Johann Wolfgang von Goethe","Mountains cannot be surmounted except by winding paths." -"Thich Nhat Hanh","May our hearts garden of awakening bloom with hundreds of flowers." -"John Dryden","Fortune befriends the bold." -"Friedrich von Schiller","Keep true to the dreams of thy youth." -"Mike Ditka","You're never a loser until you quit trying." -"Immanuel Kant","Science is organized knowledge. Wisdom is organized life." -"Johann Wolfgang von Goethe","Knowing is not enough; we must apply!" -"Richard Bach","Strong beliefs win strong men, and then make them stronger." -"Albert Camus","Autumn is a second spring when every leaf is a flower." -"Toni Morrison","If you surrender to the wind, you can ride it." -"Helen Keller","Keep yourself to the sunshine and you cannot see the shadow." -"Paulo Coelho","Write your plans in pencil and give God the eraser." -"Pablo Picasso","Inspiration exists, but it has to find us working." -"Jonathan Kozol","Pick battles big enough to matter, small enough to win." -"Janis Joplin","Don't compromise yourself. You are all you've got." -"Sophocles","A short saying oft contains much wisdom." -"Epictetus","Difficulties are things that show a person what they are." -"Honore de Balzac","When you doubt your power, you give power to your doubt." -"Ovid","The cause is hidden. The effect is visible to all." -"Francis Bacon","A prudent question is one half of wisdom." -"Tony Robbins","The path to success is to take massive, determined action." -"Manuel Puig","I allow my intuition to lead my path." -"William R. Inge","Nature takes away any faculty that is not used." -"Epictetus","If you wish to be a writer, write." -"Wayne Dyer","There is no way to prosperity, prosperity is the way." -"Jim Rohn","Either you run the day or the day runs you." -"Publilius Syrus","Better be ignorant of a matter than half know it." -"Oprah Winfrey","Follow your instincts. That is where true wisdom manifests itself." -"Benjamin Franklin","There never was a good knife made of bad steel." -"Anatole France","To accomplish great things, we must dream as well as act." -"Saint Augustine","Patience is the companion of wisdom." -"Buddha","The mind is everything. What you think you become." -"Voltaire","To enjoy life, we must touch much of it lightly." -"Maya Lin","To fly, we have to have resistance." -"Blaise Pascal","The heart has its reasons which reason knows not of." -"William Shakespeare","Be great in act, as you have been in thought." -"Napoleon Bonaparte","Imagination rules the world." -"Blaise Pascal","Kind words do not cost much. Yet they accomplish much." -"Michelangelo","There is no greater harm than that of time wasted." -"Jonas Salk","Intuition will tell the thinking mind where to look next." -"","Worry gives a small thing a big shadow." -"Napoleon Hill","Fears are nothing more than a state of mind." -"Lao Tzu","The journey of a thousand miles begins with one step." -"Peter Drucker","Efficiency is doing things right; effectiveness is doing the right things." -"Luisa Sigea","Blaze with the fire that is never extinguished." -"Dr. Seuss","Don't cry because it's over. Smile because it happened." -"Jason Fried","No is easier to do. Yes is easier to say." -"Confucius","To be wrong is nothing unless you continue to remember it." -"Babe Ruth","Yesterdays home runs don't win today's games." -"Carlyle","Silence is deep as Eternity, Speech is shallow as Time." -"Leo F. Buscaglia","Don't smother each other. No one can grow in the shade." -"Lao Tzu","An ant on the move does more than a dozing ox" -"Indira Gandhi","You can't shake hands with a clenched fist." -"Plato","A good decision is based on knowledge and not on numbers." -"Confucius","The cautious seldom err." -"Frederick Douglass","If there is no struggle, there is no progress." -"Willa Cather","Where there is great love, there are always miracles." -"John Lennon","Time you enjoy wasting, was not wasted." -"Richard Bach","Every problem has a gift for you in its hands." -"Jean de la Fontaine","Sadness flies away on the wings of time." -"Publilius Syrus","I have often regretted my speech, never my silence." -"Thomas Jefferson","Never put off till tomorrow what you can do today." -"Thomas Dewar","Minds are like parachutes. They only function when open." -"George Patton","If a man does his best, what else is there?" -"Benjamin Disraeli","The secret of success is constancy to purpose." -"Ralph Emerson","Life is a progress, and not a station." -"Horace Friess","All seasons are beautiful for the person who carries happiness within." -"Elbert Hubbard","To avoid criticism, do nothing, say nothing, be nothing." -"Ovid","All things change; nothing perishes." -"Haynes Bayly","Absence makes the heart grow fonder." -"Lauren Bacall","Imagination is the highest kite one can fly." \ No newline at end of file diff --git a/test/test_app.py b/test/test_app.py index baa6ea39..00b828bd 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -3,6 +3,8 @@ import requests +app.testing = True + class TestModule(unittest.TestCase): def test_home(self): From 6b6287c55dbff447351beb3a761a66f6eaa9e6f3 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:14:12 -0400 Subject: [PATCH 048/205] add --- src/quotes.csv | 259 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 src/quotes.csv diff --git a/src/quotes.csv b/src/quotes.csv new file mode 100644 index 00000000..36b6971a --- /dev/null +++ b/src/quotes.csv @@ -0,0 +1,259 @@ +"Author","Quote" +"Thomas Edison","Genius is one percent inspiration and ninety-nine percent perspiration." +"Yogi Berra","You can observe a lot just by watching." +"Abraham Lincoln","A house divided against itself cannot stand." +"Johann Wolfgang von Goethe","Difficulties increase the nearer we get to the goal." +"Byron Pulsifer","Fate is in your hands and no one elses" +"Lao Tzu","Be the chief but never the lord." +"Carl Sandburg","Nothing happens unless first we dream." +"Aristotle","Well begun is half done." +"Yogi Berra","Life is a learning experience, only if you learn." +"Margaret Sangster","Self-complacency is fatal to progress." +"Buddha","Peace comes from within. Do not seek it without." +"Byron Pulsifer","What you give is what you get." +"Iris Murdoch","We can only learn to love by loving." +"Karen Clark","Life is change. Growth is optional. Choose wisely." +"Wayne Dyer","You'll see it when you believe it." +"","Today is the tomorrow we worried about yesterday." +"","It's easier to see the mistakes on someone else's paper." +"","Every man dies. Not every man really lives." +"Lao Tzu","To lead people walk behind them." +"William Shakespeare","Having nothing, nothing can he lose." +"Henry J. Kaiser","Trouble is only opportunity in work clothes." +"Publilius Syrus","A rolling stone gathers no moss." +"Napoleon Hill","Ideas are the beginning points of all fortunes." +"Donald Trump","Everything in life is luck." +"Lao Tzu","Doing nothing is better than being busy doing nothing." +"Benjamin Spock","Trust yourself. You know more than you think you do." +"Confucius","Study the past, if you would divine the future." +"","The day is already blessed, find peace within it." +"Sigmund Freud","From error to error one discovers the entire truth." +"Benjamin Franklin","Well done is better than well said." +"Ella Williams","Bite off more than you can chew, then chew it." +"Buddha","Work out your own salvation. Do not depend on others." +"Benjamin Franklin","One today is worth two tomorrows." +"Christopher Reeve","Once you choose hope, anythings possible." +"Albert Einstein","God always takes the simplest way." +"Charles Kettering","One fails forward toward success." +"","From small beginnings come great things." +"Chinese proverb","Learning is a treasure that will follow its owner everywhere" +"Socrates","Be as you wish to seem." +"V. Naipaul","The world is always in movement." +"John Wooden","Never mistake activity for achievement." +"Haddon Robinson","What worries you masters you." +"Pearl Buck","One faces the future with ones past." +"Brian Tracy","Goals are the fuel in the furnace of achievement." +"Leonardo da Vinci","Who sows virtue reaps honour." +"Dalai Lama","Be kind whenever possible. It is always possible." +"Chinese proverb","Talk doesn't cook rice." +"Buddha","He is able who thinks he is able." +"Larry Elder","A goal without a plan is just a wish." +"Michael Korda","To succeed, we must first believe that we can." +"Albert Einstein","Learn from yesterday, live for today, hope for tomorrow." +"James Lowell","A weed is no more than a flower in disguise." +"Yoda","Do, or do not. There is no try." +"Harriet Beecher Stowe","All serious daring starts from within." +"Byron Pulsifer","The best teacher is experience learned from failures." +"Murray Gell-Mann","Think how hard physics would be if particles could think." +"John Lennon","Love is the flower you've got to let grow." +"Napoleon Hill","Don't wait. The time will never be just right." +"Pericles","Time is the wisest counsellor of all." +"Napoleon Hill","You give before you get." +"Socrates","Wisdom begins in wonder." +"Baltasar Gracian","Without courage, wisdom bears no fruit." +"Aristotle","Change in all things is sweet." +"Byron Pulsifer","What you fear is that which requires action to overcome." +"Cullen Hightower","When performance exceeds ambition, the overlap is called success." +"African proverb","When deeds speak, words are nothing." +"Wayne Dyer","Real magic in relationships means an absence of judgement of others." +"Albert Einstein","I never think of the future. It comes soon enough." +"Ralph Emerson","Skill to do comes of doing." +"Sophocles","Wisdom is the supreme part of happiness." +"Maya Angelou","I believe that every person is born with talent." +"Abraham Lincoln","Important principles may, and must, be inflexible." +"Richard Evans","The undertaking of a new action brings new strength." +"Ralph Emerson","The years teach much which the days never know." +"Ralph Emerson","Our distrust is very expensive." +"Bodhidharma","All know the way; few actually walk it." +"Johann Wolfgang von Goethe","Great talent finds happiness in execution." +"Michelangelo","Faith in oneself is the best and safest course." +"Winston Churchill","Courage is going from failure to failure without losing enthusiasm." +"Leo Tolstoy","The two most powerful warriors are patience and time." +"Lao Tzu","Anticipate the difficult by managing the easy." +"Buddha","Those who are free of resentful thoughts surely find peace." +"Sophocles","A short saying often contains much wisdom." +"","It takes both sunshine and rain to make a rainbow." +"","A beautiful thing is never perfect." +"Princess Diana","Only do what your heart tells you." +"John Pierrakos","Life is movement-we breathe, we eat, we walk, we move!" +"Eleanor Roosevelt","No one can make you feel inferior without your consent." +"Richard Bach","Argue for your limitations, and sure enough theyre yours." +"Seneca","Luck is what happens when preparation meets opportunity." +"Napoleon Bonaparte","Victory belongs to the most persevering." +"William Shakespeare","Love all, trust a few, do wrong to none." +"Richard Bach","In order to win, you must expect to win." +"Napoleon Hill","A goal is a dream with a deadline." +"Napoleon Hill","You can do it if you believe you can!" +"Bo Jackson","Set your goals high, and don't stop till you get there." +"","Every new day is another chance to change your life." +"Thich Nhat Hanh","Smile, breathe, and go slowly." +"Liberace","Nobody will believe in you unless you believe in yourself." +"William Arthur Ward","Do more than dream: work." +"Seneca","No man was ever wise by chance." +"","Some pursue happiness, others create it." +"William Shakespeare","He that is giddy thinks the world turns round." +"Ellen Gilchrist","Don't ruin the present with the ruined past." +"Albert Schweitzer","Do something wonderful, people may imitate it." +"","We do what we do because we believe." +"Eleanor Roosevelt","Do one thing every day that scares you." +"Byron Pulsifer","If you cannot be silent be brilliant and thoughtful." +"Carl Jung","Who looks outside, dreams; who looks inside, awakes." +"Buddha","What we think, we become." +"Lord Herbert","The shortest answer is doing." +"Leonardo da Vinci","All our knowledge has its origins in our perceptions." +"","The harder you fall, the higher you bounce." +"Anne Wilson Schaef","Trusting our intuition often saves us from disaster." +"Sojourner Truth","Truth is powerful and it prevails." +"Elizabeth Browning","Light tomorrow with today!" +"German proverb","Silence is a fence around wisdom." +"Madame de Stael","Society develops wit, but its contemplation alone forms genius." +"Richard Bach","The simplest things are often the truest." +"","Everyone smiles in the same language." +"Bernadette Devlin","Yesterday I dared to struggle. Today I dare to win." +"Napoleon Hill","No alibi will save you from accepting the responsibility." +"Walt Disney","If you can dream it, you can do it." +"Buddha","It is better to travel well than to arrive." +"Anais Nin","Life shrinks or expands in proportion to one's courage." +"Sun Tzu","You have to believe in yourself." +"Wayne Dyer","Our intention creates our reality." +"Confucius","Silence is a true friend who never betrays." +"Johann Wolfgang von Goethe","Character develops itself in the stream of life." +"American proverb","From little acorns mighty oaks do grow." +"Jon Kabat-Zinn","You can't stop the waves, but you can learn to surf." +"Gustave Flaubert","Reality does not conform to the ideal, but confirms it." +"William Shakespeare","Speak low, if you speak love." +"Johann Wolfgang von Goethe","A really great talent finds its happiness in execution." +"John Lennon","Reality leaves a lot to the imagination." +"Seneca","The greatest remedy for anger is delay." +"Pearl Buck","Growth itself contains the germ of happiness." +"Leonardo da Vinci","Nothing strengthens authority so much as silence." +"Confucius","Wherever you go, go with all your heart." +"Albert Einstein","The only real valuable thing is intuition." +"Ralph Emerson","Good luck is another name for tenacity of purpose." +"Sylvia Voirol","Rainbows apologize for angry skies." +"","Friendship isn't a big thing. It's a million little things." +"Theophrastus","Time is the most valuable thing a man can spend." +"Tony Robbins","Whatever happens, take responsibility." +"Oscar Wilde","Experience is simply the name we give our mistakes." +"Wayne Dyer","I think and that is all that I am." +"Gloria Steinem","If the shoe doesn't fit, must we change the foot?" +"Marcus Aurelius","Each day provides its own gifts." +"Publilius Syrus","While we stop to think, we often miss our opportunity." +"Bernard Shaw","Life isn't about finding yourself. Life is about creating yourself." +"Richard Bach","To bring anything into your life, imagine that it's already there." +"German proverb","Begin to weave and God will give you the thread." +"Confucius","The more you know yourself, the more you forgive yourself." +"Mary Bethune","Without faith, nothing is possible. With it, nothing is impossible." +"Albert Einstein","Once we accept our limits, we go beyond them." +"","Don't be pushed by your problems; be led by your dreams." +"Brian Tracy","Whatever we expect with confidence becomes our own self-fulfilling prophecy." +"Pablo Picasso","Everything you can imagine is real." +"Usman Asif","Fear is a darkroom where negatives develop." +"Napoleon Bonaparte","The truest wisdom is a resolute determination." +"Victor Hugo","Life is the flower for which love is the honey." +"Epictetus","Freedom is the right to live as we wish." +"","Change your thoughts, change your life!" +"Robert Heller","Never ignore a gut feeling, but never believe that it's enough." +"Marcus Aurelius","Loss is nothing else but change,and change is Natures delight." +"Byron Pulsifer","Someone is special only if you tell them." +"Thich Nhat Hanh","There is no way to happiness, happiness is the way." +"Lao Tzu","He who talks more is sooner exhausted." +"Lao Tzu","He who is contented is rich." +"Plutarch","What we achieve inwardly will change outer reality." +"Ralph Waldo Emerson","Our strength grows out of our weaknesses." +"Mahatma Gandhi","We must become the change we want to see." +"Napoleon Hill","Happiness is found in doing, not merely possessing." +"","Put your future in good hands : your own." +"Wit","We choose our destiny in the way we treat others." +"Voltaire","No snowflake in an avalanche ever feels responsible." +"Virgil","Fortune favours the brave." +"Joseph Stalin","I believe in one thing only, the power of human will." +"Robert Frost","The best way out is always through." +"Seneca","The mind unlearns with difficulty what it has long learned." +"Abraham Lincoln","I destroy my enemies when I make them my friends." +"Thomas Fuller","No garden is without its weeds." +"Elbert Hubbard","There is no failure except in no longer trying." +"Turkish proverb","Kind words will unlock an iron door." +"Hugh Miller","Problems are only opportunities with thorns on them." +"A. Powell Davies","Life is just a chance to grow a soul." +"Johann Wolfgang von Goethe","Mountains cannot be surmounted except by winding paths." +"Thich Nhat Hanh","May our hearts garden of awakening bloom with hundreds of flowers." +"John Dryden","Fortune befriends the bold." +"Friedrich von Schiller","Keep true to the dreams of thy youth." +"Mike Ditka","You're never a loser until you quit trying." +"Immanuel Kant","Science is organized knowledge. Wisdom is organized life." +"Johann Wolfgang von Goethe","Knowing is not enough; we must apply!" +"Richard Bach","Strong beliefs win strong men, and then make them stronger." +"Albert Camus","Autumn is a second spring when every leaf is a flower." +"Toni Morrison","If you surrender to the wind, you can ride it." +"Helen Keller","Keep yourself to the sunshine and you cannot see the shadow." +"Paulo Coelho","Write your plans in pencil and give God the eraser." +"Pablo Picasso","Inspiration exists, but it has to find us working." +"Jonathan Kozol","Pick battles big enough to matter, small enough to win." +"Janis Joplin","Don't compromise yourself. You are all you've got." +"Sophocles","A short saying oft contains much wisdom." +"Epictetus","Difficulties are things that show a person what they are." +"Honore de Balzac","When you doubt your power, you give power to your doubt." +"Ovid","The cause is hidden. The effect is visible to all." +"Francis Bacon","A prudent question is one half of wisdom." +"Tony Robbins","The path to success is to take massive, determined action." +"Manuel Puig","I allow my intuition to lead my path." +"William R. Inge","Nature takes away any faculty that is not used." +"Epictetus","If you wish to be a writer, write." +"Wayne Dyer","There is no way to prosperity, prosperity is the way." +"Jim Rohn","Either you run the day or the day runs you." +"Publilius Syrus","Better be ignorant of a matter than half know it." +"Oprah Winfrey","Follow your instincts. That is where true wisdom manifests itself." +"Benjamin Franklin","There never was a good knife made of bad steel." +"Anatole France","To accomplish great things, we must dream as well as act." +"Saint Augustine","Patience is the companion of wisdom." +"Buddha","The mind is everything. What you think you become." +"Voltaire","To enjoy life, we must touch much of it lightly." +"Maya Lin","To fly, we have to have resistance." +"Blaise Pascal","The heart has its reasons which reason knows not of." +"William Shakespeare","Be great in act, as you have been in thought." +"Napoleon Bonaparte","Imagination rules the world." +"Blaise Pascal","Kind words do not cost much. Yet they accomplish much." +"Michelangelo","There is no greater harm than that of time wasted." +"Jonas Salk","Intuition will tell the thinking mind where to look next." +"","Worry gives a small thing a big shadow." +"Napoleon Hill","Fears are nothing more than a state of mind." +"Lao Tzu","The journey of a thousand miles begins with one step." +"Peter Drucker","Efficiency is doing things right; effectiveness is doing the right things." +"Luisa Sigea","Blaze with the fire that is never extinguished." +"Dr. Seuss","Don't cry because it's over. Smile because it happened." +"Jason Fried","No is easier to do. Yes is easier to say." +"Confucius","To be wrong is nothing unless you continue to remember it." +"Babe Ruth","Yesterdays home runs don't win today's games." +"Carlyle","Silence is deep as Eternity, Speech is shallow as Time." +"Leo F. Buscaglia","Don't smother each other. No one can grow in the shade." +"Lao Tzu","An ant on the move does more than a dozing ox" +"Indira Gandhi","You can't shake hands with a clenched fist." +"Plato","A good decision is based on knowledge and not on numbers." +"Confucius","The cautious seldom err." +"Frederick Douglass","If there is no struggle, there is no progress." +"Willa Cather","Where there is great love, there are always miracles." +"John Lennon","Time you enjoy wasting, was not wasted." +"Richard Bach","Every problem has a gift for you in its hands." +"Jean de la Fontaine","Sadness flies away on the wings of time." +"Publilius Syrus","I have often regretted my speech, never my silence." +"Thomas Jefferson","Never put off till tomorrow what you can do today." +"Thomas Dewar","Minds are like parachutes. They only function when open." +"George Patton","If a man does his best, what else is there?" +"Benjamin Disraeli","The secret of success is constancy to purpose." +"Ralph Emerson","Life is a progress, and not a station." +"Horace Friess","All seasons are beautiful for the person who carries happiness within." +"Elbert Hubbard","To avoid criticism, do nothing, say nothing, be nothing." +"Ovid","All things change; nothing perishes." +"Haynes Bayly","Absence makes the heart grow fonder." +"Lauren Bacall","Imagination is the highest kite one can fly." \ No newline at end of file From 1cd6c56a467719338356dddae11367295a62d552 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:18:53 -0400 Subject: [PATCH 049/205] add absolute path --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 1114e590..dc7c3f88 100644 --- a/src/app.py +++ b/src/app.py @@ -82,7 +82,7 @@ def getnewTaskID(): @app.route("/") def homePage(): """This function renders the home page.""" - return render_template("index.html", data=refresh_data()) + return render_template("../templates/index.html", data=refresh_data()) @app.route("/update_user_info", methods = ["POST"]) From 01d096259f0878dc41d54139d9af58cb4d5f24ef Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:22:56 -0400 Subject: [PATCH 050/205] refactor --- src/app.py | 2 +- src/index.html | 271 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 src/index.html diff --git a/src/app.py b/src/app.py index dc7c3f88..1114e590 100644 --- a/src/app.py +++ b/src/app.py @@ -82,7 +82,7 @@ def getnewTaskID(): @app.route("/") def homePage(): """This function renders the home page.""" - return render_template("../templates/index.html", data=refresh_data()) + return render_template("index.html", data=refresh_data()) @app.route("/update_user_info", methods = ["POST"]) diff --git a/src/index.html b/src/index.html new file mode 100644 index 00000000..84639ad9 --- /dev/null +++ b/src/index.html @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Simpli + + + + + +

+ + +
+

+

Welcome to Task Scheduler

+

+

Schedule for : + +

+
+ + +
+

+ Hi, {{data["name_block"]["name"]}}
+ email-id: {{data["name_block"]["email_id"]}}
+ E-mail notifications: {{data["name_block"]["email_notifications"]}} + + + + + +
+ + + + + + + +
+ +

+
+ +
+
+

+ {{data["quote_block"]["quote"]}} +

+

+ {{data["quote_block"]["author"]}} +

+
+ + + + + +
+

+

+ Add a task

+
+
+ +
+ +
+
+
+ + +
+
+
+ + +
+
+
+
+ +
+ + +
+
+ +
+
+ + + + +
+
+ +
+
+

+ +
+

+

+ Task List +

+ + + + + + + + + + + + + {% for task in data["task-list-block"]["task-list"] %} + + + + + + + + + + + + {% endfor %} + +
TaskTime Reqd.Due on:
yyyy-mm-ddThh:mm
Delete
+ {{data["task-list-block"]["task-list"][task]["task_name"]}} + + {{data["task-list-block"]["task-list"][task]["estimate"]}} + + {{data["task-list-block"]["task-list"][task]["deadline"]}} + +
+ + + + +
+ +
+

+
+ + + +
+ + + + + \ No newline at end of file From 28d6480013178cfa771ea463fd91a0efbe92bb5d Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:30:28 -0400 Subject: [PATCH 051/205] refactor --- src/{ => templates}/index.html | 0 templates/index.html | 271 --------------------------------- 2 files changed, 271 deletions(-) rename src/{ => templates}/index.html (100%) delete mode 100644 templates/index.html diff --git a/src/index.html b/src/templates/index.html similarity index 100% rename from src/index.html rename to src/templates/index.html diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index 84639ad9..00000000 --- a/templates/index.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simpli - - - - - -
- - -
-

-

Welcome to Task Scheduler

-

-

Schedule for : - -

-
- - -
-

- Hi, {{data["name_block"]["name"]}}
- email-id: {{data["name_block"]["email_id"]}}
- E-mail notifications: {{data["name_block"]["email_notifications"]}} - - - - - -
- - - - - - - -
- -

-
- -
-
-

- {{data["quote_block"]["quote"]}} -

-

- {{data["quote_block"]["author"]}} -

-
- - - - - -
-

-

+ Add a task

-
-
- -
- -
-
-
- - -
-
-
- - -
-
-
-
- -
- - -
-
- -
-
- - - - -
-
- -
-
-

- -
-

-

- Task List -

- - - - - - - - - - - - - {% for task in data["task-list-block"]["task-list"] %} - - - - - - - - - - - - {% endfor %} - -
TaskTime Reqd.Due on:
yyyy-mm-ddThh:mm
Delete
- {{data["task-list-block"]["task-list"][task]["task_name"]}} - - {{data["task-list-block"]["task-list"][task]["estimate"]}} - - {{data["task-list-block"]["task-list"][task]["deadline"]}} - -
- - - - -
- -
-

-
- - - -
- - - - - \ No newline at end of file From d9ca6a78726ef3f928be4a8813aead786f8772e9 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:36:59 -0400 Subject: [PATCH 052/205] refactor path --- src/app.py | 4 ++-- src/user_information.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/user_information.json diff --git a/src/app.py b/src/app.py index 1114e590..4e1f5ffd 100644 --- a/src/app.py +++ b/src/app.py @@ -33,7 +33,7 @@ def refresh_data(): """This function loads all the data required to display the home page from file-system.""" ##### Load user information from file - with open(os.path.join("../static", "user_information.json"), "r", encoding="utf-8") as json_file: + with open(os.path.join(package_dir,"user_information.json"), "r", encoding="utf-8") as json_file: json_data = json.load(json_file) initialized = json_data["initialized"] @@ -96,7 +96,7 @@ def update_user_information(): new_info["initialized"] = "yes" new_info["email_notifications"] = user_information["emailChoose"] - with open(os.path.join("../static", "user_information.json"), "w", encoding="utf-8") as json_file: + with open(os.path.join(package_dir, "user_information.json"), "w", encoding="utf-8") as json_file: json.dump(new_info, json_file) return redirect("/") diff --git a/src/user_information.json b/src/user_information.json new file mode 100644 index 00000000..01e250f3 --- /dev/null +++ b/src/user_information.json @@ -0,0 +1 @@ +{"name": "user1", "email_id": "user1@gmail.com", "initialized": "yes", "email_notifications": "user1@gmail.com"} \ No newline at end of file From 2dc2532d093faf2c26816b498a45eaa9d95bc2cc Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:39:56 -0400 Subject: [PATCH 053/205] refactor --- src/app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app.py b/src/app.py index 4e1f5ffd..905c9790 100644 --- a/src/app.py +++ b/src/app.py @@ -11,16 +11,17 @@ app = Flask(__name__) +package_dir = os.path.dirname(os.path.abspath(__file__)) """Global constant to store directory path""" -TODO_TASKS_PATH = os.path.join("../static", "tasks", "todo") -COMPLETED_TASKS_PATH = os.path.join("../static", "tasks", "completed") +TODO_TASKS_PATH = os.path.join(package_dir, "../static", "tasks", "todo") +COMPLETED_TASKS_PATH = os.path.join(package_dir, "../static", "tasks", "completed") """List declaration for storing the quotes and authors """ ALL_QUOTES = [] ALL_AUTHORS = [] """Loading our code dataset in memory""" -package_dir = os.path.dirname(os.path.abspath(__file__)) + with open(os.path.join(package_dir,"quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) From 274076b4d740c88e9c009a75e76f3bcd8d63bc4c Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:45:59 -0400 Subject: [PATCH 054/205] test --- .github/workflows/code_cov.yml | 7 +++++-- .travis.yml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code_cov.yml b/.github/workflows/code_cov.yml index 4471fc13..a7d7c817 100644 --- a/.github/workflows/code_cov.yml +++ b/.github/workflows/code_cov.yml @@ -24,8 +24,11 @@ jobs: echo requirements installed - name: Run the tests run: | - cd test - pytest --cov=./ + cd src + python app.py & + sleep 5 + cd test + pytest --cov=./ - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/.travis.yml b/.travis.yml index cc1bc83b..babcfb0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ name: Testing language: python env: - - CODECOV_TOKEN='13d7f7c4-84e7-48ab-b951-8257e4432983' + - CODECOV_TOKEN='18a8beea-4407-498f-8b15-990517519ac2' os: - linux python: From 42c76060121383414184249d592d8783d251274f Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:47:25 -0400 Subject: [PATCH 055/205] refactor --- .github/workflows/code_cov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_cov.yml b/.github/workflows/code_cov.yml index a7d7c817..5c6fd4b9 100644 --- a/.github/workflows/code_cov.yml +++ b/.github/workflows/code_cov.yml @@ -27,7 +27,7 @@ jobs: cd src python app.py & sleep 5 - cd test + cd ../test pytest --cov=./ - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From fc4d55572fb6264963105899641dba442027e3fc Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:50:17 -0400 Subject: [PATCH 056/205] refactor --- src/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.py b/src/app.py index 905c9790..5becd216 100644 --- a/src/app.py +++ b/src/app.py @@ -22,7 +22,7 @@ """Loading our code dataset in memory""" -with open(os.path.join(package_dir,"quotes.csv"), "r", encoding="utf-8") as csv_file: +with open(os.path.join(package_dir, "../static", "quotes.csv"), "r", encoding="utf-8") as csv_file: reader = csv.DictReader(csv_file) for row in reader: @@ -34,7 +34,7 @@ def refresh_data(): """This function loads all the data required to display the home page from file-system.""" ##### Load user information from file - with open(os.path.join(package_dir,"user_information.json"), "r", encoding="utf-8") as json_file: + with open(os.path.join(package_dir,"../static","user_information.json"), "r", encoding="utf-8") as json_file: json_data = json.load(json_file) initialized = json_data["initialized"] @@ -97,7 +97,7 @@ def update_user_information(): new_info["initialized"] = "yes" new_info["email_notifications"] = user_information["emailChoose"] - with open(os.path.join(package_dir, "user_information.json"), "w", encoding="utf-8") as json_file: + with open(os.path.join(package_dir,"../static", "user_information.json"), "w", encoding="utf-8") as json_file: json.dump(new_info, json_file) return redirect("/") From f6467fd6943f9743640a6a9584cca161a73f7a97 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 16:51:31 -0400 Subject: [PATCH 057/205] refactor --- src/quotes.csv | 259 -------------------------------------- src/user_information.json | 1 - 2 files changed, 260 deletions(-) delete mode 100644 src/quotes.csv delete mode 100644 src/user_information.json diff --git a/src/quotes.csv b/src/quotes.csv deleted file mode 100644 index 36b6971a..00000000 --- a/src/quotes.csv +++ /dev/null @@ -1,259 +0,0 @@ -"Author","Quote" -"Thomas Edison","Genius is one percent inspiration and ninety-nine percent perspiration." -"Yogi Berra","You can observe a lot just by watching." -"Abraham Lincoln","A house divided against itself cannot stand." -"Johann Wolfgang von Goethe","Difficulties increase the nearer we get to the goal." -"Byron Pulsifer","Fate is in your hands and no one elses" -"Lao Tzu","Be the chief but never the lord." -"Carl Sandburg","Nothing happens unless first we dream." -"Aristotle","Well begun is half done." -"Yogi Berra","Life is a learning experience, only if you learn." -"Margaret Sangster","Self-complacency is fatal to progress." -"Buddha","Peace comes from within. Do not seek it without." -"Byron Pulsifer","What you give is what you get." -"Iris Murdoch","We can only learn to love by loving." -"Karen Clark","Life is change. Growth is optional. Choose wisely." -"Wayne Dyer","You'll see it when you believe it." -"","Today is the tomorrow we worried about yesterday." -"","It's easier to see the mistakes on someone else's paper." -"","Every man dies. Not every man really lives." -"Lao Tzu","To lead people walk behind them." -"William Shakespeare","Having nothing, nothing can he lose." -"Henry J. Kaiser","Trouble is only opportunity in work clothes." -"Publilius Syrus","A rolling stone gathers no moss." -"Napoleon Hill","Ideas are the beginning points of all fortunes." -"Donald Trump","Everything in life is luck." -"Lao Tzu","Doing nothing is better than being busy doing nothing." -"Benjamin Spock","Trust yourself. You know more than you think you do." -"Confucius","Study the past, if you would divine the future." -"","The day is already blessed, find peace within it." -"Sigmund Freud","From error to error one discovers the entire truth." -"Benjamin Franklin","Well done is better than well said." -"Ella Williams","Bite off more than you can chew, then chew it." -"Buddha","Work out your own salvation. Do not depend on others." -"Benjamin Franklin","One today is worth two tomorrows." -"Christopher Reeve","Once you choose hope, anythings possible." -"Albert Einstein","God always takes the simplest way." -"Charles Kettering","One fails forward toward success." -"","From small beginnings come great things." -"Chinese proverb","Learning is a treasure that will follow its owner everywhere" -"Socrates","Be as you wish to seem." -"V. Naipaul","The world is always in movement." -"John Wooden","Never mistake activity for achievement." -"Haddon Robinson","What worries you masters you." -"Pearl Buck","One faces the future with ones past." -"Brian Tracy","Goals are the fuel in the furnace of achievement." -"Leonardo da Vinci","Who sows virtue reaps honour." -"Dalai Lama","Be kind whenever possible. It is always possible." -"Chinese proverb","Talk doesn't cook rice." -"Buddha","He is able who thinks he is able." -"Larry Elder","A goal without a plan is just a wish." -"Michael Korda","To succeed, we must first believe that we can." -"Albert Einstein","Learn from yesterday, live for today, hope for tomorrow." -"James Lowell","A weed is no more than a flower in disguise." -"Yoda","Do, or do not. There is no try." -"Harriet Beecher Stowe","All serious daring starts from within." -"Byron Pulsifer","The best teacher is experience learned from failures." -"Murray Gell-Mann","Think how hard physics would be if particles could think." -"John Lennon","Love is the flower you've got to let grow." -"Napoleon Hill","Don't wait. The time will never be just right." -"Pericles","Time is the wisest counsellor of all." -"Napoleon Hill","You give before you get." -"Socrates","Wisdom begins in wonder." -"Baltasar Gracian","Without courage, wisdom bears no fruit." -"Aristotle","Change in all things is sweet." -"Byron Pulsifer","What you fear is that which requires action to overcome." -"Cullen Hightower","When performance exceeds ambition, the overlap is called success." -"African proverb","When deeds speak, words are nothing." -"Wayne Dyer","Real magic in relationships means an absence of judgement of others." -"Albert Einstein","I never think of the future. It comes soon enough." -"Ralph Emerson","Skill to do comes of doing." -"Sophocles","Wisdom is the supreme part of happiness." -"Maya Angelou","I believe that every person is born with talent." -"Abraham Lincoln","Important principles may, and must, be inflexible." -"Richard Evans","The undertaking of a new action brings new strength." -"Ralph Emerson","The years teach much which the days never know." -"Ralph Emerson","Our distrust is very expensive." -"Bodhidharma","All know the way; few actually walk it." -"Johann Wolfgang von Goethe","Great talent finds happiness in execution." -"Michelangelo","Faith in oneself is the best and safest course." -"Winston Churchill","Courage is going from failure to failure without losing enthusiasm." -"Leo Tolstoy","The two most powerful warriors are patience and time." -"Lao Tzu","Anticipate the difficult by managing the easy." -"Buddha","Those who are free of resentful thoughts surely find peace." -"Sophocles","A short saying often contains much wisdom." -"","It takes both sunshine and rain to make a rainbow." -"","A beautiful thing is never perfect." -"Princess Diana","Only do what your heart tells you." -"John Pierrakos","Life is movement-we breathe, we eat, we walk, we move!" -"Eleanor Roosevelt","No one can make you feel inferior without your consent." -"Richard Bach","Argue for your limitations, and sure enough theyre yours." -"Seneca","Luck is what happens when preparation meets opportunity." -"Napoleon Bonaparte","Victory belongs to the most persevering." -"William Shakespeare","Love all, trust a few, do wrong to none." -"Richard Bach","In order to win, you must expect to win." -"Napoleon Hill","A goal is a dream with a deadline." -"Napoleon Hill","You can do it if you believe you can!" -"Bo Jackson","Set your goals high, and don't stop till you get there." -"","Every new day is another chance to change your life." -"Thich Nhat Hanh","Smile, breathe, and go slowly." -"Liberace","Nobody will believe in you unless you believe in yourself." -"William Arthur Ward","Do more than dream: work." -"Seneca","No man was ever wise by chance." -"","Some pursue happiness, others create it." -"William Shakespeare","He that is giddy thinks the world turns round." -"Ellen Gilchrist","Don't ruin the present with the ruined past." -"Albert Schweitzer","Do something wonderful, people may imitate it." -"","We do what we do because we believe." -"Eleanor Roosevelt","Do one thing every day that scares you." -"Byron Pulsifer","If you cannot be silent be brilliant and thoughtful." -"Carl Jung","Who looks outside, dreams; who looks inside, awakes." -"Buddha","What we think, we become." -"Lord Herbert","The shortest answer is doing." -"Leonardo da Vinci","All our knowledge has its origins in our perceptions." -"","The harder you fall, the higher you bounce." -"Anne Wilson Schaef","Trusting our intuition often saves us from disaster." -"Sojourner Truth","Truth is powerful and it prevails." -"Elizabeth Browning","Light tomorrow with today!" -"German proverb","Silence is a fence around wisdom." -"Madame de Stael","Society develops wit, but its contemplation alone forms genius." -"Richard Bach","The simplest things are often the truest." -"","Everyone smiles in the same language." -"Bernadette Devlin","Yesterday I dared to struggle. Today I dare to win." -"Napoleon Hill","No alibi will save you from accepting the responsibility." -"Walt Disney","If you can dream it, you can do it." -"Buddha","It is better to travel well than to arrive." -"Anais Nin","Life shrinks or expands in proportion to one's courage." -"Sun Tzu","You have to believe in yourself." -"Wayne Dyer","Our intention creates our reality." -"Confucius","Silence is a true friend who never betrays." -"Johann Wolfgang von Goethe","Character develops itself in the stream of life." -"American proverb","From little acorns mighty oaks do grow." -"Jon Kabat-Zinn","You can't stop the waves, but you can learn to surf." -"Gustave Flaubert","Reality does not conform to the ideal, but confirms it." -"William Shakespeare","Speak low, if you speak love." -"Johann Wolfgang von Goethe","A really great talent finds its happiness in execution." -"John Lennon","Reality leaves a lot to the imagination." -"Seneca","The greatest remedy for anger is delay." -"Pearl Buck","Growth itself contains the germ of happiness." -"Leonardo da Vinci","Nothing strengthens authority so much as silence." -"Confucius","Wherever you go, go with all your heart." -"Albert Einstein","The only real valuable thing is intuition." -"Ralph Emerson","Good luck is another name for tenacity of purpose." -"Sylvia Voirol","Rainbows apologize for angry skies." -"","Friendship isn't a big thing. It's a million little things." -"Theophrastus","Time is the most valuable thing a man can spend." -"Tony Robbins","Whatever happens, take responsibility." -"Oscar Wilde","Experience is simply the name we give our mistakes." -"Wayne Dyer","I think and that is all that I am." -"Gloria Steinem","If the shoe doesn't fit, must we change the foot?" -"Marcus Aurelius","Each day provides its own gifts." -"Publilius Syrus","While we stop to think, we often miss our opportunity." -"Bernard Shaw","Life isn't about finding yourself. Life is about creating yourself." -"Richard Bach","To bring anything into your life, imagine that it's already there." -"German proverb","Begin to weave and God will give you the thread." -"Confucius","The more you know yourself, the more you forgive yourself." -"Mary Bethune","Without faith, nothing is possible. With it, nothing is impossible." -"Albert Einstein","Once we accept our limits, we go beyond them." -"","Don't be pushed by your problems; be led by your dreams." -"Brian Tracy","Whatever we expect with confidence becomes our own self-fulfilling prophecy." -"Pablo Picasso","Everything you can imagine is real." -"Usman Asif","Fear is a darkroom where negatives develop." -"Napoleon Bonaparte","The truest wisdom is a resolute determination." -"Victor Hugo","Life is the flower for which love is the honey." -"Epictetus","Freedom is the right to live as we wish." -"","Change your thoughts, change your life!" -"Robert Heller","Never ignore a gut feeling, but never believe that it's enough." -"Marcus Aurelius","Loss is nothing else but change,and change is Natures delight." -"Byron Pulsifer","Someone is special only if you tell them." -"Thich Nhat Hanh","There is no way to happiness, happiness is the way." -"Lao Tzu","He who talks more is sooner exhausted." -"Lao Tzu","He who is contented is rich." -"Plutarch","What we achieve inwardly will change outer reality." -"Ralph Waldo Emerson","Our strength grows out of our weaknesses." -"Mahatma Gandhi","We must become the change we want to see." -"Napoleon Hill","Happiness is found in doing, not merely possessing." -"","Put your future in good hands : your own." -"Wit","We choose our destiny in the way we treat others." -"Voltaire","No snowflake in an avalanche ever feels responsible." -"Virgil","Fortune favours the brave." -"Joseph Stalin","I believe in one thing only, the power of human will." -"Robert Frost","The best way out is always through." -"Seneca","The mind unlearns with difficulty what it has long learned." -"Abraham Lincoln","I destroy my enemies when I make them my friends." -"Thomas Fuller","No garden is without its weeds." -"Elbert Hubbard","There is no failure except in no longer trying." -"Turkish proverb","Kind words will unlock an iron door." -"Hugh Miller","Problems are only opportunities with thorns on them." -"A. Powell Davies","Life is just a chance to grow a soul." -"Johann Wolfgang von Goethe","Mountains cannot be surmounted except by winding paths." -"Thich Nhat Hanh","May our hearts garden of awakening bloom with hundreds of flowers." -"John Dryden","Fortune befriends the bold." -"Friedrich von Schiller","Keep true to the dreams of thy youth." -"Mike Ditka","You're never a loser until you quit trying." -"Immanuel Kant","Science is organized knowledge. Wisdom is organized life." -"Johann Wolfgang von Goethe","Knowing is not enough; we must apply!" -"Richard Bach","Strong beliefs win strong men, and then make them stronger." -"Albert Camus","Autumn is a second spring when every leaf is a flower." -"Toni Morrison","If you surrender to the wind, you can ride it." -"Helen Keller","Keep yourself to the sunshine and you cannot see the shadow." -"Paulo Coelho","Write your plans in pencil and give God the eraser." -"Pablo Picasso","Inspiration exists, but it has to find us working." -"Jonathan Kozol","Pick battles big enough to matter, small enough to win." -"Janis Joplin","Don't compromise yourself. You are all you've got." -"Sophocles","A short saying oft contains much wisdom." -"Epictetus","Difficulties are things that show a person what they are." -"Honore de Balzac","When you doubt your power, you give power to your doubt." -"Ovid","The cause is hidden. The effect is visible to all." -"Francis Bacon","A prudent question is one half of wisdom." -"Tony Robbins","The path to success is to take massive, determined action." -"Manuel Puig","I allow my intuition to lead my path." -"William R. Inge","Nature takes away any faculty that is not used." -"Epictetus","If you wish to be a writer, write." -"Wayne Dyer","There is no way to prosperity, prosperity is the way." -"Jim Rohn","Either you run the day or the day runs you." -"Publilius Syrus","Better be ignorant of a matter than half know it." -"Oprah Winfrey","Follow your instincts. That is where true wisdom manifests itself." -"Benjamin Franklin","There never was a good knife made of bad steel." -"Anatole France","To accomplish great things, we must dream as well as act." -"Saint Augustine","Patience is the companion of wisdom." -"Buddha","The mind is everything. What you think you become." -"Voltaire","To enjoy life, we must touch much of it lightly." -"Maya Lin","To fly, we have to have resistance." -"Blaise Pascal","The heart has its reasons which reason knows not of." -"William Shakespeare","Be great in act, as you have been in thought." -"Napoleon Bonaparte","Imagination rules the world." -"Blaise Pascal","Kind words do not cost much. Yet they accomplish much." -"Michelangelo","There is no greater harm than that of time wasted." -"Jonas Salk","Intuition will tell the thinking mind where to look next." -"","Worry gives a small thing a big shadow." -"Napoleon Hill","Fears are nothing more than a state of mind." -"Lao Tzu","The journey of a thousand miles begins with one step." -"Peter Drucker","Efficiency is doing things right; effectiveness is doing the right things." -"Luisa Sigea","Blaze with the fire that is never extinguished." -"Dr. Seuss","Don't cry because it's over. Smile because it happened." -"Jason Fried","No is easier to do. Yes is easier to say." -"Confucius","To be wrong is nothing unless you continue to remember it." -"Babe Ruth","Yesterdays home runs don't win today's games." -"Carlyle","Silence is deep as Eternity, Speech is shallow as Time." -"Leo F. Buscaglia","Don't smother each other. No one can grow in the shade." -"Lao Tzu","An ant on the move does more than a dozing ox" -"Indira Gandhi","You can't shake hands with a clenched fist." -"Plato","A good decision is based on knowledge and not on numbers." -"Confucius","The cautious seldom err." -"Frederick Douglass","If there is no struggle, there is no progress." -"Willa Cather","Where there is great love, there are always miracles." -"John Lennon","Time you enjoy wasting, was not wasted." -"Richard Bach","Every problem has a gift for you in its hands." -"Jean de la Fontaine","Sadness flies away on the wings of time." -"Publilius Syrus","I have often regretted my speech, never my silence." -"Thomas Jefferson","Never put off till tomorrow what you can do today." -"Thomas Dewar","Minds are like parachutes. They only function when open." -"George Patton","If a man does his best, what else is there?" -"Benjamin Disraeli","The secret of success is constancy to purpose." -"Ralph Emerson","Life is a progress, and not a station." -"Horace Friess","All seasons are beautiful for the person who carries happiness within." -"Elbert Hubbard","To avoid criticism, do nothing, say nothing, be nothing." -"Ovid","All things change; nothing perishes." -"Haynes Bayly","Absence makes the heart grow fonder." -"Lauren Bacall","Imagination is the highest kite one can fly." \ No newline at end of file diff --git a/src/user_information.json b/src/user_information.json deleted file mode 100644 index 01e250f3..00000000 --- a/src/user_information.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "user1", "email_id": "user1@gmail.com", "initialized": "yes", "email_notifications": "user1@gmail.com"} \ No newline at end of file From a7fb493f1b9f0f3db2c3a3366a2b678e9d2c26cf Mon Sep 17 00:00:00 2001 From: radhikaraman20 <89432698+radhikaraman20@users.noreply.github.com> Date: Tue, 2 Nov 2021 17:26:32 -0400 Subject: [PATCH 058/205] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 8f9a75db..e9351cfe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ Jinja2==3.0.1 MarkupSafe==2.0.1 Werkzeug==2.0.1 requests==2.26.0 +pymongo==3.12.1 From 634732d97c5c47f72db8563278f224d39438b344 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 19:35:10 -0400 Subject: [PATCH 059/205] Add code formatter badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c2dbcd8d..77d6a5f2 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/python-app.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/code_cov.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/close_as_a_feature.yml/badge.svg) +![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/code_formatter.yml/badge.svg) Simplii forks From 59cd6735ee2dcca2c56c115160c5231ff426a502 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 19:46:42 -0400 Subject: [PATCH 060/205] test --- .github/workflows/code_formatter.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/code_formatter.yml b/.github/workflows/code_formatter.yml index 08986fd5..733c753e 100644 --- a/.github/workflows/code_formatter.yml +++ b/.github/workflows/code_formatter.yml @@ -18,12 +18,4 @@ jobs: args: --style pep8 --recursive --in-place . - name: Check for modified files id: git-check - run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) - - name: Push changes - if: steps.git-check.outputs.modified == 'true' - run: | - git config --global user.name 'PrakruthiSomashekar' - git config --global user.email 'prakruthi1796@gmail.com' - git remote set-url origin https://x-access-token:${{ secrets.GIT_TOKEN }}@github.com/${{ deekay2310/Simplii }} - git commit -am "Automated autoyapf fixes" - git push \ No newline at end of file + run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) \ No newline at end of file From e395a70a0c786c028f17d2341ad4ed963de76d09 Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 20:12:16 -0400 Subject: [PATCH 061/205] Add syntax checker --- .github/workflows/syntax_checker.yml | 8 ++++++++ README.md | 1 + 2 files changed, 9 insertions(+) create mode 100644 .github/workflows/syntax_checker.yml diff --git a/.github/workflows/syntax_checker.yml b/.github/workflows/syntax_checker.yml new file mode 100644 index 00000000..c6cb4a5b --- /dev/null +++ b/.github/workflows/syntax_checker.yml @@ -0,0 +1,8 @@ +on: push +name: Lint Python +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: cclauss/Find-Python-syntax-errors-action@master \ No newline at end of file diff --git a/README.md b/README.md index 77d6a5f2..383241ab 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ [![codecov](https://codecov.io/gh/deekay2310/Simplii/branch/main/graph/badge.svg?token=9ZXVRIPHLO)](https://codecov.io/gh/deekay2310/Simplii) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/unit_test.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/style_checker.yml/badge.svg) +![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/syntax_checker.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/python-app.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/code_cov.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/close_as_a_feature.yml/badge.svg) From 93c0609388f1dfc32a8ca981d02225e8d77e707c Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 20:14:31 -0400 Subject: [PATCH 062/205] add --- .github/workflows/code_formatter.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code_formatter.yml b/.github/workflows/code_formatter.yml index 733c753e..08986fd5 100644 --- a/.github/workflows/code_formatter.yml +++ b/.github/workflows/code_formatter.yml @@ -18,4 +18,12 @@ jobs: args: --style pep8 --recursive --in-place . - name: Check for modified files id: git-check - run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) \ No newline at end of file + run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) + - name: Push changes + if: steps.git-check.outputs.modified == 'true' + run: | + git config --global user.name 'PrakruthiSomashekar' + git config --global user.email 'prakruthi1796@gmail.com' + git remote set-url origin https://x-access-token:${{ secrets.GIT_TOKEN }}@github.com/${{ deekay2310/Simplii }} + git commit -am "Automated autoyapf fixes" + git push \ No newline at end of file From 7b721e510543c01e8c9f034ef022e156c2ea417e Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 20:15:12 -0400 Subject: [PATCH 063/205] removed --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 383241ab..e96d4859 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/python-app.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/code_cov.yml/badge.svg) ![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/close_as_a_feature.yml/badge.svg) -![github workflow](https://github.com/deekay2310/Simplii/actions/workflows/code_formatter.yml/badge.svg) Simplii forks From ee8ba4c9f5fd21df897faa76b8bad28809d401fa Mon Sep 17 00:00:00 2001 From: PrakruthiSomashekar Date: Tue, 2 Nov 2021 20:25:43 -0400 Subject: [PATCH 064/205] Add tips to extend --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b88bc00..b927c083 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,3 +53,15 @@ Maintain the projects quality Fix problems that are important to users Enable a sustainable system for the projects maintainers to review contributions + +## Tips to Extend + +Check the Projects tab for TO-DO list and pick the feature you find interesting to work on. + +Create a branch and implement the feature in Python and test it locally. + +Write corresponding test cases to ensure it is not breaking the existing system. + +Create pull request and request for the code review. Once the request is approved, merge to main. + +Any suggestions to improve the application is appreciated. Please request a feature/report bugs through issues section. From 4e48f6a45cea407eebf8520f17c9086ed4f0888e Mon Sep 17 00:00:00 2001 From: Sunidhi Hegde <62884191+SunidhiHegde@users.noreply.github.com> Date: Tue, 2 Nov 2021 22:18:29 -0400 Subject: [PATCH 065/205] Add files via upload Landing page - draft --- src/templates/base.html | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/templates/base.html diff --git a/src/templates/base.html b/src/templates/base.html new file mode 100644 index 00000000..75271516 --- /dev/null +++ b/src/templates/base.html @@ -0,0 +1,56 @@ + + + + + + + + + Simplii + + + + +
+ + + +
+
+ +

+ Simplii +

+

+ A Simple Task Scheduler +

+ +
+
+
+ + + \ No newline at end of file From d90ba342c09f80f3c25fe8bfd845d11d955839e4 Mon Sep 17 00:00:00 2001 From: Sunidhi Hegde <62884191+SunidhiHegde@users.noreply.github.com> Date: Tue, 2 Nov 2021 22:20:35 -0400 Subject: [PATCH 066/205] Update app.py --- src/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.py b/src/app.py index 5becd216..afb99941 100644 --- a/src/app.py +++ b/src/app.py @@ -82,6 +82,11 @@ def getnewTaskID(): @app.route("/") def homePage(): + """This function renders the home page.""" + return render_template("base.html") + + +def mainPage(): """This function renders the home page.""" return render_template("index.html", data=refresh_data()) From 0b571694b0b7e4ad2906558d2afc225d23574d44 Mon Sep 17 00:00:00 2001 From: Sunidhi Hegde <62884191+SunidhiHegde@users.noreply.github.com> Date: Tue, 2 Nov 2021 22:29:35 -0400 Subject: [PATCH 067/205] Update base.html --- src/templates/base.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/templates/base.html b/src/templates/base.html index 75271516..4b3f1ea9 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -25,10 +25,10 @@