Giter VIP home page Giter VIP logo

muscle-gym-terminal's Introduction

Muscle Gym Terminal

This app is designed to allow people to registered them self for a membership at Muscle Gym. Existing custumers can also calculate the average cost per visit to the gym. They will get a full year statistic depending on what membership they have and how many times they trained each month. There is a BMI calculator to check on what level their BMI is right now. It's also possible to check how many calories they burn each day from a BMR calculator.

Here is the live version of my project

Here is the Google Sheet

Skärmavbild 2021-09-01 kl  11 48 13

Existing Features

  • Start menu
    • Customer will be asked to type a number between 1 and 5.

There are validations to check firstly that the user only enter a number between 1 and 5. If they dont they will get a error message and be able to enter a correct number.

menu

  • Registered as a new member
    • Customers will be able to registered them selfs with inside the terminal.

The information entering by the customer will be saved to a google sheet called new_customer. All inputs have validators that check so the customer is entered valid information. If not they will be asked to enter the information again.

meeeember

  • Calculate existing customer's membership price
    • Customer is able to calculate the avarge price on how many times they visited the gym each month for the last year.

The information is already saved in a google sheet called exisiting_customer and the program will read from it how many times the customer have trained each month and what type of membership they have. Please use one of these test accounts when checking if it is working, [email protected] (Gold) and [email protected] (Silver). All inputs have validations that check so the customer is entered valid information. If not they will be asked to enter the information again.

priccce

  • Calculate your BMI (Body Mass Index)
    • Customer is able to calculate their body type scale with the BMI calculation.

The customer will get back information on how their BMI is right now and also if they are underweight, middleweight or overweight. All inputs have validations that check so the customer is entered valid information. If not they will be asked to enter the information again.

bmiii

  • Calculate your BMR (Basal Metabolic Rate)
    • Customer is able to calculate their daily calorie burn rate with the BMR calculation.

Customer will get information on how many calories they should eat to maintain their current weight based on the information they enter. All inputs have validations that check so the customer is entered valid information. If not they will be asked to enter the information again.

bmrr2 bmrr3

  • Exit the program
    • Customer is able to exit the program

Data Model

In the new_members sheet I collect all information the customer entered.

new menber

In the excisting_customers sheet I put in a summary of data for a year. I decided to store four attributes with fake data just to have something to read from. I'm aware that in a real world senario it would not look like this and every visit would be tracked but for this education project I did it like a summary.

month

Future Features

  • Allow members to cancel their membership
  • Allow members to pay for their membership in the app
  • Collect even more information about the members like address and hometown

How to Use the app

  1. When the app finishes loading read the instructions the first part is the most important as it asks you to choose between 5 different numbers.
  2. After choosing the number just follow the instructions as they are on screen
  3. After finish the start menu will come back up again. Use 5 to exit the program or use a new number.

Testing

How I have tested the code:

  • The python code has been run through the Python pep8 validation and confirmed there are no problems
  • I have also run the code through many cycles adding in different values and checking that the output is as expected.
  • All inputs have validation to ensure the customer enters the correct information.
  • I have tested both in my local terminal and my deployed Heroku terminal

Bugs

Solved Bugs

  • I had this problem where I calculated the price per visit wrong. I use this formula first to get the result "price = int(values[i]) * (30 / p)". The price was getting higher if the customer was training more which it obviously shouldn't be.

Skärmavbild 2021-08-31 kl  17 47 41

I fast found out it was not working properly and also wanted to get the price to round up to only 2 decimals, so I decided to use round(). First I was getting errors from the terminal on how I did the calculation.

Skärmavbild 2021-08-31 kl  17 53 34

Finally I found out how to make the calculation work properly and could move on with no bugs. (price = round(p / int(values[i]), 2))

Remaining Bugs

  • No bugs remaining

Validation Testing

  • PEP8
    • No errors where returned from PEP8online.com

pep no error

Technologies

Deployment

  1. On the home screen click on create new app button
  2. Enter a name for the project and select your region to the correct region
  3. On the next screen select settings
  4. Go to config vars and click reveal config vars
  5. Switch to the program file and where you are keeping your credentials copy these and then on Heroku enter a name for the key and paste the code into the config vars value box and click add
  6. Now scroll down to buildPacks and click add build packs
  7. First select python and click save changes
  8. Click back into build packs and choose node.js and click save again
  9. Ensure that the Python build pack is at the top of the list you are able to drag and drop if you need to rearrange
  10. Now select deploy
  11. From the deployment method select GitHub
  12. Then click on connect to Github button that appears
  13. Click into the search box and search for the project name
  14. Once located select connect
  15. Then click deploy branch, this will then be shown in the box below
  16. You can the click view to show the app in a browser

The program can be deployed automatically but i have chosen to keep it as a manual deploy.

Cloning

How to clone this repository.

  • On GitHub go to the main page of the Repository.
  • Above the list of files click the code button with the drop-down arrow.
  • To clone the repository using HTTPS, under "Clone with HTTPS", click on the clipboard.
  • Open the Git Bash terminal.
  • Change the current working directory to the location where you want the cloned directory.
  • Type git clone, and then paste the URL you copied earlier from step 3.
  • Press Enter to create your local clone.

Credits

muscle-gym-terminal's People

Contributors

andrezeitz avatar

Watchers

 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.