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

Uploaded Source

Built Distribution

shrub.py-1.1.4-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for shrub.py-1.1.4.tar.gz
Algorithm Hash digest
SHA256 d062ad131c7121dc0c2ffbb275e0a1199418911b7202193bb38b3b30d0d8361c
MD5 ac0a9e0e38ab739d77912ba35486a230
BLAKE2b-256 1d777f65a8c8f0457f4f719eb0b4c2530957097cbe36b8c193b0b3fe5337b363

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for shrub.py-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bb7149948447f718b150d500973e981e1d34014675a5ff1a3c22737a632f6aeb
MD5 4b5197e8a80a173a2dcad6f4796f56a7
BLAKE2b-256 4311877ad8be0ee63b3e4b8bbcb0dc6da606e34805acd27bb97b6c06a8a43031

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