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

Uploaded Source

Built Distribution

shrub_py-3.0.7-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shrub_py-3.0.7.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

Hashes for shrub_py-3.0.7.tar.gz
Algorithm Hash digest
SHA256 9bed828815909b92908da51744ebfc9a2bd00efbb5e1442c54dfa7e9d17a5732
MD5 f6089eb6367a14ad016186322acc8c6a
BLAKE2b-256 f8317311a16f6aabbc1ca72a76f84cbd667e1de5266850741cb2b3752ec43e16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shrub_py-3.0.7-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

Hashes for shrub_py-3.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2010ab08b7fc08ad5f3e84fdc1d433cc4569ceec65f8855b932acfc4d3427785
MD5 7264957b3e77b6a1b769ef239ce4c272
BLAKE2b-256 a3bf0a6bfe55d95556bf0df96c11dbc80c614935a8e7088693ff03132181a6f6

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