Commit Graph

97 Commits

Author SHA1 Message Date
3bc28aa0c2 Update requirements, fixes packaging version problem. 2019-05-16 11:53:50 +02:00
ca464ef6f7 Enforcing quote format with black in develop. 2018-08-11 16:15:26 +02:00
a140e6506e misc: migrate to mondrian 0.8, humanize cli commands 2018-08-11 15:29:53 +02:00
2eea3c6ad6 Merge branch 'master' into develop 2018-08-11 15:04:35 +02:00
adcb210c64 smell: move commands arg to nonlocal var 2018-08-11 07:16:12 +02:00
0b32b9751c smell: rename unused var 2018-08-11 06:56:42 +02:00
d1c9beae97 style: switching from yapf to isort/black 2018-08-11 06:34:37 +02:00
89dda0dca6 feat: new alternate syntax and switch to black + isort (yeah, maybe not the best time, but that is done). 2018-07-29 18:21:56 +01:00
12fb1cf5c0 misc: sorting imports. 2018-07-29 16:04:07 +01:00
21d013bdf3 feat: nicer errors, cleanup examples. 2018-07-29 15:59:44 +01:00
db54ff41ef Fix PrettyPrinter, output verbosity is now slightly more discreete. 2017-12-01 07:42:23 +01:00
686d1c81b3 Simple "examples" command that just show examples for now. 2017-11-28 21:57:08 +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
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
56c26ea26c Fix default logging level, adds options to default template. 2017-11-05 14:54:01 +01:00
0b969d31e0 Adds basic test for convert command. 2017-11-04 14:55:08 +01:00
6bd1130e34 [core] Refactoring to use an event dispatcher in the main thread.
Plugins now run in the main thread, instead of their own threads, and
the API changed to use an event dispatcher approach instead of a static
class interface.
2017-11-04 12:05:04 +01:00
fb86bc9507 [errors] Move error handling in transformations to use mondrian. 2017-11-02 00:08:09 +01:00
58923f4a84 [logging] Switching to mondrian, who got all our formating code. 2017-11-01 19:57:51 +01:00
7035cc01e0 Adds argument parser support in default template. 2017-11-01 19:52:34 +01:00
8e85fa04e2 Adds the ability to initialize a package from bonobo init. 2017-11-01 19:45:35 +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
b6c7d598dc [core] Simplification: as truthfully stated by Maik at Pycon.DE sprint «lets try not to turn python into javascript». 2017-10-30 08:28:18 +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
8351897e3a [core] Refactoring of commands to move towards a more pythonic way of running the jobs. Commands are now classes, and bonobo "graph" related commands now hooks into bonobo.run() calls so it will use what you actually put in your __main__ block. 2017-10-29 19:23:50 +01: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
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
7d9b547a53 Merge branch 'zimmermann/import' of github.com:userzimmermann/bonobo into develop 2017-10-28 14:16:08 +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
a94efeaafc commands.run: Enable relative imports in main.py
Do project's main.py loading with importlib instead of runpy and define
a __bonobo__ parent package for the user directory
2017-10-28 13:08:48 +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
9a54f7b4aa [core] Still refactoring the core behaviour of bags, starting to be much simpler. 2017-10-23 21:18:02 +02:00
df45251622 Check if target directory is empty instead of current directory and remove overwrite_if_exists argument 2017-10-22 23:05:58 +02:00
3c453f0be7 Code formating. 2017-10-22 18:05:39 +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
bad598a4d7 Cast env_dir to string before passing to load_dotenv as passing a PosixPath to load_dotenv raises an exception in 3.5. 2017-10-15 16:52:14 -04: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
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
f6d78ceeb5 Set cookiecutter overwrite_if_exists parameter to True if current directory is empty 2017-10-15 16:02:47 +02:00
dc59c88c3d [cli/util] fix requires to use the right stack frame, remove --print as "-" does the job 2017-10-13 17:25:42 +02:00
64875a05bd [cli] Adds a --filter option to "convert" command, allowing to use arbitrary filters to a command line conversion. Also adds --print and "-" output to pretty print to terminal instead of file output. 2017-10-13 17:21:25 +02:00
b1d7498054 [cli] convert, remove useless import. 2017-10-12 19:12:10 +02:00
2898902ebd [cli] adds ability to override reader/writer options from cli convert. 2017-10-12 19:01:35 +02:00
53f6cc055f Fixed bug involved in finding env when running module. 2017-10-11 21:49:39 -04:00
af15647ab4 Added tests for running file with combinations of multiple default env files, env files, and env vars. Also reorganized environment directory in examples. 2017-10-10 22:54:31 -04:00