Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/brwali/PopcornPicks into …
Browse files Browse the repository at this point in the history
…master
  • Loading branch information
rpkenney committed Nov 27, 2023
2 parents 8e271c3 + 83b0858 commit 0f316d9
Show file tree
Hide file tree
Showing 5 changed files with 204 additions and 20 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ name: "CodeQL"
on:
push:
branches: [ master ]
schedule:
- cron: '0 0 * * *'

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ master ]
schedule:
- cron: '07 12 * * *'
- cron: '25 20 * * *'

jobs:
build:
Expand Down
23 changes: 19 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,33 @@
## Our Table Of Contents

- .github/workflows
- all GitHub workflow YAML files
- proj2
- score_card.md

- all GitHub workflow YAML files

- proj3
- README.md
- Proj3Changes.md

- src
- prediction_scripts
- item_based.py
- recommenderapp
- static
- script.js
- stylesheet.css
- wall.js
- templates
- landing_page.html
- login.html
- profile.html
- review.html
- search_page.html
- success.html
- wall.html
- app.py
- search.py
- utils.py
- init.sql
- movies.sql

- test
- test_predict.py
Expand All @@ -42,10 +51,16 @@

- .gitignore

- CHAT.md

- CITATION.md

- CODE_OF_CONDUCT.md

- CONTRIBUTING.md

- Dependencies.md

- LICENSE

- README.md
Expand Down
157 changes: 157 additions & 0 deletions docs/generated_docs/src_doc/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# Table of Contents

* [utils](#utils)
* [create\_colored\_tags](#utils.create_colored_tags)
* [beautify\_feedback\_data](#utils.beautify_feedback_data)
* [create\_movie\_genres](#utils.create_movie_genres)
* [send\_email\_to\_user](#utils.send_email_to_user)
* [create\_account](#utils.create_account)
* [add\_friend](#utils.add_friend)
* [login\_to\_account](#utils.login_to_account)
* [submit\_review](#utils.submit_review)
* [get\_wall\_posts](#utils.get_wall_posts)
* [get\_recent\_movies](#utils.get_recent_movies)
* [get\_username](#utils.get_username)
* [get\_recent\_friend\_movies](#utils.get_recent_friend_movies)
* [get\_friends](#utils.get_friends)

<a id="utils"></a>

# utils

Copyright (c) 2023 Aditya Pai, Ananya Mantravadi, Rishi Singhal, Samarth Shetty
This code is licensed under MIT license (see LICENSE for details)

@author: PopcornPicks

<a id="utils.create_colored_tags"></a>

#### create\_colored\_tags

```python
def create_colored_tags(genres)
```

Utitilty function to create colored tags for different
movie genres

<a id="utils.beautify_feedback_data"></a>

#### beautify\_feedback\_data

```python
def beautify_feedback_data(data)
```

Utility function to beautify the feedback json containing predicted movies for sending in email

<a id="utils.create_movie_genres"></a>

#### create\_movie\_genres

```python
def create_movie_genres(movie_genre_df)
```

Utility function for creating a dictionary for movie-genres mapping

<a id="utils.send_email_to_user"></a>

#### send\_email\_to\_user

```python
def send_email_to_user(recipient_email, categorized_data)
```

Utility function to send movie recommendations to user over email

<a id="utils.create_account"></a>

#### create\_account

```python
def create_account(db, email, username, password)
```

Utility function for creating an account

<a id="utils.add_friend"></a>

#### add\_friend

```python
def add_friend(db, username, user_id)
```

Utility function for adding a friend

<a id="utils.login_to_account"></a>

#### login\_to\_account

```python
def login_to_account(db, username, password)
```

Utility function for logging in to an account

<a id="utils.submit_review"></a>

#### submit\_review

```python
def submit_review(db, user, movie, score, review)
```

Utility function for creating a dictionary for submitting a review

<a id="utils.get_wall_posts"></a>

#### get\_wall\_posts

```python
def get_wall_posts(db)
```

Utility function for creating getting wall posts from the db

<a id="utils.get_recent_movies"></a>

#### get\_recent\_movies

```python
def get_recent_movies(db, user)
```

Utility function for getting recent movies reviewed by a user

<a id="utils.get_username"></a>

#### get\_username

```python
def get_username(db, user)
```

Utility function for getting the current users username

<a id="utils.get_recent_friend_movies"></a>

#### get\_recent\_friend\_movies

```python
def get_recent_friend_movies(db, user)
```

Utility function for getting a certain users id

<a id="utils.get_friends"></a>

#### get\_friends

```python
def get_friends(db, user)
```

Utility function for getting the current users friends

40 changes: 27 additions & 13 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
# Steps for setting up the repository and running the web app

**Step 1:**
**Git Clone the Repository**
## Step 1: Git Clone the Repository

git clone https://github.com/brwali/PopcornPicks.git

(OR) Download the .zip file on your local machine from the following link

https://github.com/brwali/PopcornPicks/

**Step 2:**
**Install the required packages by running the following command in the terminal**
## Step 2: Install the required packages by running the following command in the terminal

pip install -r requirements.txt

**Step 3:**
**Run the following command in the terminal**

## Step 3: MySQL Install
Download and Install [MySQL Workbench](https://dev.mysql.com/downloads/workbench/) and [MySQL Community Server](https://dev.mysql.com/downloads/mysql/)

## Step 4: Setting up MySQL Community Server

In the `Type and Networking` tab, select config type as **Server Computer**

All other menus, use default settings. If you create a root password, be sure not to lose it!

Click `Execute` button on the bottom of the window to start the MySQL Service.

## Step 5: Setting up MySQL Workbench
1. Launch MySQL Workbench
2. Under MySQL Connections, Right click in the whitespace. Select `Rescan for Local MySQL Instances`. It should detect the server established in the previous step.
3. Select the discovered Local instance and enter your password if created in server setup.
4. Click `File` > `Open SQL Script` then select `init.sql` in the `PopcornPicks/src` directory. This will create the tables required for the application's persistence.
5. Repeat above step for `movies.sql` file located in the `PopcornPicks/src` directory. This may take a few minutes.


## Step 6: Python Packages
Run the following command in the terminal

cd src/recommenderapp
python app.py


**Step 4:**
**Open the URL in your browser:**
## Step 7: Open the URL in your browser

http://127.0.0.1:5000/

**You can also leave Steps 2-4 and directly run the setup.py file for setting up all dependencies and running the web app!**

python setup.py

**NOTE: For the email notifier feature - create a new gmail account, replace the sender_email variable with the new email and sender_password variable with its password (2 factor authentication) in the utils.py file (function: send_email_to_user(recipient_email, categorized_data)).**
**NOTE: For the email notifier feature - create a new gmail account, replace the sender_email variable with the new email and sender_password variable with its password (2 factor authentication) in the utils.py file (function: send_email_to_user(recipient_email, categorized_data)).**

0 comments on commit 0f316d9

Please sign in to comment.