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.5.tar.gz
(31.9 kB
view details)
Built Distribution
shrub_py-3.0.5-py3-none-any.whl
(38.3 kB
view details)
File details
Details for the file shrub_py-3.0.5.tar.gz
.
File metadata
- Download URL: shrub_py-3.0.5.tar.gz
- Upload date:
- Size: 31.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 180a8126b435bfcd7172ace830b77d616e7b882b55d6c24301893350546b0058 |
|
MD5 | 6b9163c943ee1925d73cff2856ca8fc0 |
|
BLAKE2b-256 | b673dab44b9d5cc48486c643104c1fb8514680c14eeef3d7dd96fda5b28aa641 |
File details
Details for the file shrub_py-3.0.5-py3-none-any.whl
.
File metadata
- Download URL: shrub_py-3.0.5-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 583d725fce041f14b6374125561fdc0279c2f770771ea4eac0935c029d4d3821 |
|
MD5 | ed0837ffcaeb67e8488a2d9c3575d961 |
|
BLAKE2b-256 | 484f2f774e9358aa74732509b33d974622e2924f74348bd2890a52d08bb3e491 |