Commit Graph

147 Commits

Author SHA1 Message Date
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
c2f17296f6 [stdlib] Adds Update(...) and FixedWindow(...) the the standard nodes provided with bonobo. 2017-11-12 10:06:15 +01:00
d1481fbfe8 Moves jupyter extension to both bonobo.contrib.jupyter (for the jupyter widget) and to bonobo.plugins (for the executor-side plugin). 2017-11-12 09:08:05 +01:00
eb393331cd Adds a "bare" template, containing the very minimum you want to have in 90% of cases. 2017-11-05 14:59:25 +01:00
674f9348e7 Skip failing order test for python 3.5 (temporary). 2017-11-05 14:45:30 +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
2c9729c4ca Remove the sleep() in tick() that causes a minimum execution time of 2*PERIOD, more explicit status display and a small test case for console plugin. 2017-11-04 13:01:43 +01:00
0b8168f7da [tests] Fix path usage for python 3.5 2017-11-04 12:29:46 +01:00
017bb4a9a6 Adds a test for default file init command. 2017-11-04 12:24:30 +01:00
9037d94654 Fix imports. 2017-11-02 07:25:38 +01:00
fb86bc9507 [errors] Move error handling in transformations to use mondrian. 2017-11-02 00:08:09 +01:00
23404d06dd Still cleaning up. 2017-11-01 19:02:48 +01:00
e06b616251 Refactoring the runner to go more towards standard python, also adds the ability to use bonobo argument parser from standard python execution. 2017-11-01 18:46:45 +01:00
e6596cf3f3 Removes cookiecutter. 2017-11-01 13:19:24 +01:00
40a745fe08 Module registry reimported as it is needed for "bonobo convert". 2017-11-01 12:46:03 +01:00
c770287466 [core] still refactoring env-related stuff towards using __main__ blocks (but with argparser, if needed). 2017-10-29 23:46:39 +01:00
cac6920040 Minor test change. 2017-10-29 12:13:52 +01:00
f9c809f626 [core] Change the token parsing part in prevision of different flags. 2017-10-29 12:10:02 +01:00
32e73316e1 Merge pull request #210 from mpenkov/streamjson
Support line-delimited JSON
2017-10-28 17:45:09 +02:00
10a82cce62 Support line-delimited JSON
New nodes for handling line-delimited JSON.

https://en.wikipedia.org/wiki/JSON_Streaming
2017-10-28 17:34:13 +02:00
ce0bd9ea37 Merge branch 'develop' of https://github.com/mpenkov/bonobo into mpenkov-develop 2017-10-28 17:27:04 +02:00
209c4f3176 Merge branch 'develop' of github.com:python-bonobo/bonobo into develop 2017-10-28 17:24:39 +02:00
efb31126b4 [tests] simplify assertion 2017-10-28 17:24:26 +02:00
3e7898a987 Issue #134: use requests.get as a context manager 2017-10-28 16:19:05 +02:00
eabc79c8ec Issue #134: use requests instead of urllib 2017-10-28 16:11:58 +02:00
9e86abca60 Issue #134: add a bonobo download url command
This enables users on different platforms to download the examples in
the tutorial using the same command.
2017-10-28 14:08:53 +02:00
cb97b18dca [tests] trying to speed up the init test. 2017-10-23 22:58:35 +02:00
a935c8fa92 Merge branch 'feature/bonobo-init-should-work-on-an-empty-existing-directory' of git://github.com/arimbr/bonobo into arimbr-feature/bonobo-init-should-work-on-an-empty-existing-directory 2017-10-23 22:45:39 +02:00
a79c17c3e9 [tests] bonobo.util.objects 2017-10-23 22:15:19 +02:00
dd28e08f0f [nodes] Removing draft quality factory from bonobo main package, will live in separate personnal package until it is good enough to live here. 2017-10-23 21:56:13 +02:00
ece764b95c [tests] rename factory test and move bag detecting so any bag is returned as is as an output. 2017-10-23 21:28:49 +02:00
9a54f7b4aa [core] Still refactoring the core behaviour of bags, starting to be much simpler. 2017-10-23 21:18:02 +02:00
4641425e4c Fix python 3.5 os.chdir not accepting LocalPath 2017-10-23 00:30:10 +02:00
7c0071bfdf Remove unused shutil import 2017-10-22 23:30:23 +02:00
9820fca2b4 Use pytest tmpdir fixture and add more init tests 2017-10-22 23:26:59 +02: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
80006ba24d [tests] fix uncaptured output in test_commands 2017-10-22 17:23:19 +02:00
7560412bc7 Merge branch 'develop' of github.com:python-bonobo/bonobo into develop 2017-10-21 12:56:06 +02:00
4f1eeacd45 Merge tag '0.5.1' into develop
0.5.1
2017-10-21 12:54:46 +02:00
c7f39aa851 release: 0.5.1 2017-10-21 12:49:34 +02:00
12e4250166 Merge pull request #195 from cw-andrews/feature/env_file
Feature/env file
2017-10-17 13:55:48 +02:00
b87f674eb2 Test tweak to work for Windows CI. 2017-10-15 19:55:37 -04:00
f1e9969a88 Add tests for bonobo init new directory and init within empty directory 2017-10-15 23:54:26 +02:00
cb7a18f20f Added more tests and moved all env and env file testing to classes (it might make more sense to just move them to separate files?). 2017-10-15 16:14:14 -04:00