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.0.tar.gz
(32.2 kB
view details)
Built Distribution
shrub_py-3.1.0-py3-none-any.whl
(38.7 kB
view details)
File details
Details for the file shrub_py-3.1.0.tar.gz
.
File metadata
- Download URL: shrub_py-3.1.0.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c5979e1f22b09154b89f15401b477bc6f978f5678a6ca0e903f42e1c2a213af |
|
MD5 | f0970db1258e4e46a2bcdc5d38c0c14b |
|
BLAKE2b-256 | e5d86c3ab8d07f10957b596338349c3f03ee1bea615ecb95c6ae2b8cd3e6e6aa |
File details
Details for the file shrub_py-3.1.0-py3-none-any.whl
.
File metadata
- Download URL: shrub_py-3.1.0-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92d9c6ff2b084e682228d2d2fb46ddddccceb6fdfeb3701e678b9286f1c0d65e |
|
MD5 | 074108d214d1245359f6d4bd133abb6f |
|
BLAKE2b-256 | 43a3531b733f10791a5b32b6b1cb80a2a560b43ee6689a757754857b3fa2e02e |