gws.spec.generator.main

Generator entry points and JSON storage of the specs.

Source code: gws.spec.generator.main

Module Contents

gws.spec.generator.main.Error
gws.spec.generator.main.from_path(path: str) → gws.spec.core.SpecData

Load the specs from a JSON file written by to_path.

Parameters:

path – File path.

Returns:

The spec data.

gws.spec.generator.main.generate(manifest_path='') → gws.spec.core.SpecData

Generate the specs.

Parameters:

manifest_path – Path to the application manifest.

Returns:

The spec data.

Raises:

GeneratorError – If the specs cannot be generated.

gws.spec.generator.main.generate_and_write(root_dir='', out_dir='', manifest_path='', debug=False)

Generate the specs and write them to the output directory.

Writes specs.json, gws.generated.ts, configref.en.md and configref.de.md.

Parameters:
  • root_dir – Application root directory, defaults to the app directory of this installation.

  • out_dir – Output directory.

  • manifest_path – Path to the application manifest.

  • debug – If True, log debug messages and dump the generator state after each step.

Raises:

GeneratorError – If the specs cannot be generated.

gws.spec.generator.main.to_path(path: str, specs: gws.spec.core.SpecData)

Write the specs to a JSON file.

Parameters:
  • path – File path.

  • specs – Spec data.

Returns:

The file path.