<commit_before>omg-transform
=============

An [`enaml`](https://github.com/enaml-ops/enaml) based tool 
that allows you to perform transformations on bosh manifests.

## Development Setup

Make sure you have a working Go toolchain and have installed [glide](http://glide.sh/).

```sh
go get -d -u github.com/enaml-ops/omg-transform
cd $GOPATH/src/enaml-ops/omg-transform
glide install
go build
go test `glide nv`
```

## Usage

By default, `omg-transform` attempts to read a manifest from standard in 
and writes the transformed manifest to standard out.

For example, to run a transformation on a manifest produced by 
[`omg-cli`](https://github.com/enaml-ops/omg-cli):

```sh
omg-cli deploy-product --print-manifest cloudfoundry-plugin-linux | omg-transform <TRANSFORM> [flags...]
```

## Transformations

 - `change-network`: change an instance group's network
 - `clone`: clone an instance group

## Adding a new transformation<commit_msg>add change-az transform to readme<commit_after>omg-transform
=============

An [`enaml`](https://github.com/enaml-ops/enaml) based tool 
that allows you to perform transformations on bosh manifests.

## Development Setup

Make sure you have a working Go toolchain and have installed [glide](http://glide.sh/).

```sh
go get -d -u github.com/enaml-ops/omg-transform
cd $GOPATH/src/enaml-ops/omg-transform
glide install
go build
go test `glide nv`
```

## Usage

By default, `omg-transform` attempts to read a manifest from standard in 
and writes the transformed manifest to standard out.

For example, to run a transformation on a manifest produced by 
[`omg-cli`](https://github.com/enaml-ops/omg-cli):

```sh
omg-cli deploy-product --print-manifest cloudfoundry-plugin-linux | omg-transform <TRANSFORM> [flags...]
```

## Transformations

 - `change-network`: change an instance group's network
 - `clone`: clone an instance group
 - `change-az`: change an instance group's AZs

## Adding a new transformation
{'fraction_non_alphanumeric': 0.13043478260869565, 'fraction_numerical': 0.0, 'mean_word_length': 4.373626373626373, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2665804', 'n_tokens_mistral': 631, 'n_tokens_neox': 595, 'n_words': 209}