Configuration
⚙️ ConfigurationLink
Configure the SierraDevelopmentClient to get the most out of Sierra’s structured development workflow. This guide covers best practices around logging, caching, and environment layout.
🧱 Client ConstructionLink
At the core of every workflow is the SierraDevelopmentClient. You can instantiate it with custom logging, caching, and environment parameters.
✅ Recommended Client SetupLink
This initializes:
- Environment paths and config files
- Logger with debug-level tracing
- HTTP client (e.g. for plugins or services)
- Script sideloader
- Compiler + Builder pipeline
📁 Project LayoutLink
Here’s the standard folder structure Sierra expects:
| Text Only | |
|---|---|
You can change the base path with environment_path, but scripts/ must exist inside it.
🧠 Logging Best PracticesLink
Use UniversalLogger to trace build, validation, or runtime errors.
Available Log LevelsLink
| Level | Description |
|---|---|
DEBUG |
Most verbose — useful during development |
INFO |
Normal output — good for regular builds |
WARNING |
Misconfiguration or redundancy |
ERROR |
Exceptions or halting errors |
Set level during logger construction:
| Python | |
|---|---|
Sierra uses structured messages for every phase:
- Environment init
- Sideloader source population
- Script discovery
- Invoker registration
- Compiler stages
💾 Caching (Optional)Link
You can pass a CacheManager instance to control how Sierra handles repeated compilation, YAML regeneration, and data reuse:
| Python | |
|---|---|
By default, caching is enabled unless disabled explicitly.
🔎 Script Auto‑DiscoveryLink
Call this in your entry script to load all InvokerScript instances from scripts/:
| Python | |
|---|---|
Each script must expose a load() function like this:
Sierra uses Python’s importlib to dynamically load and validate each invoker module.
🧱 Environment NameLink
The environment_name is used for logical grouping. You can create multiple environments (e.g., default_env, prod, test) and Sierra will handle separate script and build trees per environment.
This affects:
- Generated YAML config name
- Build paths
- Contextual logging
🧪 Full ExampleLink
🧵 SummaryLink
| Config Field | Purpose | Default |
|---|---|---|
environment_path |
Base path for scripts & builds | Path.cwd() |
environment_name |
Logical name for config/environment | "default_env" |
logger |
Structured logging output | Built‑in UniversalLogger |
cache |
Optional caching backend | Enabled by default |
http_client |
Internal HTTP client (optional use) | httpx.Client |