summaryrefslogtreecommitdiff
path: root/HACKING.txt
diff options
context:
space:
mode:
Diffstat (limited to 'HACKING.txt')
-rw-r--r--HACKING.txt56
1 files changed, 26 insertions, 30 deletions
diff --git a/HACKING.txt b/HACKING.txt
index 1386be3af..e31dd8714 100644
--- a/HACKING.txt
+++ b/HACKING.txt
@@ -31,7 +31,7 @@ By Hand
$ cd hack-on-pyramid
# Configure remotes such that you can pull changes from the Pyramid
# repository into your local repository.
- $ git remote add upstream https://github.com:Pylons/pyramid.git
+ $ git remote add upstream https://github.com/Pylons/pyramid.git
# fetch and merge changes from upstream into master
$ git fetch upstream
$ git merge upstream/master
@@ -113,6 +113,7 @@ for this use case) and inside that a simple pyramid application named
``hacking`` that you can then fire up like so:
cd env27/hacking
+ ../bin/python setup.py develop
../bin/pserve development.ini
Adding Features
@@ -177,7 +178,7 @@ Running Tests
invoke the ``tox`` console script. This will read the ``tox.ini`` file and
execute the tests on multiple Python versions and platforms; while it runs,
it creates a virtualenv for each version/platform combination. For
- example:
+ example::
$ sudo /usr/bin/easy_install tox
$ cd ~/hack-on-pyramid/
@@ -185,18 +186,27 @@ Running Tests
- The tests can also be run using ``pytest`` (http://pytest.org/). This is
intended as a convenience for people who are more used or fond of ``pytest``.
- Run the tests like so:
+ Run the tests like so::
$ $VENV/bin/easy_install pytest
$ py.test --strict pyramid/
+- Functional tests related to the "scaffolds" (starter, zodb, alchemy) which
+ create a virtualenv, install the scaffold package and its dependencies, start
+ a server, and hit a URL on the server can be run like so::
+
+ $ ./scaffoldtests.sh
+
+ Alternately::
+
+ $ tox -e{py26,py27,py32,py33,py34,pypy,pypy3}-scaffolds,
+
Test Coverage
-------------
-- The codebase *must* have 100% test statement coverage after each commit.
- You can test coverage via ``tox -e coverage``, or alternately by installing
- ``nose`` and ``coverage`` into your virtualenv (easiest via ``setup.py
- dev``) , and running ``setup.py nosetests --with-coverage``.
+- The codebase *must* have 100% test statement coverage after each commit. You
+ can test coverage via ``./coverage.sh`` (which itself just executes ``tox
+ -epy2-cover,py3-cover,coverage``).
Documentation Coverage and Building HTML Documentation
------------------------------------------------------
@@ -204,45 +214,31 @@ Documentation Coverage and Building HTML Documentation
If you fix a bug, and the bug requires an API or behavior modification, all
documentation in this package which references that API or behavior must be
changed to reflect the bug fix, ideally in the same commit that fixes the bug
-or adds the feature.
+or adds the feature. To build and review docs, use the following steps.
-To build and review docs (where ``$VENV`` refers to the virtualenv you're
-using to develop Pyramid):
-
-1. After following the steps above in "Using a Development Checkout", install
- Sphinx and all development requirements in your virtualenv:
-
- $ cd ~/hack-on-pyramid
- $ $VENV/bin/python setup.py docs
-
-2. Update all git submodules from the top-level of your Pyramid checkout, like
- so:
+1. After following the steps above in "Using a Development Checkout", update
+ all git submodules from the top-level of your Pyramid checkout, like so:
$ git submodule update --init --recursive
This will checkout theme subrepositories and prevent error conditions when
HTML docs are generated.
-3. Next change into the submodule's directory and switch to a branch so that
+2. Next change into the submodule's directory and switch to a branch so that
the submodule repositories are no longer "headless". Then update the
repository to ensure that we have the latest updates.
- See http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/
+ See http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/ ::
$ cd docs/_themes
$ git checkout master
$ git pull
-4. Change into the ``docs`` directory within your Pyramid checkout and execute
- the ``make`` command with some flags:
-
- $ cd ~/hack-on-pyramid/pyramid/docs
- $ make clean html SPHINXBUILD=$VENV/bin/sphinx-build
+3. Change back to the main Pyramid checkout dir and run ``./builddocs`` (which
+ just turns around and runs ``tox -e py2-docs,py3-docs``)::
- The ``SPHINXBUILD=...`` argument tells Sphinx to use the virtualenv Python,
- which will have both Sphinx and Pyramid (for API documentation generation)
- installed.
+ $ ./builddocs
-5. Open the ``docs/_build/html/index.html`` file to see the resulting HTML
+4. Open the ``.tox/_build/html/index.html`` file to see the resulting HTML
rendering.
Change Log