Showing 281 of 942 total issues
Function analyzeArea
has 7 arguments (exceeds 6 allowed). Consider refactoring. Open
def analyzeArea(rasterTransfo, resAnalysisDF, simRowHash, newRasters, cfg, pathDict, contourDict):
Function generateAveragePath
has 7 arguments (exceeds 6 allowed). Consider refactoring. Open
def generateAveragePath(avalancheDir, pathFromPart, simName, dem, addVelocityInfo=False, flagAvaDir=True,
Function fetchRangeTimeInfo
has 7 arguments (exceeds 6 allowed). Consider refactoring. Open
def fetchRangeTimeInfo(cfgRangeTime, cfg, dtRangeTime, t, demHeader, fields, mtiInfo):
Function calcEarlySol
has 7 arguments (exceeds 6 allowed). Consider refactoring. Open
def calcEarlySol(t, earthPressureCoefficients, x_0, zeta, delta, eps_x, eps_y):
Function probAnalysis
has 7 arguments (exceeds 6 allowed). Consider refactoring. Open
def probAnalysis(avaDir, cfg, modName, parametersDict='', inputDir='', probConf='', simDFActual=''):
Function generateCom1DFAEnergyPlot
has 7 arguments (exceeds 6 allowed). Consider refactoring. Open
def generateCom1DFAEnergyPlot(avalancheDir, energyLineTestCfg, com1DFACfg, avaProfileMass, dem, fieldsList, simName):
Function getEnergyInfo
has 7 arguments (exceeds 6 allowed). Consider refactoring. Open
def getEnergyInfo(avaProfileMass, g, mu, sIntersection, zIntersection, runOutAngleDeg, alphaDeg):
Function addDem2Plot
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def addDem2Plot(ax, dem, what='slope', extent='', origHeader=False):
""" Add dem to the background of a plot
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 _plotVariable
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _plotVariable(ax1, cfg, simiDict, comSol, limits, axis, particles=False):
"""Plot flow thickness and velocity for similarity solution and simulation results in axis direction
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 plotBondsSnowSlideFinal
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def plotBondsSnowSlideFinal(cfg, particles, dem, inputSimLines=''):
"""With snowSlide option on, plot the bonds between particles as well as the particles properties
"""
fig, (ax1) = plt.subplots(ncols=1)
ax1.set_aspect('equal')
- 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 plotMaxValuesComp
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def plotMaxValuesComp(pathDict, resultsDF, name1, name2, hue=None):
"""plot result type name1 vs name 2 and colorcode scenarios using hue
add reference sim value with label
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 addTrOrMe
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def addTrOrMe(ax, pDict, prop1, prop2, cmap, label=False, zorder=1, lineStyle='-'):
""" add a line plot of x: prop1, y: prop2 and label if label=True
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 computeEulerTimeStep
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def computeEulerTimeStep(cfg, particles, fields, zPartArray0, dem, tCPU, frictType):
"""compute next time step using an euler forward scheme
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 readLine
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def readLine(fname, defname, dem):
""" Read line from .shp
Use SHP2Array to read the shape file.
Check if the lines are laying inside the dem extend
- 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 postProcessSimiSol
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def postProcessSimiSol(avalancheDir, cfgMain, cfgSimi, simDF, solSimi, outDirTest):
"""loop on all DFA simulations and compare then to the anlytic solution
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 initializeRelVol
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def initializeRelVol(cfg, demVol, releaseFile, radius, releaseType="primary"):
"""initialize release line and apply thickness to compute release volume
Parameters
cfg: dict
- 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 initializeFolderStruct
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def initializeFolderStruct(pathAvaName, removeExisting=False):
''' Initialize the standard folder structure. If removeExisting is true,
deletes any existing folders! BEWARE!
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 copyPlots2ReportDir
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def copyPlots2ReportDir(reportDir, plotDict):
""" copy the plots to report directory
The plots are in a dictionary:
plotDict = {'plot1': PurePath to plot1, 'plot2': PurePath to plot2...}
- 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 getDFAPathFromField
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def getDFAPathFromField(fieldsList, fieldHeader, dem):
""" compute mass averaged path from fields
Also returns the averaged velocity and kinetic energy associated
The dem and fieldsList (FT, FV and FM) need to have identical dimentions and cell size.
- 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 checkProfile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def checkProfile(avaProfile, projSplitPoint=None):
"""check that the avalanche profiles goes from top to bottom
flip it if not and adjust the splitpoint in consequence
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"