Removes cookiecutter.

This commit is contained in:
Romain Dorgueil
2017-11-01 13:19:24 +01:00
parent 69bb3cb091
commit e6596cf3f3
6 changed files with 24 additions and 30 deletions

View File

@ -4,6 +4,9 @@ Changelog
Unreleased Unreleased
:::::::::: ::::::::::
* Cookiecutter usage is removed. Linked to the fact that bonobo now use either a single file (up to you to get python
imports working as you want) or a regular fully fledged python package, we do not need it anymore.
New features New features
------------ ------------

View File

@ -4,8 +4,6 @@ Jupyter Extension
There is a builtin plugin that integrates (somewhat minimallistically, for now) bonobo within jupyter notebooks, so There is a builtin plugin that integrates (somewhat minimallistically, for now) bonobo within jupyter notebooks, so
you can read the execution status of a graph within a nice (ok, not so nice) html/javascript widget. you can read the execution status of a graph within a nice (ok, not so nice) html/javascript widget.
See https://github.com/jupyter-widgets/widget-cookiecutter for the base template used.
Installation Installation
:::::::::::: ::::::::::::

View File

@ -5,16 +5,18 @@ Installation
Create an ETL project Create an ETL project
::::::::::::::::::::: :::::::::::::::::::::
Creating a project and starting to write code should take less than a minute: Let's create a job.
.. code-block:: shell-session .. code-block:: shell-session
$ pip install --upgrade bonobo cookiecutter $ pip install --upgrade bonobo
$ bonobo init my-etl-project $ bonobo create my-etl.py
$ bonobo run my-etl-project $ python my-etl.py
Once you bootstrapped a project, you can start editing the default example transformation by editing This job only uses one python file, and you can run it using the python interpreter. For bigger jobs or jobs that
`my-etl-project/main.py`. Now, you can head to :doc:`tutorial/index`. relates to multiple files, you should create a python package.
Now, you can head to :doc:`tutorial/index`.
Other installation options Other installation options

View File

@ -16,16 +16,6 @@ Syntax: `bonobo convert [-r reader] input_filename [-w writer] output_filename`
to read from csv and write to csv too (or other format) but adding a geocoder filter that would add some fields. to read from csv and write to csv too (or other format) but adding a geocoder filter that would add some fields.
Bonobo Init
:::::::::::
Create an empty project, ready to use bonobo.
Syntax: `bonobo init`
Requires `cookiecutter`.
Bonobo Inspect Bonobo Inspect
:::::::::::::: ::::::::::::::

View File

@ -1,8 +1,7 @@
Let's get started! Let's get started!
================== ==================
To begin with Bonobo, you need to install it in a working python 3.5+ environment, and you'll also need cookiecutter To get started with Bonobo, you need to install it in a working python 3.5+ environment:
to bootstrap your project.
.. code-block:: shell-session .. code-block:: shell-session
@ -14,21 +13,24 @@ See :doc:`/install` for more options.
Create an empty project Create an empty project
::::::::::::::::::::::: :::::::::::::::::::::::
Your ETL code will live in ETL projects, which are basically a bunch of files, including python code, that bonobo Your ETL code will live in standard python files and packages.
can run.
.. code-block:: shell-session .. code-block:: shell-session
$ bonobo init tutorial $ bonobo create tutorial.py
This will create a `tutorial` directory (`content description here <https://www.bonobo-project.org/with/cookiecutter>`_). This will create a simple example job in a `tutorial.py` file.
To run this project, use: Now, try to execute it:
.. code-block:: shell-session .. code-block:: shell-session
$ bonobo run tutorial $ python tutorial.py
Congratulations, you just ran your first ETL job!
.. todo:: XXX **CHANGES NEEDED BELOW THIS POINTS BEFORE 0.6** XXX
Write a first transformation Write a first transformation
:::::::::::::::::::::::::::: ::::::::::::::::::::::::::::
@ -131,9 +133,9 @@ Rewrite it using builtins
There is a much simpler way to describe an equivalent graph: There is a much simpler way to describe an equivalent graph:
.. literalinclude:: ../../bonobo/examples/tutorials/tut01e02.py .. literalinclude:: ../../bonobo/examples/tutorials/tut01e02.py
:language: python :language: python
The `extract()` generator has been replaced by a list, as Bonobo will interpret non-callable iterables as a no-input The `extract()` generator has been replaced by a list, as Bonobo will interpret non-callable iterables as a no-input
generator. generator.
This example is also available in :mod:`bonobo.examples.tutorials.tut01e02`, and you can also run it as a module: This example is also available in :mod:`bonobo.examples.tutorials.tut01e02`, and you can also run it as a module:

View File

@ -4,11 +4,10 @@ import os
import runpy import runpy
import sys import sys
from contextlib import redirect_stdout, redirect_stderr from contextlib import redirect_stdout, redirect_stderr
from unittest.mock import patch, Mock from unittest.mock import patch
import pkg_resources import pkg_resources
import pytest import pytest
from cookiecutter.exceptions import OutputDirExistsException
from bonobo import __main__, __version__, get_examples_path from bonobo import __main__, __version__, get_examples_path
from bonobo.commands import entrypoint from bonobo.commands import entrypoint