Commit Graph

12 Commits

Author SHA1 Message Date
02eeaff883 Fix #249: Quoting format is integer, not string. 2018-02-03 17:11:23 +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
c87775f090 Core: refactoring contexts with more logical responsibilities, stopping to rely on kargs ordering for compat with python3.5 2017-11-12 16:36:11 +01: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
32e222787d release: 0.5.0 2017-10-05 19:16:03 +02:00
b2f93b2416 [config/dx] bundle a default fs (and http?) service if none is provided (#179) 2017-10-05 07:17:16 +02:00
4a2c7280d6 [misc] Fixes formatting. 2017-07-05 13:09:46 +02:00
6ef25deac9 [config] Adds test for requires() decorator. 2017-07-05 12:01:37 +02:00
5062221e78 [config] Refactoring of configurables, allowing partially configured objects.
Configurables did not allow more than one "method" option, and mixed
scenarios (options+methods+...) were sometimes flaky, forcing the user
to know what order was the right one. Now, all options work the same,
sharing the same "order" namespace.

Backward incompatible change: Options are now required by default,
unless a default is provided.

Also adds a few candies for debugging/testing, found in the
bonobo.util.inspect module.
2017-07-05 11:15:03 +02:00
71c47a762b [config] Implements "Exclusive" context processor allowing to ask for an exclusive usage of a service while in a transformation. 2017-05-25 11:14:49 +02:00