Changes between Version 37 and Version 38 of ModelConvInst


Ignore:
Timestamp:
Jan 28, 2016 6:03:36 PM (8 years ago)
Author:
pkienzle
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ModelConvInst

    v37 v38  
    5151  - add more as you generate them! 
    5252  - **''NOTE: There is no need to specify 'scale' or 'background', these are implicit to all models.''** 
     53  - to see the list of parameters currently used across all models, use 
     54{{{ 
     55python -m sasmodels.list_pars 
     56}}} 
    5357 - lower and upper limits can be any number, or -inf or inf. 
    5458  - add limits where required the (old) sasview models don't usually define them. 
     
    199203}}} 
    200204 
     205'''CLEAN LINT''' 
     206 
     207Run the lint check with: 
     208 
     209{{{ 
     210python -m pylint --rcfile=extra/pylint.rc sasmodels/models/modelname.py 
     211}}} 
     212 
     213 
     214You can tell pylint to ignore things.  For example, to align you parameters in blocks: 
     215 
     216{{{#!python 
     217 
     218# pylint: disable=bad-whitespace,line-too-long 
     219#   ["name",                  "units", default, [lower, upper], "type", "description"], 
     220parameters = [ 
     221    ["contrast_factor",       "barns",    10.0,  [-inf, inf], "", "Contrast factor of the polymer"], 
     222    ["bjerrum_length",        "Ang",       7.1,  [0, inf],    "", "Bjerrum length"], 
     223    ["virial_param",          "1/Ang^2",  12.0,  [-inf, inf], "", "Virial parameter"], 
     224    ["monomer_length",        "Ang",      10.0,  [0, inf],    "", "Monomer length"], 
     225    ["salt_concentration",    "mol/L",     0.0,  [-inf, inf], "", "Concentration of monovalent salt"], 
     226    ["ionization_degree",     "",          0.05, [0, inf],    "", "Degree of ionization"], 
     227    ["polymer_concentration", "mol/L",     0.7,  [0, inf],    "", "Polymer molar concentration"], 
     228    ] 
     229# pylint: enable=bad-whitespace,line-too-long 
     230}}} 
     231 
     232We are not aiming for zero lint just yet, only keeping it to a minimum.  For now, don't worry about invalid-name or missing-docstring on Iq/Iqxy. If you really want a variable name Rg for example because Rg is the right name for the model parameter, then ignore the lint errors.  We will have delinting sessions at the code camp, where we can decide on standards for model files, parameter names, etc. 
     233 
     234 
    201235'''CHECK THE DOCS''' 
    202236