Contributing to django-machina¶
Here are some simple rules to help you contribute to django-machina. You can contribute in many ways!
Contributing code¶
The preferred way to contribute to django-machina is to submit pull requests to the project’s Github repository. Here are some general tips regarding pull requests.
Warning
Keep in mind that you should propose new features on the project’s issue tracker before starting working on your ideas! Remember that the central aim of django-machina is to provide a solid core of a forum project - without much of extra functionality included!
Development environment¶
You should first fork the django-machina’s repository. Then you can get a working copy of the project using the following commands:
$ git clone git@github.com:<username>/django-machina.git
$ cd django-machina && mkvirtualenv machina
(machina) $ make install
(machina) $ npm install
Coding style¶
Please make sure that your code is compliant with the PEP8 style guide. You can ignore the “Maximum Line Length” requirement but the length of your lines should not exceed 100 characters. Remember that your code will be checked using flake8. You can use the django-machina‘s tox configuration to perform this validation:
$ tox -e lint
Tests¶
You should not submit pull requests without providing tests. Django-machina uses pytest as a test runner but also as a syntax for tests instead of unittest. So you should write your tests using pytest instead of unittest and you should not use the built-in django.test.TestCase
.
You can run the whole test suite using the following command:
$ py.test
Code coverage should not decrease with pull requests! You can easily get the code coverage of the project using the following command:
$ make coverage
Contributing translations¶
The translation work on django-machina is done using Transifex. Don’t hesitate to apply for a language if you want to improve the internationalization of the project.
Using the issue tracker¶
You should use the project’s issue tracker if you’ve found a bug or if you want to propose a new feature. Don’t forget to include as many details as possible in your tickets (eg. tracebacks if this is appropriate).