Revision control

From NorthShore Analytics
Jump to: navigation, search

Revision control is essential for incremental and cooperative development. Git is currently the suggested tool of choice for implementing a robust framework for sharing and improving the code. A centralized local Git repository for the Clinical Analytics team is not available at the time of this writing (), however, interim measures can be taken to ensure that changes made to the code are at least traceable to its developer(s). Collaboration Portal is currently used as a proxy for the centralized code repository, and all current code should periodically be placed on the portal to facilitate quality control and cross-training of the department team members. In preparation for the implementation of the centralized Git repository, all team members should implement Git framework on their local computers and regularly check in working code with appropriate descriptive comments. If this practice is followed, the creation of a centralized Git node will be reduced to pushing individual repositories to the designated location and should take place with minimum resource diversion from higher priority tasks.

Once the central repository is set up, one person (presumably, the project manager) should be designated as the administrator with one or two team members serving as backup resources fully cross-trained on the system functionality. The following is a suggested list of good repository maintenance practices in the form of do’s:

  • DO take regular snapshots of COMPILABLE CODE;
  • DO write concise, informative, itemized comments for each commit highlighting the most significant changes from the previous version;
  • DO minimize the time you keep the code checked out;
  • DO conduct unit tests before checking in the code to make sure it is backward compatible.
  • DO merge branches at the first opportunity.

and don’ts:

  • DON’T check in code that does not compile;
  • DON’T check in code that will break the build;
  • DON’T store the executable, compiled, auxiliary or any other binary files with the source;
  • DON’T create more branches than necessary.

(see, e.g., [9], [4], [20]).