diff --git a/Makefile b/Makefile
index 5f078ed..594b4de 100644
--- a/Makefile
+++ b/Makefile
@@ -120,7 +120,7 @@ watch-$(SPHINX_SOURCEDIR): ##
$(SPHINX_AUTOBUILD) $(SPHINX_SOURCEDIR) $(shell mktemp -d)
format: ## Reformats the whole codebase using our standards (requires black and isort).
- black -l 120 --skip-string-normalization .
+ black -l 120 .
isort -rc -o mondrian -o whistle -y .
medikit: # Checks installed medikit version and updates it if it is outdated.
diff --git a/Projectfile b/Projectfile
index 0355430..590f670 100644
--- a/Projectfile
+++ b/Projectfile
@@ -87,7 +87,7 @@ def on_make_generate(event):
makefile.add_target(
'format',
'''
- black -l 120 --skip-string-normalization .
+ black -l 120 .
isort -rc -o mondrian -o whistle -y .
''',
phony=True,
diff --git a/benchmarks/parameters.py b/benchmarks/parameters.py
index f8e63a1..53664b5 100644
--- a/benchmarks/parameters.py
+++ b/benchmarks/parameters.py
@@ -16,11 +16,11 @@ import timeit
def j1(d):
- return {'prepend': 'foo', **d, 'append': 'bar'}
+ return {"prepend": "foo", **d, "append": "bar"}
def k1(**d):
- return {'prepend': 'foo', **d, 'append': 'bar'}
+ return {"prepend": "foo", **d, "append": "bar"}
def j2(d):
@@ -39,17 +39,17 @@ def k3(**d):
return None
-if __name__ == '__main__':
+if __name__ == "__main__":
import timeit
- with open('person.json') as f:
+ with open("person.json") as f:
json_data = json.load(f)
for i in 1, 2, 3:
print(
- 'j{}'.format(i), timeit.timeit("j{}({!r})".format(i, json_data), setup="from __main__ import j{}".format(i))
+ "j{}".format(i), timeit.timeit("j{}({!r})".format(i, json_data), setup="from __main__ import j{}".format(i))
)
print(
- 'k{}'.format(i),
+ "k{}".format(i),
timeit.timeit("k{}(**{!r})".format(i, json_data), setup="from __main__ import k{}".format(i)),
)
diff --git a/bin/update_apidoc.py b/bin/update_apidoc.py
index 4ed763f..9a31a62 100644
--- a/bin/update_apidoc.py
+++ b/bin/update_apidoc.py
@@ -2,48 +2,48 @@ import os
from jinja2 import DictLoader, Environment
-__path__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__), '..'))
+__path__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__), ".."))
-apidoc_root = 'docs/reference/api'
+apidoc_root = "docs/reference/api"
class Module:
def __init__(self, name, title=None, *, automodule_options=None):
self.name = name
- self.title = title or ' '.join(map(str.title, self.name.split('.')[1:]))
+ self.title = title or " ".join(map(str.title, self.name.split(".")[1:]))
self.automodule_options = automodule_options or list()
def __repr__(self):
- return '<{} ({})>'.format(self.title, self.name)
+ return "<{} ({})>".format(self.title, self.name)
def asdict(self):
- return {'name': self.name, 'title': self.title, 'automodule_options': self.automodule_options}
+ return {"name": self.name, "title": self.title, "automodule_options": self.automodule_options}
def get_path(self):
- return os.path.join(__path__, apidoc_root, *self.name.split('.')) + '.rst'
+ return os.path.join(__path__, apidoc_root, *self.name.split(".")) + ".rst"
modules = [
- Module('bonobo', title='Bonobo'),
- Module('bonobo.config'),
- Module('bonobo.constants', automodule_options=['no-members']),
- Module('bonobo.execution'),
- Module('bonobo.execution.contexts'),
- Module('bonobo.execution.events'),
- Module('bonobo.execution.strategies'),
- Module('bonobo.util'),
+ Module("bonobo", title="Bonobo"),
+ Module("bonobo.config"),
+ Module("bonobo.constants", automodule_options=["no-members"]),
+ Module("bonobo.execution"),
+ Module("bonobo.execution.contexts"),
+ Module("bonobo.execution.events"),
+ Module("bonobo.execution.strategies"),
+ Module("bonobo.util"),
]
def underlined_filter(txt, chr):
- return txt + '\n' + chr * len(txt)
+ return txt + "\n" + chr * len(txt)
env = Environment(
loader=DictLoader(
{
- 'module': '''
+ "module": """
{{ (':mod:`'~title~' <'~name~'>`') | underlined('=') }}
.. currentmodule:: {{ name }}
@@ -52,15 +52,15 @@ env = Environment(
.. automodule:: {{ name }}
{% for opt in automodule_options %} :{{ opt }}:{{ "\n" }}{% endfor %}
- '''[
+ """[
1:-1
]
- + '\n'
+ + "\n"
}
)
)
-env.filters['underlined'] = underlined_filter
+env.filters["underlined"] = underlined_filter
for module in modules:
- with open(module.get_path(), 'w+') as f:
- f.write(env.get_template('module').render(module.asdict()))
+ with open(module.get_path(), "w+") as f:
+ f.write(env.get_template("module").render(module.asdict()))
diff --git a/bonobo/__init__.py b/bonobo/__init__.py
index f3cdfc0..35dc5c9 100644
--- a/bonobo/__init__.py
+++ b/bonobo/__init__.py
@@ -8,7 +8,7 @@
import sys
if sys.version_info < (3, 5):
- raise RuntimeError('Python 3.5+ is required to use Bonobo.')
+ raise RuntimeError("Python 3.5+ is required to use Bonobo.")
from bonobo._api import (
run,
@@ -65,8 +65,8 @@ def _repr_html_():
'
'
- ).format(__logo__, '
'.join(get_versions(all=True)))
+ ""
+ ).format(__logo__, "
".join(get_versions(all=True)))
del sys
diff --git a/bonobo/_api.py b/bonobo/_api.py
index 043aa77..78576aa 100644
--- a/bonobo/_api.py
+++ b/bonobo/_api.py
@@ -187,7 +187,7 @@ def get_examples_path(*pathsegments):
import os
import pathlib
- return str(pathlib.Path(os.path.dirname(__file__), 'examples', *pathsegments))
+ return str(pathlib.Path(os.path.dirname(__file__), "examples", *pathsegments))
@api.register
diff --git a/bonobo/_version.py b/bonobo/_version.py
index a68d2bd..63af887 100644
--- a/bonobo/_version.py
+++ b/bonobo/_version.py
@@ -1 +1 @@
-__version__ = '0.6.3'
+__version__ = "0.6.3"
diff --git a/bonobo/commands/base.py b/bonobo/commands/base.py
index b1210d3..65bdb24 100644
--- a/bonobo/commands/base.py
+++ b/bonobo/commands/base.py
@@ -4,10 +4,11 @@ import runpy
import sys
from contextlib import contextmanager
+from mondrian import humanizer
+
import bonobo.util.environ
from bonobo.util import get_name
from bonobo.util.environ import get_argument_parser, parse_args
-from mondrian import humanizer
class BaseCommand:
diff --git a/bonobo/commands/convert.py b/bonobo/commands/convert.py
index 125c4b2..d9e5c00 100644
--- a/bonobo/commands/convert.py
+++ b/bonobo/commands/convert.py
@@ -1,8 +1,9 @@
+from mondrian import humanizer
+
import bonobo
from bonobo.commands import BaseCommand
from bonobo.registry import READER, WRITER, default_registry
from bonobo.util.resolvers import _resolve_options, _resolve_transformations
-from mondrian import humanizer
class ConvertCommand(BaseCommand):
diff --git a/bonobo/commands/init.py b/bonobo/commands/init.py
index 4342e72..d655ee2 100644
--- a/bonobo/commands/init.py
+++ b/bonobo/commands/init.py
@@ -1,9 +1,9 @@
import os
from jinja2 import Environment, FileSystemLoader
+from mondrian import humanizer
from bonobo.commands import BaseCommand
-from mondrian import humanizer
class InitCommand(BaseCommand):
@@ -31,16 +31,12 @@ class InitCommand(BaseCommand):
with open(filename, "w+") as f:
f.write(template.render(name=name))
- print(
- humanizer.Success(
- "Generated {} using template {!r}.".format(filename, template_name)
- )
- )
+ print(humanizer.Success("Generated {} using template {!r}.".format(filename, template_name)))
def create_package(self, *, filename):
_, ext = os.path.splitext(filename)
- if ext != '':
- raise ValueError('Package names should not have an extension.')
+ if ext != "":
+ raise ValueError("Package names should not have an extension.")
try:
import medikit.commands
@@ -60,16 +56,16 @@ class InitCommand(BaseCommand):
print(
humanizer.Success(
'Package "{}" has been created.'.format(package_name),
- '',
+ "",
"Install it...",
- '',
+ "",
" $ `pip install --editable {}`".format(filename),
- '',
+ "",
"Then maybe run the example...",
- '',
+ "",
" $ `python -m {}`".format(package_name),
- '',
- "Enjoy!"
+ "",
+ "Enjoy!",
)
)
diff --git a/bonobo/commands/version.py b/bonobo/commands/version.py
index 0a8d9ab..ee5584b 100644
--- a/bonobo/commands/version.py
+++ b/bonobo/commands/version.py
@@ -1,6 +1,7 @@
-from bonobo.commands import BaseCommand
from mondrian import humanizer
+from bonobo.commands import BaseCommand
+
def get_versions(*, all=False, quiet=None):
import bonobo
diff --git a/bonobo/config/services.py b/bonobo/config/services.py
index 1fb38cd..d9f6495 100644
--- a/bonobo/config/services.py
+++ b/bonobo/config/services.py
@@ -68,7 +68,7 @@ class Container(dict):
if len(args) == 1:
if len(kwargs):
raise ValueError(
- 'You can either use {} with one positional argument or with keyword arguments, not both.'.format(
+ "You can either use {} with one positional argument or with keyword arguments, not both.".format(
cls.__name__
)
)
diff --git a/bonobo/contrib/django/commands.py b/bonobo/contrib/django/commands.py
index 076ac23..95f6b89 100644
--- a/bonobo/contrib/django/commands.py
+++ b/bonobo/contrib/django/commands.py
@@ -60,8 +60,8 @@ class ETLCommand(BaseCommand):
for i, graph in enumerate(graph_coll):
if not isinstance(graph, bonobo.Graph):
- raise ValueError('Expected a Graph instance, got {!r}.'.format(graph))
- print(term.lightwhite('{}. {}'.format(i + 1, graph.name)))
+ raise ValueError("Expected a Graph instance, got {!r}.".format(graph))
+ print(term.lightwhite("{}. {}".format(i + 1, graph.name)))
result = bonobo.run(graph, services=services, strategy=strategy)
results.append(result)
print(term.lightblack(" ... return value: " + str(result)))
diff --git a/bonobo/util/bags.py b/bonobo/util/bags.py
index e8cfeff..8e69d9b 100644
--- a/bonobo/util/bags.py
+++ b/bonobo/util/bags.py
@@ -134,7 +134,7 @@ def BagType(typename, fields, *, verbose=False, module=None):
if type(name) is not str:
raise TypeError("Type names and field names must be strings, got {name!r}".format(name=name))
if not isinstance(name, str):
- raise TypeError('Type names and field names must be strings, got {name!r}'.format(name=name))
+ raise TypeError("Type names and field names must be strings, got {name!r}".format(name=name))
if not i:
if not name.isidentifier():
raise ValueError("Type names must be valid identifiers: {name!r}".format(name=name))
diff --git a/bonobo/util/term.py b/bonobo/util/term.py
index ca7375d..d3335cb 100644
--- a/bonobo/util/term.py
+++ b/bonobo/util/term.py
@@ -1,2 +1,2 @@
CLEAR_EOL = "\033[0K"
-MOVE_CURSOR_UP = '\033[{}A'.format
+MOVE_CURSOR_UP = "\033[{}A".format
diff --git a/docs/_templates/alabaster/__init__.py b/docs/_templates/alabaster/__init__.py
index a4bebf2..c88b2b5 100644
--- a/docs/_templates/alabaster/__init__.py
+++ b/docs/_templates/alabaster/__init__.py
@@ -12,13 +12,13 @@ def get_path():
def update_context(app, pagename, templatename, context, doctree):
- context['alabaster_version'] = version.__version__
+ context["alabaster_version"] = version.__version__
def setup(app):
# add_html_theme is new in Sphinx 1.6+
- if hasattr(app, 'add_html_theme'):
+ if hasattr(app, "add_html_theme"):
theme_path = os.path.abspath(os.path.dirname(__file__))
- app.add_html_theme('alabaster', theme_path)
- app.connect('html-page-context', update_context)
- return {'version': version.__version__, 'parallel_read_safe': True}
+ app.add_html_theme("alabaster", theme_path)
+ app.connect("html-page-context", update_context)
+ return {"version": version.__version__, "parallel_read_safe": True}
diff --git a/docs/_templates/alabaster/_version.py b/docs/_templates/alabaster/_version.py
index 9e641f7..b74ffbe 100644
--- a/docs/_templates/alabaster/_version.py
+++ b/docs/_templates/alabaster/_version.py
@@ -1,2 +1,2 @@
__version_info__ = (0, 7, 10)
-__version__ = '.'.join(map(str, __version_info__))
+__version__ = ".".join(map(str, __version_info__))
diff --git a/docs/conf.py b/docs/conf.py
index 73e6ec3..f9c1ead 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -7,43 +7,43 @@ import sys
import bonobo
-sys.path.insert(0, os.path.abspath('..'))
-sys.path.insert(0, os.path.abspath('_themes'))
+sys.path.insert(0, os.path.abspath(".."))
+sys.path.insert(0, os.path.abspath("_themes"))
# -- General configuration ------------------------------------------------
extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.autosummary',
- 'sphinx.ext.doctest',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.todo',
- 'sphinx.ext.coverage',
- 'sphinx.ext.ifconfig',
- 'sphinx.ext.viewcode',
- 'sphinx.ext.graphviz',
- 'sphinx_sitemap',
+ "sphinx.ext.autodoc",
+ "sphinx.ext.autosummary",
+ "sphinx.ext.doctest",
+ "sphinx.ext.intersphinx",
+ "sphinx.ext.todo",
+ "sphinx.ext.coverage",
+ "sphinx.ext.ifconfig",
+ "sphinx.ext.viewcode",
+ "sphinx.ext.graphviz",
+ "sphinx_sitemap",
]
-site_url = 'http://docs.bonobo-project.org/en/master/'
+site_url = "http://docs.bonobo-project.org/en/master/"
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ["_templates"]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
-source_suffix = '.rst'
+source_suffix = ".rst"
# The master toctree document.
-master_doc = 'index'
+master_doc = "index"
# General information about the project.
-project = 'Bonobo'
-author = 'Romain Dorgueil'
-copyright = '2012-{}, {}'.format(datetime.datetime.now().year, author)
+project = "Bonobo"
+author = "Romain Dorgueil"
+copyright = "2012-{}, {}".format(datetime.datetime.now().year, author)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -60,14 +60,14 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
-exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
-autoclass_content = 'both'
-autodoc_member_order = 'groupwise'
-autodoc_default_flags = ['members', 'undoc-members', 'show-inheritance']
+autoclass_content = "both"
+autodoc_member_order = "groupwise"
+autodoc_default_flags = ["members", "undoc-members", "show-inheritance"]
add_module_names = False
-pygments_style = 'sphinx'
+pygments_style = "sphinx"
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
@@ -77,56 +77,56 @@ todo_include_todos = True
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
-html_theme = 'alabaster'
+html_theme = "alabaster"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
- 'github_user': 'python-bonobo',
- 'github_repo': 'bonobo',
- 'github_button': 'true',
- 'github_banner': 'true',
- 'show_powered_by': 'false',
- 'show_related': 'true',
+ "github_user": "python-bonobo",
+ "github_repo": "bonobo",
+ "github_button": "true",
+ "github_banner": "true",
+ "show_powered_by": "false",
+ "show_related": "true",
}
html_sidebars = {
- 'index': [
- 'sidebarlogo.html',
- 'navigation.html',
- 'localtoc.html',
- 'sidebarintro.html',
- 'sourcelink.html',
- 'searchbox.html',
- 'sidebarinfos.html',
+ "index": [
+ "sidebarlogo.html",
+ "navigation.html",
+ "localtoc.html",
+ "sidebarintro.html",
+ "sourcelink.html",
+ "searchbox.html",
+ "sidebarinfos.html",
],
- '**': [
- 'sidebarlogo.html',
- 'navigation.html',
- 'localtoc.html',
- 'relations.html',
- 'sourcelink.html',
- 'searchbox.html',
- 'sidebarinfos.html',
+ "**": [
+ "sidebarlogo.html",
+ "navigation.html",
+ "localtoc.html",
+ "relations.html",
+ "sourcelink.html",
+ "searchbox.html",
+ "sidebarinfos.html",
],
}
-html_theme_path = ['_themes']
-html_additional_pages = {'index': 'index.html'}
+html_theme_path = ["_themes"]
+html_additional_pages = {"index": "index.html"}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = ["_static"]
html_show_sphinx = False
-graphviz_output_format = 'svg'
+graphviz_output_format = "svg"
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
-htmlhelp_basename = 'Bonobodoc'
+htmlhelp_basename = "Bonobodoc"
# -- Options for LaTeX output ---------------------------------------------
@@ -148,13 +148,13 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
-latex_documents = [(master_doc, 'Bonobo.tex', 'Bonobo Documentation', 'Romain Dorgueil', 'manual')]
+latex_documents = [(master_doc, "Bonobo.tex", "Bonobo Documentation", "Romain Dorgueil", "manual")]
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
-man_pages = [(master_doc, 'bonobo', 'Bonobo Documentation', [author], 1)]
+man_pages = [(master_doc, "bonobo", "Bonobo Documentation", [author], 1)]
# -- Options for Texinfo output -------------------------------------------
@@ -164,12 +164,12 @@ man_pages = [(master_doc, 'bonobo', 'Bonobo Documentation', [author], 1)]
texinfo_documents = [
(
master_doc,
- 'Bonobo',
- 'Bonobo Documentation',
+ "Bonobo",
+ "Bonobo Documentation",
author,
- 'Bonobo',
- 'One line description of project.',
- 'Miscellaneous',
+ "Bonobo",
+ "One line description of project.",
+ "Miscellaneous",
)
]
@@ -191,14 +191,14 @@ epub_copyright = copyright
# epub_uid = ''
# A list of files that should not be packed into the epub file.
-epub_exclude_files = ['search.html']
+epub_exclude_files = ["search.html"]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
- 'django': ('https://docs.djangoproject.com/en/2.0/', 'https://docs.djangoproject.com/en/2.0/_objects/'),
- 'fs': ('https://docs.pyfilesystem.org/en/latest/', None),
- 'python': ('https://docs.python.org/3', None),
- 'requests': ('http://docs.python-requests.org/en/master/', None),
+ "django": ("https://docs.djangoproject.com/en/2.0/", "https://docs.djangoproject.com/en/2.0/_objects/"),
+ "fs": ("https://docs.pyfilesystem.org/en/latest/", None),
+ "python": ("https://docs.python.org/3", None),
+ "requests": ("http://docs.python-requests.org/en/master/", None),
}
rst_epilog = """
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 366ecf1..7b03457 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -20,7 +20,6 @@ jinja2==2.10
markupsafe==1.0
more-itertools==4.3.0
packaging==17.1
-pathlib2==2.3.2
pluggy==0.7.1
poyo==0.4.1
py==1.5.4
diff --git a/requirements-docker.txt b/requirements-docker.txt
index 389588d..b5da1e0 100644
--- a/requirements-docker.txt
+++ b/requirements-docker.txt
@@ -23,7 +23,6 @@ requests==2.19.1
semantic-version==2.6.0
six==1.11.0
stevedore==1.29.0
-typing==3.6.4
unidecode==1.0.22
urllib3==1.23
websocket-client==0.48.0
diff --git a/requirements-sqlalchemy.txt b/requirements-sqlalchemy.txt
index d6c7845..389f976 100644
--- a/requirements-sqlalchemy.txt
+++ b/requirements-sqlalchemy.txt
@@ -21,7 +21,6 @@ requests==2.19.1
six==1.11.0
sqlalchemy==1.2.10
stevedore==1.29.0
-typing==3.6.4
unidecode==1.0.22
urllib3==1.23
whistle==1.0.1
diff --git a/requirements.txt b/requirements.txt
index a3dc418..51127fd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -19,7 +19,6 @@ pytz==2018.5
requests==2.19.1
six==1.11.0
stevedore==1.29.0
-typing==3.6.4
unidecode==1.0.22
urllib3==1.23
whistle==1.0.1
diff --git a/setup.py b/setup.py
index daeab3e..18b166a 100644
--- a/setup.py
+++ b/setup.py
@@ -2,10 +2,11 @@
# All changes will be overriden.
# Edit Projectfile and run “make update” (or “medikit update”) to regenerate.
-from setuptools import setup, find_packages
from codecs import open
from os import path
+from setuptools import find_packages, setup
+
here = path.abspath(path.dirname(__file__))
# Py3 compatibility hacks, borrowed from IPython.
@@ -20,76 +21,88 @@ except NameError:
# Get the long description from the README file
try:
- with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
+ with open(path.join(here, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
except:
- long_description = ''
+ long_description = ""
# Get the classifiers from the classifiers file
-tolines = lambda c: list(filter(None, map(lambda s: s.strip(), c.split('\n'))))
+tolines = lambda c: list(filter(None, map(lambda s: s.strip(), c.split("\n"))))
try:
- with open(path.join(here, 'classifiers.txt'), encoding='utf-8') as f:
+ with open(path.join(here, "classifiers.txt"), encoding="utf-8") as f:
classifiers = tolines(f.read())
except:
classifiers = []
version_ns = {}
try:
- execfile(path.join(here, 'bonobo/_version.py'), version_ns)
+ execfile(path.join(here, "bonobo/_version.py"), version_ns)
except EnvironmentError:
- version = 'dev'
+ version = "dev"
else:
- version = version_ns.get('__version__', 'dev')
+ version = version_ns.get("__version__", "dev")
setup(
- author='Romain Dorgueil',
- author_email='romain@dorgueil.net',
- data_files=[('share/jupyter/nbextensions/bonobo-jupyter', [
- 'bonobo/contrib/jupyter/static/extension.js',
- 'bonobo/contrib/jupyter/static/index.js',
- 'bonobo/contrib/jupyter/static/index.js.map'
- ])],
- description=(
- 'Bonobo, a simple, modern and atomic extract-transform-load toolkit for '
- 'python 3.5+.'),
- license='Apache License, Version 2.0',
- name='bonobo',
- python_requires='>=3.5',
+ author="Romain Dorgueil",
+ author_email="romain@dorgueil.net",
+ data_files=[
+ (
+ "share/jupyter/nbextensions/bonobo-jupyter",
+ [
+ "bonobo/contrib/jupyter/static/extension.js",
+ "bonobo/contrib/jupyter/static/index.js",
+ "bonobo/contrib/jupyter/static/index.js.map",
+ ],
+ )
+ ],
+ description=("Bonobo, a simple, modern and atomic extract-transform-load toolkit for " "python 3.5+."),
+ license="Apache License, Version 2.0",
+ name="bonobo",
+ python_requires=">=3.5",
version=version,
long_description=long_description,
classifiers=classifiers,
- packages=find_packages(exclude=['ez_setup', 'example', 'test']),
+ packages=find_packages(exclude=["ez_setup", "example", "test"]),
include_package_data=True,
install_requires=[
- 'cached-property (~= 1.4)', 'fs (~= 2.0)', 'graphviz (>= 0.8, < 0.9)',
- 'jinja2 (~= 2.9)', 'mondrian (~= 0.8)', 'packaging (~= 17.0)',
- 'psutil (~= 5.4)', 'python-slugify (~= 1.2.0)', 'requests (~= 2.0)',
- 'stevedore (~= 1.27)', 'whistle (~= 1.0)'
+ "cached-property (~= 1.4)",
+ "fs (~= 2.0)",
+ "graphviz (>= 0.8, < 0.9)",
+ "jinja2 (~= 2.9)",
+ "mondrian (~= 0.8)",
+ "packaging (~= 17.0)",
+ "psutil (~= 5.4)",
+ "python-slugify (~= 1.2.0)",
+ "requests (~= 2.0)",
+ "stevedore (~= 1.27)",
+ "whistle (~= 1.0)",
],
extras_require={
- 'dev': [
- 'cookiecutter (>= 1.5, < 1.6)', 'coverage (~= 4.4)',
- 'pytest (~= 3.4)', 'pytest-cov (~= 2.5)',
- 'pytest-timeout (>= 1, < 2)', 'sphinx (~= 1.7)',
- 'sphinx-sitemap (>= 0.2, < 0.3)'
+ "dev": [
+ "cookiecutter (>= 1.5, < 1.6)",
+ "coverage (~= 4.4)",
+ "pytest (~= 3.4)",
+ "pytest-cov (~= 2.5)",
+ "pytest-timeout (>= 1, < 2)",
+ "sphinx (~= 1.7)",
+ "sphinx-sitemap (>= 0.2, < 0.3)",
],
- 'docker': ['bonobo-docker (~= 0.6.0a1)'],
- 'jupyter': ['ipywidgets (~= 6.0)', 'jupyter (~= 1.0)'],
- 'sqlalchemy': ['bonobo-sqlalchemy (~= 0.6.0a1)']
+ "docker": ["bonobo-docker (~= 0.6.0a1)"],
+ "jupyter": ["ipywidgets (~= 6.0)", "jupyter (~= 1.0)"],
+ "sqlalchemy": ["bonobo-sqlalchemy (~= 0.6.0a1)"],
},
entry_points={
- 'bonobo.commands': [
- 'convert = bonobo.commands.convert:ConvertCommand',
- 'download = bonobo.commands.download:DownloadCommand',
- 'examples = bonobo.commands.examples:ExamplesCommand',
- 'init = bonobo.commands.init:InitCommand',
- 'inspect = bonobo.commands.inspect:InspectCommand',
- 'run = bonobo.commands.run:RunCommand',
- 'version = bonobo.commands.version:VersionCommand'
+ "bonobo.commands": [
+ "convert = bonobo.commands.convert:ConvertCommand",
+ "download = bonobo.commands.download:DownloadCommand",
+ "examples = bonobo.commands.examples:ExamplesCommand",
+ "init = bonobo.commands.init:InitCommand",
+ "inspect = bonobo.commands.inspect:InspectCommand",
+ "run = bonobo.commands.run:RunCommand",
+ "version = bonobo.commands.version:VersionCommand",
],
- 'console_scripts': ['bonobo = bonobo.commands:entrypoint']
+ "console_scripts": ["bonobo = bonobo.commands:entrypoint"],
},
- url='https://www.bonobo-project.org/',
- download_url='https://github.com/python-bonobo/bonobo/tarball/{version}'.
- format(version=version),
+ url="https://www.bonobo-project.org/",
+ download_url="https://github.com/python-bonobo/bonobo/tarball/{version}".format(version=version),
)
diff --git a/tests/config/test_services.py b/tests/config/test_services.py
index 20b0ee2..a86e639 100644
--- a/tests/config/test_services.py
+++ b/tests/config/test_services.py
@@ -131,20 +131,20 @@ def test_requires():
def test_constructor():
- c1 = Container(foo='foo', bar='bar')
+ c1 = Container(foo="foo", bar="bar")
assert 2 == len(c1)
- c2 = Container({'foo': 'foo', 'bar': 'bar'})
+ c2 = Container({"foo": "foo", "bar": "bar"})
assert 2 == len(c2)
- assert c1['foo'] == c2['foo']
- assert c1['bar'] == c2['bar']
+ assert c1["foo"] == c2["foo"]
+ assert c1["bar"] == c2["bar"]
with pytest.raises(ValueError):
- Container({'bar': 'bar'}, foo='foo')
+ Container({"bar": "bar"}, foo="foo")
-@pytest.mark.parametrize('services', [None, {}])
+@pytest.mark.parametrize("services", [None, {}])
def test_create_container_empty_values(services):
c = create_container(services)
assert len(c) == 2
diff --git a/tests/nodes/io/test_csv.py b/tests/nodes/io/test_csv.py
index 0f853a3..3173768 100644
--- a/tests/nodes/io/test_csv.py
+++ b/tests/nodes/io/test_csv.py
@@ -63,9 +63,9 @@ class CsvReaderTest(Csv, ReaderTest, TestCase):
def test_output_type(self, context):
context.write_sync(EMPTY)
context.stop()
- self.check_output(context, prepend=[('id', 'name')])
+ self.check_output(context, prepend=[("id", "name")])
- @incontext(output_fields=('x', 'y'), skip=1)
+ @incontext(output_fields=("x", "y"), skip=1)
def test_output_fields(self, context):
context.write_sync(EMPTY)
context.stop()
@@ -103,7 +103,7 @@ class CsvWriterTest(Csv, WriterTest, TestCase):
context.write_sync((L1, L2), (L3, L4))
context.stop()
- assert self.readlines() == ('a,hey', 'b,bee', 'c,see', 'd,dee')
+ assert self.readlines() == ("a,hey", "b,bee", "c,see", "d,dee")
@incontext()
def test_nofields_multiple_args_length_mismatch(self, context):