Skip to content

gsl_parser

sqllocks_spindle.specs.gsl_parser

Parse Generation Spec Language (GSL) YAML files.

Classes

SchemaRef dataclass

Reference to the data schema (spindle JSON or domain).

DateRangeSpec dataclass

Date range for scenario simulation.

ScenarioRef dataclass

Reference to a scenario pack and its runtime parameters.

ChaosSpec dataclass

Chaos engineering configuration.

LandingZoneSpec dataclass

Lakehouse landing zone configuration.

LakehouseOutputSpec dataclass

Lakehouse output configuration.

EventstreamTopicSpec dataclass

Single eventstream topic definition.

EventstreamOutputSpec dataclass

Eventstream output configuration.

OutputsSpec dataclass

Combined output specification.

ValidationGateSpec dataclass

Validation configuration for the generation run.

GenerationSpec dataclass

Complete Generation Spec Language document.

Represents a fully resolved GSL YAML file that ties together a schema, a scenario pack, chaos configuration, output targets, and validation gates.

Methods:
resolve_path(relative)

Resolve a relative path against the spec file's directory.

GSLParser

Parse Generation Spec Language (GSL) YAML files.

Example::

parser = GSLParser()
spec = parser.parse("my_estate.gsl.yaml")
print(spec.name, spec.scenario.scale)
Methods:
parse(path)

Parse a GSL YAML file and return a GenerationSpec.

Relative paths in the spec are resolved relative to the spec file's parent directory.

parse_dict(raw, base_dir='.')

Parse a GSL spec from a raw dict (useful for tests).