<commit_before>.. index:: jinja2 - development, developer, developer guide, develop, contribute

.. _developer_guide:

LAVA developer guide
####################

.. _development_pre_requisites:

Pre-requisites to start with development
****************************************

LAVA is written in Python_, so you will need to know (or be willing to learn)
the language. Likewise, the web interface is a Django_ application so you will
need to use and debug Django if you need to modify the web interface. The
pipeline model uses YAML_ (so you'll need the `YAML Parser
<http://yaml-online-parser.appspot.com/?yaml=&type=json>`_) and Jinja2_. All
LAVA software is maintained in git_, as are many of the support scripts, test
definitions and job submissions. Some familiarity with Debian_ is going to be
useful, helper scripts are available when preparing packages based on your
modifications.

LAVA is complex and works to solve complex problems. This has implications
for how LAVA is developed, tested, deployed and used.

Other elements involved in LAVA development
===========================================

The Django backend used with LAVA is PostgreSQL_ and some
`postgres-specific support <http://www.postgresql.org/docs/9.5/static/rules-materializedviews.html>`_
is used. The LAVA UI has some use of Javascript_ and CSS_. LAVA also
uses ZMQ_ and XML-RPC_ and the LAVA documentation is written with RST_.

In addition, test jobs and device support can involve use of U-Boot_,
GuestFS_, ADB_, QEMU_, Grub_, SSH_ and a variety of other systems and tools to
access devices and debug test jobs.

.. _Python: http://www.python.org/
.. _Django: https://www.djangoproject.com/
.. _YAML: http://yaml.org/
.. _Jinja2: http://jinja.pocoo.org/docs/dev/
.. _git: http://www.git-scm.org/
.. _PostgreSQL: http://www.postgresql.org/
.. _Debian: https://www.debian.org/<commit_msg>Add a note on developer branches<commit_after>.. index:: jinja2 - development, developer, developer guide, develop, contribute

.. _developer_guide:

LAVA developer guide
####################

.. _development_pre_requisites:

Pre-requisites to start with development
****************************************

LAVA is written in Python_, so you will need to know (or be willing to learn)
the language. Likewise, the web interface is a Django_ application so you will
need to use and debug Django if you need to modify the web interface. The
pipeline model uses YAML_ (so you'll need the `YAML Parser
<http://yaml-online-parser.appspot.com/?yaml=&type=json>`_) and Jinja2_. All
LAVA software is maintained in git_, as are many of the support scripts, test
definitions and job submissions. Some familiarity with Debian_ is going to be
useful, helper scripts are available when preparing packages based on your
modifications.

LAVA is complex and works to solve complex problems. This has implications
for how LAVA is developed, tested, deployed and used.

.. index:: git branches, development branches

.. __lava_git_branches:

LAVA and git branches
=====================

Development occurs on the ``master`` branch, testing of each release happens on
the ``staging`` branch and releases are made from the ``release`` branch. Git
tags are also based on the ``release`` branch. All reviews need to be made
against the ``master`` branch.

.. note:: It is worth checking if someone already has a review which relates to
   your proposed changes. Check for open reviews on gerrit, e.g.
   ``https://review.linaro.org/#/q/status:open+lava-dispatcher``

Other elements involved in LAVA development
===========================================

The Django backend used with LAVA is PostgreSQL_ and some
`postgres-specific support <http://www.postgresql.org/docs/9.5/static/rules-materializedviews.html>`_
is used. The LAVA UI has some use of Javascript_ and CSS_. LAVA also
uses ZMQ_ and XML-RPC_ and the LAVA documentation is written with RST_.

In addition, test jobs and device support can involve use of U-Boot_,
GuestFS_, ADB_, QEMU_, Grub_, SSH_ and a variety of other systems and tools to
access devices and debug test jobs.

.. _Python: http://www.python.org/
.. _Django: https://www.djangoproject.com/
.. _YAML: http://yaml.org/
.. _Jinja2: http://jinja.pocoo.org/docs/dev/
.. _git: http://www.git-scm.org/
.. _PostgreSQL: http://www.postgresql.org/
.. _Debian: https://www.debian.org/
{'fraction_non_alphanumeric': 0.13292011019283748, 'fraction_numerical': 0.002295684113865932, 'mean_word_length': 4.459899749373434, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 5, 'lorem ipsum': 0, 'www.': 12, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7030703', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1195, 'n_words': 535}