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
|
How to contribute
=================
Branching
---------
- Pull requests that fix bugs of a released version should go to
``x.y-maintenance`` (e.g. ``0.2-maintenance``) branch.
Coding style
------------
- Follows `PEP 8`_.
- Alphabetically order imports.
- Prefer relative imports.
- All functions, classes, methods, attributes, and modules should have
the docstring.
- Functions and methods should contain ``:param:``, ``:type:``
(``:returns:``, ``:rtype`` if it returns something),
(``:raises:`` if it may raise an error) in their docstring.
Tests
-----
- All code patches should contain one or more unit tests or regression tests.
- There's `docs about how to test`__.
- All commits will be tested by `Travis CI`__ & `GitHub Actions`__.
__ https://docs.wand-py.org/en/latest/test.html
__ https://travis-ci.org/emcconville/wand
__ https://github.com/emcconville/wand/actions
Docs
----
- All packages and modules should have ``.rst`` file for them inside ``docs/``
directory. For example, if there's ``wand/module.py`` there also should be
``docs/wand/module.rst``, and it has to be listed in ``.. toc::`` of
``docs/wand.rst``.
- All new classes/functions/methods/attributes/properties have to contain
``.. versionadded::`` in their docstring.
- All interface changes have to contain ``.. versionchanged::``
in theirdocstring.
.. _PEP 8: www.python.org/dev/peps/pep-0008
|