Skip to content

Using the new repos

ahmadia edited this page May 11, 2011 · 17 revisions

Preliminaries

Here are some brief instructions for getting started with the new repos. For now this just refers to PyClaw and PetClaw, as well as the 'riemann' repo. Others will be added as they appear.

You will need to set several environment variables to use the code. Unfortunately, there are two ways to do this, based on whether you are using a Bourne-compatible shell such as sh, bash, or zsh; or a C-shell derivative such as csh or tcsh. If you do not know which shell you are using, you can determine this with:

echo $SHELL

Create a new directory to contain your Clawpack build

You will probably want to organize all the packages under one directory:

mkdir clawpack
cd clawpack

sh/bash/zsh:

export CLAW=`pwd`

csh/tcsh:

setenv CLAW `pwd`

Clone repositories

git clone git@github.com:clawpack/pyclaw.git
git clone git@github.com:clawpack/riemann.git

Set repository variables


sh/bash/zsh:

export RIEMANN=$CLAW/riemann
export PYCLAW=$CLAW/pyclaw

csh/tcsh:

setenv RIEMANN $CLAW/riemann
setenv PYCLAW $CLAW/pyclaw

Set PYTHONPATH


sh/bash/zsh:

export PYTHONPATH=$PYCLAW/src/

csh/tcsh:

setenv PYTHONPATH "$PYCLAW/src/"

Install PETSc/petsc4py (optional)

For PetClaw, you must also have PETSc and petsc4py installed. See their websites for more information.

Verification

$ cd $PYCLAW
$ nosetests

If any tests fail please report them to the developers immediately!

Development Style

For PyClaw, we do not develop on the master branch, but on a 'dev' branch. To get this, do the following:

$ cd $PYCLAW
$ git checkout -b dev origin/dev

To push changes you'll generally want to do

$ git push origin dev

Clone this wiki locally