Commit Graph

18 Commits

Author SHA1 Message Date
464d08a4a2 Generalize tuplize decorator to cast(...) decorator. 2017-12-27 14:21:50 +01:00
5e0b6567cd Rewritting Bags from scratch using a namedtuple approach, along with other (less major) updates.
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.
2017-11-27 00:04:51 +01:00
40a745fe08 Module registry reimported as it is needed for "bonobo convert". 2017-11-01 12:46:03 +01:00
a79c17c3e9 [tests] bonobo.util.objects 2017-10-23 22:15:19 +02:00
9a54f7b4aa [core] Still refactoring the core behaviour of bags, starting to be much simpler. 2017-10-23 21:18:02 +02:00
7560412bc7 Merge branch 'develop' of github.com:python-bonobo/bonobo into develop 2017-10-21 12:56:06 +02:00
c7f39aa851 release: 0.5.1 2017-10-21 12:49:34 +02:00
fe4964b9c7 comparison to None|True|False should be 'if cond is None:' 2017-10-12 17:46:28 +02:00
1ba31191ee [qa] adds a rather stupid test to check valueholder works correctly. Still some operations missing. 2017-05-22 22:22:36 +02:00
4d9b579a60 Tuning ValueHolder as I could not find better option to generate the double-underscore methods. 2017-05-21 19:22:45 +02:00
2b3ef05fac Removes unused functions and test bag application to iterables. 2017-05-20 14:47:30 +02:00
4342035f12 Refactoring: dispatch "core" package modules into structs and utils, as it does not have a lot of sense anymore. 2017-05-20 13:11:37 +02:00
e747bc1da8 Topological sort of a graph, allowing better console (and other) outputs.
Uses algorithm borrowed from networkx graph library to sort a graph in
topological order. The method is only used by output plugins, as
internal plumbery does not really care about the node order.

Also includes a bonobo.util.python.require function that helps importing
thing in a package-less context, or when there are conflict with site
package names.
2017-05-19 13:28:31 +02:00
8f38237658 Code formating. 2017-05-01 15:57:03 +02:00
159389e323 adds valueholder tests and fixes. 2017-05-01 15:31:00 +02:00
8532520aae Big refactoring, way simpler management of transformations. Early branch for upcoming version 0.2. 2017-01-17 22:45:10 +01:00
b6e84c66e3 Implements configurables and options to create cleaner transformation classes, and ease documentation of available options. 2017-01-16 16:22:13 +01:00
90d3b6235b work in progress ... 2016-12-09 08:01:04 +01:00