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.4.tar.gz
(32.1 kB
view details)
Built Distribution
shrub.py-3.0.4-py3-none-any.whl
(38.0 kB
view details)
File details
Details for the file shrub.py-3.0.4.tar.gz
.
File metadata
- Download URL: shrub.py-3.0.4.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 | 17890e04c4c05437708247b13d70a7d9a8c80de1b159e757889787eed3919b41 |
|
MD5 | e7f1275c793eb898d70e266140259d68 |
|
BLAKE2b-256 | 339a3f38fd80b3deacbaa68e495acf69cf839f6a3e99ac68ac5c87165cf1adcb |
File details
Details for the file shrub.py-3.0.4-py3-none-any.whl
.
File metadata
- Download URL: shrub.py-3.0.4-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 | 57d783e3cfe85573906c330a7612ade7eadca8b7c41006bdc75d0faf0b835300 |
|
MD5 | a8450715c8a28fdc4e74bb633820b2eb |
|
BLAKE2b-256 | 3b8c7a6420abe5103526c9c7a72971246fceed63bacd33ee050156e5e9891faa |