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.8.tar.gz
(32.2 kB
view details)
Built Distribution
shrub_py-3.0.8-py3-none-any.whl
(38.6 kB
view details)
File details
Details for the file shrub_py-3.0.8.tar.gz
.
File metadata
- Download URL: shrub_py-3.0.8.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c15f296b5920907f669a8c5245e57e3f3b933bfd5204f1a224915d54cac6a6b |
|
MD5 | 57749061b35976077479eef00ff04463 |
|
BLAKE2b-256 | 5888803a1e1a7c16b0319ce8eb0b5193ac75e12ecbb55126c1da1606086eab92 |
File details
Details for the file shrub_py-3.0.8-py3-none-any.whl
.
File metadata
- Download URL: shrub_py-3.0.8-py3-none-any.whl
- Upload date:
- Size: 38.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.2 Linux/4.15.0-1044-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33758153f5b931e915d268b44a1f69b79d2a3e5ce5b97241820f3535a1c8930a |
|
MD5 | d443af9018eb0d91a03f1f6a081b1c8a |
|
BLAKE2b-256 | 1a08b9083aabfc01ad50c0932ef65a1c070b72477029574bcd29a19892007a5b |