Skip to content

Latest commit

 

History

History
104 lines (68 loc) · 2.45 KB

CONTRIBUTING.rst

File metadata and controls

104 lines (68 loc) · 2.45 KB

Contributing

  • We are interested in various different kinds of improvement for Molecule; please feel free to raise an Issue if you would like to work on something major to ensure efficient collaboration and avoid duplicate effort.
  • Create a topic branch from where you want to base your work.
  • Check for unnecessary whitespace with git diff --check before committing.
  • Make sure you have added tests for your changes.
  • Run all the tests to ensure nothing else was accidentally broken.
  • Reformat the code by following the formatting section below.
  • Submit a pull request.

IRC

Join us in the #molecule-users channel on freenode.

Installing from source

Due to the rapid pace of development on this tool, you might want to install it in "development" mode so that new updates can be obtained by simply doing a git pull in the repository's directory.

$ cd /path/to/repos
$ git clone [email protected]:metacloud/molecule.git
$ cd molecule
$ sudo python setup.py develop

There is also a pip pattern for development mode:

$ cd /path/to/repos
$ git clone [email protected]:metacloud/molecule.git
$ pip install -U -e .

Testing

Dependencies

Tests will be skipped when the driver's binary is not present. Serverspec scenarios do require a working ruby, `Bunder`_, and Rake.

Install the test framework Tox.

$ pip install tox

Install the remaining requirements in a venv (optional):

$ pip install -r test-requirements.txt -r requirements.txt

Unit

Unit tests are invoked by Tox, and composed of a generative envlist.

$ tox -l
$ py{27}-ansible{19,20,21}-unit

Functional

Functional tests are invoked by Tox, and composed of a generative envlist.

$ tox -l
$ py{27}-ansible{19,20,21}-functional

Formatting

The formatting is done using YAPF.

From the root for the project, run:

$ tox -e syntax