Skip to content

SanitaB17/Tesla

Repository files navigation

Tesla

Tesla is a CLI data automation program created for educational purposes only as part of the Code Institute Diploma in Full-Stack Software Development.

Live Preview of Tesla

Main view

Table of Contents

UX

User

User Goals

  • Rent Tesla car.
  • View Booking.
  • Cancel booking.

User Stories

  • As a user, I want to be able to rent a Tesla car so that I can use it for my transportation needs.
  • As a user, I want to view my booking details so that I can verify the information.
  • As a user, I want to cancel my booking if my plans change so that I can avoid unnecessary charges and free up the car for other customers.

Site owners Goals

  • Easy to navigate.
  • Provide a diverse selection of Tesla car models and prices.
  • Provide feedback or a response to the user when they perform a task or action.
  • Implement a reservation system to allow users to schedule car rentals in advance, ensuring availability and convenience.

Program flowchart

During planning, I created a flowchart of how I wanted program to work and interact. The flowchart was created using Figma

Flow-chart


  Back to Top
 

Data Storage (Google Sheets)

The data for the application's rental details is stored in Google Sheet.

Features

Existing Features

  • The Main Menu:
    • Users are greeted and presented with three options to choose from.

Main


  Back to Top
 

  • Rent Car Section:
    • This section allows users to input their desired rental dates (future dates) and choose a car model. It also provides feedback if a car is unavailable during those dates. Selected Car Unavailable
    • Displays a summary of booking details and cost. Rent Car Section


  Back to Top
 

  • View Booking:
    • This section allows users to search for their booking by entering their name. If the user has booked a car, it will display all information regarding the user's booking. View Booking
    • If no booking is found for the entered name, it will inform the user accordingly. Booking Not Found


  Back to Top
 

  • Cancel Booking:
    • In this section, users are provided with the option to cancel their booking. Users will be prompted to input their name to identify their booking. If a booking is found for the entered name, the system will display all relevant booking information and prompt the user to confirm the cancellation. If confirmed, the booking will be canceled. Cancel Booking
    • If no booking is found for the entered name, user will be informed accordingly. Cancel Booking Not Found


  Back to Top
 

Future Features

  • Generate Booking IDs:
    • When a user makes a booking, generate a unique booking ID for that reservation.
    • Cancel booking/s by booking id.

Technology used


  Back to Top
 

Testing and Validation

Functional Testing

Test scenario Steps Observation Pass/Fail
Main Menu - selecting options 1.Input letters.
2.Input letters, numbers, and symbols.
3.Input letters '1', '2', and '3'.
4.Input numbers greater than '3'.
1.Program should prompt to enter a number between '1' and '3'.
2.Program should prompt to enter a number between '1' and '3'.
3.Program should navigate to the selected option.
4.Program should prompt to enter a number between '1' and '3'.
1.Pass
2.Pass
3.Pass
4.Pass
Rent Car - selecting start date 1.Input letters.
2.Input letters, numbers, and symbols.
3.Input past dates.
4.Input the current date.
5. Input future dates.
1.Program should prompt to enter a valid date.
2.Program should prompt to enter a valid date.
3.Program should prompt to enter a valid date.
4.Program should prompt to enter a valid date.
5.Program should prompt to enter the end date.
1.Pass
2.Pass
3.Pass
4.Pass
5.Pass
Rent Car - selecting end date 1.Input letters.
2.Input letters, numbers, and symbols.
3.Input past dates.
4.Input the current date.
5.Input the start date.
6.Input dates greater than the start date.
1.Program should prompt to enter a valid date.
2.Program should prompt to enter a valid date.
3.Program should prompt to enter a valid date.
4.Program should prompt to enter a valid date.
5.Program should prompt to enter a valid date.
6.Program should display car models to select.
1.Pass
2.Pass
3.Pass
4.Pass
5.Pass
6.Pass
Rent Car - selecting car model 1.Input letters.
2.Input letters, numbers, and symbols.
3.Input the letters '1', '2', and '3'.
4.Input numbers greater than '3'.
1.Program should display: "Invalid choice. Please select a valid number." and prompt to select a car model.
2.Program should display: "Invalid choice. Please select a valid number." and prompt to select a car model.
3.Program should prompt to enter the user's name.
4.Program should display: "Invalid choice. Please select a valid number." and prompt to select a car model.
1.Pass
2.Pass
3.Pass
4.Pass
Rent Car - enter user name 1.Input numbers.
2.Input numbers, letters, and symbols.
3.Input letters only.
1.Program should display: "Name should contain only letters." and prompt to enter a name.
2.Program should display: "Name should contain only letters." and prompt to enter a name.
3.Program should display the booking details.
1.Pass
2.Pass
3.Pass
View Booking - enter user name 1.Input numbers.
2.Input numbers, letters, and symbols.
3.Input lowercase letters.
4.Input capital letters only
1.Program should display: "Name should contain only uppercase letters." and prompt to enter a name.
2.Program should display: "Name should contain only uppercase letters." and prompt to enter a name.
3.Program should display: "Name should contain only uppercase letters." and prompt to enter a name.
4.Program should display user's booking details.
1.Pass
2.Pass
3.Pass
4.Pass
Cancel booking - enter user name 1.Input numbers.
2.Input numbers, letters, and symbols.
3.Input lowercase letters.
4.Input capital letters only.
1.Program should display: "Name should contain only uppercase letters." and prompt to enter a name.
2.Program should display: "Name should contain only uppercase letters." and prompt to enter a name.
3.Program should display: "Name should contain only uppercase letters." and prompt to enter a name.
4.Program should display user's booking details.
1.Pass
2.Pass
3.Pass
4.Pass
Cancel booking - users booking data display 1.Enter the user's name with no booking.
2.Enter the user's name with booking.
1.Program should display: "No booking found for USER."
2.Program should display users booking and ask user to cancel booking(s) (yes/no).
1.Pass
2.Pass
Cancel booking - yes/no confirmation 1.Input numbers.
2.Input letters, numbers, and symbols.
3.Input yes.
4.Input no.
1.Program should display: "Invalid input. Please enter 'yes' or 'no'." and prompt the user to enter yes/no.
2.Program should display: "Invalid input. Please enter 'yes' or 'no'." and prompt the user to enter yes/no.
3.Program should return to the main menu.
4.Program should display: "Booking cancelation canceled."
1.Pass
2Pass
3.Pass
4.Pass


  Back to Top
 

