blob: a4040e4d9afdb47d0f55b9576b498c9b2cc38bf2 [file] [log] [blame]
Laurens Van Houtven5a422982014-03-15 21:42:31 +01001Contributing
2============
Laurens Van Houtven290aba12014-03-14 15:20:18 +01003
Laurens Van Houtven36a26652014-03-15 21:52:25 +01004First of all, thank you for your interest in contributing to pyOpenSSL!
Laurens Van Houtven290aba12014-03-14 15:20:18 +01005
Laurens Van Houtven5a422982014-03-15 21:42:31 +01006Filing bug reports
7------------------
Laurens Van Houtven290aba12014-03-14 15:20:18 +01008
Laurens Van Houtven36a26652014-03-15 21:52:25 +01009Bug reports are very welcome.
10Please file them on the Github issue tracker.
11Good bug reports come with extensive descriptions of the error and how to reproduce it.
Jean-Paul Calderone0679a692014-03-16 10:17:09 -040012Reporters are strongly encouraged to include an `short, self contained, correct example <http://www.sscce.org/>`_.
Laurens Van Houtven290aba12014-03-14 15:20:18 +010013
Laurens Van Houtven5a422982014-03-15 21:42:31 +010014Patches
15-------
Laurens Van Houtven290aba12014-03-14 15:20:18 +010016
Laurens Van Houtven36a26652014-03-15 21:52:25 +010017All patches to pyOpenSSL should be submitted in the form of pull requests to the main pyOpenSSL repository, ``pyca/pyopenssl``.
18These pull requests should satisfy the following properties:
Laurens Van Houtven290aba12014-03-14 15:20:18 +010019
Jean-Paul Calderone433d4bd2014-03-16 10:46:16 -040020- The branch referenced should be a `feature branch`_ focusing on one particular improvement to pyOpenSSL.
Jean-Paul Calderone0679a692014-03-16 10:17:09 -040021 Create different branches and different pull requests for unrelated features or bugfixes.
22- The branch referenced should have a distinctive name (in particular, please do not open pull requests for your ``master`` branch).
Laurens Van Houtven36a26652014-03-15 21:52:25 +010023- Code should follow `PEP 8`_, especially in the "do what code around you does" sense.
Jean-Paul Calderone0679a692014-03-16 10:17:09 -040024 One notable way pyOpenSSL code differs, for example, is that there should be three empty lines between module-level elements,and two empty lines between class-level elements.
Laurens Van Houtven36a26652014-03-15 21:52:25 +010025 Methods and functions are named in ``snake_case``.
26 Follow OpenSSL naming for callables whenever possible is preferred.
Jean-Paul Calderone0679a692014-03-16 10:17:09 -040027- Pull requests that introduce code must test all new behavior they introduce as well as for previously untested or poorly tested behavior that they touch.
Laurens Van Houtven290aba12014-03-14 15:20:18 +010028- Pull requests are not allowed to break existing tests.
Laurens Van Houtven36a26652014-03-15 21:52:25 +010029- Pull requests that introduce features or fix bugs should note those changes in the ``ChangeLog`` text file in the root of the repository.
30 They should also document the changes, both in docstrings and in the documentation in the ``doc/`` directory.
Laurens Van Houtven290aba12014-03-14 15:20:18 +010031
Laurens Van Houtven36a26652014-03-15 21:52:25 +010032Finally, pull requests must be reviewed before merging.
33This process mirrors the `cryptography code review process`_.
34Everyone can perform reviews; this is a very valuable way to contribute, and is highly encouraged.
Laurens Van Houtven290aba12014-03-14 15:20:18 +010035
Laurens Van Houtven83b3e092014-03-16 15:06:24 +010036Pull requests are merged by members of the `pyopenssl-committers team <https://github.com/orgs/pyca/teams/pyopenssl-committers>`_.
37They should, of course, keep all the requirements detailed in this document as well as the pyca/cryptography merge requirements in mind.
Laurens Van Houtven290aba12014-03-14 15:20:18 +010038
Laurens Van Houtven36a26652014-03-15 21:52:25 +010039The final responsibility for the reviewing of merged code lies with the person merging it; since pyOpenSSL is obviously a sensitive project from a security perspective, so reviewers are strongly encouraged to take this review and merge process very seriously.
Laurens Van Houtven290aba12014-03-14 15:20:18 +010040
Laurens Van Houtven757807e2014-03-15 21:49:03 +010041.. _PEP 8: http://legacy.python.org/dev/peps/pep-0008/
Laurens Van Houtven5a422982014-03-15 21:42:31 +010042.. _cryptography code review process: https://cryptography.io/en/latest/development/reviewing-patches/
Jean-Paul Calderone433d4bd2014-03-16 10:46:16 -040043.. _feature branch: http://nvie.com/posts/a-successful-git-branching-model/