1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
.. _about-contributing:
.. highlight:: shell
======================
Contributing to Waffle
======================
.. image:: https://jazzband.co/static/img/jazzband.svg
:target: https://jazzband.co/
:alt: Jazzband
This is a `Jazzband <https://jazzband.co>`_ project. By contributing you agree to abide by the
`Contributor Code of Conduct <https://jazzband.co/about/conduct>`_ and follow the
`guidelines <https://jazzband.co/about/guidelines>`_.
Waffle is pretty simple to hack, and has a decent test suite! Here's how
to patch Waffle, add tests, run them, and contribute changes.
**Please** `open a new issue`_ to discuss a new feature before beginning
work on it. Not all suggestions are accepted. The :ref:`Goals
<about-goals>` may help guide which features are likely to be accepted.
Set Up
======
Setting up an environment is easy! You'll want ``virtualenv`` and
``pip``, then just create a new virtual environment and install the
requirements::
$ mkvirtualenv waffle
$ pip install -r requirements.txt
Done!
Writing Patches
===============
Fork_ Waffle and create a new branch off master for your patch. Run the
tests often::
$ ./run.sh test
Try to keep each branch to a single feature or bugfix.
.. note::
To update branches, please **rebase** onto master, do not merge
master into your branch.
Submitting Patches
==================
Open a pull request on GitHub!
Before a pull request gets merged, it should be **rebased** onto master
and squashed into a minimal set of commits. Each commit should include
the necessary code, test, and documentation changes for a single "piece"
of functionality.
To be mergeable, patches must:
- be rebased onto the latest master,
- be automatically mergeable,
- not break existing tests,
- not change existing tests without a *very* good reason,
- add tests for new code (bug fixes should include regression tests, new
features should have relevant tests),
- not introduce any new ruff_ errors (run ``./run.sh lint``),
- not introduce any new mypy_ errors (run ``./run.sh typecheck``),
- include updated source translations (run ``./run.sh makemessages`` and ``./run.sh compilemessages``),
- document any new features, and
- have a `good commit message`_.
Regressions tests should fail without the rest of the patch and pass
with it.
.. _open a new issue: https://github.com/jazzband/django-waffle/issues/new
.. _Fork: https://github.com/jazzband/django-waffle/fork
.. _ruff: https://pypi.python.org/pypi/ruff
.. _mypy: https://www.mypy-lang.org/
.. _good commit message: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|