File: index.rst

package info (click to toggle)
doit 0.25.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,404 kB
  • ctags: 1,504
  • sloc: python: 11,084; makefile: 111; ansic: 14
file content (166 lines) | stat: -rw-r--r-- 6,556 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
Introduction
==============

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

A **task** describes some computation to be done (*actions*),
and contains some extra meta-data.

.. code-block:: python

  def task_example():
      return {
          'actions': ['myscript'],
          'file_dep': ['my_input_file'],
          'targets': ['result_file'],
      }


.. topic:: actions

  - can be external programs (executed as shell commands) or
    python functions.
  - a single task may define more than one action.


*doit* uses the task's meta-data to:

.. topic:: cache task results

   `doit` checks if the task is **up-to-date** and skips its execution if the
   task would produce the same result (cached) of a previous execution.

.. topic:: correct execution order

  By checking the inter-dependency between tasks `doit` ensures that tasks
  will be execute in the correct order.

.. topic:: parallel execution

  built-in support for parallel (threaded or multi-process) task execution
  (:ref:`more <parallel-execution>`)


Traditional build-tools were created mainly to deal with compile/link
process of source code. `doit` was designed to solve a broader range of tasks.

.. topic:: powerful dependency system

   - the *up-to-date* check is not restricted to looking for
     file modification on dependencies,
     it can be customized for each task (:ref:`more <attr-uptodate>`)
   - *target* files are not required in order to check if a task is up-to-date
     (:ref:`more <up-to-date-def>`)
   - *dependencies* can be dynamically calculated by other tasks
     (:ref:`more <attr-calc_dep>`)


Task's metadata (actions, dependencies, targets...) are better described
in a declarative way,
but often you want to create this metadata programmatically.

.. topic:: flexible task definition

   `doit` uses plain python modules to create tasks (and its meta-data)

.. topic:: customizable task definition

   By default tasks are described by a `dict`.
   But it can be easily customized. (:ref:`more <create-doit-tasks>`) like:

.. code-block:: python

     # with a decorator
     @task(file_dep=['input.txt'])
     def my_task_action(dependencies):
          # do something


Other features...

.. topic:: self documented

  `doit` command allows you to list and obtain help/documentation for tasks
  (:ref:`more <cmd-list>`)

.. topic:: inotify integration

  built-in support for a long-running process that automatically re-execute tasks
  based on file changes by external process (linux/mac only)
  (:ref:`more <cmd-auto>`)

.. topic:: custom output

  process output can be completely customized through *reporters*
  (:ref:`more <reporter>`)

.. topic:: tab-completion

  tab-completion for commands/task (supports bash and zsh)
  (:ref:`more <tabcompletion>`)


.. topic:: extensible

  Apart from using `doit` to automate your project it also expose its API
  so you can create new applications/tools using `doit` functionality
  (:ref:`more <extending>`)

Check the `documentation <contents.html>`_ for more features...


What people are saying about `doit`
=====================================

  Congratulations! Your tool follows the KISS principle very closely. I always wondered why build tools had to be that complicated. - `Elena <http://schettino72.wordpress.com/2008/04/14/doit-a-build-tool-tale/#comment-514>`_

  Let me start by saying I'm really lovin doit, at first the interface seemed verbose but quickly changed my mind when I started using it and realized the flexibility.  Many thanks for the great software! - `Michael Gliwinski <https://groups.google.com/d/msg/python-doit/7cD2RiBhB9c/FzrAWkVhEgUJ>`_

  I love all the traditional unix power tools, like cron, make, perl, ..., I also like new comprehensive configuration management tools like CFEngine and Puppet.  But I find doit to be so versatile and so productive. - `Charlie Guo <https://groups.google.com/d/msg/python-doit/JXElpPfcmmM/znvBT0OFhMYJ>`_

  I needed a sort of 'make' tool to glue things together and after trying out all kinds, doit ... has actually turned out to be beautiful. Its easy to add and manage tasks, even complex ones-- gluing things together with decorators and 'library' functions I've written to do certain similar things. - `Matthew <https://groups.google.com/d/msg/python-doit/eKI0uu02ZeY/cBU0RRsO0_cJ>`_

  Some time ago, I grew frustrated with Make and Ant and started porting my build files to every build tool I found (SCons, Waf, etc.). Each time, as soon as I stepped out of already available rules, I ran into some difficult to overcome stumbling blocks. Then I discovered this little gem of simplicity: doit. It's Python-based. It doesn't try to be smart, it does not try to be cool, it just works. If you are looking for a flexible little build tool for different languages and tasks, give it a chance. (...) - `lelele <http://www.hnsearch.com/search#request/all&q=python-doit.sourceforge.net&start=0>`_



Project Details
===============

* This is an open-source project (`MIT license <http://opensource.org/licenses/mit-license.php>`_) written in python. Runs on Python 2.6 through 3.4 with a single codebase.

* Download from `PyPi <http://pypi.python.org/pypi/doit>`_

* Project management (bug tracker, feature requests and source code ) on `bitbucket <https://bitbucket.org/schettino72/doit>`_.

* Questions and feedback on `google group <http://groups.google.co.in/group/python-doit>`_.

* This web site is hosted on http://pages.github.com

* `doit-recipes <https://bitbucket.org/schettino72/doit-recipes/wiki/Home>`_ contains a collection of non-trivial examples and a list of projects using `doit`.

* Professional support and consulting services available from `doit`
  creator & maintainer (*schettino72* at gmail.com).



Status
======

This blog `post <http://schettino72.wordpress.com/2008/04/14/doit-a-build-tool-tale/>`_ explains how everything started in 2008.

`doit` is under active development. Version 0.25 released on 2014-03.

`doit` core features are quite stable. So if there is no recent development,
it does NOT mean `doit` is not being maintained...
The project has 100% unit-test code coverage
and kept with *zero* bugs in the tracker.

Development is done based on real world use cases.
If I don't need a feature and nobody never asked/implemented it,
it is not implemented ;)
It is well designed and has a very small code base
so adding new features isn't hard.

If you use `doit` please drop me a line telling me your experience...