Showing 233 of 415 total issues
File versioneer.py
has 1416 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
File create_acc.py
has 772 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""create JSON/ACC files for Arbor from a set of BluePyOpt.ephys parameters"""
# pylint: disable=R0914
import io
File models.py
has 685 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Cell template class"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
File efeatures.py
has 525 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""eFeature classes"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
File protocols.py
has 525 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Protocol classes"""
from .recordings import LFPRecording
from .simulators import LFPySimulator
from .stimuli import LFPStimulus
File biophys.py
has 503 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Functions to create neuroml biophysiology"""
"""
Copyright (c) 2016-2022, EPFL/Blue Brain Project
This file is part of BluePyOpt <https://github.com/BlueBrain/BluePyOpt>
File l5pc_analysis.py
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Run simple cell optimisation"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
File locations.py
has 475 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Location classes"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
Function define_fitness_calculator
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
def define_fitness_calculator(main_protocol, features_filename, prefix=""):
"""Define fitness calculator"""
with open(os.path.join(os.path.dirname(__file__), '..', features_filename)) as protocol_file:
feature_definitions = json.load(protocol_file)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _translate_mech
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def _translate_mech(cls, mech_name, mech_params, arb_cats):
"""Translate NMODL mechanism to Arbor ACC format
Args:
mech_name (): NMODL mechanism name (suffix)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _generate_parameters
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def _generate_parameters(parameters, location_order, loc_desc):
"""Create a list of parameters that need to be added to the hoc template"""
param_locations = defaultdict(list)
global_params = {}
for param in parameters:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File extra_features_utils.py
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Extra features functions"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
File _version.py
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains the computed version number.
File stimuli.py
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Stimuli classes"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
Function create_protocols
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def create_protocols(protocol_definitions, do_replace_axon=None, sim='nrn'):
protocols = {}
if sim == 'nrn':
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File morphologies.py
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Morphology classes"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
File evaluator.py
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
This file is part of BluePyOpt <https://github.com/BlueBrain/BluePyOpt>
Function define_parameters
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def define_parameters(params_filename):
"""Define parameters"""
parameters = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File parameters.py
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Parameter classes"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
Function _create_sim_desc
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def _create_sim_desc(self, param_values,
ignored_globals=(), template=None,
disable_banner=False,
template_dir=None,
extra_params=None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"