Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
/ aml-gen Public archive

AML Document Generator

Notifications You must be signed in to change notification settings

aml-org/aml-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c8b5229 · Jul 24, 2019

History

40 Commits
Apr 5, 2019
Jul 24, 2019
Apr 5, 2019
Apr 5, 2019
Apr 5, 2019
Apr 5, 2019
May 2, 2019
Jul 4, 2019
Jun 24, 2019
Jul 20, 2019
Jul 24, 2019
Apr 5, 2019
Apr 5, 2019
Apr 5, 2019

Repository files navigation

AML-GEN

Automatic generator of examples for AML dialects.

Provided a valid AML dialect, this generator can automatically create a set of examples that validates the dialect. The generator can be potentially customised to generate more semantically accurate values that not only matches the contraints in the dialect but provide a better set of examples for a human reader.

Command line usage

Installation

Script usage documentation

AML 1.0
Usage: amlgen [generate] [options] dialect output

Command: generate [options]
Generates dialect instances
  -s, --seed <value>       the seed used when generating files. Default is random
  dialect                  dialect is the path to the dialect
  output                   output is the path to the folder where the generated files will be dumped
  -i, --instances <value>  instances is the number of dialect instances you want to generate. Default is 1000
  -c, --cardinality <value>
                           cardinality is the maximum length of generated lists and maps. Default is 3

Example

The following example will generate 5 dialect instances files given the dialect.yaml and leave them in the output file.

./amlgen generate "./dialect.yaml" "./output" -instances 5 -cardinality 2 -seed 7

Library usage

Installation

Maven
<dependency>
    <groupId>com.github.amlorg</groupId>
    <artifactId>aml-gen_2.12</artifactId>
    <version>1.0.1</version>
</dependency>
Gradle

compile group: 'com.github.amlorg', name: 'aml-gen_2.12', version: '1.0.1'

SBT

libraryDependencies += "com.github.amlorg" %% "aml-gen_2.12" % "1.0.1"