diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 383e65cd0..3fc27ea95 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -18,6 +18,9 @@ jobs: run: | python -m pip install --upgrade pip pip install pylint + pip install pandas + pip install -U Flask + pip install -U flask-cors - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') diff --git a/Code/recommenderapp/.DS_Store b/Code/recommenderapp/.DS_Store deleted file mode 100644 index 14b6f163b..000000000 Binary files a/Code/recommenderapp/.DS_Store and /dev/null differ diff --git a/README.md b/README.md index 93bbc537f..262dee0e3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Movie Recommendation 🎥 +# PopcornPicks: Your Destination for Movie Recommendations 🎥 A collaborative filtering based recommendation engine! @@ -6,7 +6,7 @@ -[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://gitHub.com/git-ankit/MovieRecommender/graphs/commit-activity) [![Contributors Activity](https://img.shields.io/github/commit-activity/m/git-ankit/MovieRecommender)](https://github.com/git-ankit/MovieRecommender/pulse) [![GitHub issues](https://img.shields.io/github/issues/git-ankit/MovieRecommender.svg)](https://github.com/git-ankit/MovieRecommender/issues/) [![GitHub issues-closed](https://img.shields.io/github/issues-closed/git-ankit/MovieRecommender.svg)](https://github.com/git-ankit/MovieRecommender/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) [![Build Status](https://travis-ci.com/git-ankit/MovieRecommender.svg?branch=master)](https://travis-ci.com/git-ankit/MovieRecommender) [![codecov](https://codecov.io/gh/git-ankit/MovieRecommender/branch/master/graph/badge.svg?token=8K0VL8106C)](undefined) [![GitHub release](https://img.shields.io/github/release/git-ankit/MovieRecommender.svg)](https://GitHub.com/git-ankit/MovieRecommenderreleases/) [![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) [![Build Status](https://travis-ci.com/adipai/PopcornPicks.svg?branch=master)](https://travis-ci.com/adipai/PopcornPicks) [![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/) ### Project 3 Plan diff --git a/setup.py b/setup.py index d4e434253..45d04eaf8 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,14 @@ +""" +Movie Recommender Setup Script + +This script is used to package and distribute the Movie Recommender project. +It contains information about the project, including its name, version, authors, +description, and other relevant details, to facilitate distribution and installation. + +For more information about the Movie Recommender project, visit: +https://github.com/git-ankit/MovieRecommender +""" + import setuptools with open("README.md", "r", encoding="utf8") as fh: 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/prediction_scripts/item_based.py b/src/prediction_scripts/item_based.py similarity index 100% rename from Code/prediction_scripts/item_based.py rename to src/prediction_scripts/item_based.py diff --git a/Code/recommenderapp/app.py b/src/recommenderapp/app.py similarity index 93% rename from Code/recommenderapp/app.py rename to src/recommenderapp/app.py index 42f2dcf00..9994fb148 100644 --- a/Code/recommenderapp/app.py +++ b/src/recommenderapp/app.py @@ -2,14 +2,16 @@ Module for routing all calls from the frontend """ +sys.path.append("../../") +from src.prediction_scripts.item_based import recommend_for_new_user from utils import send_email_to_user, beautify_feedback_data from flask_cors import CORS from flask import Flask, jsonify, render_template, request from search import Search import sys import json -sys.path.append("../../") -from Code.prediction_scripts.item_based import recommend_for_new_user +# pylint: disable=wrong-import-position +# pylint: enable=wrong-import-position app = Flask(__name__) @@ -65,6 +67,7 @@ def feedback(): data = json.loads(request.data) return data + @app.route("/sendMail", methods=["POST"]) def sendMail(): """ diff --git a/Code/recommenderapp/constants.py b/src/recommenderapp/constants.py similarity index 100% rename from Code/recommenderapp/constants.py rename to src/recommenderapp/constants.py diff --git a/Code/recommenderapp/search.py b/src/recommenderapp/search.py similarity index 100% rename from Code/recommenderapp/search.py rename to src/recommenderapp/search.py diff --git a/Code/recommenderapp/static/224299.jpg b/src/recommenderapp/static/224299.jpg similarity index 100% rename from Code/recommenderapp/static/224299.jpg rename to src/recommenderapp/static/224299.jpg diff --git a/Code/recommenderapp/static/script.js b/src/recommenderapp/static/script.js similarity index 100% rename from Code/recommenderapp/static/script.js rename to src/recommenderapp/static/script.js diff --git a/Code/recommenderapp/static/stylesheet.css b/src/recommenderapp/static/stylesheet.css similarity index 100% rename from Code/recommenderapp/static/stylesheet.css rename to src/recommenderapp/static/stylesheet.css diff --git a/Code/recommenderapp/templates/landing_page.html b/src/recommenderapp/templates/landing_page.html similarity index 100% rename from Code/recommenderapp/templates/landing_page.html rename to src/recommenderapp/templates/landing_page.html diff --git a/Code/recommenderapp/templates/success.html b/src/recommenderapp/templates/success.html similarity index 100% rename from Code/recommenderapp/templates/success.html rename to src/recommenderapp/templates/success.html diff --git a/Code/recommenderapp/utils.py b/src/recommenderapp/utils.py similarity index 81% rename from Code/recommenderapp/utils.py rename to src/recommenderapp/utils.py index a4257d399..746fccf14 100644 --- a/Code/recommenderapp/utils.py +++ b/src/recommenderapp/utils.py @@ -2,12 +2,12 @@ import logging import smtplib +from smtplib import SMTPException from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart import constants as c - def beautify_feedback_data(data): """ Utility function to beautify the feedback json containing predicted movies for sending in email @@ -55,10 +55,10 @@ def send_email_to_user(recipient_email, categorized_data): message['Subject'] = subject # Create the email message with HTML content - html_content = c.EMAIL_HTML_CONTENT.format('\n'.join(f'