Contributing

Thank you for taking the time to contribute to netjsonconfig.

Follow these guidelines to speed up the process.

Reach out before you start

Before opening a new issue, try the following steps:

  • look if somebody else has already started working on the same issue by looking in the github issues and pull requests
  • look also in the OpenWISP mailing list
  • announce your intentions by opening a new issue
  • present yourself on the mailing list

Create a virtual environment

Please use a python virtual environment while developing your feature, it keeps everybody on the same page and it helps reproducing bugs and resolving problems.

We suggest you to use virtualenvwrapper for this task (consult install instructions in the virtualenvwrapper docs).

mkvirtualenv netjsonconfig  # create virtualenv

Fork repo and install your fork

Once you have forked this repository to your own github account or organization, install your own fork in your development environment:

git clone git@github.com:<your_fork>/netjsonconfig.git
cd netjsonconfig
workon netjsonconfig  # activate virtualenv
python setup.py develop

Ensure test coverage does not decrease

First of all, install the test requirements:

workon netjsonconfig  # activate virtualenv
pip install -r requirements-test.txt

When you introduce changes, ensure test coverage is not decreased with:

nosetests --with-coverage --cover-package=netjsonconfig

Follow style conventions (PEP8, isort)

First of all, install the test requirements:

workon netjsonconfig  # activate virtualenv
pip install -r requirements-test.txt

Before committing your work check that your changes are not breaking the style conventions with:

./runflake8 && ./runisort

For more information, please see:

Update the documentation

If you introduce new features or change existing documented behavior, please remember to update the documentation!

The documentation is located in the /docs directory of the repository.

To do work on the docs, proceed with the following steps:

workon netjsonconfig  # activate virtualenv
pip install sphinx
cd docs
make html

Send pull request

Now is time to push your changes to github and open a pull request!