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

Uploaded Source

Built Distribution

shrub_py-3.1.3-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file shrub_py-3.1.3.tar.gz.

File metadata

  • Download URL: shrub_py-3.1.3.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.2 Linux/5.15.0-1021-aws

File hashes

Hashes for shrub_py-3.1.3.tar.gz
Algorithm Hash digest
SHA256 e728a4cdb32f395ce1214bf1422682123240ff893062e692726fc63754443b43
MD5 17a9314314622d1f758a1dd0faab5781
BLAKE2b-256 5bce753cfc076ede779c9edec203c346049ee5cc1ccfcfbc70ff483a3d0caa38

See more details on using hashes here.

File details

Details for the file shrub_py-3.1.3-py3-none-any.whl.

File metadata

  • Download URL: shrub_py-3.1.3-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.2 Linux/5.15.0-1021-aws

File hashes

Hashes for shrub_py-3.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 04b2353b84546045d6c79265e1a32945209678fb1333e79bc591bac8dd5becf7
MD5 9ce79273718d4f6abd9b4acdd5269faf
BLAKE2b-256 1adaa0f261227497399759ecd2cac1e9c6dd0d73493ab8c17802013ef8e3aae8

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