Changes between Version 2 and Version 3 of Developers/Good Practices


Ignore:
Timestamp:
2018-11-08T22:54:12+01:00 (23 months ago)
Author:
nicolasmartin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Developers/Good Practices

    v2 v3  
    11= Good Practices 
     2 
     3[[PageOutline(2, , inline, unnumbered)]] 
    24 
    35== Set up a proper development environment once and for all 
    46 
    5 Obviously each developer can have its own working approach for developing the NEMO code, however we recommend to download and run [source:/utils/install_dev_env.sh this script] to install a __clean and minimal working copy__ with everything you need to start your development and to support the NEMO reference. \\ 
    6 Actually it will download from the SVN repository a working copy of `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. 
     7Obviously each developer can have its own working approach for developing the NEMO code, however we recommend to download and run [source:/utils/install_dev_env.sh this script] to install a '''clean and minimal working copy''' with everything you need to start your development and to support the NEMO reference. \\ 
     8Actually 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. 
    79 
    8 == Manage SVN externals according to your needs 
     10The benefits of this new way are numerous: 
     11- __Possibility to work offline like ''git''__: create a dev branch by copying the trunk and start coding without a first commit to the repository 
     12- __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. 
     13- __Put an end at the branches scattering__, no more multiple working copies but now all needed developments handled in one location 
     14 
     15== Manage SVN external references according to your needs 
     16 
     17As of now, the working copy of the NEMO code is build from several sources in the repository, via [http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html SVN external definitions]. \\ 
     18The "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. 
     19 
     20Here is the current list of these externals definitions for the NEMO code 
    921 
    1022[[Include(wiki:Developers/ExternalDefinitions)]] 
     23 
     24From that you have 2 options per external, either 
     25- 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. 
     26- 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. 
     27 
     28Of 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__. 
     29 
     30 
     31=> configuration of NEMO releases 
     32=> current configuration of the trunk 
     33 
     34== Be smart while working with ticket 
     35 
     36 
     37 
     38== Usual commands sequence to follow for creating a development branch 
    1139 
    1240{{{#!sh 
     
    1442## To repeat for each development branch 
    1543#---------------------------------------------------------------------------------- 
     44 
    1645## Create your development branch locally 
    17 svn copy trunk[@${PEGREV}]    branches/$year/'dev_r'${PEGREV}_${NameOfNewBranch} 
    18 ## If needed, edit the external references (${SVN_EDITOR} env. variable must be set) 
    19 svn pedit svn:externals       branches/$year/'dev_r'${PEGREV}_${NameOfNewBranch} 
    20 ## Then push it to the repository 
    21 svn commit [-m 'log message'] branches/$year/'dev_r'${PEGREV}_${NameOfNewBranch} 
     46$ svn copy trunk[@${REV}]    branches/$year/'dev_r'${REV}_${NameOfNewBranch} 
    2247 
    23 cd branches/$year/'dev_r'${PEGREV}_${NameOfNewBranch} 
     48## Edit the external references for your branch (${SVN_EDITOR} env. variable must be set) 
     49$ svn propedit svn:externals ${PATH_BRANCH} 
     50 
     51## If needed, push it to the repository (externals are versioned SVN properties) 
     52$ svn commit [-m 'log message'] ${PATH_BRANCH} 
     53 
     54$ cd ${PATH_BRANCH} 
    2455 
    2556## Download sette tool to validate your changes to the NEMO reference 
    26 svn co http://forge.ipsl.jussieu.fr/nemo/svn/utils/CI/sette 
     57$ svn checkout http://forge.ipsl.jussieu.fr/nemo/svn/utils/CI/sette 
     58 
    2759## Doc figures for building NEMO manual (not mandatory) 
    28 svn co http://forge.ipsl.jussieu.fr/nemo/svn/utils/figures  ./doc/figures 
     60$ svn checkout http://forge.ipsl.jussieu.fr/nemo/svn/utils/figures  doc/figures 
    2961}}} 
     62