Skip to main content

"A Make-like tool with a syntax similar to Drake."

Project description

https://badge.fury.io/py/faz.png https://travis-ci.org/hmartiniano/faz.png?branch=master https://pypip.in/d/faz/badge.png

Faz is a data workflow tool heavily inspired in .. _Drake: https://github.com/Factual/drake

The intended use is combining data treatment scripts in bash, python, ruby (or anything else, with a little coding) into a single text file.

The name “faz” is portuguese for “do” or “make”.

The various steps can be separated into tasks, with defined inputs and outputs. Dependencies between the tasks are determined from inputs and outputs of every task. The program executes all tasks in the appropriate order, checking for the existence of output and input files.

Why?

  • Because I like Drake but can’t stand the startup time of java.

  • Because I can (actually to see if I can, but it turns out I can).

Features

  • simple but robust functionality

  • easy to use and extend (the code, minus the tests, is around 300 lines of python)

  • fast startup time (compared to Drake)

  • Documentation: https://faz.readthedocs.org.

Installation

Using pypi

pip install faz

Usage

From the command line, just type

faz

without arguments, the program will read the tasks from a file called “fazfile”. If you want to use another filename, just give that as an argumento to the program

faz <filename>

to get a list of command line arguments type

faz -h

Task file basics

The task file is a plain text file, with a syntax similar to Drake input files. The following is an example with two tasks

# file1 <-
touch file1

# file2 <- file1
cat file1 > file2

Lines starting with “#” and having the symbols “<-” signal a task. On the left of the “<-” is a (comma separated) list of the files produced by the task. On the right are the task dependencies, the files needed to run that task. In the above example the first task has no dependencies, and produces a file called “file1”. The second task has “file1” as a dependency, and has as output a file called “file2”.

The outputs and inputs and inputs of each task are used by the program to estabilish the order by which the tasks have to be run, and if they need to be run. In the example above, if a file called “file1” was already present in the directory the program was run, the first task would not be executed.

The code sections, are all the lines in betweeen the two task lines. In these two tasks, they are just are just plain bash commands but could be, for example, python code

# file1 <-
touch file1

# file2 <- file1 :python
f1 = open("file1")
text = file1.read()
f2 = open("file2", "w")
f2.write(text)

note that, in the second task, there’s an extra option “:python”, wich indicates to the program that the code from this task is python code. Options are a list of (comma separated) keywords follwing the “:”, and must be placed after the inputs.

History

0.1.0 (2014-01-11)

  • First release.

0.1.1 (2015-03-20)

  • Bug fixes.

0.1.2 (2015-10-17)

  • Project name change.

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

faz-0.1.2.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

faz-0.1.2-py2.py3-none-any.whl (11.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file faz-0.1.2.tar.gz.

File metadata

  • Download URL: faz-0.1.2.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for faz-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b7c510a4b170cb5601a9c3a0af7ecea2af2ee992d0434302e0d35cf38c6e0274
MD5 3957ec9abee426c22b14c2bcd10bbbcf
BLAKE2b-256 b1cd8cd8646d9a1ce3854133cc222d3f34874442ddfa4691384ecfcb223e9d0e

See more details on using hashes here.

File details

Details for the file faz-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for faz-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 40e9ab4f781267a2c6773e4522de06042d792e1f3bb5e486e28b4d5e3083f60b
MD5 c308d287c92a56558be60819e2cee7a2
BLAKE2b-256 1727d7fde0af34a3bcd58ba458470fff8ff2b7a68a17aeac4106feeb0bfbb0b0

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