Skip to content

Commit e213067

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 884931a commit e213067

13 files changed

Lines changed: 31 additions & 47 deletions

File tree

biomass/construction/julia_template.py

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
from typing import Final
99

10-
PARAMETERS: Final[
11-
str
12-
] = """\
10+
PARAMETERS: Final[str] = """\
1311
module C
1412
1513
const NAMES = []
@@ -24,9 +22,7 @@
2422
"""
2523

2624

27-
SPECIES: Final[
28-
str
29-
] = """\
25+
SPECIES: Final[str] = """\
3026
module V
3127
3228
const NAMES = []
@@ -41,9 +37,7 @@
4137
"""
4238

4339

44-
ODE: Final[
45-
str
46-
] = """\
40+
ODE: Final[str] = """\
4741
function diffeq!(du, u, p, t)
4842
v = Dict{Int64,Float64}()
4943
@@ -69,9 +63,7 @@
6963
"""
7064

7165

72-
OBSERVABLE: Final[
73-
str
74-
] = """\
66+
OBSERVABLE: Final[str] = """\
7567
const observables = []
7668
7769
function observables_index(observable_name::String)::Int
@@ -83,9 +75,7 @@
8375
"""
8476

8577

86-
SIMULATION: Final[
87-
str
88-
] = """\
78+
SIMULATION: Final[str] = """\
8979
module Sim
9080
include("./name2idx/parameters.jl")
9181
include("./name2idx/species.jl")
@@ -187,9 +177,7 @@
187177
"""
188178

189179

190-
EXPERIMENTAL_DATA: Final[
191-
str
192-
] = """\
180+
EXPERIMENTAL_DATA: Final[str] = """\
193181
module Exp
194182
include("./observable.jl")
195183
@@ -204,9 +192,7 @@
204192
"""
205193

206194

207-
SEARCH_PARAM: Final[
208-
str
209-
] = """\
195+
SEARCH_PARAM: Final[str] = """\
210196
# Specify model parameters and/or initial values to optimize
211197
function get_search_index()::Tuple{Array{Int64,1},Array{Int64,1}}
212198
# parameters
@@ -437,9 +423,7 @@
437423
end
438424
"""
439425

440-
PROBLEM: Final[
441-
str
442-
] = """\
426+
PROBLEM: Final[str] = """\
443427
# Residual Sum of Squares
444428
function compute_objval_rss(
445429
sim_data::Vector{Float64},

biomass/construction/template/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def _diff_sim_and_exp(sim_matrix, exp_dict, exp_timepoint, conditions, sim_norm_
4444
def objective(self, indiv, *args):
4545
"""Define an objective function to be minimized."""
4646
if len(args) == 0:
47-
(x, y0) = self.update(indiv)
47+
x, y0 = self.update(indiv)
4848
elif len(args) == 1:
4949
raise ValueError("not enough values to unpack (expected 2, got 1)")
5050
elif len(args) == 2:
51-
(x, y0) = args
51+
x, y0 = args
5252
else:
5353
raise ValueError("too many values to unpack (expected 2)")
5454

biomass/model_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def load_param(self, paramset: int) -> OptimizedValues:
109109
Optimized parameter/initial values.
110110
"""
111111
best_individual = self.get_individual(paramset)
112-
(x, y0) = self.problem.update(best_individual)
112+
x, y0 = self.problem.update(best_individual)
113113
optimized_values = OptimizedValues(x, y0)
114114
return optimized_values
115115

