Library for creating evergreen configurations
Project description
shrub.py
A python based Evergreen project config generation library
Overview
Based on shrub, shrub.py is a library for programatically building Evergreen project configurations described here.
Example
The following snippet will create a set of parallel tasks reported under a single display task. It
would generate json used by generate.tasks
:
from shrub.v2 import ShrubProject, Task, BuildVariant
n_tasks = 10
def define_task(index):
name = f"task_name_{index}"
return Task(
name,
[
FunctionCall("do setup"),
FunctionCall(
"run test generator",
{"parameter_1": "value 1", "parameter_2": "value 2"}
),
FunctionCall("run tests")
],
).dependency("compile")
tasks = {define_task(i) for i in range(n_tasks)}
variant = BuildVariant("linux-64").display_task("test_suite", tasks)
project = ShrubProject({variant})
project.json()
Run tests
poetry run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shrub.py-1.0.0.tar.gz
(23.0 kB
view details)
Built Distribution
shrub.py-1.0.0-py3-none-any.whl
(26.8 kB
view details)
File details
Details for the file shrub.py-1.0.0.tar.gz
.
File metadata
- Download URL: shrub.py-1.0.0.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.0 Linux/4.4.0-1030-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c5e91cce7fc90db510a82d1717f1dc30ed99e3e67b4df0df98c52ed0a791d52 |
|
MD5 | a55f1824cd91b797b1e3ce6ab58b321b |
|
BLAKE2b-256 | c40e6444a82e50e2a2b6e0b6e48b0abab32e082816df1cd2670f5486a8e33680 |
File details
Details for the file shrub.py-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: shrub.py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.0 Linux/4.4.0-1030-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5120029af6c12d3aee17c30b448712ae91bf4a4ab0cb531d09c14b45b5490aca |
|
MD5 | 6894765a850f1c83faa5eb4293f4e5df |
|
BLAKE2b-256 | eb20a0e373a10c251b00b141fbd3ce4ed14173175f9fea66a456a54f932f1b1c |