wip: version bumps & formating.
This commit is contained in:
7
Makefile
7
Makefile
@ -1,7 +1,8 @@
|
|||||||
# Generated by Medikit 0.6.3 on 2018-08-11.
|
# Generated by Medikit 0.7.1 on 2019-05-08.
|
||||||
# All changes will be overriden.
|
# All changes will be overriden.
|
||||||
# Edit Projectfile and run “make update” (or “medikit update”) to regenerate.
|
# Edit Projectfile and run “make update” (or “medikit update”) to regenerate.
|
||||||
|
|
||||||
|
|
||||||
PACKAGE ?= bonobo
|
PACKAGE ?= bonobo
|
||||||
PYTHON ?= $(shell which python || echo python)
|
PYTHON ?= $(shell which python || echo python)
|
||||||
PYTHON_BASENAME ?= $(shell basename $(PYTHON))
|
PYTHON_BASENAME ?= $(shell basename $(PYTHON))
|
||||||
@ -29,7 +30,7 @@ SPHINX_BUILDDIR ?= $(SPHINX_SOURCEDIR)/_build
|
|||||||
SPHINX_AUTOBUILD ?= $(PYTHON_DIRNAME)/sphinx-autobuild
|
SPHINX_AUTOBUILD ?= $(PYTHON_DIRNAME)/sphinx-autobuild
|
||||||
MEDIKIT ?= $(PYTHON) -m medikit
|
MEDIKIT ?= $(PYTHON) -m medikit
|
||||||
MEDIKIT_UPDATE_OPTIONS ?=
|
MEDIKIT_UPDATE_OPTIONS ?=
|
||||||
MEDIKIT_VERSION ?= 0.6.3
|
MEDIKIT_VERSION ?= 0.7.1
|
||||||
|
|
||||||
.PHONY: $(SPHINX_SOURCEDIR) clean format help install install-dev install-docker install-jupyter install-sqlalchemy medikit quick test update update-requirements watch-$(SPHINX_SOURCEDIR)
|
.PHONY: $(SPHINX_SOURCEDIR) clean format help install install-dev install-docker install-jupyter install-sqlalchemy medikit quick test update update-requirements watch-$(SPHINX_SOURCEDIR)
|
||||||
|
|
||||||
@ -135,5 +136,5 @@ update-requirements: ## Update project artifacts using medikit, including requ
|
|||||||
help: ## Shows available commands.
|
help: ## Shows available commands.
|
||||||
@echo "Available commands:"
|
@echo "Available commands:"
|
||||||
@echo
|
@echo
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?##[\s]?.*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?##"}; {printf " make \033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z_-]+:.*?##[\s]?.*$$' --no-filename $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?##"}; {printf " make \033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
@echo
|
@echo
|
||||||
|
|||||||
@ -330,6 +330,7 @@ def MapFields(function, key=True):
|
|||||||
:param key: bool or callable
|
:param key: bool or callable
|
||||||
:return: callable
|
:return: callable
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@use_raw_input
|
@use_raw_input
|
||||||
def _MapFields(bag):
|
def _MapFields(bag):
|
||||||
try:
|
try:
|
||||||
@ -342,12 +343,10 @@ def MapFields(function, key=True):
|
|||||||
fields = bag._fields
|
fields = bag._fields
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
raise UnrecoverableAttributeError(
|
raise UnrecoverableAttributeError(
|
||||||
'This transformation works only on objects with named'
|
"This transformation works only on objects with named" " fields (namedtuple, BagType, ...)."
|
||||||
' fields (namedtuple, BagType, ...).') from e
|
) from e
|
||||||
|
|
||||||
return factory(
|
return factory(function(value) if key(key_) else value for key_, value in zip(fields, bag))
|
||||||
function(value) if key(key_) else value for key_, value in zip(fields, bag)
|
|
||||||
)
|
|
||||||
elif key:
|
elif key:
|
||||||
return factory(function(value) for value in bag)
|
return factory(function(value) for value in bag)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -1,40 +1,41 @@
|
|||||||
-e .[dev]
|
-e .[dev]
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
alabaster==0.7.11
|
alabaster==0.7.12
|
||||||
arrow==0.12.1
|
arrow==0.13.1
|
||||||
atomicwrites==1.1.5
|
atomicwrites==1.3.0
|
||||||
attrs==18.1.0
|
attrs==19.1.0
|
||||||
babel==2.6.0
|
babel==2.6.0
|
||||||
binaryornot==0.4.4
|
binaryornot==0.4.4
|
||||||
certifi==2018.4.16
|
certifi==2019.3.9
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
click==6.7
|
click==7.0
|
||||||
cookiecutter==1.5.1
|
cookiecutter==1.5.1
|
||||||
coverage==4.5.1
|
coverage==4.5.3
|
||||||
docutils==0.14
|
docutils==0.14
|
||||||
future==0.16.0
|
future==0.17.1
|
||||||
idna==2.7
|
idna==2.8
|
||||||
imagesize==1.0.0
|
imagesize==1.1.0
|
||||||
jinja2-time==0.2.0
|
jinja2-time==0.2.0
|
||||||
jinja2==2.10
|
jinja2==2.10.1
|
||||||
markupsafe==1.0
|
markupsafe==1.1.1
|
||||||
more-itertools==4.3.0
|
more-itertools==7.0.0
|
||||||
packaging==17.1
|
packaging==19.0
|
||||||
pluggy==0.7.1
|
pathlib2==2.3.3
|
||||||
poyo==0.4.1
|
pluggy==0.11.0
|
||||||
py==1.5.4
|
poyo==0.4.2
|
||||||
pygments==2.2.0
|
py==1.8.0
|
||||||
pyparsing==2.2.0
|
pygments==2.3.1
|
||||||
pytest-cov==2.5.1
|
pyparsing==2.4.0
|
||||||
pytest-timeout==1.3.1
|
pytest-cov==2.7.1
|
||||||
pytest==3.7.1
|
pytest-timeout==1.3.3
|
||||||
python-dateutil==2.7.3
|
pytest==3.10.1
|
||||||
pytz==2018.5
|
python-dateutil==2.8.0
|
||||||
requests==2.19.1
|
pytz==2019.1
|
||||||
six==1.11.0
|
requests==2.21.0
|
||||||
|
six==1.12.0
|
||||||
snowballstemmer==1.2.1
|
snowballstemmer==1.2.1
|
||||||
sphinx-sitemap==0.2
|
sphinx-sitemap==0.2
|
||||||
sphinx==1.7.6
|
sphinx==1.8.5
|
||||||
sphinxcontrib-websupport==1.1.0
|
sphinxcontrib-websupport==1.1.0
|
||||||
urllib3==1.23
|
urllib3==1.24.3
|
||||||
whichcraft==0.4.1
|
whichcraft==0.5.2
|
||||||
|
|||||||
@ -2,28 +2,30 @@
|
|||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
appdirs==1.4.3
|
appdirs==1.4.3
|
||||||
bonobo-docker==0.6.0
|
bonobo-docker==0.6.0
|
||||||
certifi==2018.4.16
|
cached-property==1.5.1
|
||||||
|
certifi==2019.3.9
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
colorama==0.3.9
|
colorama==0.3.9
|
||||||
docker-pycreds==0.3.0
|
docker-pycreds==0.4.0
|
||||||
docker==2.7.0
|
docker==2.7.0
|
||||||
fs==2.0.27
|
fs==2.4.5
|
||||||
graphviz==0.8.4
|
graphviz==0.8.4
|
||||||
idna==2.7
|
idna==2.8
|
||||||
jinja2==2.10
|
jinja2==2.10.1
|
||||||
markupsafe==1.0
|
markupsafe==1.1.1
|
||||||
mondrian==0.8.0
|
mondrian==0.8.0
|
||||||
packaging==17.1
|
packaging==17.1
|
||||||
pbr==4.2.0
|
pbr==5.2.0
|
||||||
psutil==5.4.6
|
psutil==5.6.2
|
||||||
pyparsing==2.2.0
|
pyparsing==2.4.0
|
||||||
python-slugify==1.2.5
|
python-slugify==1.2.6
|
||||||
pytz==2018.5
|
pytz==2019.1
|
||||||
requests==2.19.1
|
requests==2.21.0
|
||||||
semantic-version==2.6.0
|
semantic-version==2.6.0
|
||||||
six==1.11.0
|
six==1.12.0
|
||||||
stevedore==1.29.0
|
stevedore==1.30.1
|
||||||
unidecode==1.0.22
|
typing==3.6.6
|
||||||
urllib3==1.23
|
unidecode==1.0.23
|
||||||
websocket-client==0.48.0
|
urllib3==1.24.3
|
||||||
|
websocket-client==0.56.0
|
||||||
whistle==1.0.1
|
whistle==1.0.1
|
||||||
|
|||||||
@ -1,44 +1,45 @@
|
|||||||
-e .[jupyter]
|
-e .[jupyter]
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
appnope==0.1.0
|
appnope==0.1.0
|
||||||
|
attrs==19.1.0
|
||||||
backcall==0.1.0
|
backcall==0.1.0
|
||||||
bleach==2.1.3
|
bleach==3.1.0
|
||||||
decorator==4.3.0
|
decorator==4.4.0
|
||||||
entrypoints==0.2.3
|
defusedxml==0.6.0
|
||||||
html5lib==1.0.1
|
entrypoints==0.3
|
||||||
ipykernel==4.8.2
|
ipykernel==5.1.0
|
||||||
ipython-genutils==0.2.0
|
ipython-genutils==0.2.0
|
||||||
ipython==6.5.0
|
ipython==7.5.0
|
||||||
ipywidgets==6.0.1
|
ipywidgets==6.0.1
|
||||||
jedi==0.12.1
|
jedi==0.13.3
|
||||||
jinja2==2.10
|
jinja2==2.10.1
|
||||||
jsonschema==2.6.0
|
jsonschema==3.0.1
|
||||||
jupyter-client==5.2.3
|
jupyter-client==5.2.4
|
||||||
jupyter-console==5.2.0
|
jupyter-console==6.0.0
|
||||||
jupyter-core==4.4.0
|
jupyter-core==4.4.0
|
||||||
jupyter==1.0.0
|
jupyter==1.0.0
|
||||||
markupsafe==1.0
|
markupsafe==1.1.1
|
||||||
mistune==0.8.3
|
mistune==0.8.4
|
||||||
nbconvert==5.3.1
|
nbconvert==5.5.0
|
||||||
nbformat==4.4.0
|
nbformat==4.4.0
|
||||||
notebook==5.6.0
|
notebook==5.7.8
|
||||||
pandocfilters==1.4.2
|
pandocfilters==1.4.2
|
||||||
parso==0.3.1
|
parso==0.4.0
|
||||||
pexpect==4.6.0
|
pexpect==4.7.0
|
||||||
pickleshare==0.7.4
|
pickleshare==0.7.5
|
||||||
prometheus-client==0.3.1
|
prometheus-client==0.6.0
|
||||||
prompt-toolkit==1.0.15
|
prompt-toolkit==2.0.9
|
||||||
ptyprocess==0.6.0
|
ptyprocess==0.6.0
|
||||||
pygments==2.2.0
|
pygments==2.3.1
|
||||||
python-dateutil==2.7.3
|
pyrsistent==0.15.1
|
||||||
pyzmq==17.1.2
|
python-dateutil==2.8.0
|
||||||
qtconsole==4.3.1
|
pyzmq==18.0.1
|
||||||
|
qtconsole==4.4.4
|
||||||
send2trash==1.5.0
|
send2trash==1.5.0
|
||||||
simplegeneric==0.8.1
|
six==1.12.0
|
||||||
six==1.11.0
|
terminado==0.8.2
|
||||||
terminado==0.8.1
|
testpath==0.4.2
|
||||||
testpath==0.3.1
|
tornado==6.0.2
|
||||||
tornado==5.1
|
|
||||||
traitlets==4.3.2
|
traitlets==4.3.2
|
||||||
wcwidth==0.1.7
|
wcwidth==0.1.7
|
||||||
webencodings==0.5.1
|
webencodings==0.5.1
|
||||||
|
|||||||
@ -2,25 +2,27 @@
|
|||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
appdirs==1.4.3
|
appdirs==1.4.3
|
||||||
bonobo-sqlalchemy==0.6.0
|
bonobo-sqlalchemy==0.6.0
|
||||||
certifi==2018.4.16
|
cached-property==1.5.1
|
||||||
|
certifi==2019.3.9
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
colorama==0.3.9
|
colorama==0.3.9
|
||||||
fs==2.0.27
|
fs==2.4.5
|
||||||
graphviz==0.8.4
|
graphviz==0.8.4
|
||||||
idna==2.7
|
idna==2.8
|
||||||
jinja2==2.10
|
jinja2==2.10.1
|
||||||
markupsafe==1.0
|
markupsafe==1.1.1
|
||||||
mondrian==0.8.0
|
mondrian==0.8.0
|
||||||
packaging==17.1
|
packaging==17.1
|
||||||
pbr==4.2.0
|
pbr==5.2.0
|
||||||
psutil==5.4.6
|
psutil==5.6.2
|
||||||
pyparsing==2.2.0
|
pyparsing==2.4.0
|
||||||
python-slugify==1.2.5
|
python-slugify==1.2.6
|
||||||
pytz==2018.5
|
pytz==2019.1
|
||||||
requests==2.19.1
|
requests==2.21.0
|
||||||
six==1.11.0
|
six==1.12.0
|
||||||
sqlalchemy==1.2.10
|
sqlalchemy==1.3.3
|
||||||
stevedore==1.29.0
|
stevedore==1.30.1
|
||||||
unidecode==1.0.22
|
typing==3.6.6
|
||||||
urllib3==1.23
|
unidecode==1.0.23
|
||||||
|
urllib3==1.24.3
|
||||||
whistle==1.0.1
|
whistle==1.0.1
|
||||||
|
|||||||
@ -1,24 +1,25 @@
|
|||||||
-e .
|
-e .
|
||||||
appdirs==1.4.3
|
appdirs==1.4.3
|
||||||
cached-property==1.4.3
|
cached-property==1.5.1
|
||||||
certifi==2018.4.16
|
certifi==2019.3.9
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
colorama==0.3.9
|
colorama==0.3.9
|
||||||
fs==2.0.27
|
fs==2.4.5
|
||||||
graphviz==0.8.4
|
graphviz==0.8.4
|
||||||
idna==2.7
|
idna==2.8
|
||||||
jinja2==2.10
|
jinja2==2.10.1
|
||||||
markupsafe==1.0
|
markupsafe==1.1.1
|
||||||
mondrian==0.8.0
|
mondrian==0.8.0
|
||||||
packaging==17.1
|
packaging==17.1
|
||||||
pbr==4.2.0
|
pbr==5.2.0
|
||||||
psutil==5.4.6
|
psutil==5.6.2
|
||||||
pyparsing==2.2.0
|
pyparsing==2.4.0
|
||||||
python-slugify==1.2.5
|
python-slugify==1.2.6
|
||||||
pytz==2018.5
|
pytz==2019.1
|
||||||
requests==2.19.1
|
requests==2.21.0
|
||||||
six==1.11.0
|
six==1.12.0
|
||||||
stevedore==1.29.0
|
stevedore==1.30.1
|
||||||
unidecode==1.0.22
|
typing==3.6.6
|
||||||
urllib3==1.23
|
unidecode==1.0.23
|
||||||
|
urllib3==1.24.3
|
||||||
whistle==1.0.1
|
whistle==1.0.1
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -1,4 +1,4 @@
|
|||||||
# Generated by Medikit 0.6.3 on 2018-08-11.
|
# Generated by Medikit 0.7.1 on 2019-05-08.
|
||||||
# All changes will be overriden.
|
# All changes will be overriden.
|
||||||
# Edit Projectfile and run “make update” (or “medikit update”) to regenerate.
|
# Edit Projectfile and run “make update” (or “medikit update”) to regenerate.
|
||||||
|
|
||||||
|
|||||||
@ -117,4 +117,4 @@ class CsvWriterTest(Csv, WriterTest, TestCase):
|
|||||||
context.write_sync(EMPTY, EMPTY, EMPTY)
|
context.write_sync(EMPTY, EMPTY, EMPTY)
|
||||||
context.stop()
|
context.stop()
|
||||||
|
|
||||||
assert self.readlines() == ('', '', '')
|
assert self.readlines() == ("", "", "")
|
||||||
|
|||||||
@ -119,23 +119,26 @@ def test_methodcaller():
|
|||||||
MyBag = BagType("MyBag", ["a", "b", "c"])
|
MyBag = BagType("MyBag", ["a", "b", "c"])
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("input_, key, expected", [
|
@pytest.mark.parametrize(
|
||||||
|
"input_, key, expected",
|
||||||
|
[
|
||||||
(MyBag(1, 2, 3), True, MyBag(1, 4, 9)),
|
(MyBag(1, 2, 3), True, MyBag(1, 4, 9)),
|
||||||
(MyBag(1, 2, 3), False, MyBag(1, 2, 3)),
|
(MyBag(1, 2, 3), False, MyBag(1, 2, 3)),
|
||||||
(MyBag(1, 2, 3), lambda x: x == 'c', MyBag(1, 2, 9)),
|
(MyBag(1, 2, 3), lambda x: x == "c", MyBag(1, 2, 9)),
|
||||||
((1, 2, 3), True, (1, 4, 9)),
|
((1, 2, 3), True, (1, 4, 9)),
|
||||||
((1, 2, 3), False, (1, 2, 3)),
|
((1, 2, 3), False, (1, 2, 3)),
|
||||||
])
|
],
|
||||||
|
)
|
||||||
def test_map_fields(input_, key, expected):
|
def test_map_fields(input_, key, expected):
|
||||||
with BufferingNodeExecutionContext(bonobo.MapFields(lambda x: x**2, key)) as context:
|
with BufferingNodeExecutionContext(bonobo.MapFields(lambda x: x ** 2, key)) as context:
|
||||||
context.write_sync(input_)
|
context.write_sync(input_)
|
||||||
assert context.status == '-'
|
assert context.status == "-"
|
||||||
[got] = context.get_buffer()
|
[got] = context.get_buffer()
|
||||||
assert expected == got
|
assert expected == got
|
||||||
|
|
||||||
|
|
||||||
def test_map_fields_error():
|
def test_map_fields_error():
|
||||||
with BufferingNodeExecutionContext(bonobo.MapFields(lambda x: x**2, lambda x: x == 'c')) as context:
|
with BufferingNodeExecutionContext(bonobo.MapFields(lambda x: x ** 2, lambda x: x == "c")) as context:
|
||||||
context.write_sync(tuple())
|
context.write_sync(tuple())
|
||||||
assert context.status == '!'
|
assert context.status == "!"
|
||||||
assert context.defunct
|
assert context.defunct
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from bonobo.util import ensure_tuple, sortedlist
|
from bonobo.util import ensure_tuple, sortedlist
|
||||||
from bonobo.util.collections import cast, tuplize, tuple_or_const
|
from bonobo.util.collections import cast, tuple_or_const, tuplize
|
||||||
|
|
||||||
|
|
||||||
def test_sortedlist():
|
def test_sortedlist():
|
||||||
@ -15,10 +15,11 @@ def test_sortedlist():
|
|||||||
|
|
||||||
def test_tuple_or_const():
|
def test_tuple_or_const():
|
||||||
assert tuple_or_const(()) == ()
|
assert tuple_or_const(()) == ()
|
||||||
assert tuple_or_const((1, )) == (1, )
|
assert tuple_or_const((1,)) == (1,)
|
||||||
assert tuple_or_const((1, 2, )) == (1, 2, )
|
assert tuple_or_const((1, 2)) == (1, 2)
|
||||||
assert tuple_or_const([1, 2, ]) == (1, 2, )
|
assert tuple_or_const([1, 2]) == (1, 2)
|
||||||
assert tuple_or_const("aaa") == ('aaa', )
|
assert tuple_or_const("aaa") == ("aaa",)
|
||||||
|
|
||||||
|
|
||||||
def test_ensure_tuple():
|
def test_ensure_tuple():
|
||||||
assert ensure_tuple("a") == ("a",)
|
assert ensure_tuple("a") == ("a",)
|
||||||
|
|||||||
Reference in New Issue
Block a user