Giter Site home page Giter Site logo

suppliers's Introduction

NYU DevOps Project - Suppliers

codecov Build Status

Project description

The purpose of this project is to develop a suppliers system for an eCommerce web site backend as a collection RESTful services for a client by adopting DevOps methodology. The final app is hosted on IBM Cloud with CI Delivery Pipeline.

Current build

This build is for Sprint 5, intended for the Wednesday, December 11 2019 due date.

How to access

Running on IBM Cloud in Prod: (App Dashboard Here)
https://nyu-suppliers-service-f19.mybluemix.net/

Running on IBM Cloud in Dev: (App Dashboard Here)
https://nyu-suppliers-service-f19-dev.mybluemix.net/

DevOps Pipeline in IBM Cloud:
https://cloud.ibm.com/devops/pipelines/74638c62-616b-4ef0-b8e7-d8db2bf6c0a3?env_id=ibm:yp:us-south

Features supported

Seven paths:

GET /suppliers - Returns a list all of the suppliers
GET /suppliers/string:supplierID - Returns the supplier with a given id number
POST /suppliers - creates a new supplier record in the database
PUT /suppliers/string:supplierID - updates a supplier record in the database
DELETE /suppliers/string:supplierID - deletes a supplier record in the database
QUERY /suppliers/ - query the database by the name of the supplier
ACTION /suppliers/string:productId/recommend - query the database for suppliers that serve a certain product with a average rating of 3 or above

string:supplierID is a string of 24 hexadecimal characters eg: 4f4381f4e779897a2c000009

The recommend: Enter the ID of the product of which you'd like to get remmended suppliers.

Running Tests

To run the TDD tests please run the following commands:

 git clone https://github.com/nyu-devops-fall19-suppliers/suppliers
 cd suppliers
 vagrant up
 vagrant ssh
 cd /vagrant
 nosetests

To run the BDD tests please run the following commands:

 git clone https://github.com/nyu-devops-fall19-suppliers/suppliers
 cd suppliers
 vagrant up
 vagrant ssh
 cd /vagrant
 honcho start &
 behave

Running the Flask App:

To run the Flask app to create an interactive version of the API, please follow these steps:

 vagrant up
 vagrant ssh
 cd /vagrant
 nosetests
 FLASK_APP=service:app flask run -h 0.0.0.0

Then the service will available at: http://127.0.0.1:5000/suppliers

Running Pylint:

vagrant up
vagrant ssh
cd /vagrant
pylint --rcfile=pylint.conf service/*.py
pylint --rcfile=pylint.conf tests/*.py

Built using:

  • MongoDB - MongoDB is a document database
  • MongoEngine - a Python Object-Document Mapper for working with MongoDB.
  • Nose - Better python testing

suppliers's People

Contributors

greenson avatar krystal-158 avatar lhmartin avatar silemie 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.