Skip to content

Teddykavooh/Ride-My-Way-Project

Repository files navigation

Coverage Status Build Status PEP8 License: MIT

Ride-My-Way


Home Image

  • Ride-my App is a carpooling application that provides drivers with the ability to create ride offers and passengers to join the available ride offers.

Getting Started

  1. Clone the repository to your machine; *https://github.com/Teddykavooh/Ride-My-Way.git
  2. Open the repo with an IDE of your choice as a project.

Prerequisites

  • Python 3
  • Virtual environment.
  • Flask
  • flask rest-plus
  • Postman
  • Browser of your liking

Setup

1 Open cmd. In the root directory folder;

  • Run the command: virtualenv venv, to create a virtual
    environment with the name venv. Folder with the name venv will
    created.
  • Activate the virtual environment by moving to the Script directory i.e. cd venv\Scripts, and running
    activate.
  • Create a database as per the database.ini file.

Application Requirements

  • The application requirements are clearly listed in the requirents.txt document.
    • To install them run the following cmd command:
      • pip install -r requirements.txt
    • Run the command: 'python run_my_tables.py' to create the necessary tables.

End-Points

Requests EndPoint Functionality
GET api/v2/rides Get all Rides
GET api/v2/rides/{ride_id} Get a specific ride
DELETE api/v2/rides/{ride_id} Delete ride
POST api/v2//rides Add a ride
POST api/v2/rides/{ride_id}/requests Request to join a ride
PUT api/v2/rides/{ride_id} Edit ride details
POST api/v2/users Register users
POST api/v2/users/login Login user
DELETE api/v2/users/{username} Delete a user
  • The above endpoints can be tested by Postman.

Running Of Tests

  • Running of tests can be done by unittest.
  • To run tests, run the following command in cmd:
    • coverage run -m unittest
  • A test report can be acquire by the coverage report cmd command.
  • Finally a better view can be acquired by the python -m http.server cmd command.

Version Control

  • This was done by GitHub

Github link

Pivotal Tracker link

Heroku

Author

  • Antony Kavoo

License

  • This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgement

  • Great appreciation to everyone who assisted in willing this project to its current glory.Thank you.

Home Image