============
Contributing
============

agate actively encourages contributions from people of all genders, races, ethnicities, ages, creeds, nationalities, persuasions, alignments, sizes, shapes, and journalistic affiliations. You are welcome here.

We seek contributions from developers and non-developers of all skill levels. We will typically accept bug fixes, documentation updates, and new cookbook recipes with minimal fuss. If you want to work on a larger feature—great! The maintainers will be happy to provide feedback and code review on your implementation.

Before making any changes or additions to agate, please be sure to read about the principles of agate in the `About <about.html>`_ section of the documentation.

Process for documentation
=========================

Not a developer? That's fine! As long as you can use `git` (there are many tutorials) then you can contribute to agate. Please follow this process:

#. Fork the project on `Github <https://github.com/onyxfish/agate>`_.
#. If you don't have a specific task in mind, check out the `issue tracker <https://github.com/onyxfish/agate/issues>`_ and find a documentation ticket that needs to be done.
#. Comment on the ticket letting everyone know you're going to be working on it so that nobody duplicates your effort.
#. Write the documentation. Documentation files live in the `docs` directory and are in Restructured Text Format.
#. Add yourself to the AUTHORS file if you aren't already there.
#. Once your contribution is complete, submit a pull request on Github.
#. Wait for it to either be merged by a maintainer or to receive feedback about what needs to be revised.
#. Rejoice!

Process for code
================

Hacker? We'd love to have you hack with us. Please follow this process to make your contribution:

#. Fork the project on `Github <https://github.com/onyxfish/agate>`_.
#. If you don't have a specific task in mind, check out the `issue tracker <https://github.com/onyxfish/agate/issues>`_ and find a task that needs to be done and is of a scope you can realistically expect to complete in a few days. Don't worry about the priority of the issues at first, but try to choose something you'll enjoy. You're much more likely to finish something to the point it can be merged if it's something you really enjoy hacking on.
#. If you already have a task you know you want to work on, open a ticket or comment on the existing ticket letting everyone know you're going to be working on it. It's also good practice to provide some general idea of how you plan on resolving the issue so that other developers can make suggestions.
#. Write tests for the feature you're building. Follow the format of the existing tests in the test directory to see how this works. You can run all the tests with the command ``nosetests tests``.
#. Verify your tests work on all supported versions of Python by runing ``tox``.
#. Write the code. Try to stay consistent with the style and organization of the existing codebase. A good patch won't be refused for stylistic reasons, but large parts of it may be rewritten and nobody wants that.
#. As you are coding, periodically merge in work from the master branch and verify you haven't broken anything by running the test suite.
#. Write documentation. This means docstrings on all classes and methods, including parameter explanations. It also means, when relevant, cookbook recipes and updates to the agate user tutorial.
#. Add yourself to the AUTHORS file if you aren't already there.
#. Once your contribution is complete, tested, and has documentation, submit a pull request on Github.
#. Wait for it to either be merged by a maintainer or to receive feedback about what needs to be revisited.
#. Rejoice!

Licensing
=========

To the extent that they care, contributors should keep in mind that the source of agate and therefore of any contributions are licensed under the permissive `MIT license <license.html>`_. By submitting a patch or pull request you are agreeing to release your code under this license. You will be acknowledged in the AUTHORS list, the commit history and the hearts and minds of journalists everywhere.
