Version 3 (modified by nicolasmartin, 23 months ago) (diff)

Good Practices

Set up a proper development environment once and for all

Obviously each developer can have its own working approach for developing the NEMO code, however we recommend to download and run this script to install a clean and minimal working copy with everything you need to start your development and to support the NEMO reference.
Actually it will download from the SVN repository a working copy of the NEMO root directory but only in terms of the very first paths in depth, you will have NEMO/branches and NEMO/releases with empty subfolders. Only the trunk (NEMO/trunk) and the last NEMO release (NEMO/releases/release-X.X) will be entirely downloaded.

The benefits of this new way are numerous:

  • Possibility to work offline like git: create a dev branch by copying the trunk and start coding without a first commit to the repository
  • Simple SVN commands (UNIX-like) without tedious svn+ssh URL scheme: create your dev branch locally and commit it as you want to the repository instead of creating the dev branch remotely on the repository and then downloading it to start working.
  • Put an end at the branches scattering, no more multiple working copies but now all needed developments handled in one location

Manage SVN external references according to your needs

As of now, the working copy of the NEMO code is build from several sources in the repository, via SVN external definitions.
The "core" code which is actively developed in line with NEMO releases is still present and unique to a selected branch. Whereas the "complementary" code modified from time to time between consecutive releases has been extracted from the development organisation to be shared between branches from one location.

Here is the current list of these externals definitions for the NEMO code

Wiki page "Developers/ExternalDefinitions" does not exist

From that you have 2 options per external, either

  • you want to be isolated by default from unwanted commits coming from outside, fix a revision for the definition (add @ with revision number at the end of relative path) and you will be in safe mode.
  • you want to be able to commit on this external from your dev branch, don't modify the definition but you will receive the commits at each SVN update.

Of course you can change your mind any time and update the externals of your branch on a case-by-case basis. But don't forget to push your modified externals to the repository.

⇒ configuration of NEMO releases ⇒ current configuration of the trunk

Be smart while working with ticket

Usual commands sequence to follow for creating a development branch

#----------------------------------------------------------------------------------
## To repeat for each development branch
#----------------------------------------------------------------------------------

## Create your development branch locally
$ svn copy trunk[@${REV}]    branches/$year/'dev_r'${REV}_${NameOfNewBranch}

## Edit the external references for your branch (${SVN_EDITOR} env. variable must be set)
$ svn propedit svn:externals ${PATH_BRANCH}

## If needed, push it to the repository (externals are versioned SVN properties)
$ svn commit [-m 'log message'] ${PATH_BRANCH}

$ cd ${PATH_BRANCH}

## Download sette tool to validate your changes to the NEMO reference
$ svn checkout http://forge.ipsl.jussieu.fr/nemo/svn/utils/CI/sette

## Doc figures for building NEMO manual (not mandatory)
$ svn checkout http://forge.ipsl.jussieu.fr/nemo/svn/utils/figures  doc/figures