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.2.tar.gz
(32.0 kB
view details)
Built Distribution
shrub.py-3.0.2-py3-none-any.whl
(37.9 kB
view details)
File details
Details for the file shrub.py-3.0.2.tar.gz
.
File metadata
- Download URL: shrub.py-3.0.2.tar.gz
- Upload date:
- Size: 32.0 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 | 0229f9ef06df8a697fa289eec1e4e9ac4805081efba93cf660c9718a0f8b8cab |
|
MD5 | 8fcf84679aad303528211db0fac85085 |
|
BLAKE2b-256 | 637070c89fc46d867b044f306cbd261dc149e599c0f3824acb9406c5bf21e1a7 |
File details
Details for the file shrub.py-3.0.2-py3-none-any.whl
.
File metadata
- Download URL: shrub.py-3.0.2-py3-none-any.whl
- Upload date:
- Size: 37.9 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 | 6ef3622475dc22fd55ce134c433e6f1279177b784edf24325a89e9dbc07e228f |
|
MD5 | 83ae86c2cd6f6ac59c0a1b1b12e4e70b |
|
BLAKE2b-256 | ad43f6475815dfff117370ff9b50397c7a9ef95485a8e4cad024dc7a27783a19 |