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.1.tar.gz
(32.2 kB
view details)
Built Distribution
shrub_py-3.1.1-py3-none-any.whl
(38.7 kB
view details)
File details
Details for the file shrub_py-3.1.1.tar.gz
.
File metadata
- Download URL: shrub_py-3.1.1.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c4c3cf7c0726a6dbf69b3b741f54a30e3a141dde77d70a4c3aca90b26be81e3 |
|
MD5 | 9ac2b30b09847670e2282c3f75f9f963 |
|
BLAKE2b-256 | 9f975ed82054181a6d4a420921e56be647ab300d1388458006a1c806c82120aa |
File details
Details for the file shrub_py-3.1.1-py3-none-any.whl
.
File metadata
- Download URL: shrub_py-3.1.1-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d2294114677dbbdba82bf935120dc8cb391b64de1e29f59081017d775af6740 |
|
MD5 | 7785e63223b4a2249c0e30002ce7bbff |
|
BLAKE2b-256 | 485661bf9a3c5ade9bcfebf86dd7c374805259cc918bf9b9e3317ee15fd8ca18 |