From patchwork Wed Feb 3 21:22:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 578378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9796F140778 for ; Thu, 4 Feb 2016 08:23:19 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 84DE71A0298 for ; Thu, 4 Feb 2016 08:23:19 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lists.ozlabs.org (Postfix) with ESMTP id 8701E1A026E for ; Thu, 4 Feb 2016 08:22:47 +1100 (AEDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 03 Feb 2016 13:22:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,391,1449561600"; d="scan'208";a="740070192" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 03 Feb 2016 13:22:45 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u13LMj3u027495; Wed, 3 Feb 2016 21:22:45 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id u13LMj78017634; Wed, 3 Feb 2016 21:22:45 GMT Received: (from sfinucan@localhost) by sivswdev01.ir.intel.com with id u13LMjUA017630; Wed, 3 Feb 2016 21:22:45 GMT From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 2/7] docs: Add a contributors guide Date: Wed, 3 Feb 2016 21:22:30 +0000 Message-Id: <1454534555-17582-2-git-send-email-stephen.finucane@intel.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1454534555-17582-1-git-send-email-stephen.finucane@intel.com> References: <1454534555-17582-1-git-send-email-stephen.finucane@intel.com> X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" This guide details the steps one should follow to submit patches for patchwork. It's nothing onerous but rather common sense. This requires moving the testing section from the development guide to this new document. Signed-off-by: Stephen Finucane --- docs/contributing.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/development.md | 32 ---------------------------- mkdocs.yml | 1 + 3 files changed, 60 insertions(+), 32 deletions(-) create mode 100644 docs/contributing.md diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 0000000..1e61b7f --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,59 @@ +# Tips and Tricks + +## Coding Standards + +**Follow PEP8**. All code is currently PEP8 compliant and it should stay this +way. + +Changes that fix semantic issues will be generally be happily received, but +please keep such changes seperate from functional changes. + +`pep8` targets are provided via tox. Refer to the [testing section](#testing) +below for more information on usage of this tool. + +## Testing + +patchwork includes a [tox][ref-tox] script to automate testing. This requires +a functional database and some Python requirements like `tox`. Please refer +to the [development guide][doc-development] for information on how to configure +these. + +Assuming these requirements are met, actually testing patchwork is quite easy +to do. To start, you can show the default targets like so: + + $ tox --list + +You'll see that this includes a number of targets to run unit tests against +the different versions of Django supported, along with some other targets +related to code coverage and code quality. To run one of these, use the `-e` +parameter: + + $ tox -e py27-django18 + +In the case of the unit tests targets, you can also run specific tests by +passing the fully qualified test name as an additional argument to this +command: + + $ tox -e py27-django18 patchwork.tests.SubjectCleanUpTest + +Because patchwork support multiple versions of Django, it's very important +that you test against all supported versions. When run without argument, tox +will do this: + + $ tox + +## Submitting Changes + +All patches should be sent to the [mailing list][pw-ml]. When doing so, please +abide by the [QEMU guidelines][ref-qemu-contrib] on contributing or submitting +patches. This covers both the initial submission and any follow up to the +patches. In particulat, please ensure: + +* [All tests pass](#testing) +* Documentation has been updated with new requirements, new script names etc. +* The `CHANGES` file has been updated with any added or removed features + +[doc-development]: development.md +[pw-ml]: https://ozlabs.org/mailman/listinfo/patchwork +[ref-qemu-contrib]: http://wiki.qemu.org/Contribute/SubmitAPatch +[ref-tox]: https://tox.readthedocs.org/en/latest/ diff --git a/docs/development.md b/docs/development.md index 07e0ca0..3868adf 100644 --- a/docs/development.md +++ b/docs/development.md @@ -90,35 +90,3 @@ The following environmental variables are available to configure settings:
PW_TEST_DB_TYPE = 'mysql'
Type of database to use. Options: 'mysql', 'postgresql'
- -## Running Tests - -patchwork includes a [tox] script to automate testing. Before running this, you -should probably install tox: - - $ pip install tox - -You can show available -targets like so: - - $ tox --list - -You'll see that this includes a number of targets to run unit tests against the -different versions of Django supported, along with some other targets related -to code coverage and code quality. To run these, use the `-e` parameter: - - $ tox -e py27-django18 - -In the case of the unit tests targets, you can also run specific tests by -passing the fully qualified test name as an additional argument to this -command: - - $ tox -e py27-django18 patchwork.tests.SubjectCleanUpTest - -Because patchwork supports multiple versions of Django, it's very important -that you test against all supported versions. When run without argument, tox -will do this: - - $ tox - -[tox]: https://tox.readthedocs.org/en/latest/ diff --git a/mkdocs.yml b/mkdocs.yml index 876ebf7..6e28dfe 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -8,3 +8,4 @@ pages: - Home: 'index.md' - Installation: 'installation.md' - Development: 'development.md' + - Contributing: 'contributing.md'