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.1.tar.gz
(23.3 kB
view details)
Built Distribution
shrub.py-1.0.1-py3-none-any.whl
(27.1 kB
view details)
File details
Details for the file shrub.py-1.0.1.tar.gz
.
File metadata
- Download URL: shrub.py-1.0.1.tar.gz
- Upload date:
- Size: 23.3 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 | 69b92b5a75d75730d5147adf0ebedc035fd54e72aa08f8742338c81ea5075c5f |
|
MD5 | eab6d8766042c7c43fa857195fc789d7 |
|
BLAKE2b-256 | 206ce3b05945aff281fb9ea51a621857095412d113c5da4444ec69b2c473e5e8 |
Provenance
File details
Details for the file shrub.py-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: shrub.py-1.0.1-py3-none-any.whl
- Upload date:
- Size: 27.1 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 | f04bd5eee6e3727247ba9d8c3c75b6dd5a2a3f3ef70c3147d8fd084101000cf7 |
|
MD5 | 6a3b8fda1a64982526b6135a6efb82d3 |
|
BLAKE2b-256 | 08015c871bcffd53e9beeb342d86dd07f7e523bf77fd8118c0c5f3638f8818df |