Changes between Version 24 and Version 25 of DevNotes/DevGuide/CodingRules


Ignore:
Timestamp:
May 31, 2016 2:25:43 AM (8 years ago)
Author:
wojciech
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • DevNotes/DevGuide/CodingRules

    v24 v25  
    55The following document is divided into subsections (Some of these needs to be written) 
    66 
    7 * Golden Rule     
    8 * Coding Standards 
    9         * Docstring 
    10         * Naming 
    11         * Imports 
    12         * Exception Handling 
    13         * Coding Style 
    14  
    15 * Testing 
    16 * GIT 
    17 * Code reviews 
    18 * Code Editors (Not sure if we want to include it) 
    19 * GUI guidelines (to be included in the future) 
    20 * API interface (to be included in the future) 
    21  
     7* [#point1  Golden Rule ]    
     8* [#point2 Coding Standards] 
     9        * [#point3 Docstring] 
     10        * [#point4 Naming] 
     11        * [#point5 Imports] 
     12        * [#point6 Exception Handling] 
     13        * [#point7 Coding Style] 
     14 
     15* [#point8 Testing] 
     16* [#point9 GIT] 
     17* [#point10 Code reviews] 
     18* [#point11 API interface (to be included in the future)] 
     19* [#point12 Code Editors (Not sure if we want to include it)] 
     20* [#point13 GUI guidelines (to be included in the future)] 
     21 
     22[=#point1] 
    2223== Golden Rule: == 
    2324 
     
    2526    '''If you do break the build - the no. 1 priority is to fix it IMMEDIATELY.''' 
    2627 
     28[=#point2] 
    2729== Coding Standards == 
    2830 
     31[=#point3] 
    2932Docstring 
    3033 
     
    4750    * Models: make sure all references to model parameters are appropriately named, and that the relationship between equation variables and model parameters are obvious. 
    4851 
     52[=#point4] 
    4953Naming 
    5054 
     
    8084    * Models: When defining parameters use radius_core, sld_core names not core_radius and core_sld 
    8185 
     86[=#point5] 
    8287Imports 
    8388 
     
    113118    * Put a blank line between each group of imports. 
    114119 
     120[=#point6] 
    115121Exception Handling 
    116122 
     
    121127    * Never use a blank except: statement since it interferes with !KeyboardInterrupt.  At a minimum, use except Exception:. 
    122128 
    123  
     129[=#point7] 
    124130Coding Style 
    125131 
     
    164170    * Use inline comments (sparingly) to clarify confusing lines. 
    165171 
     172[=#point8] 
    166173== Testing == 
    167174 
     
    178185    * Models: Remember to test a model for critical values (e.g. q=0) 
    179186 
     187[=#point9] 
    180188== GIT == 
    181189 
     
    185193    * When merging a branch with multiple commits use --squash or interactively rebase before pushing to master. 
    186194 
     195[=#point10] 
    187196== Code Reviews == 
    188197 
     
    198207        7. Verify that the defects are actually fixed 
    199208 
     209[=#point11] 
    200210== Editors == 
    201211 
     
    208218     * Both !PyCharm and VS allow source level debugging both of self-spawned processes and by attaching to an already running process. 
    209219 
     220[=#point12] 
    210221== API ==  
    211222