<commit_before>[![GoDoc](https://godoc.org/github.com/3DSIM/simulation-goclient?status.svg)](https://godoc.org/github.com/3DSIM/simulation-goclient)

# simulation-goclient
Go client for interacting with the 3DSIM simulation api.  See http://docs.simulationapi.apiary.io for full API documentation.
Issues and PRs are welcome.  If you are a 3DSIM customer and have questions, feel free to visit https://community.3dsim.com to start a discussion.

## Technical Specifications

### Platforms Supported
MacOS, Windows, and Linux

## Background Info
We use https://goswagger.io to generate our Go APIs and clients.  This allows
us to build our APIs in a "design first" manner.

First we create a `swagger.yaml` file that defines the API.  Then we run a command
to generate the server code.

Additionally, this allows us to automatically generate client code.  The code in this
directory was all generated using the `go-swagger` tools.


## Organization
* `simulation` - the client package that adds convenience methods for common simulation operations
* `genclient` - the generated client code
   * `genclient/examples` - examples of how to use the `genclient` package
* `helpers` - a few simple helper utilities
* `models` - the generated models

## Regenerating code
First install the swagger generator.  Currently we are using release 0.11.0 of https://github.com/go-swagger/go-swagger.

For mac users:
* brew tap go-swagger/go-swagger
* brew install go-swagger

For windows users:
* See https://github.com/go-swagger/go-swagger for options

The code generator needs a specification file.  The specification for the simulation API is stored in `github.com/3dsim/simulation-api-specification/swagger.yaml`.  Assuming that project
is cloned as a sibling project, the command to run to generate new client code is:
```
swagger generate client -A SimulationAPI -f ../simulation-api-specification/swagger.yaml --client-package genclient
```

* Generate fakes using counterfeiter
```
go get github.com/maxbrunsfeld/counterfeiter
```
From inside package folder
```
go generate
```

* Generate mocks using https://github.com/vektra/mockery

```
go get github.com/vektra/mockery/.../
$GOPATH/bin/mockery -name <interface name> -recursive
```

If you need to generate mocks in the same package to avoid circular dependencies use
```
$GOPATH/bin/mockery -name <interface name> -recursive -inpkg
```

## Using the client
TODO

## Client to API version compatibility

| Simulation API | Simulation Client |
| ------------- | ------------- |
| 0.14.x  | 0.3.x |

<commit_msg>Add contributors list<commit_after>[![GoDoc](https://godoc.org/github.com/3DSIM/simulation-goclient?status.svg)](https://godoc.org/github.com/3DSIM/simulation-goclient)

# simulation-goclient
Go client for interacting with the 3DSIM simulation api.  See http://docs.simulationapi.apiary.io for full API documentation.
Issues and PRs are welcome.  If you are a 3DSIM customer and have questions, feel free to visit https://community.3dsim.com to start a discussion.

## Technical Specifications

### Platforms Supported
MacOS, Windows, and Linux

## Background Info
We use https://goswagger.io to generate our Go APIs and clients.  This allows
us to build our APIs in a "design first" manner.

First we create a `swagger.yaml` file that defines the API.  Then we run a command
to generate the server code.

Additionally, this allows us to automatically generate client code.  The code in this
directory was all generated using the `go-swagger` tools.


## Organization
* `simulation` - the client package that adds convenience methods for common simulation operations
* `genclient` - the generated client code
   * `genclient/examples` - examples of how to use the `genclient` package
* `helpers` - a few simple helper utilities
* `models` - the generated models

## Regenerating code
First install the swagger generator.  Currently we are using release 0.11.0 of https://github.com/go-swagger/go-swagger.

For mac users:
* brew tap go-swagger/go-swagger
* brew install go-swagger

For windows users:
* See https://github.com/go-swagger/go-swagger for options

The code generator needs a specification file.  The specification for the simulation API is stored in `github.com/3dsim/simulation-api-specification/swagger.yaml`.  Assuming that project
is cloned as a sibling project, the command to run to generate new client code is:
```
swagger generate client -A SimulationAPI -f ../simulation-api-specification/swagger.yaml --client-package genclient
```

* Generate fakes using counterfeiter
```
go get github.com/maxbrunsfeld/counterfeiter
```
From inside package folder
```
go generate
```

* Generate mocks using https://github.com/vektra/mockery

```
go get github.com/vektra/mockery/.../
$GOPATH/bin/mockery -name <interface name> -recursive
```

If you need to generate mocks in the same package to avoid circular dependencies use
```
$GOPATH/bin/mockery -name <interface name> -recursive -inpkg
```

## Using the client
TODO

## Client to API version compatibility

| Simulation API | Simulation Client |
| ------------- | ------------- |
| 0.14.x  | 0.3.x |


## Contributors
* <NAME>
* <NAME>
* <NAME>
* <NAME>
* <NAME>

## Original release
January 2017
{'fraction_non_alphanumeric': 0.10553533805784332, 'fraction_numerical': 0.006512162420992147, 'mean_word_length': 4.025986525505293, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 14, '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': '3033228', 'n_tokens_mistral': 1595, 'n_tokens_neox': 1500, 'n_words': 586}