Git Product home page Git Product logo

bangazon_cli's Introduction

Bangazon Command Line Interface

This is a continuation of the work started here: https://github.com/PythonPonies/bangazon-api. The CLI provides a minimalistic platform from which users can create accounts, associate payment types, create orders, add products to orders, and make purchases in interaction with the Bangazon database.

##How to Use the CLI

  1. If you don't have Python version 2.7, 3.2, 3.3, 3.4, or 3.5: install the latest version of Python.

  2. Clone this repository to a folder on your computer.

  3. From the root folder of this repository, run python main.py in order to create the bangazon.db sqlite3 file.

  4. Also from the root folder, run python bangazon.py menu to enter the CLI "shell".

  5. Important to Note: This is not an actual shell. It functions on the basis of sysargs so you will need to run python bangazon.py and the appropriate number for the command you'd like to run. For example, if you want to create a user, then you would run python bangazon.py 1 to see that interface. If you already have an account and would like to select it, then you would run python bangazon.py 2.

  6. On each page, you will respond to the prompts in order to move along the interface and create orders, add products, and complete purchases. Wherever there is a menu showing, you will need to remember to run python bangazon.py -- where the -- is the number of the menu item you'd like to navigate to.

  7. Entering any command other than python bangazon.py [1-7] or menu will return you to the main menu. Ex: python bangazon.py 9 or python bangazon.py home will return you to the main menu.

##Contributors

bangazon_cli's People

Contributors

nathantbaker avatar consumerike avatar stevenwally avatar sales-ls21 avatar zoeleblanc avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

markellisdev

bangazon_cli's Issues

Feature: Associating Payment Types to User Accounts

Context

  1. What should the feature do?
    Users should be able to enter the account number and type for payment methods and associate those payment types to their accounts.

  2. When and where should the feature appear?
    Before being able to view available products and create orders, users have to enter payment information.

Associated Product Ticket

#1 Command line interface for ordering Bangazon products

Requirements

  1. Potential Impact on Code or Other Features
    This data needs to be included in a table in the database so that the data can be displayed when a user attempts to complete an order.

Customer can complete order tying payment type to order

Context

  1. What should the feature do?

This feature should allow a registered customer to use a command line interface tool for the Bangazon Platform to complete an order (containing at least one item) and select a payment method to be used for said order.

Associated Product Ticket

#1

Requirements

  • Unit tests to verify order completion in accordance with a chosen payment method and user.

  • Appropriate classes for orders, payment methods & users.

  • Appropriate methods for completing an order & confirming payment method.

  • A method of persisting chosen payment type + account number.

  • Database table(s) to persist pertinent order information.

A customer can add a product to an order

Context

  1. What should the feature do?
    This feature should allow any registered customer select any product and add it to their order. When a customer selects a product, the menu of all available products will display again. The user will also be able to select the last option which takes them back to the main menu and specifies that no more products are needed for that order.

  2. When and where should the feature appear?
    The feature should appear when the customer navigates to the products on order section of the command line interface.

Associated Product Ticket

#1

Requirements

  1. Potential Impact on Code or Other Features
    requires:
  • unit test to verify products can be added to orders
  • class of products on orders
  • methods to add products on orders and to get all products on orders
  • database table that stores: products, order, and customer information

A user can complete an order

Context

What should the feature do?
Complete an order by tying a payment type to an order via command line interface

When and where should the feature appear?
After a payment type has been designated
After products have been added

Requirements

access to order information (Access to product Ids, Access to cost of items, access to customer identity)

User can login by selecting the active user

Context

  1. What should the feature do?

Allow customer to login by selecting an active user out of a list of all customers

  1. When and where should the feature appear?
    After users have been registered or upon signing in to the CLI

Associated Product Ticket

#1

Requirements

  1. Potential Impact on Code or Other Features

*Need data to persist and be associated with the active user

*Access to "list" of customers
*Unit tests to verify user is active

*Access to Appropriate classes for customers

*Appropriate methods for selecting an active user out of all potential users

*access to user identity information of active user to include:
**payment methods
**orders

Feature: Associating Payment Type to User

As a customer

In order to purchase items from the Bangazon Platform

I want to have a command line interface tool where I can enter my payment information

and associate that payment information with my account

so that I can eventually complete purchases.

Use Bangazon API for interaction with database

Story

As a command line client

In order to interact with the Bangazon database

I want to use a RESTful API

Scenarios

Given a customer performs an action

When that action requires the querying of data

Or that action requires creating new data

Then the Bangazon RESTful API should be used to complete the action

ref: requests

A customer can register

Context

1. What should the feature do?
A customer of the Bangazon Platform can register in order to interact with the platform. They can register by entering their:

  • customer name
  • city
  • state
  • postal code
  • phone number

2. When and where should the feature appear?
All this takes place through a command line interface.

Associated Product Ticket

#1

Requirements

  • Data should persist
  • Tests should be written to see if all data fields are added to a database
  • There should be a database table to store user information
  • There should be a class or classes to best organize responsibilities of the registrar and/or user

1. Potential Impact on Code or Other Features
There should be discussion to make sure data is persisting in a similar way to other parts of the application. Tests should be written in a consistent way across the application.

A user can complete an order (Feature Story)

As a registered user I can view products sorted by popularity (initially, most ordered products)

Context

  1. What should the feature do?
    Produce a command line report that lists the relationship between a specific (each) product and said product's orders, # of customers, and revenue

  2. When and where should the feature appear?
    After accessing the Bangazon CLI it should be listed as an option

Requirements

access to Bangazon Database
Products list ordered by count of orders

Unit tests to products popularity

Appropriate methods for getting popularity data

The product column must be 18 characters wide, and will display a maximum of 17 characters for the product name.
The orders column must be 11 characters wide.
The customers column must be 11 characters wide.
The revenue column must be 15 characters wide.

User can login by selecting the active user

As a user I can login by selecting an active user from the CLI user list so that I can:

add products

add payment types

complete orders

As a registered user I can complete an order by tying a payment type to an order via command line interface.

Context

What should the feature do?
Allow customer to login by selecting an active user

When and where should the feature appear?

After a user has registered

Requirements

Access to "list" of customers
Unit tests to verify user is active

Appropriate classes for customers

Appropriate methods for selecting an active user out of all potential users

access to user identity information of active user

Create SQL statements to seed database and persist data

Context

1. What should the feature do?
Based on our ERD, we need sequel statements into order to create a database. Data needs to persist in order to complete some of the required features of feature ticket #1. For instance, selecting an active customer requires persisting customer data.

2. When and where should the feature appear?
Ideally the sql file is accessible to the whole group to assist with knowing how to insert and query data from within methods across the app. The SQL statements can be used to create our database file to be used in the app.

Associated Product Ticket

#1

Requirements

1. Potential Impact on Code or Other Features
This will act as the source of truth for how all methods will query and add data to our database so data can persist.

Add password capabilities for customer

Story

As a customer of Bangazon

In order to purchase items currently for sale securely

I want to add a password to my account so that other customers cannot access mine

Scenarios

Given that a customer wants to use Bangazon CLI to purchase items

When the initial menu is presented to the customer

Then the Choose Active Customer menu item should be removed

And it should be replaced with a Log in to my account item


Given that a customer wants to use Bangazon CLI to purchase items

When the customer chooses to create a new account

Then a password must be entered in for their profile, in addition to all current information


Given that a customer has an account

When the customer selects the Log in to my account item

Then the customer should be prompted for their first name, last name, and password


Given that a customer has logged in to the system

When the main menu is displayed

Then there should be a Log out menu item

And the Log in to my account item should not be visible

ref: hashlib

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.