Skip to main content

Library for creating evergreen configurations

Project description

shrub.py

A python based Evergreen project config generation library

PyPI - Python Version PyPI version

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


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-1.1.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

shrub.py-1.1.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file shrub.py-1.1.0.tar.gz.

File metadata

  • Download URL: shrub.py-1.1.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.6.9 Linux/4.15.0-1044-aws

File hashes

Hashes for shrub.py-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a998336a67bc8af698a45bcd9c9f439fac5e8f4043ccae63c8e3ba091615a7e5
MD5 5bd76ce9c8b44751e2c9982c7cd4da26
BLAKE2b-256 830d1093b6d077c1f52372bd215fa48bf804cd7f3871554e0ad62d673343c069

See more details on using hashes here.

File details

Details for the file shrub.py-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: shrub.py-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.6.9 Linux/4.15.0-1044-aws

File hashes

Hashes for shrub.py-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ca508923dfe2ff8201dd73a0973152976b3233cb30a291cc3ba96164b6374bb
MD5 511430e3815b09d2b1cd36dd30804624
BLAKE2b-256 92f0ae578b50629f5f9e9e34930897a0f6170d974b224a3cce47ff5b283d69e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page