biomass/models/Nakakuki_Cell_2010/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def _diff_sim_and_exp(sim_matrix, exp_dict, exp_timepoint, conditions, sim_norm_
4444
def objective(self, indiv, *args):
4545
"""Define an objective function to be minimized"""
4646
if len(args) == 0:
47-
(x, y0) = self.update(indiv)
47+
x, y0 = self.update(indiv)
4848
elif len(args) == 1:
4949
raise ValueError("not enough values to unpack (expected 2, got 1)")
5050
elif len(args) == 2:
51-
(x, y0) = args
51+
x, y0 = args
5252
else:
5353
raise ValueError("too many values to unpack (expected 2)")
5454

biomass/models/circadian_clock/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def _diff_sim_and_exp(sim_matrix, exp_dict, exp_timepoint, conditions, sim_norm_
4444
def objective(self, indiv, *args):
4545
"""Define an objective function to be minimized"""
4646
if len(args) == 0:
47-
(x, y0) = self.update(indiv)
47+
x, y0 = self.update(indiv)
4848
elif len(args) == 1:
4949
raise ValueError("not enough values to unpack (expected 2, got 1)")
5050
elif len(args) == 2:
51-
(x, y0) = args
51+
x, y0 = args
5252
else:
5353
raise ValueError("too many values to unpack (expected 2)")
5454

biomass/models/g1s_transition/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def _diff_sim_and_exp(sim_matrix, exp_dict, exp_timepoint, conditions, sim_norm_
4444
def objective(self, indiv, *args):
4545
"""Define an objective function to be minimized"""
4646
if len(args) == 0:
47-
(x, y0) = self.update(indiv)
47+
x, y0 = self.update(indiv)
4848
elif len(args) == 1:
4949
raise ValueError("not enough values to unpack (expected 2, got 1)")
5050
elif len(args) == 2:
51-
(x, y0) = args
51+
x, y0 = args
5252
else:
5353
raise ValueError("too many values to unpack (expected 2)")
5454

biomass/models/insulin_signaling/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def _diff_sim_and_exp(sim_matrix, exp_dict, exp_timepoint, conditions, sim_norm_
4444
def objective(self, indiv, *args):
4545
"""Define an objective function to be minimized"""
4646
if len(args) == 0:
47-
(x, y0) = self.update(indiv)
47+
x, y0 = self.update(indiv)
4848
elif len(args) == 1:
4949
raise ValueError("not enough values to unpack (expected 2, got 1)")
5050
elif len(args) == 2:
51-
(x, y0) = args
51+
x, y0 = args
5252
else:
5353
raise ValueError("too many values to unpack (expected 2)")
5454

biomass/models/jak_stat_pathway/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def _diff_sim_and_exp(sim_matrix, exp_dict, exp_timepoint, conditions, sim_norm_
4444
def objective(self, indiv, *args):
4545
"""Define an objective function to be minimized."""
4646
if len(args) == 0:
47-
(x, y0) = self.update(indiv)
47+
x, y0 = self.update(indiv)
4848
elif len(args) == 1:
4949
raise ValueError("not enough values to unpack (expected 2, got 1)")
5050
elif len(args) == 2:
51-
(x, y0) = args
51+
x, y0 = args
5252
else:
5353
raise ValueError("too many values to unpack (expected 2)")
5454

biomass/models/mapk_cascade/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def _diff_sim_and_exp(sim_matrix, exp_dict, exp_timepoint, conditions, sim_norm_
4444
def objective(self, indiv, *args):
4545
"""Define an objective function to be minimized"""
4646
if len(args) == 0:
47-
(x, y0) = self.update(indiv)
47+
x, y0 = self.update(indiv)
4848
elif len(args) == 1:
4949
raise ValueError("not enough values to unpack (expected 2, got 1)")
5050
elif len(args) == 2:
51-
(x, y0) = args
51+
x, y0 = args
5252
else:
5353
raise ValueError("too many values to unpack (expected 2)")
5454

biomass/models/nfkb_pathway/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def _diff_sim_and_exp(sim_matrix, exp_dict, exp_timepoint, conditions, sim_norm_
4444
def objective(self, indiv, *args):
4545
"""Define an objective function to be minimized"""
4646
if len(args) == 0:
47-
(x, y0) = self.update(indiv)
47+
x, y0 = self.update(indiv)
4848
elif len(args) == 1:
4949
raise ValueError("not enough values to unpack (expected 2, got 1)")
5050
elif len(args) == 2:
51-
(x, y0) = args
51+
x, y0 = args
5252
else:
5353
raise ValueError("too many values to unpack (expected 2)")
5454

0 commit comments

Comments
 (0)