Showing 281 of 942 total issues
Function radarFieldOfViewPlot
has 51 lines of code (exceeds 30 allowed). Consider refactoring. Open
def radarFieldOfViewPlot(radarFov, radarRange, cfgRangeTime, rangeGates, dem):
"""Create radar field of view plot
Parameters
-----------
Function initializeFields
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def initializeFields(cfg, dem, particles, releaseLine):
"""Initialize fields and update particles flow thickness. Eventually build bond array if snowSlide is activated
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
Function createReportDict
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def createReportDict(avaDir, logName, relName, inputSimLines, cfg, reportAreaInfo):
"""create simulaton report dictionary
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
Function prepareInputData
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def prepareInputData(inputSimFiles, cfg):
"""Fetch input data
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
Function appendShpThickness
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def appendShpThickness(cfg):
""" append thickness values to GENERAL section if read from shp and not varied
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
Function removeSimsNotMatching
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def removeSimsNotMatching(simDF, key, value):
"""remove simulations from simDF that do not match filtering critera
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
Function prepareArea
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def prepareArea(line, dem, radius, thList="", combine=True, checkOverlap=True):
"""convert shape file polygon to raster
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
Function extractFrontAndMeanValuesRadar
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def extractFrontAndMeanValuesRadar(cfgRangeTime, flowF, mtiInfo):
""" extract average values of flow parameter result at certain distance intervals (range gates)
add info to be used for colorcoding range-time diagram
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
Function readABinputs
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def readABinputs(avalancheDir, path2Line='', path2SplitPoint=''):
""" Fetch inputs for AlpahBeta model
Get path to AlphaBeta model inputs (dem raster, avalanche path and split points)
- 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 plotSimiSolSummary
has 45 lines of code (exceeds 30 allowed). Consider refactoring. Open
def plotSimiSolSummary(
avalancheDir,
timeList,
fieldsList,
fieldHeader,
Function SHP2Array
has 45 lines of code (exceeds 30 allowed). Consider refactoring. Open
def SHP2Array(infile, defname=None):
""" Read shapefile and convert it to a python dictionary
The dictionary contains the name of the paths in the shape file, the np array with
the coordinates of the feature points (all stacked in the same array)
Function mainAIMEC
has 45 lines of code (exceeds 30 allowed). Consider refactoring. Open
def mainAIMEC(pathDict, inputsDF, cfg):
""" Main logic for AIMEC postprocessing
Reads the required files location for ana3AIMEC postprocessing
given an avalanche directory
Function validateVarDict
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def validateVarDict(variationDict, standardCfg):
""" Check if all parameters in variationDict exist in default configuration and
are provided in the correct format
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
Function getTrackedParticlesProperties
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def getTrackedParticlesProperties(particlesList, nPartTracked, properties):
'''Get the desired properties for the tracked particles
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
Function setVariationForAllFeatures
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def setVariationForAllFeatures(cfg, key, thType, varType, variationFactor):
""" set thickness value for all features according to varType variation
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
Function createSampleWithVariationForThParameters
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def createSampleWithVariationForThParameters(avaDir, cfgProb, cfgStart, varParList, valVariationValue, varType, thReadFromShp):
""" Create a sample of parameters for a desired parameter variation,
and fetch thickness values from shp file and perform variation for each feature within
shapefile but treating the features of one shapefile as not-independent
- 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 findAngleProfile
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def findAngleProfile(tmp, ds, dsMin):
"""
Find the beta point: first point under the beta value given in
prepareAngleProfile. Make sure that at least dsMin meters behind the point
are also under the beta value otherwise keep searching
- 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 getInputData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def getInputData(avaDir, cfg):
"""Fetch input datasets required for simulation, duplicated function because
simulation type set differently in com1DFAOrig compared to com1DFA:
TODO: remove duplicate once it is not required anymore
- 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 makeLists
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def makeLists(simDict, benchDict):
""" Create a list for table creation """
parameterList = []
valuesSim = []
- 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 createCfgFiles
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def createCfgFiles(paramValuesDList, comMod, cfg, cfgPath=''):
""" create all config files required to run com Module from parameter variations using paramValues
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"