Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Medikit 0.7.2 on 2019-06-01.
# Generated by Medikit 0.7.3 on 2019-06-30.
# All changes will be overriden.
# Edit Projectfile and run “make update” (or “medikit update”) to regenerate.

Expand All @@ -21,6 +21,10 @@ QUICK ?=
PIP ?= $(PYTHON) -m pip
PIP_INSTALL_OPTIONS ?=
VERSION ?= $(shell git describe 2>/dev/null || git rev-parse --short HEAD)
BLACK ?= $(shell which black || echo black)
BLACK_OPTIONS ?= --line-length 120
ISORT ?= $(PYTHON) -m isort
ISORT_OPTIONS ?= --recursive --apply
PYTEST ?= $(PYTHON_DIRNAME)/pytest
PYTEST_OPTIONS ?= --capture=no --cov=$(PACKAGE) --cov-report html
SPHINX_BUILD ?= $(PYTHON_DIRNAME)/sphinx-build
Expand All @@ -30,7 +34,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)

Expand Down Expand Up @@ -111,6 +115,10 @@ else
@mkdir -p .medikit; touch $@
endif

format: install-dev ## Reformats the codebase (with black, isort).
$(BLACK) $(BLACK_OPTIONS) . Projectfile
$(ISORT) $(ISORT_OPTIONS) . Projectfile

test: install-dev ## Runs the test suite.
$(PYTEST) $(PYTEST_OPTIONS) tests

Expand All @@ -120,10 +128,6 @@ $(SPHINX_SOURCEDIR): install-dev ##
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 .
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)"

Expand Down
128 changes: 53 additions & 75 deletions Projectfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,100 +2,78 @@

from medikit import require

make = require('make')
pytest = require('pytest')
python = require('python')
sphinx = require('sphinx')
make = require("make")
python = require("python")
sphinx = require("sphinx")

require("format")

# Tests
with require("pytest") as pytest:
pytest.set_version("~=5.0")
pytest.addons["pytest-timeout"] = ">=1,<2"

python.setup(
name='bonobo',
python_requires='>=3.5',
description='Bonobo, a simple, modern and atomic extract-transform-load toolkit for python 3.5+.',
license='Apache License, Version 2.0',
url='https://www.bonobo-project.org/',
download_url='https://github.com/python-bonobo/bonobo/tarball/{version}',
author='Romain Dorgueil',
author_email='romain@dorgueil.net',
name="bonobo",
python_requires=">=3.5",
description="Bonobo, a simple, modern and atomic extract-transform-load toolkit for python 3.5+.",
license="Apache License, Version 2.0",
url="https://www.bonobo-project.org/",
download_url="https://github.com/python-bonobo/bonobo/tarball/{version}",
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',
]
),
"share/jupyter/nbextensions/bonobo-jupyter",
[
"bonobo/contrib/jupyter/static/extension.js",
"bonobo/contrib/jupyter/static/index.js",
"bonobo/contrib/jupyter/static/index.js.map",
],
)
],
entry_points={
'console_scripts': [
'bonobo = bonobo.commands:entrypoint',
"console_scripts": ["bonobo = bonobo.commands:entrypoint"],
"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',
],
}
},
)

python.add_requirements(
'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',
dev=[
'cookiecutter >=1.5,<1.6',
'pytest-timeout >=1,<2',
'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',
],
"cached-property ~=1.5",
"fs ~=2.4",
"graphviz >=0.11,<0.12",
"jinja2 ~=2.10",
"mondrian ~=0.8",
"packaging ~=19.0",
"psutil ~=5.6",
"python-slugify ~=1.2.0",
"requests ~=2.0",
"stevedore ~=1.30",
"whistle ~=1.0",
dev=["cookiecutter >=1.6,<1.7", "sphinx-sitemap ~=1.0"],
docker=["bonobo-docker ~=0.6"],
jupyter=["ipywidgets ~=6.0", "jupyter ~=1.0"],
sqlalchemy=["bonobo-sqlalchemy ~=0.6"],
)


@listen(make.on_generate)
def on_make_generate(event):
makefile = event.makefile

# Sphinx
makefile['SPHINX_AUTOBUILD'] = '$(PYTHON_DIRNAME)/sphinx-autobuild'
makefile.add_target(
'watch-$(SPHINX_SOURCEDIR)',
'$(SPHINX_AUTOBUILD) $(SPHINX_SOURCEDIR) $(shell mktemp -d)',
phony=True
)

# Formating
# Sphinx
makefile["SPHINX_AUTOBUILD"] = "$(PYTHON_DIRNAME)/sphinx-autobuild"
makefile.add_target(
'format',
'''
black -l 120 .
isort -rc -o mondrian -o whistle -y .
''',
phony=True,
doc='Reformats the whole codebase using our standards (requires black and isort).'
"watch-$(SPHINX_SOURCEDIR)", "$(SPHINX_AUTOBUILD) $(SPHINX_SOURCEDIR) $(shell mktemp -d)", phony=True
)





# vim: ft=python:
1 change: 1 addition & 0 deletions bonobo/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from bonobo.util.envelopes import UnchangedEnvelope

BEGIN = Token("Begin")
ERROR = Token("Error")
END = Token("End")

NOT_MODIFIED = UnchangedEnvelope()
Expand Down
Loading