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

Uploaded Source

Built Distribution

shrub.py-3.0.1-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shrub.py-3.0.1.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.2 Linux/4.15.0-1044-aws

File hashes

Hashes for shrub.py-3.0.1.tar.gz
Algorithm Hash digest
SHA256 cc3ec095671344cdea259edd32c30bcd2b26986ee9cf0bf9c646b5eaa3b80da2
MD5 93c75e82d8f480e2a6ea6bc82e4d4683
BLAKE2b-256 5a8f7bfc23b29f8c95ce22669e09a309be01a6500f57c20809d9619463b0d65d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for shrub.py-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b455abab9d6beb234018fa5850b01be3083cda5dc3c47bb9776ca60805a2986
MD5 da61fdca9a5d21ed1c2d8324fcbd174b
BLAKE2b-256 d730af52cac4ca2c60b0516d53b3f0f02008b6ba41f126237fedc71614102efe

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