Compare commits

...

11 Commits

Author SHA1 Message Date
4cf69d362e Hack to make Bonobo work with py3.10 2022-12-19 11:04:38 +01:00
feb7ec8505 Merge pull request #393 from remitamine/docs_remove_dup_word
[docs] remove duplicate word
2021-03-10 16:44:00 +01:00
785e27f91e Merge pull request #394 from remitamine/docs_index_fix_typo
[docs] fix typo
2021-03-10 16:43:42 +01:00
49d5d6c44c [docs] fix typo 2021-03-06 10:35:17 +01:00
00b1da2f51 [docs] remove duplicate word 2021-03-06 09:39:37 +01:00
f8f0c9040e Merge pull request #388 from timgates42/bugfix_typo_running
docs: fix simple typo, runnning -> running
2021-01-01 06:32:01 +01:00
b45f39126c docs: fix simple typo, runnning -> running
There is a small typo in bonobo/errors.py.

Should read `running` rather than `runnning`.
2020-12-31 07:36:47 +11:00
274058db8b Release: 0.7.0rc2 2019-07-20 15:19:49 +02:00
d90f60c815 Release: 0.7.0rc1 2019-07-20 15:13:08 +02:00
62afb47b36 Merge pull request #354 from hartym/339_templates_new_syntax
#339 - Update templates to use new syntax.
2019-07-20 15:04:37 +02:00
9158af1f4c #339 - Update templates to use new syntax. 2019-07-20 14:56:05 +02:00
16 changed files with 127 additions and 134 deletions

View File

@ -1,4 +1,4 @@
# Generated by Medikit 0.7.2 on 2019-06-01.
# Generated by Medikit 0.7.3 on 2019-07-20.
# All changes will be overriden.
# Edit Projectfile and run “make update” (or “medikit update”) to regenerate.
@ -30,7 +30,7 @@ SPHINX_BUILDDIR ?= $(SPHINX_SOURCEDIR)/_build
SPHINX_AUTOBUILD ?= $(PYTHON_DIRNAME)/sphinx-autobuild
MEDIKIT ?= $(PYTHON) -m medikit
MEDIKIT_UPDATE_OPTIONS ?=
MEDIKIT_VERSION ?= 0.7.2
MEDIKIT_VERSION ?= 0.7.3
.PHONY: $(SPHINX_SOURCEDIR) clean format help install install-dev install-docker install-jupyter install-sqlalchemy medikit quick test update update-requirements watch-$(SPHINX_SOURCEDIR)
@ -43,7 +43,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_INLINE) -r $(PYTHON_REQUIREMENTS_FILE)
@mkdir -p .medikit; touch $@
endif
@ -61,7 +61,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_DEV_INLINE) -r $(PYTHON_REQUIREMENTS_DEV_FILE)
@mkdir -p .medikit; touch $@
endif
@ -78,7 +78,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_DOCKER_INLINE) -r $(PYTHON_REQUIREMENTS_DOCKER_FILE)
@mkdir -p .medikit; touch $@
endif
@ -92,7 +92,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_JUPYTER_INLINE) -r $(PYTHON_REQUIREMENTS_JUPYTER_FILE)
@mkdir -p .medikit; touch $@
endif
@ -106,7 +106,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_SQLALCHEMY_INLINE) -r $(PYTHON_REQUIREMENTS_SQLALCHEMY_FILE)
@mkdir -p .medikit; touch $@
endif
@ -125,7 +125,7 @@ format: ## Reformats the whole codebase using our standards (requires black an
isort -rc -o mondrian -o whistle -y .
medikit: # Checks installed medikit version and updates it if it is outdated.
@$(PYTHON) -c 'import medikit, pip, sys; from packaging.version import Version; sys.exit(0 if (Version(medikit.__version__) >= Version("$(MEDIKIT_VERSION)")) and (Version(pip.__version__) < Version("10")) else 1)' || $(PYTHON) -m pip install -U "pip ~=19.0" "medikit>=$(MEDIKIT_VERSION)"
@$(PYTHON) -c 'import medikit, pip, sys; from packaging.version import Version; sys.exit(0 if (Version(medikit.__version__) >= Version("$(MEDIKIT_VERSION)")) and (Version(pip.__version__) < Version("10")) else 1)' || $(PYTHON) -m pip install -U "pip ~=22.0" "medikit>=$(MEDIKIT_VERSION)"
update: medikit ## Update project artifacts using medikit.
$(MEDIKIT) update $(MEDIKIT_UPDATE_OPTIONS)

View File

