<commit_before>orka
====

The module provides configuration based task management.

The module functionality is different from other modules that provide similar API, such as async or orchestrator. The main difference is how a task is executed in relation to the tasks it depends on. For example, if task A depends on tasks C and D, it will be executed only when tasks C and D are complete while orka will let A run till it really needs results from C or D. If it happens due to logic that task A does not need data from D or C it will run without waiting for the related tasks.

# TODO:
* Make task loading async

# Installation

```
npm install orka --save
```

# Configuration

The configuration is called 'execution plan' and is based on one level of dependency tree, meaning each task specifies only direct dependencies. 

## Execution plan

```javascript
var plan = {
    A: ['B', 'C'],
    B: ['C'],
    D: ['A', 'B']
};
```

You can also map task output to another task input
```javascript
var plan = {
    A: {
        data-B: 'B',
        data-C: 'C'
    },
    B: ['C'],
    D: ['A', 'B']
};
```

## Task loading

The tasks can be loaded via options.load function or require by default:
```javascript
var orka = require('orka');
orka.start(executionPlan, {
    load: function (taskName) {
        return someRegistry[taskName];
    }<commit_msg>readme update<commit_after>orka
====

The module provides configuration based task management.

The module functionality is different from other modules that provide similar API, such as async or orchestrator. The main difference is how a task is executed in relation to the tasks it depends on. For example, if task A depends on tasks C and D, it will be executed only when tasks C and D are complete while orka will let A run till it really needs results from C or D. If it happens due to logic that task A does not need data from D or C it will run without waiting for the related tasks (mapped dependency).

# TODO:
* Make task loading async

# Installation

```
npm install orka --save
```

# Configuration

The configuration is called 'execution plan' and is based on one level of dependency tree, meaning each task specifies only direct dependencies. 

## Execution plan

```javascript
var plan = {
    A: ['B', 'C'],
    B: ['C'],
    D: ['A', 'B']
};
```

You can also map task output to another task input (mapped dependency)
```javascript
var plan = {
    A: {
        data-B: 'B',
        data-C: 'C'
    },
    B: ['C'],
    D: ['A', 'B']
};
```

## Task loading

The tasks can be loaded via options.load function or require by default:
```javascript
var orka = require('orka');
orka.start(executionPlan, {
    load: function (taskName) {
        return someRegistry[taskName];
    }
{'fraction_non_alphanumeric': 0.09520348837209303, 'fraction_numerical': 0.0, 'mean_word_length': 3.454692556634304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2688614', 'n_tokens_mistral': 780, 'n_tokens_neox': 752, 'n_words': 403}