Contributing

Thank you for taking the time to contribute to django-freeradius.

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 radius  # 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>/django-freeradius.git
cd django-freeradius
workon radius  # activate virtualenv
python setup.py develop

Ensure test coverage does not decrease

First of all, install the test requirements:

workon radius  # activate virtualenv
pip install --no-cache-dir -U -r requirements-test.txt

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

coverage run --source=django_freeradius runtests.py

Follow style conventions (PEP8, isort, JSLint)

First of all, install the test requirements:

workon radius  # activate virtualenv
pip install --no-cache-dir -U -r requirements-test.txt
npm install -g jslint

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

./runflake8
./runisort
jslint ./django_freeradius/static/django-freeradius/js/*.js

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 radius  # 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!