There are a number of ways to contribute to django-all-access. If you are interested in making django-all-access better then this guide will help you find a way to contribute.
Ways to Contribute¶
Not all contributions are source code related. You can contribute to the project by writing a blog post on using django-all-access and sharing with the mailing list. You can also submit bug reports, feature requests or documentation updates through the Github issues.
Getting the Source¶
You can clone the repository from Github:
git clone git://github.com/mlavin/django-all-access.git
However this checkout will be read only. If you want to contribute code you should create a fork and clone your fork. You can then add the main repository as a remote:
git clone email@example.com:<your-username>/django-all-access.git git remote add upstream git://github.com/mlavin/django-all-access.git git fetch upstream
Running the Tests¶
When making changes to the code, either fixing bugs or adding features, you’ll want to run the tests to ensure that you have not broken any of the existing functionality. With the code checked out and Django installed you can run the tests via:
python setup.py test
Note that the tests require the mock library.
To test against multiple versions of Django you can use install and use
tox command will run the tests against the currently supported Python and Django versions.
# Build all environments tox # Build a single environment tox -e py27-django18-normal
Building all environments will also build the documentation. More on that in the next section.
Building the Documentation¶
This project aims to have a minimal core with hooks for customization. That makes documentation an important part of the project. Useful examples and notes on common use cases are a great way to contribute and improve the documentation.
tox -e docs
from inside the
Code contributions should follow the PEP8 and Django contributing style standards. Please note that these are only guidelines. Overall code consistency and readability are more important than strict adherence to these guides.
Submitting a Pull Request¶
The easiest way to contribute code or documentation changes is through a pull request. For information on submitting a pull request you can read the Github help page https://help.github.com/articles/using-pull-requests.
Pull requests are a place for the code to be reviewed before it is merged. This review will go over the coding style as well as if it solves the problem intended and fits in the scope of the project. It may be a long discussion or it might just be a simple thank you.
Not necessarily every request will be merged but you should not take it personally if your change is not accepted. If you want to increase the chances of your change being incorporated, here are some tips.
- Address a known issue. Preference is given to a request that fixes a currently open issue.
- Include documentation and tests when appropriate. New features should be tested and documented. Bugfixes should include tests which demonstrate the problem.
- Keep it simple. It’s difficult to review a large block of code, so try to keep the scope of the change small.
If you aren’t sure if a particular change is a good idea, or if it would be helpful to other users, just ask. You should also feel free to ask for help writing tests or writing documentation if you aren’t sure how to go about it.