Giter Site home page Giter Site logo

mini-project-1's Introduction

mini-project-1

Build Status Documentation Status

Requirements

  • Python 3.6+

Overview

mini-project-1 is a simple command line interface (CLI) tool for interacting with a database service that provide information similar to popular ride sharing applications.

Installation

mini-project-1 can be installed from source by running:

pip install .

Within the same directory as mini-project-1's setup.py file.

Usage

After installing mini-project-1's shell can be started by the following console command:

mini-project-1 -i example.db -v

This will create an initial mini-project-1 database named example.db at your current directory and will immediately give you a prompt to login to such database.

To get additional usage help on starting mini-project-1 run the following console command:

mini-project-1 --help

mini-project-1's People

Contributors

nklapste avatar ryfurrer avatar thomaslorincz avatar

Watchers

 avatar  avatar  avatar

Forkers

icefrog-45

mini-project-1's Issues

Messaging for cancel_booking

For any booking that is cancelled (i.e. being deleted from the booking table), a proper message should be sent to the member whose booking is cancelled.

Delete ride request

The member should be able to see all his/her ride requests and be able to delete any of them.

Search ride request

The member should be able to see all his/her ride requests and be able to delete any of them. Also the member should be able to provide a location code or a city and see a listing of all requests with a pickup location matching the location code or the city entered. If there are more than 5 matches, at most 5 matches will be shown at a time. The member should be able to select a request and message the posting member, for example asking the member to check out a ride.

Cancel Booking

The member should be able to list all bookings on rides s/he offers and cancel any booking. For any booking that is cancelled (i.e. being deleted from the booking table), a proper message should be sent to the member whose booking is cancelled.

Offer ride

The member should be able to offer rides by providing a date, the number of seats offered, the price per seat, a luggage description, a source location, and a destination location. The member should have the option of adding a car number and any set of enroute locations. For locations (including source, destination and enroute), the member should be able to provide a keyword, which can be a location code. If the keyword is not a location code, your system should return all locations that have the keyword as a substring in city, province or address fields. If there are more than 5 matching locations, at most 5 matches will be shown at a time, letting the member select a location or see more matches. If a car number is entered, your system must ensure that the car belongs to the member. Your system should automatically assign a unique ride number (rno) to the ride and set the member as the driver of the ride.

Logout

Members should be able to logout and there must be also an option to exit the program.

Login method

The first screen of your system should provide options for members to login and for new members to register. Existing members should be able to login using a valid email and password, denoted with email and pwd in table members. After a login, all unseen messages of the member will be displayed, and the status of the messages will be set to seen (i.e, the seen column is set to 'y'). Unregistered members should be able to sign up by providing a unique email, a name, a phone, and a password. Proper messages should be given if the provided email is not unique. After a successful login or signup, members should be able to perform the subsequent operations (possibly chosen from a menu) as discussed next.

The login password non-visible at the time of typing.

register new users

Unregistered members should be able to sign up by providing a unique email, a name, a phone, and a password.

related to #3

Search Rides

The member should be able to enter 1-3 location keywords and retrieve all rides that match all keywords. A ride matches a keyword if the keyword matches one of the locations source, destination, or enroute. Also a location matches a keyword if the keyword is either the location code or a substring of the city, the province, or the address fields of the location. For each matching ride, all information about the ride (from the rides table) and car details (if any) will be displayed. If there are more than 5 matches, at most 5 will be shown at a time, and the member is provided an option to see more. The member should be able to select a ride and message the member posting the ride that h/she wants to book seats on that ride.

Simplify API methods

No need to be so verbose:
ride_request can be shortened to request
location_code can be shortened to lcode
city_name can be shortened to city

Duplicate Inbox messages on Failed Login

do_login recursively calls itself on incorrect username/password leading to duplicate show inbox messages

Ex:
mini-project-1>login
Login to mini-project-1 database:
username: [email protected]
password:
[2018-11-05 13:22:35,533] [WARNING] - invalid login: bad username/password
Login to mini-project-1 database:
username: [email protected]
password:
[2018-11-05 13:22:40,675] [WARNING] - invalid login: bad username/password
Login to mini-project-1 database:
username: [email protected]
password:
[2018-11-05 13:22:43,590] [WARNING] - invalid login: bad username/password
Login to mini-project-1 database:
username: [email protected]
password:
[2018-11-05 13:22:46,239] [INFO] - logged in user: [email protected]
No new messages
No new messages
No new messages
No new messages

List Bookings

The member should be able to list all bookings on rides s/he offers.

Post ride request

Post ride requests.The member should be able to post a ride request by providing a date, a pick up location code, a drop off location code, and the amount willing to pay per seat. The request rid is set by your system to a unique number and the email is set to the email address of the member.

Book Member

The member should be able to book other members on the rides they offer. Your system should list all rides the member offers with the number of available seats for each ride (i.e., seats that are not booked). If there are more than 5 matching rides, at most 5 will be shown at a time, and the member will have the option to see more. The member should be able to select a ride and book a member for that ride by entering the member email, the number of seats booked, the cost per seat, and pickup and drop off location codes. Your system should assign a unique booking number (bno) to the booking. Your system should give a warning if a ride is being overbooked (i.e. the number of seats booked exceeds the number of seats offered), but will allow overbooking if the member confirms it. After a successful booking, a proper message should be sent to the other member that s/he is booked on the ride.

Restructure Registration

registration should be more streamlined. It should not require an separate entrypoint and startup script.

Fix cancel_bookings

Bookings are cancelled by those that are offering the ride, not the person who is booked.

Report

txt template in docs

The design document should include
(a) a general overview of your system with a small user guide,
(b) a detailed design of your software with a focus on the components required to
deliver the major functions of your application,
(c) your testing strategy, and
(d) your group work break-down strategy.

Everyone at least needs to put down their time spent (an estimate) and progress made

Search ride requests by lcode or city name

Also the member should be able to provide a location code or a city and see a listing of all requests with a pickup location matching the location code or the city entered. If there are more than 5 matches, at most 5 matches will be shown at a time.

cancel_booking error messages

User should receive info messages about the successful and unsuccessful attempt to cancel_booking.
Examples:

  • "Error: You have no booking corresponding to bno=_"
  • "Are you sure you want to cancel booking _? (y/n)"
  • "Successfully deleted booking _"

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.