New bag implementation improves a lot how bonobo works, even if this is highly backward incompatible (sorry, that's needed, and better sooner than later). * New implementation uses the same approach as python's namedtuple, by dynamically creating the python type's code. This has drawbacks, as it feels like not the right way, but also a lot of benefits that cannot be achieved using a regular approach, especially the constructor parameter order, hardcoded. * Memory usage is now much more efficient. The "keys" memory space will be used only once per "io type", being spent in the underlying type definition instead of in the actual instances. * Transformations now needs to use tuples as output, which will be bound to its "output type". The output type can be infered from the tuple length, or explicitely set by the user using either `context.set_output_type(...)` or `context.set_output_fields(...)` (to build a bag type from a list of field names). Jupyter/Graphviz integration is more tight, allowing to easily display graphs in a notebook, or displaying the live transformation status in an html table instead of a simple <div>. For now, context processors were hacked to stay working as before but the current API is not satisfactory, and should be replaced. This new big change being unreasonable without some time to work on it properly, it is postponed for next versions (0.7, 0.8, ...). Maybe the best idea is to have some kind of "local services", that would use the same dependency injection mechanism as the execution-wide services. Services are now passed by keywoerd arguments only, to avoid confusion with data-arguments.
67 lines
2.1 KiB
ReStructuredText
67 lines
2.1 KiB
ReStructuredText
Problems
|
|
========
|
|
|
|
Failed to display Jupyter Widget of type BonoboWidget.
|
|
If you're reading this message in Jupyter Notebook or JupyterLab, it may mean that the widgets JavaScript is still loading. If this message persists, it likely means that the widgets JavaScript library is either not installed or not enabled. See the Jupyter Widgets Documentation for setup instructions.
|
|
If you're reading this message in another notebook frontend (for example, a static rendering on GitHub or NBViewer), it may mean that your frontend doesn't currently support widgets.
|
|
|
|
.. code-block:: shell-session
|
|
|
|
$ jupyter nbextension enable --py widgetsnbextension
|
|
$ jupyter nbextension install --py --symlink bonobo.contrib.jupyter
|
|
$ jupyter nbextension enable --py bonobo.contrib.jupyter
|
|
|
|
|
|
Todo
|
|
====
|
|
|
|
* Pretty printer
|
|
|
|
|
|
Options for Bags
|
|
================
|
|
|
|
tuple only
|
|
|
|
pros : simple
|
|
cons :
|
|
- how to name columns / store headers ?
|
|
- how to return a dictionary
|
|
|
|
|
|
|
|
yield keys('foo', 'bar', 'baz')
|
|
|
|
|
|
yield 'a', 'b', 'c'
|
|
|
|
|
|
CHANGELOG
|
|
=========
|
|
|
|
* Bags changed to something way closer to namedtuples.
|
|
* Better at managing memory
|
|
* Less flexible for kwargs usage, but much more standard and portable from one to another version of python
|
|
* More future proof for different execution strategies
|
|
* May lead to changes in your current transformation
|
|
|
|
* A given transformation now have an input and a output "type" which is either manually set by the user or
|
|
detected from the first item sent through a queue. It is a restiction on how bonobo can be used, but
|
|
will help having better predicatability.
|
|
|
|
* No more "graph" instance detection. This was misleading for new users, and not really pythonic. The
|
|
recommended way to start with bonobo is just to use one python file with a __main__ block, and if the
|
|
project grows, include this file in a package, either new or existing one. The init cli changed to
|
|
help you generate files or packages. That also means that we do not generate things with cookiecutter
|
|
anymore.
|
|
|
|
* Jupyter enhancements
|
|
|
|
* Graphviz support
|
|
|
|
* New nodes in stdlib
|
|
|
|
* Registry, used for conversions but also for your own integrations.
|
|
|
|
|