raesl.compile#

ESL compiler.

Compiles ESL documents and workspaces, meaning:

  • Parsing lines

  • Typechecking

  • Building an AST

  • Instantiating components, variables and requirements.

  • Deriving dependencies from these to build an output graph (network).

Subpackages#

Submodules#

Package Contents#

Functions#

to_graph(→ ragraph.graph.Graph)

Convert ESL file(s) into a ragraph.graph.Graph.

exception raesl.compile.EslCompilationError#

Bases: Exception

Error during ESL compilation.

raesl.compile.to_graph(*paths: str | pathlib.Path, output: str | pathlib.Path | None = None, force: bool = False) ragraph.graph.Graph#

Convert ESL file(s) into a ragraph.graph.Graph.

Parameters:
  • paths – Paths to resolve into ESL files. May be any number of files and directories to scan.

  • output – Optional output file (JSON) to write the graph to.

  • force – Whether to overwrite the output file or raise an error if it the file already exists.

Returns:

Instantiated graph.