SHEPARD Module API Reference

Source code for SHEPARD Operator and Task Object.

class padocc.groups.shepard.ShepardOperator(mode: str | None = None, conf: dict | str | None = None, verbose: int = 0, parallel: bool = False, autolog: bool = False)

Operator class for Shepard deployments.

activate() None

Main operation function to activate the deployment

property bypass: BypassSwitch

Standard bypass switch for shepard operations

property cycle_delay: int

Delay between cycling operations

property cycle_limit: int

Limit for cycling operations

property default_source: str

Default virtual environment is the one currently activated.

delete_logs() None

Delete logs for all groups

quarantine() None

Identify in each flock any projects that have produced an unexpected error.

These projects are transferred from their host flock to the quarantined flock.

run_batch(cycle: int = 1) None

Run a batch of processes.

scrub_errors() None

Identify in each flock any projects that have produced an unexpected error.

These projects are backtracked to the start. WARNING: This is an experimental function used to reset the status of whole deployments. Use with great care.

summarise_flocks() None

Get a top-level view of all flocks.

Single line of information about each flock.

class padocc.groups.shepard.ShepardTask(fid: int, groupID: str, old_phase: str, codeset: list, old_allocation: str | None = None, redo: bool = False)

Store task-specific features in a Task Object.

get_allocation() tuple

Determine allocation values for time/memory for this task.

property uid

Gives a unique id for each task based on the flock and the allocation.

The combination is unique for each task.

padocc.groups.shepard.random_hash(length: int)

Where necessary, generate a random hash for unique labelling.