Commit Graph

11 Commits

Author SHA1 Message Date
a8ff1b4df1 [tests] adding a spec to magicmock of nodes to avoid it being seen as partially configured nodes 2017-12-02 14:51:33 +01:00
d8c0dfe11a Inheritance of bags and better jupyter output for pretty printer. 2017-11-28 21:58:01 +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
0b969d31e0 Adds basic test for convert command. 2017-11-04 14:55:08 +01:00
25e919ab96 [tests] adds node context lifecycle test.( 2017-11-04 13:36:54 +01:00
83fc1743fc Small changes in events, and associated tests. 2017-11-04 13:20:53 +01:00
28884231b3 [core] Moves bonobo.execution context related package to new bonobo.execution.contexts package, also moves bonobo.strategies to new bonobo.execution.strategies package, so everything related to execution is now contained under the bonobo.execution package. 2017-11-04 13:13:47 +01:00
3c453f0be7 Code formating. 2017-10-22 18:05:39 +02:00
28fe41c0bd [core] Testing and fixing new args/kwargs behaviour. 2017-10-22 18:00:16 +02:00
bc01b5d404 [core] simplification of result interpretation. 2017-10-22 17:37:49 +02:00
92cc400fe7 [core] Refactoring IOFormats so there is one and only obvious way to send it.
This is the commit where I admit that having more than one input/output
format for readers and writers was complicating the code too much for a
very small gain, and that it would be easier to only have one way to do
it.

So such way is now:

- Returning (or yielding) a dict if you have key-value type collections.
- Returning (or yielding) a tuple if you have a list-type collection.
- Returning (or yielding) something else otherwise, which will continue
  to work like the old "arg0" format.

IOFORMAT options has been removed in favour of a RemovedOption, which
will complain if you're still trying to set it to anything else than the
one value allowed.
2017-10-15 21:37:22 +02:00