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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shrub.py-0.2.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for shrub.py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1d324b1317f65042a9c09270ec9a222be3e52133a67c4fa310de648a48facc67
MD5 aaa7f7f28752fdcfa511917fbdfcfa15
BLAKE2b-256 94b0662aceb3d80a5d6808aeb476242665353529da7ce17450d9402d3be9f8a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shrub.py-0.2.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.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for shrub.py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa85574b24482a0781945672afa9a4f27b289298127dc8cc2918f426b06b8cc2
MD5 f08ebf29812451be26b8a23d66bb5a5d
BLAKE2b-256 4656eb2332a50fff7658f899376558b31d6925b0bb4ddd3648a33acafcf0c06c

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