Giter VIP home page Giter VIP logo

movie-rating-p3's Introduction

MOVIE DATABASE (PP3 by Christofer Asplund)

Movie database is a program written in Python, wich runs in the Code Institute mock terminal on Heroku. The program is connected to a Google Sheet API that stores all data.

The user can view a complete list or a top 10 list of the movies they have watched and rated. The user can also add new movies or delete movies from the list.

Link to a live version of my project.

Responsive

Program navigation & features

Main Page

  • When the program starts the user will be welcomed by a message that gives them information about the program. Below the message the user will see the options menu. Read more about this section below.

Main page

Options Menu

  • In the options menu the user will be able to choose from 5 different options. To access an option press the desired number and enter.

Program navigation

Show Full Movies List (1 + Enter)

  • This options allows the user to see a list of all movies that the user has added to their database. The movies will be displayed in a sorted list from best rating to worst. Press enter to return to the options menu.

All movies

Show Top 10 Movies (2 + Enter)

  • This option will give the user a list of their top 10 movies based on rating. The movies will be displayed in a sorted list from best rating to worst. Press enter to return to the options menu.

Top 10 movies

Add New Movie & Rating (3 + Enter)

In this option the user will be able to add a new movie to their database.

  • Enter a title - this can be either letters and/or numbers but can't be left blank.

Add title

  • Add a rating - this must be a float number between 0.0 - 5.0 and can't be left blank.

Add rating

  • When all the steps above are correctly filled in the user will get a message telling them that their movie has been added. Press Enter to return to the menu. Now the user can browse the list of movies and see that the new movie has been added.

Movie added

Delete a Movie From the List (4 + Enter)

In this option the user will be able to delete an exsisting movie from the list.

  • Here the user will see a list of all their movies and be able to scroll and find the desired movie to delete. In this list all movies have been assigned a "Movie ID". The user can simply enter the ID number of the movie they want to delete and press Enter.

Enter Id

  • The user will then get a message confirming what Movie ID has been deleted from the list. Press Enter to return to the menu.

Movie deleted

Exit Program (5 + Enter)

  • This option will close the program.

Future Features

  • Allow for the user to register each movie's realse date.
  • Allow for the user to give a review for each movie.

Data Model

I used a Movie class as my model. The program uses one instance of the Movie class to hold a movie when adding a movie to the program.

The Movie class stores the movie title, movie rating and movie id.

Testing

I have manually tested the program by doing the following:

  • Given invalid inputs: strings when the program expected numbers and vice versa, left empty when input was expected and vice versa.
  • Hard testing my local terminal and Code Institute Heroku terminal.
  • Making sure that my IDE doesn't giving any type errors that don't match with the PEP8 style.

Bugs

Solved Bugs

  • Option 3 had an input error when entering a string into the rating input. I solved this by making sure the input only accepts a float number between 0.0 - 5.0 and added a print statement saying "Invalid data: Rating must be a float between 0.0 - 5.0." if a string is entered.

  • Option 4 when trying to delete a movie I had a bug when I was trying to compare the movie id with the id that the user enters. When reading from the google sheet, gspread returns the movie id as an int and the input from the user is always a string, so the comparison was always returning false. I solved the issue by parsing the movie id when reading from gspread to a string so the two values could be compared correctly.

Unsolved Bugs

  • No unsolved bugs remaining.

Deployment

This project was deployed using Code Instute's mock terminal on Heroku.

  • The application was deployed to Heroku. The steps I took to deploy are as follows:
    • From my IDE I pushed my final code to GitHub, making sure that my creds.json file was mentioned in the gitignore file to keep confidential information safe.
    • I created an account on Heroku.com.
    • On Heroku I chose the option to create a new application.
    • Here I entered a name for my application and chose Europe as region.
    • In the settings tab I added necessary information to the config vars section.
    • In the deploy tab I chose to connect my application to GitHub and searched for my repository name and pressed connect.
    • Then I chose the manually deploy option and deployed my main branch.
    • When Heroku was done building the application I received a live link to the deployed application.

The live link can be found here - https://movie-database-p3.herokuapp.com/

This project was deployed using Code Instute's mock terminal on Heroku.

  • Step by step that I took to deploy my app:
    • Created an account on Heroku.com.
    • Create a new Heroku app.
    • Buildbacks should be set in this order: Python and NodeJs.
    • The Heroku app should be linked to this repository
    • Then click deploy and wait while the app is being built, when completed click view.

The links for the project can be found here -

Credits

  • Code Institute for deployment terminal.
  • IMDB for inspiration.

movie-rating-p3's People

Contributors

aspen92 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.