Showing 115 of 2,350 total issues
Function __run
has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring. Open
def __run(self, curr_state, total_time, timeline, trajectory_base, tmpSpecies, live_grapher, t=20,
number_of_trajectories=1, increment=0.05, seed=None, debug=False, profile=False,
resume=None, tau_tol=0.03, **kwargs):
# for use with resume, determines how much excess data to cut off due to
- 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 validate
has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring. Open
def validate(self, reactants=None, products=None, propensity_function=None,
ode_propensity_function=None, marate=None, annotation=None, coverage="build"):
"""
Check if the reaction is properly formatted.
Does nothing on sucesss, raises and error on failure.
- 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 __run
has a Cognitive Complexity of 142 (exceeds 5 allowed). Consider refactoring. Open
def __run(self, curr_state, total_time, timeline, trajectory_base, tmpSpecies, live_grapher, t=20,
number_of_trajectories=1, increment=0.05, seed=None, debug=False, profile=False, timeout=None,
resume=None, tau_tol=0.03, **kwargs):
# for use with resume, determines how much excess data to cut off due to
- 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 __run
has a Cognitive Complexity of 94 (exceeds 5 allowed). Consider refactoring. Open
def __run(self, curr_state, total_time, timeline, trajectory_base, live_grapher, t=20,
number_of_trajectories=1, increment=0.05, seed=None, debug=False,
resume=None,):
# for use with resume, determines how much excess data to cut off due to
- 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 to_model
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def to_model(self, name):
""" Instantiates a Model object from a StochMLDocument. """
# Empty model
model = Model(name=name)
- 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 __run
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
def __run(self, curr_state, curr_time, timeline, trajectory_base, initial_state, live_grapher, t=20,
number_of_trajectories=1, increment=0.05, seed=None,
debug=False, profile=False,
tau_tol=0.03, event_sensitivity=100,
integrator_options={}, **kwargs):
- 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 validate
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
def validate(self, initial_value=None, coverage="all"):
"""
Validate the species.
:param initial_value: Initial population (discrete) or concentration (continuous) of this species.
- 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 dependency_grapher
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def dependency_grapher(model, reactions):
"""
This function returns a dependency graph for a models reactions in the form of a
dictionary containing {species name: {'dependencies'}:[list of reaction names]}.
- 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 run
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def run(self=None, model=None, t=None, number_of_trajectories=1, increment=None, seed=None,
debug=False, profile=False, tau_tol=0.03, event_sensitivity=100,integrator_options={},
live_output=None, live_output_options={}, timeout=None, **kwargs):
"""
Function calling simulation of the model. This is typically called by the run function in GillesPy2 model
- 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 run
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def run(self=None, model=None, t=None, number_of_trajectories=1, increment=None, integrator='lsoda',
integrator_options={}, live_output=None, live_output_options={}, timeout=None, resume=None, **kwargs):
"""
:param model: The model on which the solver will operate. (Deprecated)
:type model: gillespy2.Model
- 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 run
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def run(self=None, model=None, t=None, number_of_trajectories=1, increment=None, seed=None, debug=False,
live_output=None, live_output_options={}, timeout=None, resume=None, **kwargs):
"""
Run the SSA algorithm. Uses a NumPy array for storing results and for generating the timeline.
- 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 run
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def run(self=None, model=None, t=None, number_of_trajectories=1, increment=None, seed=None,
debug=False, profile=False, live_output=None, live_output_options={},
timeout=None, resume=None, tau_tol=0.03, **kwargs):
"""
Function calling simulation of the model.
- 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 __simulate
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def __simulate(self, integrator_options, curr_state, y0, curr_time,
propensities, species, parameters, compiled_reactions,
active_rr, y_map, trajectory, save_times, save_index,
delayed_events, trigger_states, event_sensitivity,
tau_step, debug, det_spec, det_rxn):
- 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 run
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def run(self=None, model=None, t=None, number_of_trajectories=1, increment=None, seed=None,
debug=False, profile=False, live_output=None, live_output_options={},
timeout=None, resume=None, tau_tol=0.03, **kwargs):
"""
Function calling simulation of the model.
- 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 display
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def display(self, curr_state, curr_time, trajectory_base, finished=False):
'''
Display the output for the live grapher.
:param curr_state: Current state of the simulation. Should be a list of len 1 to get reference.
- 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 select
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def select(*tau_args):
"""
Tau Selection method based on Cao, Y.; Gillespie, D. T.; Petzold, L. R. (2006).
"Efficient step size selection for the tau-leaping simulation method" (PDF).
The Journal of Chemical Physics. 124 (4): 044109. Bibcode:2006JChPh.124d4109C. doi:10.1063/1.2159468. PMID 16460151
- 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 __calculate_statistics
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def __calculate_statistics(self, curr_time, propensities, curr_state, tau_step, det_spec, cv_history={}):
"""
Calculates Mean, Standard Deviation, and Coefficient of Variance for each
dynamic species, then set if species can be represented determistically
- 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 __init__
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, name=None, reactants=None, products=None, propensity_function=None,
ode_propensity_function=None, rate=None, annotation=None, massaction=None):
if massaction is not None:
from gillespy2.core import log # pylint: disable=import-outside-toplevel
log.warning(
- 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_reactions
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def __get_reactions(sbml_model, gillespy_model, errors):
# reactions
for i in range(sbml_model.getNumReactions()):
reaction = sbml_model.getReaction(i)
name = reaction.getId()
- 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 plotplotly
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def plotplotly(self, index=None, xaxis_label="Time", yaxis_label="Value", title=None,
show_title=False, show_legend=True, multiple_graphs=False, included_species_list=[],
return_plotly_figure=False, **layout_args):
""" Plots the Results using plotly. Can only be viewed in a Jupyter Notebook.
- 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"