Skip to main content

Runs pipelines configured in YAML

Project description

Pipeline Runner

When running, the configuration folder should have the following structure

  example_configuration_folder
├──   pipelines.yaml
├──   variables.yaml
├──   functions.py
├──   templates
│  ├──   script.jinja2
│  ├──   singularity.jinja2
│  ├──   etc.jinja2

pipelines.yaml

The root element should be a dictionary in which the keys = pipeline names, the values = an array of tasks to run. For a full example look at example/pipelines.yaml. The possible tasks are:

set_variables: dict

Directly define or override specific variables. Example:

- set_variables:
    HOME: /scratch/$USER/home/
    NEW_VARIABLE: Superman

load_variables: str

This will load the flat dictionary of key str. Example:

- load_variables: pipeline_one

dump_variables: filename

This will dump all of the current variables into a file, specified by filename. Example:

- dump_variables: $SUBJECT/${SESSION}.sh     
# Assumming SUBJECT + SESSION have been defined in a prior step

generate_file: dict

Create a file from a Jinja2 template. This step accepts a yaml dictionary with the following key-value pairs:

template
The Jinja2 template file to use relative to the configuration_dir/templates/
filepath
The full path onto which the new file should be saved to.
variable
The dynamic value of filepath is converted to a static absolute path and saved to the specifed variable. The default value = "OUTPUT_FILE".

Example:

- generate_file:
    template: script.jinja2
    filepath: $WORKING_DIR/$SUBJECT/$SESSION_PROCESSING.sh
    variable: PROCESSING_SCRIPT
# now $PROCESSING_SCRIPT can be used in a future step
# for example, a function that adds the script on the PBS queue

function: str

The function to call. Note: The functions must be defined in configuration_dir/functions.py Example:

- function: load_scripts_onto_pbs

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

prunner-0.3.10.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prunner-0.3.10-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file prunner-0.3.10.tar.gz.

File metadata

  • Download URL: prunner-0.3.10.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for prunner-0.3.10.tar.gz
Algorithm Hash digest
SHA256 248c491591c7942bf030406f2591145d447649fd2a175c6e7ea50b13d7bf36af
MD5 62e45f5b5c2e2bcb62dfc246abec640a
BLAKE2b-256 91024fb42e20199abda68d357d61fb313eb0bdc5c52789283aa18c619e5209d3

See more details on using hashes here.

File details

Details for the file prunner-0.3.10-py3-none-any.whl.

File metadata

  • Download URL: prunner-0.3.10-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for prunner-0.3.10-py3-none-any.whl
Algorithm Hash digest
SHA256 e8e54395008fdf30ece8b41e40822ccc54c76bbba5933ead4cb9f45cf28b54f0
MD5 0df725aac929117523704caf82a77966
BLAKE2b-256 d2c2051cde08d597d82c423077f2e780102190a344306c6481157e084f660f1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page