Goatlib API

Here is the documentation of the different modules of goatlib. It is directly extracted from the source code.

Scheduler

Task

PYTI module containing the Task definition.

class goatlib.task.Task(inputs=None)

A simple action that can be selected to be executed.

Inputs :{<input-name> : <item query>}
Category :Category id, multiple tasks may have the same category if they represent the same step.

Step

Item

PYTI module for Item and Item utility functions and classes.

class goatlib.item.Item(classifiers=(), data=None, tags=None)

Items represents Informations exchanged between Tasks.

It serve as main input-ouput objects for Tasks

An item contains three main concepts:

Classifiers :A set of hierachical classifiers e.g: {project.python, project.source}
Data :A mapping containing the item data. The key - values pairs available in the Item depends of its classifiers.
Tags :A collection of tags that will be added to the task’s outputs.
classifiers

Return classifiers of item.

has_tags(tags)

Check that item has all tags passed as arguments.

Tags :Collection of tags to check.
match(query)

Return True if item’s classifiers and tags match the query

Valid queries are:

  • type1: check that item is classified “type1”

  • type1 and type2: check that item is classifierd both “type1” and “type2”

  • #tag1: check that item has tag “tag1”

  • #tag1#tag2: check that item has both tags “tag1” and “tag2”

  • type1 and type2#tag1#tag2: check that item is classified both “type1”

    and “type2” and has both tags “tag1” and “tag2”

Query :Boolean condition of classifiers and tags.

Parser

Status

Step execution status (Missing, Skipped, Killed, Error, Failure, NoData, Partial and Success)

Store

PYTI module containing the Store definition and store utility functions.

class goatlib.store.Store

Stores a collection of items.

get(query)

Return items matching the item query.

Query :Item query (see pyti.goatlib.item.Item.match for valid queries).
Only_one :If True, return only one item.
store(item)

Store a new item.

Project Versions

Table Of Contents

Previous topic

Exemples

Next topic

Task Manager design

This Page