Pass "path" option value as positional in examples.

This commit is contained in:
Romain Dorgueil
2017-05-01 15:59:33 +02:00
parent 49cfb88519
commit d66f8c463a
6 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@ import bonobo
from bonobo.commands.run import get_default_services
graph = bonobo.Graph(
bonobo.CsvReader(path='datasets/coffeeshops.txt'),
bonobo.CsvReader('datasets/coffeeshops.txt'),
print,
)

View File

@ -7,7 +7,7 @@ def get_fields(row):
graph = bonobo.Graph(
bonobo.JsonReader(path='datasets/theaters.json'),
bonobo.JsonReader('datasets/theaters.json'),
get_fields,
bonobo.PrettyPrint(title_keys=('eq_nom_equipement', )),
)

View File

@ -8,7 +8,7 @@ def skip_comments(line):
graph = bonobo.Graph(
bonobo.FileReader(path='datasets/passwd.txt'),
bonobo.FileReader('datasets/passwd.txt'),
skip_comments,
lambda s: s.split(':'),
lambda l: l[0],

View File

@ -1,7 +1,7 @@
import bonobo
graph = bonobo.Graph(
bonobo.FileReader(path='coffeeshops.txt'),
bonobo.FileReader('coffeeshops.txt'),
print,
)

View File

@ -6,9 +6,9 @@ def split_one(line):
graph = bonobo.Graph(
bonobo.FileReader(path='coffeeshops.txt'),
bonobo.FileReader('coffeeshops.txt'),
split_one,
bonobo.JsonWriter(path='coffeeshops.json'),
bonobo.JsonWriter('coffeeshops.json'),
)
if __name__ == '__main__':

View File

@ -16,9 +16,9 @@ class MyJsonWriter(bonobo.JsonWriter):
graph = bonobo.Graph(
bonobo.FileReader(path='coffeeshops.txt'),
bonobo.FileReader('coffeeshops.txt'),
split_one_to_map,
MyJsonWriter(path='coffeeshops.json'),
MyJsonWriter('coffeeshops.json'),
)
if __name__ == '__main__':