refine contributing text in several places

This commit is contained in:
holger krekel 2014-01-23 11:38:05 +01:00
parent ab13c3f362
commit c41db8ebbb
2 changed files with 71 additions and 61 deletions

View File

@ -9,6 +9,19 @@ so do not hesitate!
Types of contributions Types of contributions
====================== ======================
Report bugs
-----------
Report bugs at https://bitbucket.org/hpk42/pytest/issues.
If you are reporting a bug, please include:
* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting,
specifically Python interpreter version,
installed libraries and py.test version.
* Detailed steps to reproduce the bug.
Submit feedback for developers Submit feedback for developers
------------------------------ ------------------------------
@ -24,18 +37,6 @@ We'd also like to hear about your propositions and suggestions. Feel free to
* If you have required skills and/or knowledge, we are very happy for * If you have required skills and/or knowledge, we are very happy for
pull requests (see below). pull requests (see below).
Report bugs
-----------
Report bugs at https://bitbucket.org/hpk42/pytest/issues.
If you are reporting a bug, please include:
* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting,
specifically Python interpreter version,
installed libraries and py.test version.
* Detailed steps to reproduce the bug.
Fix bugs Fix bugs
-------- --------
@ -65,8 +66,8 @@ py.test could always use more documentation. What exactly is needed?
* Docstrings. There's never too much of them. * Docstrings. There's never too much of them.
* Blog posts, articles and such -- they're all very appreciated. * Blog posts, articles and such -- they're all very appreciated.
Getting started for contributing Preparing Pull Requests on Bitbucket
================================ =====================================
The primary development platform for py.test is BitBucket. You can find all The primary development platform for py.test is BitBucket. You can find all
the issues there and submit pull requests. There is, however, the issues there and submit pull requests. There is, however,
@ -74,58 +75,59 @@ a `GitHub mirror <https://github.com/hpk42/pytest/>`__ available, too,
although it only allows for submitting pull requests. For a GitHub although it only allows for submitting pull requests. For a GitHub
contribution guide look :ref:`below <contribution-on-github>`. contribution guide look :ref:`below <contribution-on-github>`.
1. Fork the py.test `repository <https://bitbucket.org/hpk42/pytest>`__ on BitBucket. 1. Fork the `pytest bitbucket repository <https://bitbucket.org/hpk42/pytest>`__. It's fine to
use ``pytest`` as your fork repository name because it will live
under your user.
2. Create a local virtualenv (http://www.virtualenv.org/en/latest/):: .. _virtualenvactivate:
2. Create and activate a fork-specific virtualenv
(http://www.virtualenv.org/en/latest/)::
$ virtualenv pytest-venv $ virtualenv pytest-venv
$ cd pytest-venv/ $ source pytest-venv/bin/activate
$ source bin/activate
.. _checkout: .. _checkout:
3. Clone your fork locally:: 3. Clone your fork locally and create a branch::
$ hg clone ssh://hg@bitbucket.org/your_name_here/pytest $ hg clone ssh://hg@bitbucket.org/YOUR_BITBUCKET_USERNAME/pytest
$ cd pytest
.. _installing-dev-pytest: $ hg branch <yourbranchname>
4. Install your local copy into a virtualenv::
$ cd pytest/
$ python setup.py develop
If that last command complains about not finding the required version
of "py" then you need to use the development pypi repository::
$ python setup.py develop -i http://pypi.testrun.org
.. _testing-pytest: .. _testing-pytest:
5. When you're done making changes, check that all of them pass all the tests 4. You can now edit your local working copy. To test you need to
(including PEP8 and different Python interpreter versions). First install install the "tox" tool into your virtualenv::
``tox``::
$ pip install tox $ pip install tox
You also need to have Python 2.7 and 3.3 available in your system. Now You need to have Python 2.7 and 3.3 available in your system. Now
running tests is as simple as issuing this one command:: running tests is as simple as issuing this command::
$ tox -e py27,py33 $ python runtox.py -e py27,py33,flakes
This command will run tests for both Python 2.7 and 3.3, which is a minimum This command will run tests via the "tox" tool against Python 2.7 and 3.3
required to get your patch merged. To run whole test suit issue:: and also perform "flakes" coding-style checks. ``runtox.py`` is
a thin wrapper around ``tox`` which installs from a development package
index where newer (not yet released to pypi) versions of dependencies
(especially ``py``) might be present.
$ tox To run tests on py27 and pass options (e.g. enter pdb on failure)
to pytest you can do::
6. Commit your changes and push to BitBucket:: $ python runtox.py -e py27 -- --pdb
$ hg branch <yourbranchname> or to only run tests in a particular test module on py33::
$ hg add .
$ hg commit -m"<commit message> $ python runtox.py -e py33 -- testing/test_config.py
5. Commit and push once your tests pass and you are happy with your change(s)::
$ hg commit -m"<commit message>"
$ hg push -b . $ hg push -b .
7. Submit a pull request through the BitBucket website: 6. Finally, submit a pull request through the BitBucket website::
source: <your user>/pytest source: <your user>/pytest
branch: <yourbranchname> branch: <yourbranchname>
@ -133,34 +135,32 @@ contribution guide look :ref:`below <contribution-on-github>`.
target: hpk42/pytest target: hpk42/pytest
branch: default branch: default
.. _contribution-on-github: .. _contribution-on-github:
What about GitHub?
------------------ Preparing Pull Requests on Github
=====================================
.. warning:: .. warning::
Remember that GitHub is **not** a default development platform for py.test Remember that GitHub is **not** a default development platform for py.test
and it doesn't include e.g. issue list. and it doesn't include e.g. issue list.
1. Fork the py.test `repository <https://github.com/hpk42/pytest/>`__ on GitHub. 1. Fork the `pytest github repository <https://github.com/hpk42/pytest/>`__.
2. Create a local virtualenv (http://www.virtualenv.org/en/latest/):: 2. :ref:`create and activate virtualenv <virtualenvactivate>`.
$ virtualenv pytest-venv 3. Clone your github fork locally and create a branch::
$ cd pytest-venv/
3. Clone your fork locally:: $ git clone git@github.com:YOUR_GITHUB_USERNAME/pytest.git
$ cd pytest
$ git branch <yourbranchname>
$ git checkout <yourbranchname>
$ git clone git@github.com:your_name_here/pytest.git 4. :ref:`test your changes <testing-pytest>`.
4. :ref:`Install your local copy into a virtualenv <installing-dev-pytest>`
and after that :ref:`test your changes <testing-pytest>`.
5. Commit your changes and push to GitHub:: 5. Commit your changes and push to GitHub::
$ git branch <yourbranchname> $ git add PATH/TO/MODIFIED/FILE # to add changes to staging
$ git checkout <yourbranchname>
$ git add .
$ git commit -am"<commit message>" $ git commit -am"<commit message>"
$ git push origin <yourbranchname> $ git push origin <yourbranchname>

10
runtox.py Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env python
import subprocess
import sys
if __name__ == "__main__":
subprocess.call(["tox",
"-i", "ALL=https://devpi.net/hpk/dev/",
"--develop",] + sys.argv[1:])