Showing 107 of 141 total issues
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, dynamic_model, random_state, wc_lang_compartment, species_ids=None):
Function analyzeResults
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def analyzeResults(model, time, volume, growth, speciesCounts):
Function continuous_adjustment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def continuous_adjustment(self, time, cont_submodel_id, population_slope, time_step=None):
Function read_into_array
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def read_into_array(self, time, species, populations, round=True):
Function adjust_continuously
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def adjust_continuously(self, time, cont_submodel_id, population_slopes, time_step=None):
Function get_population
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_population(self, time, interpolate=None, round=None, temporary_mode=False):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, test_cases_root_dir, test_case_type, test_case_num,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name, period, contributors, aggregation_function, **kwargs):
Function scale_conv_opt_model
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def scale_conv_opt_model(self, conv_opt_model, copy_model=True,
Function check_simul_results
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_simul_results(test_case, dynamic_model, results_dir, integration_framework=None,
expected_initial_values=None,
expected_times=None, expected_species_trajectories=None,
expected_property_trajectories=None, rel_tol=1e-7):
""" Evaluate whether a simulation predicted the expected results
- 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 convert_metadata
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def convert_metadata(self, metadata_class):
""" Convert the saved simulation metadata into HDF5 attributes on a `metadata` Group
Args:
metadata_class (:obj:`EnhancedDataClass`): the class that stored the metadata
- 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 get_species_id
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_species_id(self, species_type):
""" Get the species id of a species type
Raises an error if the given species type is contained in multiple compartments. I believe
that this doesn't occur for models in the SBML test suite.
- 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 annotate_heatmap
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def annotate_heatmap(im, data=None, valfmt="{x:.2f}",
textcolors=["black", "white"],
threshold=None, **textkw): # pragma: no cover
"""
A function to annotate a heatmap.
- 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 adjust_continuously
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def adjust_continuously(self, time, cont_submodel_id, population_slopes, time_step=None):
""" A continuous submodel adjusts the population slopes of a set of species at simulation time `time`
Species retain the population slopes to interpolate the population until the next
call to `adjust_continuously`.
- 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
Avoid too many return
statements within this function. Open
return (next_node._data.pop_before - prev_node._data.pop_after) / \
Avoid too many return
statements within this function. Open
return self._slope_between_node_pair(left_node)
Function __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, id, dynamic_model, reactions, species, dynamic_compartments,
local_species_population, ode_time_step, options=None):
""" Initialize an ODE submodel instance
Args:
- 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 prepare_tolerances
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def prepare_tolerances(self):
""" Prepare tolerance dictionary
Use values from `verification_test_reader.settings` if available, otherwise from
`numpy.allclose()`s defaults.
- 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 get_concentrations
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_concentrations(self, compartment_id=None):
""" Get species concentrations at checkpoint times
Args:
compartment_id (:obj:`str`, optional): if provided, obtain concentrations for species in
- 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 get_data
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_data():
datafile = os.path.join(os.path.dirname(__file__), '..', 'data', '2019-11-22_run_ode_solver_w_internal.tsv')
with open(datafile, 'r') as fh:
while(True):
line = fh.readline() # discard header lines
- 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"