Git Product home page Git Product logo

parse_decision's Introduction

ParseDecision Documentation

Summary

ParseDecision provides both a command line application and a rake task that is used to parse decision logs generated by the Commerce Velocity AMS application.

Installation

Add this line to your gemfile:

gem 'parse_decision'

And then execute:

$ bundle install

or install it yourself as:

$ gem install parse_decision

Usage

Command Line Application

Usage info can be retrieved from the application by calling it with the -h or --help options:

$ parse_decision --help

Notes

  • The decision log doesn't produce valid XML in many situations.
  • In the interest of preserving any data the log may contain, the resulting XML is not cleaned.
  • As a result of the previous notes, the parsed files are not guaranteed to be valid XML.

Rake Task Usage

The rake task can be included in a rakefile by requiring parse_decision like so:

require 'parse_decision'

and called as:

ParseDecisionTask.new.execute( log_src_path, dest_dir )

The parser will parse the decision log out to a destination directory. Each product within the log will be parsed into a separate file. The APP XML is also parsed to a separate file for each product.

Both the product and the APP XML file names will be prefixed with the same number. The number indicates the order that the data was found within the decision log.

A copy of the decision log (pre-parse) is also copied to the destination folder for archiving purposes.

Testing

ParseDecision uses RSpec for testing.

To run all existing tests:

$ rake spec

or directly:

$ bundle exec rspec

TODO

  • Change camelCase method naming convention to snake_case to match ruby (what was I thinking?)

Contributing

  1. Fork it ( https://github.com/jmcaffee/parse_decision/fork )
  2. Clone it (git clone [email protected]:[my-github-username]/parse_decision.git)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Create tests for your feature branch
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create a new Pull Request

LICENSE

ParseDecision is licensed under the MIT license.

See LICENSE for details.

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.