How to Contribute
Welcome, and thanks for considering contributing! In order to make our review/development process easier, we have some guidelines to help you figure out how to contribute to Affiliates.
We use Bugzilla to track issues and bugs for Firefox Affiliates. Any issues with the website should be filed under the Firefox Affiliates product.
- The main portion of the Affiliates website, accessible at https://affiliates.mozilla.org.
- Social Integration / Facebook App
- Facebook app implemented in the `facebook` Django app that links with the mothership for certain stats.
- An image link, text link, or other type of link that users can generate using Affiliates.
- Servers pull code from
master. Development should happen in feature branches and pull requests should merge back to
masterexcept in special cases.
- Python code should follow Mozilla's general Webdev guidelines.
- As allowed by PEP8, we use 99-characters-per-line for Python code and 72-characters-per-line for documentation/comments. Feel free to break these guidelines for readability if necessary.
- Affiliates is based on Playdoh. The Playdoh Documentation explain the features of Playdoh and how to develop a site based on it.
Adding a Library
Due to licensing and deployment constraints, adding a library to Affiliates requires a few things:
Add the library to the requirements files in the
prod.txtis for libraries required in production,
dev.txtis for libraries required for local development or running tests, and
compiled.txtis for libraries that need to be compiled.
If the library isn't compiled, install it in
vendor-localusing the following Pip command (assuming we want to install the
chocobolibrary from PyPI):
pip install --no-install --build=vendor-local/packages -I chocobo
Add the path to your newly installed package to
vendor-local/vendor.pth. For example, if it was installed in
vendor-local/packages/chocobo, you'd add the line
Note: Keep the installation changes in a separate commit from the rest of your work to make code review easier.