Showing 291 of 978 total issues
Function makeTransfoMat
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def makeTransfoMat(rasterTransfo):
""" Make transformation matrix.
Takes a Domain Boundary and finds the (x,y) coordinates of the new
raster point (the one following the path)
- 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 getReleaseArea
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def getReleaseArea(cfgT, cfgR, avalancheDir):
""" Main function to compute release areas """
# Which DEM type
demType = cfgT['TOPO']['demType']
- 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 findSLCoors
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def findSLCoors(rasterTransfo, refData, referenceType):
""" find closest s,l coordinates to given x,y coordinates using transformation matrix
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 searchRemeshedRaster
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def searchRemeshedRaster(rasterName, cfgSim, typeIndicator="DEM"):
"""search if remeshed raster with correct name and cell size already available
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 remeshData
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def remeshData(rasterDict, cellSizeNew, remeshOption="griddata", interpMethod="cubic", larger=True):
"""compute raster data on a new mesh with cellSize using the specified remeshOption.
remeshOption are to choose between 'griddata' or 'RectBivariateSpline'
Only the 'griddata' works properly if the input data contains noData 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 readWrite
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def readWrite(fname_ent, time):
""" Get mass balance information
Read mass balance files to get mass properties of the simulation
(total mass, entrained mass...). Checks for mass conservation
- 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 exportcom1DFAOrigOutput
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def exportcom1DFAOrigOutput(avaDir, cfg='', addTSteps=False):
""" Export the simulation results from com1DFA output to desired location
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 plotErrorConvergence
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def plotErrorConvergence(
Function plotParticleMotionTracking
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def plotParticleMotionTracking(avalancheDir, simName, dictVelAltThalweg, trackedPartProp, dictVelEnvelope, demSim,
Function plotErrorTime
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def plotErrorTime(
Function plotComparisonDam
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def plotComparisonDam(cfg, simHash, fields0, fieldsT, header, solDam, tSave, limits, outDirTest):
Function plotRunoutLineComparisonToReference
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def plotRunoutLineComparisonToReference(cfgSetup, refLine, runoutLine, pathDict, simName, runoutLineNoPoints, refLineNoPoints, RMSE, diffNoNans):
Function plotPosition
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def plotPosition(fig, ax, particles, dem, data, Cmap, unit, plotPart=False, last=False):
Function plotPresentation
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def plotPresentation(
Function getSplitPartPosition
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def getSplitPartPosition(cfg, particles, aPart, Nx, Ny, Nz, csz, nSplit, ind):
Function saveSimiSolProfile
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def saveSimiSolProfile(cfgMain, cfgSimi, fields, limits, simiDict, tSave, header, outDirTest, simHash):
Function addColorBar
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def addColorBar(
Function mainRotationTest
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def mainRotationTest(avalancheDir, energyLineTestCfg, com1DFACfg, dem, simDF, resTypeList, flagMass, refSimRowHash,
Function postProcessAIMEC
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def postProcessAIMEC(cfg, rasterTransfo, pathDict, resAnalysisDF, newRasters, timeMass, simRowHash, contourDict, refDataTransformed):
Function analyzeResults
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def analyzeResults(avalancheDir, fieldsList, timeList, solDam, fieldHeader, cfg, outDirTest, simHash, simDFrow):