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-3.1.4.tar.gz
(32.2 kB
view details)
Built Distribution
shrub_py-3.1.4-py3-none-any.whl
(38.7 kB
view details)
File details
Details for the file shrub_py-3.1.4.tar.gz
.
File metadata
- Download URL: shrub_py-3.1.4.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.9.2 Linux/5.15.0-1021-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 534900e215fb447ea9f86cf580ec4ceca09a2a48143ff3ca26f125068977a6b3 |
|
MD5 | c55e9af997bbd79061d96dbe6e7cdef7 |
|
BLAKE2b-256 | 9aa9bb32c019abb7c737e8562a0f98d1c46f65cd48c3729199204c3436880c95 |
Provenance
File details
Details for the file shrub_py-3.1.4-py3-none-any.whl
.
File metadata
- Download URL: shrub_py-3.1.4-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.9.2 Linux/5.15.0-1021-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75edf46972a9c6a18358578d3e10dfb1aefb6737ae787f3b828b78dc67577aa7 |
|
MD5 | 914bfe7614ec07a7137c53ebbad02949 |
|
BLAKE2b-256 | 86ca5c6f5475b182b2b27dbf97d2596664da6e1fe03df2f4599423fd025b2554 |