Skip to content
bmachiel edited this page Nov 26, 2010 · 2 revisions

Note: the information on this page has not been verified yet.

Release Procedure

Development takes place in the development branch. On a release, the development branch is merged onto the master branch and tagged with the version number (v1.0 for example).

git checkout master
git merge develop
git tag -a v1.0
# don't push to origin yet

The documentation on github needs to be updated on each release.

# first run setup to update the version number
cd doc
make html
# verify documentation
cd _build/html
# you should be in the gh-pages branch now
git commit -a
git push

The master version tag should have doc/_build/html pointing to the documentation for this version though!

cd ../../..
git commit doc/_build/html
# retag version?
git push

Upload to PyPI

git checkout -b master v0.1
python setup.py register sdist bdist_egg upload

Tests

Unit tests are performed using the standard unittest Python module.

In addition, nosetest can be used to simplyfy/extend testing. It's possible to test for code coverage like this (run from the root repository folder):

nosetests --with-coverage --cover-package=nport --cover-html --cover-html-dir=coverage

Testing code coverage requires the coverage module.

Repository

Setting up the docs submodule

cd doc/_build/html/
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git add .
git commit -m "First commit in gh-pages"
git remote add -t gh-pages origin git@github.com:user/project.git
git push
cd ../../..
git submodule add -b gh-pages git://github.com/user/project.git doc/_build/html
git commit -m "Set up submodule for gh-pages"
git push

Cloning the nport repository

git clone git://github.com/user/project.git project
cd project
# change .git/config to only fetch master
git submodule init
git submodule update
cd doc/_build/html/
git branch -D master
git remote rm origin
git remote add -t gh-pages origin git://github.com/user/project.git
#or git remote add -t gh-pages origin git@github.com/user/project.git
git checkout gh-pages

Clone this wiki locally