InstallGuides/CheckoutUserProject

If you wish to have a personal projects folder for individual work using Chaste source code and the Chaste build system.

Create a NEW project in the repository

It is easiest to use the command line for this, run something like:

svn cp -m "[YOUR_PROJECT_NAME] Create new project." https://chaste.cs.ox.ac.uk/svn/chaste/projects/template https://chaste.cs.ox.ac.uk/svn/chaste/projects/YOUR_PROJECT_NAME

Obviously substituting in your new project name for YOUR_PROJECT_NAME!

Check out an EXISTING project

If you want access to the project in eclipse, then follow the first set of instructions, otherwise command line is simpler.

In Eclipse

On the command line

It seems tidiest to check all of your projects out into the same location, then put a symbolic link to them from the Chaste/projects folder.

# Go to the folder that contains `Chaste` - the Chaste source code folder (not the source code folder itself, the one above!), then do:
svn co "https://chaste.cs.ox.ac.uk/svn/chaste/projects/<YOUR_PROJECT_NAME>"
cd Chaste/projects
ln -s ../../<YOUR_PROJECT_NAME>

In either case

Important: to use existing Chaste code

As default the build system will only 'pull in' the core components of Chaste (ode solvers, meshes etc.). If you want to use 'crypt', 'cell_based', or 'heart' code then you need to alter a setting:

Building your project

To run tests in your project, go to the Chaste source folder, and either use

scons test_suite=projects/YOUR_PROJECT_NAME/test/TEST_FILE

or

scons projects/YOUR_PROJECT_NAME

The latter will run all the tests defined in projects/YOUR_PROJECT_NAME/test/ContinuousTestPack.txt. Note that no projects are run on the integration machine, either following a commit or nightly. If you want to run nightly tests locally on your machine, create a test pack called 'NightlyTestPack.txt' (although '<Something>TestPack.txt' would also work) and use

scons projects/YOUR_PROJECT_NAME build=_onlytests_Nightly

or perhaps

scons projects/YOUR_PROJECT_NAME build=GccOpt_onlytests_Nightly

See ChasteGuides/DeveloperBuildGuide for more information on how to build, including further options to scons.

Committing changes

If using the Eclipse 3.1 strategy, you should be able to do team operations on the separate Eclipse project representing your user project.

If you set the workspace for your user project to the projects folder of Chaste, then note that the fact that user projects are checked out into a subfolder of another project leads to subclipse getting a little confused. In order to commit changes to your project, you need to right-click on Chaste->projects->YOUR_PROJECT_NAME and select Commit. Similarly for Update, etc.

Note that committing/updating from the top Chaste directory only affects core chaste, not your project.

Note that a commit to user project WILL FAIL with a message like this

Transmitting file data .svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:
Branch or project commit with no indication in log message

unless the commit has a comment starting with square brackets, e.g.

svn ci -m "[YourName] A description of your commit"

this is to avoid developers having to look through lists of user project changes.

Removing the checked-out project from a local machine

Because subclipse gets confused, it is best to use the command line to remove the files from your local machine. In Eclipse, select the project (not the folder under Chaste/projects, but the actual project in the navigator) and choose 'Delete', but make sure 'Do not delete contents' is selected. Then open up a terminal and do

cdchaste
rm -rf projects/YOUR_PROJECT_NAME