The recipes are currently both hosted in a single Git repository, the master branch being
anybox.recipe.openerp is to be found in
a.r.openerp-x.y branches (currently only 1.9 and the legacy
1.8). This unusual structure because they still have most in common,
a.r.openerp without the bits for backward compatibility
before Odoo v8.
We follow the standard GitHub workflow (issues, pull requests…). Code contributors are systematically added to the list of contributors at the end of the README, unless they explicitely wish not to (what GitHub does is obviously out of our scope).
Members of the “Anybox” organization have push privileges on this repository.
To use a local version of the recipe, you may use the
general buildout option:
[buildout] develop = /path/to/anybox.recipe.o
To track a Git branch, we find the
extension simple and useful. Here’s an example for
anybox.recipe.openerp (notice the
@ notation for the branch):
[buildout] extensions = gp.vcsdevelop vcs-extend-develop = git+https://email@example.com#egg=a.r.openerp vcs-update = True
gp.vcsdevelop leverages internally pip, and the
git+https syntax actually comes from pip.
Actually some parts of the recipe are aware of the possible use
gp.vcsdevelop for python dependencies, and special care of it is
taken in the freeze and extract features. This is known to work even
We recommend “developing” the source code in a virtualenv, together
bzr. For instance:
virtualenv recipe-env recipe-env/bin/pip install bzr git clone https://github.com/anybox/anybox.recipe.odoo cd anybox.recipe.odoo python setup.py develop
The recipe follows the same strong code development coding principles as many other projects:
flake8 and, optionally,
recipe-env/bin/pip install nose coverage flake8==2.0 \ pep8==1.4.6 mccabe==0.2.1 pyflakes==0.7.3
we’ve had problems lately with discrepancies in
versions, that’s why versions of
flake8 and its
dependencies are fixed above. In case of doubt, check what
the buildbot is actually running.
flake8 and the tests (in this example, after virtualenv activation):
cd anybox.recipe.odoo flake8 anybox && nosetests anybox --with-doctest
There is also this convenience to run the tests and output a coverage report:
There is a special category of tests: those that need a real Odoo/OpenERP instance, built with the recipe, to run.
They are located within the
tests_with_openerp subdirectory and
need to be launched with a launcher script constructed by the recipe.
For example, create a testing buildout like this:
[openerp] # version as you wish eggs = nose openerp_scripts nosetests command-line-options = -d
bin/buildout, create a database and initialize it. From
the buildout directory:
createdb test-recipe bin/start_openerp -d test-recipe -i base --stop-after-init
You can then run the tests:
bin/nosetests_openerp -d test-recipe -- /path/to/recipe/branch/tests_with_openerp
Currently, these tests are all about the
Session objects, used in
you may use a different version of the recipe to build that testing buildout. This is anyway what happens if you build with your development version, and hack some changes afterwards.
Using a very different version of the recipe could give funky results, but you’re supposed to know what you’re doing at this point.
Upon each push on the main branches, Anybox’ public buildbot awakes to check the coding style, run the tests and build this documentation. You may check the status there:
Furthermore, this buildbot instance runs anybox.buildbot.openerp, a buildbot configurator for OpenERP installations based on the recipe.
This is used in turn to run high-level integration tests, having the latest bzr version of the recipe actually install several combinations of OpenObject server and addons, and run their unit tests.
The configuration is stored in the
buildbot subdirectory of the
master branch. It is made of a high level configuration file
MANIFEST.cfg) and buildout configuration files. This buildbot
instance actually aggregates several such configurations.
The corresponding builders are those whose name starts with
recipe- in the builders list.
the integration tests mentioned above are executed in
particular during this process, currently in the
Some builds may appear to be broken because of tests failures been pushed by upstream in OpenERP itself or in the tested addons, but it’s easy to check whether this is due to a recipe failure or not.
Anybox hardware resources are limited; contributing buildslaves would be greatly appreciated.