@ -45,9 +45,9 @@ python.add_requirements(
'cached-property ~=1.4',
'fs ~=2.0',
'graphviz >=0.8,<0.9',
'jinja2 ~=2.9',
'jinja2',
'mondrian ~=0.8',
'packaging ~=19.0',
'packaging',
'psutil ~=5.4',
'python-slugify ~=1.2.0',
'requests ~=2.0',
@ -95,7 +95,4 @@ def on_make_generate(event):
)
# vim: ft=python:

View File

@ -83,6 +83,9 @@ def run(graph, *, plugins=None, services=None, strategy=None):
from bonobo.util.errors import sweeten_errors
if not isinstance(graph, Graph) and hasattr(graph, 'graph'):
graph = graph.graph
with sweeten_errors():
return strategy.execute(graph, plugins=plugins, services=services)

View File

@ -1 +1 @@
__version__ = "0.7-dev"
__version__ = '0.7.0rc3'

View File

@ -1,16 +1,13 @@
import bonobo
def get_graph(**options):
graph = bonobo.Graph()
graph.get_cursor() >> ...
return graph
def get_services(**options):
return {}
def create_graph():
return (
bonobo.Graph()
>> ...
)
if __name__ == '__main__':
with bonobo.parse_args() as options:
bonobo.run(get_graph(**options), services=get_services(**options))
bonobo.run(create_graph())

View File

@ -27,8 +27,12 @@ def get_graph(**options):
"""
graph = bonobo.Graph()
graph.get_cursor() >> extract >> transform >> load
(
graph
>> extract
>> transform
>> load
)
return graph

View File

@ -30,7 +30,7 @@ class ConfigurationError(Exception):
class UnrecoverableError(Exception):
"""Flag for errors that must interrupt the workflow, either because they will happen for sure on each node run, or
because you know that your transformation has no point continuing runnning after a bad event."""
because you know that your transformation has no point continuing running after a bad event."""
class AbstractError(UnrecoverableError, NotImplementedError):

View File

@ -1,6 +1,6 @@
import bisect
import functools
from collections import Sequence
from collections.abc import Sequence
class sortedlist(list):
@ -26,7 +26,8 @@ def _with_length_check(f):
if length is not None:
if length != len(result):
raise TypeError(
"Length check failed, expected {} fields but got {}: {!r}.".format(length, len(result), result)
"Length check failed, expected {} fields but got {}: {!r}.".format(
length, len(result), result)
)
return result

View File

@ -35,7 +35,7 @@
<p>
{% trans %}
In short, <b>Bonobo</b> contains the logic to execute efficiently an ETL process, the glue to use plain old python
ojects and common operations, readers and writers. For the rest, it's just python!
objects and common operations, readers and writers. For the rest, it's just python!
{% endtrans %}
</p>

View File

@ -98,7 +98,7 @@ Accessing Environment Variables from within the Graph Context
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Environment variables, whether set globally or only for the scope of the graph,
can be can be accessed using any of the normal means. It is important to note
can be accessed using any of the normal means. It is important to note
that whether set globally for the system or just for the graph context,
environment variables are accessed by bonobo in the same way. In the example
below the database user and password are accessed via the ``os`` module's ``getenv``

View File

@ -1,12 +1,12 @@
-e .[dev]
-r requirements.txt
alabaster==0.7.12
arrow==0.14.0
arrow==0.14.2
atomicwrites==1.3.0
attrs==19.1.0
babel==2.7.0
binaryornot==0.4.4
certifi==2019.3.9
certifi==2019.6.16
chardet==3.0.4
click==7.0
cookiecutter==1.5.1
@ -15,29 +15,30 @@ docutils==0.14
future==0.17.1
idna==2.8
imagesize==1.1.0
importlib-metadata==0.17
importlib-metadata==0.18
jinja2-time==0.2.0
jinja2==2.10.1
markupsafe==1.1.1
more-itertools==7.0.0
packaging==19.0
pathlib2==2.3.3
pluggy==0.12.0
more-itertools==7.1.0
packaging
pathlib2==2.3.4
pluggy==1.0.0
poyo==0.4.2
py==1.8.0
pygments==2.4.2
pyparsing==2.4.0
pytest-cov==2.7.1
pytest-timeout==1.3.3
pytest==3.10.1
pytest==4.6.4
python-dateutil==2.8.0
pytz==2019.1
requests==2.22.0
six==1.12.0
snowballstemmer==1.2.1
snowballstemmer==1.9.0
sphinx-sitemap==0.2
sphinx==1.8.5
sphinxcontrib-websupport==1.1.2
urllib3==1.25.3
whichcraft==0.5.2
zipp==0.5.1
wcwidth==0.1.7
whichcraft==0.6.0
zipp==0.5.2

View File

