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.1.3.tar.gz
(23.9 kB
view details)
Built Distribution
shrub.py-1.1.3-py3-none-any.whl
(27.7 kB
view details)
File details
Details for the file shrub.py-1.1.3.tar.gz
.
File metadata
- Download URL: shrub.py-1.1.3.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
233d32becfb66227e11cffcb93beee7ed7b0352dfb4d60224b6bb2ad3a88fcc0
|
|
MD5 |
49db96c4a40bcad02473b43ba0cf9ddc
|
|
BLAKE2b-256 |
adc208e19981269b67fc9ddceabb388938482d3e18cf1631bb5b39a1bf162e26
|
File details
Details for the file shrub.py-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: shrub.py-1.1.3-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d719eb52c238272eed998a4c30780c512b3409b6b34509e5cc0dc44ea0a7ed77
|
|
MD5 |
8e0ebece172213e258513d286b45b80a
|
|
BLAKE2b-256 |
e5ee52d64b9cfef942d3e64a81ab0053b257f86fb0fd9f4002f48f3f9e18e091
|