Messages

category module obj line column msg
error SetupWin   16 0 Unable to import 'py2exe'
warning SetupWin   16 0 Unused import py2exe
error SetupModelMac   59 30 Undefined variable 'SEMI_STANDALONE'
refactor database.DatabaseReaderFactory DatabaseReaderFactory.getInstance 43 12 Redefinition of databaseReader type from database.Ciqual_Reader.Ciqual_Reader to database.USDA_28_Reader.USDA_28_Reader
refactor database.DatabaseReaderFactory DatabaseReaderFactory 13 0 Too few public methods (1/2)
refactor database.USDA_28_Reader USDA_28_Reader.processFile 77 4 Too many local variables (21/15)
refactor database.USDA_28_Reader USDA_28_Reader.registerConstituantsName 142 4 Too many local variables (16/15)
refactor database.Ciqual_Reader Ciqual_Reader 20 0 Too many instance attributes (10/7)
refactor database.Ciqual_Reader Ciqual_Reader.__init__ 23 4 Too many arguments (6/5)
refactor database.Ciqual_Reader Ciqual_Reader.analyseHeaderCiqual 130 4 Too many local variables (24/15)
refactor database.Ciqual_Reader Ciqual_Reader.analyseHeaderCiqual 130 4 Too many branches (16/12)
warning gui.CallTypWindow ToolTip.showtip 54 48 Access to a protected member _w of a client class
refactor gui.EnergyFrame EnergyFrame 16 0 Too many instance attributes (8/7)
refactor gui.DatabaseJoinDialog DatabaseJoinDialog 15 0 Too many instance attributes (10/7)
refactor gui.DatabaseJoinDialog DatabaseJoinDialog.__init__ 17 4 Too many arguments (6/5)
refactor gui.FrameBaseCalcAl FrameBaseCalcAl 15 0 Too many instance attributes (8/7)
refactor gui.CalcAlGUIMenu CalcAlGUIMenu 40 0 Too many instance attributes (9/7)
refactor gui.CalcAlGUI CalcAlGUI 50 0 Too many instance attributes (20/7)
refactor gui.CalcAlGUI CalcAlGUI 50 0 Too many public methods (21/20)
convention database.Database   1 0 Too many lines in module (1024/1000)
refactor database.Database Database.insertNewComposedProduct 188 4 Too many arguments (6/5)
refactor database.Database Database.insertNewComposedProduct 188 4 Too many local variables (18/15)
refactor database.Database Database.correctEnergyKcal 931 4 Too many local variables (26/15)
refactor database.Database Database 18 0 Too many public methods (41/20)
refactor gui.StartFrame StartFrame 22 0 Too many instance attributes (8/7)
refactor gui.StartFrame StartFrame.__init__ 25 4 Too many arguments (6/5)
refactor gui.PortionInfoChooser PortionInfoChooser 36 0 Too many instance attributes (9/7)
refactor gui.PortionFrame PortionFrame 20 0 Too many instance attributes (8/7)
refactor gui.PortionFrame PortionFrame.__init__ 23 4 Too many arguments (6/5)
refactor gui.PortionFrame PortionFrame.__init__ 23 4 Too many statements (53/50)
refactor gui.SearchFoodFrame SearchFoodFrame 22 0 Too many instance attributes (11/7)
refactor gui.SearchFoodFrame SearchFoodFrame.__init__ 25 4 Too many local variables (19/15)
refactor gui.SearchFoodFrame SearchFoodFrame.__init__ 25 4 Too many statements (52/50)
refactor gui.TkSimpleDialog TkSimpleDialog.validate 90 4 Method could be a function
refactor gui.PatientFrame PatientFrame 21 0 Too many instance attributes (13/7)
refactor gui.PatientFrame PatientFrame.__init__ 24 4 Too many local variables (19/15)
refactor gui.PatientFrame PatientFrame.__init__ 24 4 Too many statements (64/50)
refactor gui.PathologyFrame PathologyFrame 19 0 Too many instance attributes (11/7)
refactor gui.PathologyFrame PathologyFrame.__init__ 22 4 Too many arguments (6/5)
refactor gui.PathologyFrame PathologyFrame.__init__ 22 4 Too many local variables (20/15)
refactor gui.PathologyFrame PathologyFrame.__init__ 22 4 Too many statements (62/50)
refactor gui.PathologyFrame PathologyFrame.clicPathologiesListbox 203 8 Too many nested blocks (6/5)
refactor model.Component Component.__init__ 35 4 Too many arguments (7/5)
refactor model.SearchThreadedTask SearchThreadedTask.runSearch 53 4 Too many local variables (20/15)
refactor model.SearchThreadedTask SearchThreadedTask.runSearch 64 8 Too many nested blocks (6/5)
refactor model.SearchThreadedTask SearchThreadedTask.runSearch 53 4 Too many branches (13/12)
refactor model.Foodstuff Foodstuff.__init__ 40 4 Too many arguments (7/5)
refactor model.Patient Patient 36 0 Too many instance attributes (8/7)
error test_ModelComponent   32 0 No name 'approx' in module 'pytest'
refactor model.CalculatorFrameModel CalculatorFrameModel 43 0 Too many instance attributes (22/7)
refactor model.CalculatorFrameModel CalculatorFrameModel 43 0 Too many public methods (26/20)
refactor gui.TableTreeView TableTreeView.__init__ 38 4 Too many arguments (8/5)
refactor gui.TableTreeView TableTreeView 36 0 Too many public methods (21/20)
error test_ModelFoodstuff   32 0 No name 'approx' in module 'pytest'
refactor gui.CalculatorFrame CalculatorFrame 25 0 Too many instance attributes (18/7)
refactor gui.CalculatorFrame CalculatorFrame.__init__ 28 4 Too many arguments (6/5)
refactor gui.CalculatorFrame CalculatorFrame.__init__ 28 4 Too many local variables (34/15)
refactor gui.CalculatorFrame CalculatorFrame.__init__ 28 4 Too many statements (125/50)
refactor gui.CalculatorFrame CalculatorFrame.updateObserver 255 4 Too many branches (14/12)
refactor gui.CalculatorFrame CalculatorFrame 25 0 Too many public methods (33/20)
error test_ModelCalculatorFrameModel   32 0 No name 'approx' in module 'pytest'
error test_ModelCalculatorFrameModel test_updateFollowedComp 176 50 Instance of 'object' has no 'split' member
refactor test_ModelCalculatorFrameModel test_getTotalLineStr 250 0 Too many local variables (19/15)
refactor test_ModelCalculatorFrameModel test_portion 480 0 Too many local variables (21/15)
error test_ModelCalculatorFrameModel test_getEnergyComponentsNames 545 54 Instance of 'object' has no 'split' member
error test_ModelCalculatorFrameModel test_getEnergyRatio 569 54 Instance of 'object' has no 'split' member

