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
Metadata
Release files for shrub.py 3.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shrub_py-3.1.1.tar.gz | 32.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shrub_py-3.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 70.9 kB
Release files / shrub_py-3.1.1.tar.gz
| Download URL | shrub_py-3.1.1.tar.gz |
|---|---|
| Size | 32.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c4c3cf7c0726a6dbf69b3b741f54a30e3a141dde77d70a4c3aca90b26be81e3
|
|
BLAKE2b-256 checksum How to use checksums |
9f975ed82054181a6d4a420921e56be647ab300d1388458006a1c806c82120aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.9.2 Linux/4.15.0-1044-aws
|
Release files / shrub_py-3.1.1-py3-none-any.whl
| Download URL | shrub_py-3.1.1-py3-none-any.whl |
|---|---|
| Size | 38.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d2294114677dbbdba82bf935120dc8cb391b64de1e29f59081017d775af6740
|
|
BLAKE2b-256 checksum How to use checksums |
485661bf9a3c5ade9bcfebf86dd7c374805259cc918bf9b9e3317ee15fd8ca18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.9.2 Linux/4.15.0-1044-aws
|