BlueBrain/eFEL

View on GitHub
examples/deap/GranuleCell1/GranuleCell1.py

Summary

Maintainability
D
2 days
Test Coverage

Showing 8 of 8 total issues

Function __init__ has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def __init__(self, conductances):
 
# Properties of the cell soma
self.soma = h.Section(name='soma')
self.soma.nseg = 1
Severity: Minor
Found in examples/deap/GranuleCell1/GranuleCell1.py - About 1 hr to fix

    Function steps has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def steps(step_number, parameters):
     
    # instantiate the class
    cell = GrCmono(parameters)
     
     
    Severity: Minor
    Found in examples/deap/GranuleCell1/GranuleCell1.py - About 25 mins to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    if step_number == 0:
    # actual current injections, one for each current step.
    stim = [h.IClamp(0.5, sec=cell.soma)]
     
    stim[0].delay = stimdata['stim0del']
    Severity: Major
    Found in examples/deap/GranuleCell1/GranuleCell1.py and 2 other locations - About 4 hrs to fix
    examples/deap/GranuleCell1/GranuleCell1.py on lines 120..125
    examples/deap/GranuleCell1/GranuleCell1.py on lines 126..131

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    elif step_number == 1:
    stim2 = [h.IClamp(0.5, sec=cell.soma)]
     
    stim2[0].delay = stimdata['stim1del']
    stim2[0].dur = stimdata['stim1dur']
    Severity: Major
    Found in examples/deap/GranuleCell1/GranuleCell1.py and 2 other locations - About 4 hrs to fix
    examples/deap/GranuleCell1/GranuleCell1.py on lines 113..119
    examples/deap/GranuleCell1/GranuleCell1.py on lines 126..131

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    elif step_number == 2:
    stim3 = [h.IClamp(0.5, sec=cell.soma)]
     
    stim3[0].delay = stimdata['stim2del']
    stim3[0].dur = stimdata['stim2dur']
    Severity: Major
    Found in examples/deap/GranuleCell1/GranuleCell1.py and 2 other locations - About 4 hrs to fix
    examples/deap/GranuleCell1/GranuleCell1.py on lines 113..119
    examples/deap/GranuleCell1/GranuleCell1.py on lines 120..125

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    elif step_number == 2:
    stimdata['stim2del'] = 100
    stimdata['stim2dur'] = 500
    stimdata['stim2amp'] = 0.022
    Severity: Major
    Found in examples/deap/GranuleCell1/GranuleCell1.py and 2 other locations - About 40 mins to fix
    examples/deap/GranuleCell1/GranuleCell1.py on lines 86..89
    examples/deap/GranuleCell1/GranuleCell1.py on lines 90..93

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    if step_number == 0:
    stimdata['stim0del'] = 100
    stimdata['stim0dur'] = 500
    stimdata['stim0amp'] = 0.010
    Severity: Major
    Found in examples/deap/GranuleCell1/GranuleCell1.py and 2 other locations - About 40 mins to fix
    examples/deap/GranuleCell1/GranuleCell1.py on lines 90..93
    examples/deap/GranuleCell1/GranuleCell1.py on lines 94..97

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    elif step_number == 1:
    stimdata['stim1del'] = 100
    stimdata['stim1dur'] = 500
    stimdata['stim1amp'] = 0.016
    Severity: Major
    Found in examples/deap/GranuleCell1/GranuleCell1.py and 2 other locations - About 40 mins to fix
    examples/deap/GranuleCell1/GranuleCell1.py on lines 86..89
    examples/deap/GranuleCell1/GranuleCell1.py on lines 94..97
    Category
    Status