Skip to main content

doit - Automation Tool

Project description

doit comes from the idea of bringing the power of build-tools to execute any kind of task

doit can be uses as a simple Task Runner allowing you to easily define ad hoc tasks, helping you to organize all your project related tasks in an unified easy-to-use & discoverable way.

doit scales-up with an efficient execution model like a build-tool. doit creates a DAG (direct acyclic graph) and is able to cache task results. It ensures that only required tasks will be executed and in the correct order (aka incremental-builds).

The up-to-date check to cache task results is not restricted to looking for file modification on dependencies. Nor it requires “target” files. So it is also suitable to handle workflows not handled by traditional build-tools.

Tasks’ dependencies and creation can be done dynamically during it is execution making it suitable to drive complex workflows and pipelines.

doit is build with a plugin architecture allowing extensible commands, custom output, storage backend and “task loader”. It also provides an API allowing users to create new applications/tools leveraging doit functionality like a framework.

doit is a mature project being actively developed for more than 10 years. It includes several extras like: parallel execution, auto execution (watch for file changes), shell tab-completion, DAG visualisation, IPython integration, and more.

Sample Code

Define functions returning python dict with task’s meta-data.

Snippet from tutorial:

def task_imports():
    """find imports from a python module"""
    for name, module in PKG_MODULES.by_name.items():
        yield {
            'name': name,
            'file_dep': [module.path],
            'actions': [(get_imports, (PKG_MODULES, module.path))],
        }

def task_dot():
    """generate a graphviz's dot graph from module imports"""
    return {
        'targets': ['requests.dot'],
        'actions': [module_to_dot],
        'getargs': {'imports': ('imports', 'modules')},
        'clean': True,
    }

def task_draw():
    """generate image from a dot file"""
    return {
        'file_dep': ['requests.dot'],
        'targets': ['requests.png'],
        'actions': ['dot -Tpng %(dependencies)s -o %(targets)s'],
        'clean': True,
    }

Run from terminal:

$ doit list
dot       generate a graphviz's dot graph from module imports
draw      generate image from a dot file
imports   find imports from a python module
$ doit
.  imports:requests.models
.  imports:requests.__init__
.  imports:requests.help
(...)
.  dot
.  draw

Project Details

license

The MIT License Copyright (c) 2008-2021 Eduardo Naufel Schettino

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

doit-0.34.2.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

doit-0.34.2-py3-none-any.whl (88.2 kB view details)

Uploaded Python 3

File details

Details for the file doit-0.34.2.tar.gz.

File metadata

  • Download URL: doit-0.34.2.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for doit-0.34.2.tar.gz
Algorithm Hash digest
SHA256 388111f8a6a5b3b44620ceeb287d0585927c85d0d6d3f8790d34fbb45c0cf6c3
MD5 45d3a96895c25e9496b004cd61d3c0fd
BLAKE2b-256 dab588a9fdb40aff9a50842398bb056b6dadec439b1d00ba41502cefe49a11d9

See more details on using hashes here.

File details

Details for the file doit-0.34.2-py3-none-any.whl.

File metadata

  • Download URL: doit-0.34.2-py3-none-any.whl
  • Upload date:
  • Size: 88.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for doit-0.34.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7f414de4c596a96a727890e0792709a103f1af48e8180e27e07862fff781238
MD5 7012427355b4f88289b63c894af6d068
BLAKE2b-256 a5c88d5a0c44229d4183bb3a812479b76f96ef9edfceac03efa5bd46221b4cbb

See more details on using hashes here.

Supported by

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