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.0.3.tar.gz
(32.1 kB
view details)
Built Distribution
shrub.py-3.0.3-py3-none-any.whl
(38.0 kB
view details)
File details
Details for the file shrub.py-3.0.3.tar.gz
.
File metadata
- Download URL: shrub.py-3.0.3.tar.gz
- Upload date:
- Size: 32.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e8cb9cceff86834037d9b8107a88ad4bb77ddcb6c0c5ded7a1044e372480190 |
|
MD5 | c9e5ac307dabae262fde7fc1461d20c4 |
|
BLAKE2b-256 | 87bcefa6a63007aeb1a3cfe0745468dbe5947ee55e1869a33dc4434d8f28c34f |
File details
Details for the file shrub.py-3.0.3-py3-none-any.whl
.
File metadata
- Download URL: shrub.py-3.0.3-py3-none-any.whl
- Upload date:
- Size: 38.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 385bf4cfe62f3c9c8a93c62260a0ef6f084f9dc3d67c2c9ad600d60d1c2cf4aa |
|
MD5 | e583f3160ae09a7086d70bef987a8134 |
|
BLAKE2b-256 | 31cff665020a771e22a53820751938e4b46facc35e8bbbd80d511cddcfec3af8 |