Built-ins
Built-in utility functions for stack operations.
ensure_directory(path)
Ensure a directory exists, creating it if necessary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Path to the directory |
required |
Returns:
| Type | Description |
|---|---|
Path
|
The Path object of the directory |
Raises:
| Type | Description |
|---|---|
OrcheError
|
If directory creation fails |
Source code in orche/builtin.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
git_clone(repo_url, dest, branch=None)
Clone a git repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
repo_url
|
str
|
URL of the repository |
required |
dest
|
str | Path
|
Destination path |
required |
branch
|
str | None
|
Optional specific branch/tag to checkout |
None
|
Raises:
| Type | Description |
|---|---|
OrcheError
|
If cloning fails |
Source code in orche/builtin.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
read_yaml(path)
Read and parse a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Path to the YAML file |
required |
Returns:
| Type | Description |
|---|---|
Any
|
Parsed YAML content (usually dict or list) |
Raises:
| Type | Description |
|---|---|
ConfigError
|
If file does not exist or is not valid YAML |
Source code in orche/builtin.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |