Skip to main content

Library for creating evergreen configurations

Project description

shrub.py -- A python based Evergreen project config generation library

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:

        n_tasks = 10
        c = Configuration()

        task_names = []
        task_specs = []

        for i in range(n_tasks):
            name = "aggregation_multiversion_fuzzer_{0:03d}".format(i)
            task_names.append(name)
            task_specs.append(TaskSpec(name))
            t = c.task(name)
            t.dependency(TaskDependency("compile")).commands([
                CommandDefinition().function("do setup"),
                CommandDefinition().function("do multiversion setup"),
                CommandDefinition().function("run jstestfuzz").vars({
                    "jstestfuzz_var": "--numGeneratedFiles 5",
                    "npm_command": "agg-fuzzer",
                }),
                CommandDefinition().function("run tests").vars({
                    "continue_on_failure": "false",
                    "resmoke_args": "--suites=generational_fuzzer",
                    "should_shuffle": "false",
                    "task_path_suffix": "false",
                    "timeout_secs": "1800",
                })
            ])

        dt = DisplayTaskDefinition("aggregation_multiversion_fuzzer")\
            .components(task_names)
        c.variant("linux-64").tasks(task_specs).display_task(dt)

        c.to_json()

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

Uploaded Source

Built Distribution

shrub.py-0.1.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shrub.py-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for shrub.py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0e6728457e555932127bfd46417cb1cd66637fdde79851b251b65192ae67418a
MD5 f14089be886e730a04a52642aec71d84
BLAKE2b-256 90ebb2dba8bfbc75f59f80a9c0b90c0bb0dc812b7953c6f220d5a12e48e20bf6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shrub.py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for shrub.py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a205672da5d1d07fb3939c76f6d8831ce18afb24c3b3a73d54346d1d7986ebb
MD5 61b8a8a785a36d5458188b0b1c18f18e
BLAKE2b-256 646e6914f47b3f93d83215c634ffc6fb7079c13fae02c9fee2969a600af7d186

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