Commits

Ned Batchelder committed a04057f

Try to format the contributing page better.

  • Participants
  • Parent commits 1bc03c5

Comments (0)

Files changed (1)

doc/contributing.rst

 
 :history: 20121112T154100, brand new docs.
 
+.. highlight:: console
+
 I welcome contributions to coverage.py.  Over the years, dozens of people have
 provided patches of various sizes to add features or fix bugs.  This page
 should have all the information you need to make a contribution.
 #.  (Optional, but recommended) Create a virtualenv to work in, and activate
     it.
 
-#.  Clone the repo:
-
-    .. code-block:: console
+#.  Clone the repo::
 
         $ hg clone https://bitbucket.org/ned/coveragepy
 
-#.  Install the requirements:
-
-    .. code-block:: console
+#.  Install the requirements::
 
         $ pip install -r requirements.txt
 
 -----------------
 
 The tests are written as standard unittest-style tests, and are run with
-`tox`_:
+`tox`_::
 
-    .. code-block:: console
+    $ tox
+    GLOB sdist-make: /home/ned/coverage/setup.py
+    py25 sdist-reinst: /home/ned/coverage/tox/dist/coverage-3.5.4b1.zip
+    py25 runtests: commands[0]
+    py25 runtests: commands[1]
+    py25 runtests: commands[2]
+    py25 runtests: commands[3]
+    py25 runtests: commands[4]
+    === Python 2.5.5 with Python tracer (/home/ned/coverage/tox/py25/bin/python) ===
+    ...........................................................................................(etc)
+    ----------------------------------------------------------------------
+    Ran 360 tests in 10.836s
 
-        $ tox
-        GLOB sdist-make: /home/ned/coverage/setup.py
-        py25 sdist-reinst: /home/ned/coverage/tox/dist/coverage-3.5.4b1.zip
-        py25 runtests: commands[0]
-        py25 runtests: commands[1]
-        py25 runtests: commands[2]
-        py25 runtests: commands[3]
-        py25 runtests: commands[4]
-        === Python 2.5.5 with Python tracer (/home/ned/coverage/tox/py25/bin/python) ===
-        ...........................................................................................(etc)
-        ----------------------------------------------------------------------
-        Ran 360 tests in 10.836s
+    OK
+    py25 runtests: commands[5]
+    py25 runtests: commands[6]
+    === Python 2.5.5 with C tracer (/home/ned/coverage/tox/py25/bin/python) ===
+    ...........................................................................................(etc)
+    ----------------------------------------------------------------------
+    Ran 360 tests in 10.044s
 
-        OK
-        py25 runtests: commands[5]
-        py25 runtests: commands[6]
-        === Python 2.5.5 with C tracer (/home/ned/coverage/tox/py25/bin/python) ===
-        ...........................................................................................(etc)
-        ----------------------------------------------------------------------
-        Ran 360 tests in 10.044s
+    OK
+    py26 sdist-reinst: /home/ned/coverage/trunk/.tox/dist/coverage-3.5.4b1.zip
+    py26 runtests: commands[0]
+    py26 runtests: commands[1]
+    py26 runtests: commands[2]
+    py26 runtests: commands[3]
+    py26 runtests: commands[4]
+    === CPython 2.6.6 with Python tracer (/home/ned/coverage/tox/py26/bin/python) ===
+    ...........................................................................................(etc)
+    ----------------------------------------------------------------------
+    Ran 364 tests in 12.572s
 
-        OK
-        py26 sdist-reinst: /home/ned/coverage/trunk/.tox/dist/coverage-3.5.4b1.zip
-        py26 runtests: commands[0]
-        py26 runtests: commands[1]
-        py26 runtests: commands[2]
-        py26 runtests: commands[3]
-        py26 runtests: commands[4]
-        === CPython 2.6.6 with Python tracer (/home/ned/coverage/tox/py26/bin/python) ===
-        ...........................................................................................(etc)
-        ----------------------------------------------------------------------
-        Ran 364 tests in 12.572s
+    OK
+    py26 runtests: commands[5]
+    py26 runtests: commands[6]
+    === CPython 2.6.6 with C tracer (/home/ned/coverage/tox/py26/bin/python) ===
+    ...........................................................................................(etc)
+    ----------------------------------------------------------------------
+    Ran 364 tests in 11.458s
 
-        OK
-        py26 runtests: commands[5]
-        py26 runtests: commands[6]
-        === CPython 2.6.6 with C tracer (/home/ned/coverage/tox/py26/bin/python) ===
-        ...........................................................................................(etc)
-        ----------------------------------------------------------------------
-        Ran 364 tests in 11.458s
-
-        OK
-        (and so on...)
+    OK
+    (and so on...)
 
 Tox runs the complete test suite twice for each version of Python you have
 installed.  The first run uses the Python implementation of the trace
 function, the second uses the C implementation.
 
-To limit tox to just a few versions of Python, use the ``-e`` switch:
+To limit tox to just a few versions of Python, use the ``-e`` switch::
 
-    .. code-block:: console
+    $ tox -e py27,py33
 
-        $ tox -e py27,py33
+To run just a few tests, you can use nose test selector syntax::
 
-To run just a few tests, you can use nose test selector syntax:
-
-    .. code-block:: console
-
-        $ tox test.test_misc:SetupPyTest.test_metadata
+    $ tox test.test_misc:SetupPyTest.test_metadata
 
 This looks in `test/test_misc.py` to find the `SetupPyTest` class, and runs the
 `test_metadata` test method.
 ---------
 
 I try to keep the coverage.py as clean as possible.  I use pylint to alert me
-to possible problems:
+to possible problems::
 
-    .. code-block:: console
-
-        $ make lint
-        pylint --rcfile=.pylintrc coverage setup.py test
-        ************* Module coverage.collector
-        F0401:  7,4: Unable to import 'coverage.tracer'
-        E0611:  7,4: No name 'tracer' in module 'coverage'
-        ************* Module coverage.parser
-        W0631:532,32:ByteParser._split_into_chunks: Using possibly undefined loop variable 'bc'
-        W0631:579,40:ByteParser._arcs: Using possibly undefined loop variable 'ch'
-        make: [lint] Error 7 (ignored)
-        python -m tabnanny coverage setup.py test
-        python igor.py check_eol
+    $ make lint
+    pylint --rcfile=.pylintrc coverage setup.py test
+    ************* Module coverage.collector
+    F0401:  7,4: Unable to import 'coverage.tracer'
+    E0611:  7,4: No name 'tracer' in module 'coverage'
+    ************* Module coverage.parser
+    W0631:532,32:ByteParser._split_into_chunks: Using possibly undefined loop variable 'bc'
+    W0631:579,40:ByteParser._arcs: Using possibly undefined loop variable 'ch'
+    make: [lint] Error 7 (ignored)
+    python -m tabnanny coverage setup.py test
+    python igor.py check_eol
 
 As you can see, a few warnings persist, don't worry about them.  But clean up
 any ones you may be responsible for.