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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for shrub.py-1.1.1.tar.gz
Algorithm Hash digest
SHA256 02471ff854559c713bb0128c2b29580b46b9b2e113b7caf9843350c725760341
MD5 4c3e7c138cb3e92f7b68741d04d4e9cc
BLAKE2b-256 64bec7279ce8e6a4cd2acb059faec8171065de84901a1bbda947fbbdb0ad94ce

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for shrub.py-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d437c4b8431485dd4c4aac0210befa1de8ad15358641a3123a11f642b6fcc5f
MD5 89e15288cd10b95fbcb63a346e99a2ab
BLAKE2b-256 14684cfb0a61e453d5de25f960c2170477ee27988088695fac56ccd79a0d6f0c

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