examples/transcription_translation_hybrid_model/run_with_custom_code.py
Function sim_hyb
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
def sim_hyb(rxns, rate_params, init_species, init_time, max_time, checkpoint_period):
""" Simulate model with SSA/ODE hybrid
Args:
rxns (:obj:`dict`): reaction participants and rate laws
- 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 plot
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def plot(
species_ssa, time_ssa,
species_ode, time_ode,
species_hyb, time_hyb,
exp_avg_species, filename):
Function plot
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot(
Function sim_hyb
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def sim_hyb(rxns, rate_params, init_species, init_time, max_time, checkpoint_period):
Function sim_ssa
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def sim_ssa(rxns, rate_params, init_species, init_time, max_time, checkpoint_period):
Function sim_ode
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def sim_ode(rxns, rate_params, init_species, init_time, max_time, checkpoint_period):
Function func
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def func(ys, time, species_ids, rxns, rate_params):
Function sim_ssa
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def sim_ssa(rxns, rate_params, init_species, init_time, max_time, checkpoint_period):
""" Simulate model with SSA
Args:
rxns (:obj:`dict`): reaction participants and rate laws
- 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"