Showing 44 of 78 total issues
Function batch_submit
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def batch_submit(bucket, path, jobdir, credentials=None, state='session',
Function group_level
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def group_level(inDir, outDir, dataset=None, atlas=None, minimal=False,
log=False, hemispheres=False, dwi=True):
"""
Crawls the output directory from ndmg and computes qc metrics on the
derivatives produced
- 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 crawl_bucket
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def crawl_bucket(bucket, path, group=False):
"""
Gets subject list for a given S3 bucket and path
"""
if group:
- 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 ndmg_dwi_pipeline
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def ndmg_dwi_pipeline(dwi, bvals, bvecs, mprage, atlas, mask, labels, outdir,
clean=False, fmt='edgelist'):
"""
Creates a brain graph from MRI data
"""
- 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 loadGraphs
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def loadGraphs(filenames, verb=False):
"""
Given a list of files, returns a dictionary of graphs
Required 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 session_level
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def session_level(inDir, outDir, subjs, sesh=None, debug=False,
Function dwi2atlas
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def dwi2atlas(self, dwi, gtab, t1w, atlas,
Function make_panel_plot
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_panel_plot(basepath, outf, dataset=None, atlas=None, minimal=True,
Avoid deeply nested control flow statements. Open
if verbose:
print "Saving slice:", slices
imsave(dirname + '/%04d.png' % slices,
Avoid deeply nested control flow statements. Open
if sesh is not None:
tpath = op.join(remo, 'sub-{}'.format(sub), 'ses-{}'.format(sesh))
tindir = op.join(inDir, 'sub-{}'.format(sub), 'ses-{}'.format(sesh))
else:
tpath = op.join(remo, 'sub-{}'.format(sub))
Function apply_warp
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def apply_warp(self, inp, out, ref, warp, xfm=None, mask=None):
Function visualize_fibs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def visualize_fibs(fibs, fibfile, atlasfile, outdir, opacity, num_samples):
Function reg_mri_pngs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def reg_mri_pngs(mri, atlas, outdir, loc=0, mean=False, dim=4):
Function align_nonlinear
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def align_nonlinear(self, inp, ref, xfm, warp, mask=None):
Function plot_degrees
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_degrees(dats, name=None, ylab=None, xlab=None, hemi=True):
Function s3_push_data
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def s3_push_data(bucket, remote, outDir, modifier, creds=True):
Function plot_density
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_density(xs, ys, name=None, ylab=None, xlab=None):
Function plot_series
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_series(dats, name=None, ylab=None, xlab=None, sort=False):
Function tensor2fa
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def tensor2fa(tensors, tensor_name, dwi, derivdir, qcdir):
Function setup
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setup(inDir, dwiListFile, bvalListFile, bvecListFile, mprageListFile):