From 7ff0e64f4931ff1173a46f275b6532c725f2abc7 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:14:33 -0400 Subject: [PATCH 01/14] Update codecov.yml --- .github/workflows/codecov.yml | 44 +++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index e420c7d44..c0ae0438c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,4 +1,40 @@ -- name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +name: Upload Code Coverage + +on: + push: + branches: + - main # Change this to your main branch name or any other branch + +jobs: + upload-coverage: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 # Replace '3.x' with your desired Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + pip install pandas + pip install -U Flask + pip install -U flask-cors + pip install pytest + pip install pytest-cov + + - name: Run tests and generate coverage + run: | + cd test + coverage run pytest --cov=./ + coverage xml -i + + - name: Upload coverage report to Codecov + run: | + bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} + From 155239962c7e76f7927893760801ecf7791a41ef Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:22:48 -0400 Subject: [PATCH 02/14] Update unittest.yml --- .github/workflows/unittest.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index f475e448a..881d39cba 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -1,6 +1,11 @@ name: Unittest -on: [push] +on: + push: + branches: + - 'master' + pull_request: + workflow_dispatch: jobs: build: From c3ec9e711fd6a6a6aa62acd53300ecd1afc94885 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:36:27 -0400 Subject: [PATCH 03/14] Create codecoverage.yml --- .github/workflows/codecoverage.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/codecoverage.yml diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml new file mode 100644 index 000000000..6b9c9da33 --- /dev/null +++ b/.github/workflows/codecoverage.yml @@ -0,0 +1,41 @@ +name: Code Coverage + +on: + push: + branches: + - 'master' + pull_request: + workflow_dispatch: + +jobs: + upload-coverage: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 # Replace '3.x' with your desired Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + pip install pandas + pip install -U Flask + pip install -U flask-cors + pip install pytest + pip install pytest-cov + + - name: Run tests and generate coverage + run: | + cd test + coverage run pytest --cov=./ + coverage xml -i + + - name: Upload coverage report to Codecov + run: | + bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} From 3fb1a9554d8218520388d3ba1bb35a0d2c6252a9 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:41:27 -0400 Subject: [PATCH 04/14] Update codecoverage.yml --- .github/workflows/codecoverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index 6b9c9da33..3f693086b 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -32,7 +32,7 @@ jobs: - name: Run tests and generate coverage run: | - cd test + cd ../../test coverage run pytest --cov=./ coverage xml -i From 657cb079b70bc13d715866bb24773d1a71744cb3 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:44:31 -0400 Subject: [PATCH 05/14] Update codecoverage.yml --- .github/workflows/codecoverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index 3f693086b..a9008bc4d 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -32,7 +32,8 @@ jobs: - name: Run tests and generate coverage run: | - cd ../../test + cd ../.. + cd test coverage run pytest --cov=./ coverage xml -i From f78f8ad5b8e56564fa8303710d620dd9e5dd5500 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:47:47 -0400 Subject: [PATCH 06/14] Update codecoverage.yml --- .github/workflows/codecoverage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index a9008bc4d..d127a234f 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -32,9 +32,8 @@ jobs: - name: Run tests and generate coverage run: | - cd ../.. cd test - coverage run pytest --cov=./ + coverage run pytest --cov=./ test_util coverage xml -i - name: Upload coverage report to Codecov From 269c409aae561c5a1b339bc5516d3ee9102e3f4a Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:51:33 -0400 Subject: [PATCH 07/14] Update codecoverage.yml --- .github/workflows/codecoverage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index d127a234f..0a794275d 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -32,8 +32,7 @@ jobs: - name: Run tests and generate coverage run: | - cd test - coverage run pytest --cov=./ test_util + coverage run pytest --cov=test test_util coverage xml -i - name: Upload coverage report to Codecov From 27c87eb75cc6ed26caf43c0f77f90f3165a5182d Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:54:47 -0400 Subject: [PATCH 08/14] Update codecoverage.yml --- .github/workflows/codecoverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index 0a794275d..22ea55422 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -32,7 +32,7 @@ jobs: - name: Run tests and generate coverage run: | - coverage run pytest --cov=test test_util + coverage run --source=test -m pytest test_util coverage xml -i - name: Upload coverage report to Codecov From c300d178f9714edd360c2a6156a2fa2612ccd656 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:56:43 -0400 Subject: [PATCH 09/14] Update codecoverage.yml --- .github/workflows/codecoverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index 22ea55422..e27b8d81b 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -32,7 +32,7 @@ jobs: - name: Run tests and generate coverage run: | - coverage run --source=test -m pytest test_util + coverage run --source=test -m pytest test_util.py coverage xml -i - name: Upload coverage report to Codecov From f73999efb6f2dac1a3fe5b6d98d01b7f92c115f3 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 16:58:54 -0400 Subject: [PATCH 10/14] Update codecoverage.yml --- .github/workflows/codecoverage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index e27b8d81b..453a2b936 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -32,6 +32,8 @@ jobs: - name: Run tests and generate coverage run: | + cd test + pwd coverage run --source=test -m pytest test_util.py coverage xml -i From 04570e0ec00c53bf9d50b78a2f7cd4835c8e8786 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 17:02:27 -0400 Subject: [PATCH 11/14] Rename tests.py to test_predict.py --- test/{tests.py => test_predict.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{tests.py => test_predict.py} (100%) diff --git a/test/tests.py b/test/test_predict.py similarity index 100% rename from test/tests.py rename to test/test_predict.py From 7ef67fa9c0393ccc5bcd07853583918fda52cb81 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 17:03:57 -0400 Subject: [PATCH 12/14] Update codecoverage.yml --- .github/workflows/codecoverage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index 453a2b936..0210306ab 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -33,8 +33,7 @@ jobs: - name: Run tests and generate coverage run: | cd test - pwd - coverage run --source=test -m pytest test_util.py + coverage run --source=test -m pytest test_*.py coverage xml -i - name: Upload coverage report to Codecov From 7b5615a391562f9102f599b00a40fc71e3258990 Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 17:14:28 -0400 Subject: [PATCH 13/14] Fixed bug in unittest.yml Test suite is now running with code coverage reporting ! --- .github/workflows/unittest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 881d39cba..e2c3730e6 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -27,7 +27,7 @@ jobs: pip install -U Flask pip install -U flask-cors - name: Running test cases for predicting - run: python test/tests.py + run: python test/test_predict.py - name: Running test cases for searching run: python test/test_search.py - name: Running test cases for util From 2140cc36f70f0e430c41994e54fd24b417ae3cba Mon Sep 17 00:00:00 2001 From: Aditya Pai Date: Tue, 17 Oct 2023 17:31:38 -0400 Subject: [PATCH 14/14] Update README.md Added code coverage badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cbd87f5ce..46a239248 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # PopcornPicks: Your Destination for Movie Recommendations 🍿 -[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://gitHub.com/adipai/PopcornPicks/graphs/commit-activity) [![Contributors Activity](https://img.shields.io/github/commit-activity/m/adipai/PopcornPicks)](https://github.com/adipai/PopcornPicks/pulse) [![GitHub issues](https://img.shields.io/github/issues/adipai/PopcornPicks.svg)](https://github.com/adipai/PopcornPicks/issues/) [![GitHub issues-closed](https://img.shields.io/github/issues-closed/adipai/PopcornPicks.svg)](https://github.com/adipai/PopcornPicks/issues?q=is%3Aissue+is%3Aclosed) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4127507.svg)](https://doi.org/10.5281/zenodo.4127507) [![Unittest](https://github.com/adipai/PopcornPicks/actions/workflows/unittest.yml/badge.svg?branch=master&event=push)](https://github.com/adipai/PopcornPicks/actions/workflows/unittest.yml) [![codecov](https://codecov.io/gh/adipai/PopcornPicks/branch/master/graph/badge.svg?token=8K0VL8106C)](undefined) [![GitHub release](https://img.shields.io/github/release/adipai/PopcornPicks.svg)](https://GitHub.com/adipai/PopcornPicksreleases/) [![black](https://img.shields.io/badge/StyleChecker-black-purple.svg)](https://pypi.org/project/black/) +[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://gitHub.com/adipai/PopcornPicks/graphs/commit-activity) [![Contributors Activity](https://img.shields.io/github/commit-activity/m/adipai/PopcornPicks)](https://github.com/adipai/PopcornPicks/pulse) [![GitHub issues](https://img.shields.io/github/issues/adipai/PopcornPicks.svg)](https://github.com/adipai/PopcornPicks/issues/) [![GitHub issues-closed](https://img.shields.io/github/issues-closed/adipai/PopcornPicks.svg)](https://github.com/adipai/PopcornPicks/issues?q=is%3Aissue+is%3Aclosed) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4127507.svg)](https://doi.org/10.5281/zenodo.4127507) [![Unittest](https://github.com/adipai/PopcornPicks/actions/workflows/unittest.yml/badge.svg?branch=master&event=push)](https://github.com/adipai/PopcornPicks/actions/workflows/unittest.yml) [![codecov](https://codecov.io/gh/adipai/PopcornPicks/graph/badge.svg?token=0XN6K2DMGS)](https://codecov.io/gh/adipai/PopcornPicks) [![GitHub release](https://img.shields.io/github/release/adipai/PopcornPicks.svg)](https://GitHub.com/adipai/PopcornPicksreleases/) [![black](https://img.shields.io/badge/StyleChecker-black-purple.svg)](https://pypi.org/project/black/) PopcornPicks is more than just a movie recommender system; it's a gateway to a world of cinematic adventures. With an ever-expanding library of films and a powerful recommendation algorithm, PopcornPicks is here to transform the way you discover, enjoy, and connect with movies.