Compiler
CompilerLink
The sierra.core.compiler
module is responsible for taking registered invoker scripts and producing standalone Python scripts along with the corresponding YAML configuration.
Compiling invoker scripts
sierra.core.compiler
Link
ClassesLink
SierraCompiler
Link
SierraCompiler(
client: sierra_client.SierraDevelopmentClient,
)
Bases: sierra_core_base.SierraCoreObject
Compiler for Sierra invoker scripts and YAML configuration.
Generates standalone invoker scripts in the environment's invokers directory and writes a config.yaml file with PATHS and SCRIPTS entries without external dependencies.
PARAMETER | DESCRIPTION |
---|---|
client
|
The client to use for logging and accessing environment information.
TYPE:
|
ATTRIBUTE | DESCRIPTION |
---|---|
client |
The client instance provided during initialization.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
set_invoker_commands |
Generate and set the CLI command string for each registered invoker. |
build_and_save_scripts |
Write each invoker's generated standalone script to the invokers directory. |
make_invoker_yaml |
Construct a YAML configuration string for all registered invokers without relying on external YAML libraries. |
compile |
Complete compilation process: 1. Generate CLI command strings for invokers 2. Write standalone Python scripts 3. Write config.yaml in the root of the environment. |
Initialize a SierraCoreObject.
PARAMETER | DESCRIPTION |
---|---|
client
|
The Sierra development client.
TYPE:
|
Notes
Logs each initialization step via the client's logger.
AttributesLink
FunctionsLink
set_invoker_commands
LinkGenerate and set the CLI command string for each registered invoker.
build_and_save_scripts
LinkWrite each invoker's generated standalone script to the invokers directory.
make_invoker_yaml
Linkmake_invoker_yaml() -> str
Construct a YAML configuration string for all registered invokers without relying on external YAML libraries.
RETURNS | DESCRIPTION |
---|---|
str
|
YAML-formatted configuration. |
compile
LinkComplete compilation process: 1. Generate CLI command strings for invokers 2. Write standalone Python scripts 3. Write config.yaml in the root of the environment.