GithubHelp home page GithubHelp logo

orders-merge's Introduction

Orders merge

This repository is part of a Python assignment. I tried to not implement it in a functional way as much as possible (got used for it from ES6).

Prerequisites

Python 3.6.5

Install requirements by:

pip3 install -r requirements.txt

Wait - there are no requirements; it's all pure vanilla

To use just execute run.py with the required flags.

For example with the attached example files:

python run.py -o $PWD/example/orders.csv -b $PWD/example/barcodes.csv

Bonus points:

  • To show top users use -t 5 with a integer as the amount for the top customers.
  • The unused barcodes are being showed both in the STDOUT and the log level.
  • Please find the log file in the project root merge.log for debug and error logs.
  • If not specify, a file name result.csv will be generate. you can use the -j flag for having a JSON format instead.
  • To execute it debug mode please use the env_param PY_ENV=DEV.
  • If I had time, I would've add some unitests, but as it wasn't required I allowed myself to release this without any.
  • Last point, Personally I would've store it in a collection base(NOSQL); But base on the 2 tables attached, I've created the following schema for 3 tables (and the little fields I had to work with) UML

Optional arguments:

  • -h, --help show this help message and exit
  • -b Barcodes source, --barcodes Barcodes source Path for the barcodes_source csv file
  • -o Orders Source, --orders Orders Source Path for the orders source csv file
  • -t Top customers, --top Top customers Integer of the top customers
  • -f Filename of the output, --filename Filename of the output Give a name for the output file (default result
  • -j Export to JSON, --json Export to JSON Export to JSON instead of CSV
  • -v, --version show program's version number and exit
  • -h, --help show this help message and exit

orders-merge's People

Contributors

evilurge 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.