Report

4722 statements analysed.

Statistics by type

type number old number difference %documented %badname
module 47 47 = 100.00 0.00
class 35 35 = 100.00 0.00
method 327 327 = 100.00 0.00
function 56 56 = 100.00 0.00

External dependencies

CalcAl (test_ModelCalculatorFrameModel)
database (database.Database)
  \-Database (model.SearchThreadedTask)
  \-DatabaseManager (test_ModelCalculatorFrameModel)
gui 
  \-CalcAlGUI (CalcAl)
  \-CalcAlGUIMenu (gui.CalcAlGUI)
  \-CalculatorFrame (gui.CalcAlGUI)
  \-CallTypWindow (gui.CalculatorFrame)
  \-DatabaseInitialiser (gui.StartFrame)
  \-DatabaseJoinDialog (gui.StartFrame)
  \-EnergyFrame (gui.CalculatorFrame)
  \-FamilyNameChooser (gui.CalculatorFrame)
  \-FrameBaseCalcAl (gui.CalculatorFrame)
  \-PathologyFrame (gui.CalcAlGUI)
  \-PatientFrame (gui.CalcAlGUI)
  \-PortionFrame (gui.CalcAlGUI)
  \-PortionInfoChooser (gui.CalculatorFrame)
  \-SearchFoodFrame (gui.CalcAlGUI)
  \-StartFrame (gui.CalcAlGUI)
  \-TableTreeView (gui.CalculatorFrame)
  \-TkSimpleDialog (gui.PortionInfoChooser)
  \-WaterEnergyFrame (gui.CalculatorFrame)