Testing User Stories

User Stories Pass/Fail
As a user, I want to be able to rent a Tesla car so that I can use it for my transportation needs. Pass
As a user, I want to view my booking details so that I can verify the information. Pass
As a user, I want to cancel my booking if my plans change so that I can avoid unnecessary charges and free up the car for other customers. Pass


  Back to Top
 

Validator Testing

  • Python No error were found passing through the pep8ci

Validation


  Back to Top
 

Bugs and Unfixed Bugs

To the best of my knowledge and understanding there are no bugs present.


  Back to Top
 

Deployment

Clone the Repository

Navigate to the GitHub Repository you want to clone to use locally:

  1. Click on the code drop down button
  2. Click on HTTPS
  3. Copy the repository link to the clipboard
  4. Open your IDE of choice
  5. Type git clone copied-git-url into the IDE terminal

The project will now be cloned on your local machine for use.


  Back to Top
 

APIs

For setting up APIs I falowed videos and instructions provided in Love Sandwiches and Spreadsheet Point.

APIs used for this project:

  • Google Drive API.
  • Google Sheet API.


  Back to Top
 

Deploying app on Heroku

  1. Update requirements.txt file:
    • In your IDE, run the command: pip3 freeze > requirements.txt to include all dependencies.
    • Commit the changes and push to GitHub.
  2. Log in to Heroku:
    • Access your Heroku account.
  3. Create new app:
    • From the dashboard, click "New" (top right corner) and choose "Create new app".
    • Provide a unique name for your app (e.g., "rent-tesla") and select your preferred region (e.g., Europe).
    • Click "create app".
  4. Configure environment variables:
    • Navigate to the settings tab, find "Config Vars", and click "Reveal config vars".
    • Add a config var:
      • KEY: CREDS
      • VALUE: Copy and paste the contents of your creds.json file.
    • Add another config var:
      • KEY: PORT
      • VALUE: 8000.
  5. Set up buildpacks:
    • Scroll to the "Buildpacks" section and click "Add buildpack".
    • Select Python as the first buildpack and save changes.
    • Add another buildpack:
      • Select Node.js.
      • Save changes again.
      • Ensure that the Python buildpack is positioned above the Node.js buildpack.
  6. Connect to GitHub:
    • Navigate to the "Deploy" section by clicking the "Deploy" tab.
    • Choose "GitHub" as the deployment method and click "Connect to GitHub".
    • Search for your GitHub repository and click "Connect".
  7. Deploy the app:
    • Scroll down and click "Deploy Main".
  8. View deployed app:
    • Once the app is deployed, Heroku will notify you and provide a button to view the app.


  Back to Top
 

Credits

Acknowledgements

  • The Code Institute community and my Cohort Facilitator Laura Mayock, for motivation and support.
  • My mentor, Gareth McGirr, for providing me with information and advices through the development process.


  Back to Top
 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published