@ -2,20 +2,20 @@
-r requirements.txt
appdirs==1.4.3
bonobo-docker==0.6.0
certifi==2019.3.9
certifi==2019.6.16
chardet==3.0.4
colorama==0.3.9
docker-pycreds==0.4.0
docker==2.7.0
fs==2.4.5
fs==2.4.8
graphviz==0.8.4
idna==2.8
jinja2==2.10.1
markupsafe==1.1.1
mondrian==0.8.0
packaging==19.0
pbr==5.2.1
psutil==5.6.2
packaging
pbr==5.4.1
psutil==5.6.3
pyparsing==2.4.0
python-slugify==1.2.6
pytz==2019.1
@ -23,8 +23,8 @@ requests==2.22.0
semantic-version==2.6.0
six==1.12.0
stevedore==1.30.1
typing==3.6.6
unidecode==1.0.23
typing==3.7.4
unidecode==1.1.1
urllib3==1.25.3
websocket-client==0.56.0
whistle==1.0.1

View File

@ -9,37 +9,37 @@ defusedxml==0.6.0
entrypoints==0.3
ipykernel==5.1.1
ipython-genutils==0.2.0
ipython==7.5.0
ipython==7.6.1
ipywidgets==6.0.1
jedi==0.13.3
jedi==0.14.1
jinja2==2.10.1
jsonschema==3.0.1
jupyter-client==5.2.4
jupyter-client==5.3.1
jupyter-console==6.0.0
jupyter-core==4.4.0
jupyter-core==4.5.0
jupyter==1.0.0
markupsafe==1.1.1
mistune==0.8.4
nbconvert==5.5.0
nbformat==4.4.0
notebook==5.7.8
notebook==6.0.0
pandocfilters==1.4.2
parso==0.4.0
parso==0.5.1
pexpect==4.7.0
pickleshare==0.7.5
prometheus-client==0.6.0
prometheus-client==0.7.1
prompt-toolkit==2.0.9
ptyprocess==0.6.0
pygments==2.4.2
pyrsistent==0.15.2
pyrsistent==0.15.3
python-dateutil==2.8.0
pyzmq==18.0.1
pyzmq==18.0.2
qtconsole==4.5.1
send2trash==1.5.0
six==1.12.0
terminado==0.8.2
testpath==0.4.2
tornado==6.0.2
tornado==6.0.3
traitlets==4.3.2
wcwidth==0.1.7
webencodings==0.5.1

View File

@ -2,26 +2,26 @@
-r requirements.txt
appdirs==1.4.3
bonobo-sqlalchemy==0.6.0
certifi==2019.3.9
certifi==2019.6.16
chardet==3.0.4
colorama==0.3.9
fs==2.4.5
fs==2.4.8
graphviz==0.8.4
idna==2.8
jinja2==2.10.1
markupsafe==1.1.1
mondrian==0.8.0
packaging==19.0
pbr==5.2.1
psutil==5.6.2
packaging
pbr==5.4.1
psutil==5.6.3
pyparsing==2.4.0
python-slugify==1.2.6
pytz==2019.1
requests==2.22.0
six==1.12.0
sqlalchemy==1.3.4
sqlalchemy==1.3.5
stevedore==1.30.1
typing==3.6.6
unidecode==1.0.23
typing==3.7.4
unidecode==1.1.1
urllib3==1.25.3
whistle==1.0.1

View File

@ -1,25 +1,25 @@
-e .
appdirs==1.4.3
cached-property==1.5.1
certifi==2019.3.9
certifi==2019.6.16
chardet==3.0.4
colorama==0.3.9
fs==2.4.5
fs==2.4.8
graphviz==0.8.4
idna==2.8
jinja2==2.10.1
markupsafe==1.1.1
mondrian==0.8.0
packaging==19.0
pbr==5.2.1
psutil==5.6.2
packaging
pbr==5.4.1
psutil==5.6.3
pyparsing==2.4.0
python-slugify==1.2.6
pytz==2019.1
requests==2.22.0
six==1.12.0
stevedore==1.30.1
typing==3.6.6
unidecode==1.0.23
typing==3.7.4
unidecode==1.1.1
urllib3==1.25.3
whistle==1.0.1

110
setup.py
View File

@ -1,12 +1,11 @@
# Generated by Medikit 0.7.2 on 2019-06-01.
# Generated by Medikit 0.7.3 on 2019-07-20.
# 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.
@ -21,88 +20,79 @@ 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"))))
def tolines(c): return 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 ~= 19.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', 'mondrian ~= 0.8', 'packaging',
'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.5', 'pytest ~= 4.6',
'pytest-cov ~= 2.7', '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),
)