model 
  \-CalculatorFrameModel (test_ModelCalculatorFrameModel)
  \-Component (model.CalculatorFrameModel)
  \-Foodstuff (test_ModelFoodstuff)
  \-ModelBaseData (test_ModelBaseData)
  \-Patient (model.PatientFrameModel)
  \-PatientFrameModel (gui.CalcAlGUI)
  \-SearchThreadedTask (gui.SearchFoodFrame)
  \-TotalLine (model.CalculatorFrameModel)
pytest (test_ModelCalculatorFrameModel)
setuptools (SetupModelMac)
util 
  \-CalcalExceptions (test_ModelCalculatorFrameModel)
  \-DateUtil (test_DataDateUtil)
  \-Observable (model.CalculatorFrameModel)

Raw metrics

type number % previous difference
code 5784 65.40 5784 =
docstring 1471 16.63 1471 =
comment 567 6.41 567 =
empty 1022 11.56 1022 =

Duplication

  now previous difference
nb duplicated lines 0 0 =
percent duplicated lines 0.000 0.000 =

Messages by category

type number previous difference
convention 1 1 =
refactor 55 0 +55.00
warning 2 2 =
error 8 8 =

% errors / warnings by module

module error warning refactor convention
test_ModelCalculatorFrameModel 50.00 0.00 3.64 0.00
SetupWin 12.50 50.00 0.00 0.00
test_ModelFoodstuff 12.50 0.00 0.00 0.00
test_ModelComponent 12.50 0.00 0.00 0.00
SetupModelMac 12.50 0.00 0.00 0.00
gui.CallTypWindow 0.00 50.00 0.00 0.00
gui.CalculatorFrame 0.00 0.00 10.91 0.00
gui.PathologyFrame 0.00 0.00 9.09 0.00
database.Database 0.00 0.00 7.27 100.00
database.Ciqual_Reader 0.00 0.00 7.27 0.00
model.SearchThreadedTask 0.00 0.00 5.45 0.00
gui.SearchFoodFrame 0.00 0.00 5.45 0.00
gui.PortionFrame 0.00 0.00 5.45 0.00
gui.PatientFrame 0.00 0.00 5.45 0.00
model.CalculatorFrameModel 0.00 0.00 3.64 0.00
gui.TableTreeView 0.00 0.00 3.64 0.00
gui.StartFrame 0.00 0.00 3.64 0.00
gui.DatabaseJoinDialog 0.00 0.00 3.64 0.00
gui.CalcAlGUI 0.00 0.00 3.64 0.00
database.USDA_28_Reader 0.00 0.00 3.64 0.00
database.DatabaseReaderFactory 0.00 0.00 3.64 0.00
model.Patient 0.00 0.00 1.82 0.00
model.Foodstuff 0.00 0.00 1.82 0.00
model.Component 0.00 0.00 1.82 0.00
gui.TkSimpleDialog 0.00 0.00 1.82 0.00
gui.PortionInfoChooser 0.00 0.00 1.82 0.00
gui.FrameBaseCalcAl 0.00 0.00 1.82 0.00
gui.EnergyFrame 0.00 0.00 1.82 0.00
gui.CalcAlGUIMenu 0.00 0.00 1.82 0.00

Messages

message id occurrences
too-many-instance-attributes 15
too-many-locals 12
too-many-arguments 10
too-many-statements 5
too-many-public-methods 5
too-many-branches 3
no-name-in-module 3
no-member 3
too-many-nested-blocks 2
unused-import 1
undefined-variable 1
too-many-lines 1
too-few-public-methods 1
redefined-variable-type 1
protected-access 1
no-self-use 1
import-error 1

Global evaluation

Your code has been rated at 9.79/10 (previous run: 9.91/10, -0.12)