Debian Codegraph @

doc/stories.rst

raw
1 .. meta::
2 :description: pydoit Success Stories on scientific pipelines, build system, content generation and DevOps
3 :keywords: python, doit, case study, build system, content generation, devops, scientific pipelines
4
5 .. title:: pydoit Success Stories: users testimonials
6
7
8 Success Stories
9 ===============
10
11 Do you have a success story? Please share it!
12
13 Send a pull-request on github describing your project, how `doit` is used,
14 and why `doit` was chosen.
15
16
17 .. contents::
18 :local:
19
20
21
22 Scientific
23 ----------
24
25
26 Biomechanics Lab / Stanford University, USA
27 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28
29 by `Christopher Dembia <http://chrisdembia.github.io>`_ (2014-04-03)
30
31
32 I am a graduate student in a biomechanics lab that studies how humans coordinate
33 their muscles in movements like walking or running.
34 We record someone's motion using reflective motion capture markers and by
35 recording the force their feet exert on the ground.
36 We put this data into our software, which gives back an estimate of the
37 force each muscle (92 muscles) was generating throughout the observed motion.
38 In a typical study, we record about 100 walking motions.
39 To analyze a single walking motion, we need to run 4 different executables in
40 sequence.
41 Each executable requires a handful of input files, and generates a
42 handful of output files that a subsequent executable uses as input.
43
44 So, a study entails about 1000 files, some of which contain raw data, but most
45 of which are intermediate files (output of one executable and input to another
46 executable).
47 Typically, a researcher manages this workflow manually.
48 However, that is prone to error,
49 as a researcher may forget to properly modify all
50 relevant files if an error is noticed in, for example, a raw data file.
51
52 With `doit`, I am automating this workflow for my current study.
53 This allows me to avoid errors and avoid unnecessary duplication of files.
54 Most importantly, if I learn that I must modify something in a file
55 that is an input toward the beginning of this workflow,
56 `doit` will allow me to automatically update all my
57 results without missing a step.
58
59 I tried to do this with `Make` first.
60 `Make` just was not made to do what I want.
61 Also, my lab's software has python bindings, so my entire workflow can be
62 in python.
63 Also, the ability to script anything directly into the workflow is
64 important, and `Make` can't do that.
65 `CMake` was another option, but that's not general enough.
66 `doit` is just completely generic, and the interface is simple yet very flexible.
67
68
69
70 `Computational Metagenomics Lab <http://cibiocm.bitbucket.org>`_ / University of Trento, Italy
71 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
73 by `Nicola Segata <http://cibiocm.bitbucket.org>`_ (2015-01-20)
74
75 My laboratory of Computational Metagenomics at University of Trento studies the
76 human microbiome, i.e. the huge microbial diversity populating our body.
77
78 Our analyses involve processing several thousands of microbial genomes (long
79 sequences of DNA) with a series of computational steps (mostly written in
80 python) on subset of those genomes. Genomes are organized in a hierarchical
81 structure (the taxonomy) and many steps of our pipelines need to take into
82 account these dependencies.
83
84 `doit` is just the right way to do this. We actually even tried to implement
85 something like this on our own, but we are now switching to `doit` because it
86 has all the features we need and it is intuitive to use. We particularly love
87 the possibility of specifying dependencies "on the fly".
88
89 We are now thinking to convert all our pipelines to the `doit` format. Given the
90 importance of `doit` for our research and its potential for bioinformatic
91 pipelines we are happy to support this project scientifically (by citing it in
92 our papers, mentioning it in our funding requests, etc).
93
94 Thanks for developing `doit`, it's just wonderful for computational biology (and
95 for many other tasks, of course, but this is our research field:)!
96
97 `Cheminformatics data processing @ Atomwise <https://www.atomwise.com>`_
98 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99
100 by `Jon Sorenson <https://github.com/drkeoni>`_ (2018-12-14)
101
102 I came to `doit` from the loose requirement that I wanted a task-dependency/DAG type
103 of workflow solution for the various pipelines that our team is constructing.
104 I come from computational biology originally, and the similarity of data processing pipelines
105 to build systems has long been appreciated. More than a decade ago
106 many of us were writing bioinformatics
107 pipelines in `make` because it gave us so many features "for free."
108
109 Starting afresh at `Atomwise <https://www.atomwise.com/>`_ I did a survey of what DAG-based workflow
110 execution frameworks were out there---restricting my search to `python`, active
111 maintenance, good documentation etc. Besides `doit` I evaluated `bonobo`, `Luigi`, and `airflow`.
112 `bonobo` didn't fit my needs for dependency-based processing. `Luigi` and `airflow` are
113 very nice, but I didn't have any particular need for distributed workflows and the
114 heavier weight feel of these platforms. My favorite experience was `airflow` but it
115 didn't have (obvious) support for re-entrant processing: running a pipeline
116 from an intermediate stage.
117
118 I knew that build-system based frameworks would do exactly what I wanted and not
119 hand me too much cruft, and on that note I found `doit`. It's worked perfectly
120 for my needs:
121
122 - The order of tasks is derived from dependencies
123
124 - Tasks can be executed in parallel if they don't depend on each other
125
126 - Plenty of bells and whistles to relieve the pipeline developer from writing
127 boilerplate code (easy task documentation, discovery of the pipeline state,
128 easy process for re-doing tasks)
129
130 - Very light-weight. In this sense `doit` is the perfect example of a UNIX-style
131 tool: *do one thing and do it well*. `Luigi` and `airflow` are
132 attractive, but they also suffer from kitchen-sink bloat. If you simply
133 want a pythonic alternative to `Makefiles` or `bash` scripts, `doit`
134 is great solution.
135
136 - It's easy to build up a library of common tasks that can be reused by
137 multiple `doit` pipelines.
138
139
140 Build System
141 ------------
142
143 `BMW <https://www.bmw.com/de/index.html>`_ (Automotive)
144 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145
146 by `Mike Pagel <https://github.com/moltob>`_ (2019-02-06)
147
148 We are responsible for the development of the next generation instrument
149 cluster software at BMW. While we use CMake for the actual build of libraries
150 and applications, we have learned in the past that you *can* do almost everything
151 with ``CMake``, but probably you *shouldn’t*.
152
153 ``CMake`` is optimized for all tasks around compiler toolchain control, but the
154 language is somewhat special and functions and macros cannot easily be tested
155 outside of a real build. This is where ``doit`` enters the stage: We use it for
156 everything *but* compiling software, as a high level command line interface for
157 the development teams (and the CI systems). These are some of the tasks we
158 perform with ``doit``:
159
160 - Downloading and installing tools.
161 - Calling ``CMake`` for multiple compiler toolchains.
162 - Driving various code analysis tools.
163 - Reporting.
164 - Packaging the software for later deployment to the car etc.
165 - Checking if dependencies of the toolchain are outdated and creating automatic
166 pull requests.
167
168 Basically we implemented our complete high-level build control in ``doit``. The
169 resulting framework is now used by us and our suppliers and supports a team
170 over 100 developers. Since ``doit`` is written in Python, we have professional test
171 frameworks, linters and code analyzers at hand, allowing for a thoroughly
172 tested and well-designed platform for our build-systems and automation.
173
174
175 Game Development
176 ^^^^^^^^^^^^^^^^
177
178 by `@FrankStain <https://github.com/pydoit/doit/issues/207#issuecomment-333367177>`_ (2017-10-01)
179
180 I'm professional game developer. Also, i support my own huge game framework written on C++. :)
181
182 So, the large scalable build systems are the game building automation tools. It consists of game binary image builders for different platforms, including cross-compilation of source code and source code generation from some DSL schemes. Also it consists of resource generators, where a lot of resource types (dozens of types: textures, 3d objects and scene graphs, sounds, database and state machine raw data) have to pass through dozens of compilation steps. After all, such build system consists of dynamic testing tool, which makes some tests on build target before make it published for Draft usage, QA or Retail customers. And, yep, publishing/QA deployment also implemented as part of build system.
183
184 Just imagine you need to read PNG into pixelmap, compress it into ETC2, ATCI, S3-TC5/BC3 and PVR-TC4, after what each of compressed texture should be placed into different resource pack, obfuscated and encrypted. And all is done by different tasks, because i can read textures even from database, zip-file or other pack and may not wish to compress it into some formats.
185 Each sound should be loaded from PCM, converted into MP3 or OGG and linked with each sound mixer where it used, after what it also have to be placed at proper resource pack, obfuscated and encrypted.
186 3d location compilation process is about two hundreds tasks on just objects, not files. It's most complex resource pipeline in build system.
187
188 `doit` is well designed tool for such purposes, i think.
189
190
191 `MetalK8s @ Scality <https://www.scality.com/>`_
192 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
193
194 by `Sylvain Laperche <https://github.com/slaperche-scality>`_ (2019-05-06)
195
196 We use ``doit`` as the build system for
197 `MetalK8s <https://github.com/scality/metalk8s/>`_, a Kubernetes distribution
198 with a focus on long-term on-prem deployments.
199
200 ``doit``'s main role is to generate the MetalK8s ISO archive that should contain
201 everything to allow offline installation and deployment of a Kubernetes cluster.
202 This involves several tasks like downloading and/or building container images,
203 building software packages (RPMs) from source, creating packages repositories, …
204 We also use ``doit`` for others tasks, such as executing linting tools and
205 spawning a local cluster using Vagrant.
206
207 We wanted to move away from ``make`` because as complexity grows it becomes hard
208 to maintain, evolve and debug.
209 Given that almost everyone in our team is familiar with Python, we started to
210 look for alternatives that are Python-based.
211
212 We investigated ``Scons``, ``waf``, ``Invoke`` and ``doit``.
213 ``Scons`` and ``waf`` were put aside because their main advantage is to hide the
214 underlying complexity of compiling software in a portable way (which we aren't
215 doing). However, running arbitrary shell commands was cumbersome.
216 ``Invoke`` was pretty good at executing commands, but didn't have a good
217 dependency tracking system: a task will always be re-executed even if its
218 dependencies are unchanged, which was a deal-breaker.
219
220 ``doit`` was chosen to replace our ``make``-based approach because of the
221 following characteristics:
222
223 - Easy to invoke external commands
224 - Simple and flexible core concepts
225 - Easily customizable (``uptodate`` API, ``clean`` attribute, …)
226 - Extensive documentation
227 - Actively maintained
228 - Various useful features: JSON output, ``doit info`` to inspect dependencies,
229 ``doit auto`` for automatically replaying tasks based on dependency changes…
230
231
232 Content Generation
233 ------------------
234
235
236 Nikola
237 ^^^^^^
238
239 by `the Nikola team <https://getnikola.com/>`_
240
241 `Nikola <https://getnikola.com/>`_ is a Static Site and Blog Generator. `doit`
242 is used to process all the tasks required for building the website (HTML files,
243 indexes, RSS, copying files…). Use of `doit` makes Nikola unique: unlike other
244 static site generators, Nikola regenerates only the files that were changed
245 since last build (and not all files in the site!). ``nikola build``, the
246 centerpiece of Nikola, is basically the usual ``doit run`` command.
247
248 `doit` is what makes Nikola extremely fast, even for large sites. Only a handful
249 of files actually *change* on a rebuild. Using the dependency architecture of
250 `doit` (for files and configuration), we are able to rebuild only what is needed.
251
252 Nikola is an `open-source <https://github.com/getnikola/nikola>`_ project with
253 many users and contributors.
254
255
256 Document Production
257 ^^^^^^^^^^^^^^^^^^^
258
259 (2018-02-01)
260
261 `Carve Systems <https://carvesystems.com>`_ uses `doit` as the core automation tool
262 for all of our document production. This customized tool based on Pandoc, Latex, and
263 coordinated by `doit` is used by everyone in our company to prepare our primary
264 customer facing deliverable. Previously we used Makefiles to coordinate builds. `doit`
265 let us create a system that can be more easily maintained, tested, and extended using
266 plugins.
267
268
269
270
271 DevOps
272 ------
273
274
275 University of Oslo Library, Norway
276 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
277
278 by_ `Dan Michael O. Heggø <https://github.com/danmichaelo>`_ (2018-02-26)
279
280 .. _by: #https-data-ub-uio-no
281
282 We are using `doit` for the publishing workflow at our vocabulary server https://data.ub.uio.no/ .
283 The server checks multiple remote sources for changes, and when there’s new changes somewhere, the data is fetched,
284 converted to different formats, published and pushed to Fuseki and Elasticsearch.
285
286 One part I love about `doit` is that you can control what is considered a change.
287 For remote files, I have created a task that checks if some header, like ETag or Last-Modified, has changed.
288 If it has not, I set `uptodate` to True and stop there.
289
290 Another part I love is the ability to re-use tasks.
291 Each vocabulary (like https://github.com/realfagstermer/realfagstermer and https://github.com/scriptotek/humord)
292 has a different publication workflow, but many tasks are shared.
293 With `doit`, I have created a collection of tasks and task generators (https://github.com/scriptotek/data_ub_tasks/)
294 that I use with all the vocabularies.
295
296 Finally, it's great that you can mix shell commands and Python tasks so easily.
297 This cuts development time and makes the move from using Makefiles much easier.