Giter VIP home page Giter VIP logo

kazana's Introduction

kazana

A modular data warehouse system

NPM version Build Status Coverage Status Dependency Status

Usage

module.exports = {
  name: 'myapp',
  version: '1.0.0',
  public: 'public',
  routes: routes,
  bootstrap: 'bootstrap',
  indices: {
    'integrated-data': {
      'byYearAndMonth': mapReduce
    }
  },
  transform: {
    'commodities-excel-report': ['commodity', transformCommoditiesExcelReport]
  },
  validate: {
    commodity: validateCommodityData
  },
  service: function (server, callback) {
    // initialise service, setup cron jobs and what not
    callback()
  },
  plugins: appPlugins
}

See example app at eHealthAfrica/kazana-example/index.js

Options

Options for the new Kazana constructor

name (required)

Name of the app / plugin

version (required)

SemVer compatible version. Pro tip:

  version: require('./package').version

port (required)

Default port number for app.

public

Path to folder from where to serve public assets at the root path.

  public: 'public'

Is simply a shortcut for

  routes: [{
    method: 'GET',
    path: '/{param*}',
    handler: {
      directory: {
        path: 'public'
      }
    }
  }]

routes

Array of hapi routes

bootstrap

Either a function with a callback, or a path to bootstrap CouchDB using couchdb-bootstrap

indices

CouchDB-compatible map/reduce functions by database & index names

transform

Key/Value map of transformation scripts by sourceIds.

validate tbd

Key/Value map of validation scripts by indicator "type"s

// handlers for integrated data validate: { 'accountMovement': validate }

service

A function that gets execute on app startup. Needs to call a callback when finished initialisation.

  service: function (kazana, callback) {
    // initialise service
    // e.g. start pulling data from some 3rd party service
    callback()
  }

plugins

Array of objects with same properties as options for the Kazana constructor.

Scripts

kazana-services

$ kazana-services
npm start -- --only=account
npm start -- --only=raw-data
npm start -- --bare

Lists commands to start main app and plugins in separate processes

Local setup and Testing

devDependency Status

git clone [email protected]:eHealthAfrica/kazana.git
cd kazana
npm install
npm test

CI test with selenium / chrome

npm run test:ci

CI test with saucelabs

SAUCE_USERNAME=*** SAUCE_ACCESS_KEY=*** TEST_CLIENT="saucelabs:internet explorer:10:Windows 8" npm run test:ci

Credit

Brought to you by eHealth Africa โ€” good tech for hard places.

License

Apache-2.0

kazana's People

Contributors

boennemann avatar ehealthafrica-ci avatar gr2m avatar greenkeeperio-bot avatar jo avatar obdulia-losantos avatar patriciagarcia avatar peritus avatar tthew 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.