Skip to main content

Build large-scale task workflows using luigi, remote job submission, remote targets, and environment

Project description

law logo
Build status Documentation status Package version License

Note: This project is currently under development. Version 0.1.0 will be the first, fully documented beta release, targetted for early 2020.

Use law to build complex and large-scale task workflows. It is build on top of luigi and adds abstractions for run locations, storage locations and software environments. Law strictly disentangles these building blocks and ensures they remain interchangeable and resource-opportunistic.

Key features:

  • CLI with auto-completion and interactive status and dependency inspection.

  • Remote targets with automatic retries and local caching
    • WebDAV, HTTP, Dropbox, SFTP, all WLCG protocols (srm, xrootd, rfio, dcap, gsiftp, …)

  • Automatic submission to batch systems from within tasks
    • HTCondor, LSF, gLite, ARC

  • Environment sandboxing, configurable on task level
    • Docker, Singularity, Sub-Shells

First steps

Installation and Dependencies

Install via pip:

pip install law

This command also installs luigi and six.

Remote targets also require gfal2 and gfal2-python (optional, also via pip) to be installed.

Docker Images

To run and test law, there are three docker images available on the DockerHub, corresponding to Python versions 2.7, 3.7 and 3.8. They are based on CentOS 7 and ship with the dependencies listed above, including gfal2.

docker run -ti riga/law:latest

Tags:

  • latest, py3, py38: Python 3.8.1

  • py37: Python 3.7.6

  • py2, py27: Python 2.7.5

Usage at CERN

Overcomplete example config

Examples

Auto completion on the command-line

bash

source "$( law completion )"

zsh

zsh is able to load and evaluate bash completion scripts via bashcompinit. In order for bashcompinit to work, you should run compinstall to enable completion scripts:

autoload -Uz compinstall && compinstall

After following the instructions, these lines should be present in your ~/.zshrc:

# The following lines were added by compinstall
zstyle :compinstall filename '~/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall

If this is the case, just source the law completion script (which internally enables bashcompinit) and you’re good to go:

source "$( law completion )"

Development

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

law-0.0.36.tar.gz (161.6 kB view details)

Uploaded Source

File details

Details for the file law-0.0.36.tar.gz.

File metadata

  • Download URL: law-0.0.36.tar.gz
  • Upload date:
  • Size: 161.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.14

File hashes

Hashes for law-0.0.36.tar.gz
Algorithm Hash digest
SHA256 9503b1f7ae286bdce0ca9cb982824e9db215098cd732f7ec8d5e38c59b2948ff
MD5 a9cf20828eff1e44098a3ad1beeb35b8
BLAKE2b-256 d0679ce1fe1b31c8465d896d79456d64abab9b970181be1cd17edfdac56db8fc

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