Skip to main content

Utility package for running Girder jobs in a sequence.

Project description

girder-job-sequence

This is a utility package for running multiple Girder jobs in a sequence.

  • Define a group of jobs with inputs:
    • Only pass non-default parameters
    • Use wildcard "{{}}" strings to define inputs that are not present until they are created with a previous plugin
# This is where you define which plugins you'd like to run and in what order
from girder_job_sequence.utils import from_list

plugin_list = [
    {
        'plugin_id': 'uuid_string',
        'input_args': [
            {
                'name': 'parameter_1',
                'value': 5
            },
            {
                'name': 'parameter_2_with_wildcard',
                'value': "{{'type':'file','item_type':'path','item_query':'/collections/path/to/item.svs','file_type':'fileName','file_query':'name_of_file.csv'}}"
            }
        ]
    },
    {
        'docker_image': 'user/name:tag',
        'cli': 'PluginName',
        'input_args': [
            {
                'name': 'input_param',
                'value': 'blahblahblah'
            }
        ]
    }
]

job_sequence = from_list(job_list)

job_sequence.start(cancel_on_error=True,verbose=True)
  • Check default parameters with:
# Code example showing how to get default plugin parameters
from girder_job_sequence import Job
import json

job_object = Job(plugin_id = 'uuid_string')

print(json.dumps(job_object.inputs,indent=4))
  • Check status of group of jobs
from girder_job_sequence.utils import from_list

plugin_list = [
    {
        'plugin_id': 'uuid_string',
        'input_args': [
            {
                'name': 'parameter_1',
                'value': 5
            },
            {
                'name': 'parameter_2_with_wildcard',
                'value': "{{'type':'file','item_type':'path','item_query':'/collections/path/to/item.svs','file_type':'fileName','file_query':'name_of_file.csv'}}"
            }
        ]
    },
    {
        'docker_image': 'user/name:tag',
        'cli': 'PluginName',
        'input_args': [
            {
                'name': 'input_param',
                'value': 'blahblahblah'
            }
        ]
    }
]

job_sequence = from_list(job_list)

job_sequence.start(cancel_on_error=True,verbose=False)

print(job_sequence.get_status())
  • (#TODO): Set email notification for job step or group

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

girder_job_sequence-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

girder_job_sequence-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file girder_job_sequence-0.1.0.tar.gz.

File metadata

  • Download URL: girder_job_sequence-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.3 Windows/10

File hashes

Hashes for girder_job_sequence-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f37737c09f65edc43c4b19da5d320028bdf53395b0b215d4201521b541e431b7
MD5 cfa7dcce8a15130da75b68cfd8bb5e5c
BLAKE2b-256 b6221c02a2a869e919867df71e1029766058f04953381901d745c3c64b49185e

See more details on using hashes here.

File details

Details for the file girder_job_sequence-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for girder_job_sequence-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c948d76dbdd7413f6e389f245ca3bb8a05eb3903b1ba6cdad6d22f84839c3622
MD5 0c82c3986dd149971ff70ed2aceb1267
BLAKE2b-256 ebfc52fcaac05dd1ff4a3ba47e21accc9d7c7cc5573ed84627ea18f5a2e699cb

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