Skip to content

Commit bc45fb2

Browse files
authored
Merge pull request ModelSEED#96 from Fxe/dev
Fix MSATPCorrection pytest
2 parents f79e444 + fc94ebb commit bc45fb2

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

modelseedpy/core/mstemplate.py

+25
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ class TemplateReactionType(Enum):
3535
GAPFILLING = "gapfilling"
3636

3737

38+
class TemplateBiomassCoefficientType(Enum):
39+
MOLFRACTION = "MOLFRACTION"
40+
MOLSPLIT = "MOLSPLIT"
41+
MULTIPLIER = "MULTIPLIER"
42+
EXACT = "EXACT"
43+
44+
3845
class MSTemplateMetabolite:
3946
def __init__(
4047
self,
@@ -435,6 +442,24 @@ def get_data(self):
435442
# id=self.id, stoichiometry=self.build_reaction_string())
436443

437444

445+
class MSTemplateBiomass:
446+
def __init__(self):
447+
pass
448+
449+
@staticmethod
450+
def from_dict(d):
451+
pass
452+
453+
def add_biomass_component(self):
454+
pass
455+
456+
def to_reaction(self, model=None, index="0"):
457+
pass
458+
459+
def get_data(self):
460+
pass
461+
462+
438463
class NewModelTemplateRole:
439464
def __init__(self, role_id, name, features=None, source="", aliases=None):
440465
"""

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
license=license,
2121
packages=find_packages(exclude=("docs")),
2222
package_data={
23-
"modelseedpy": ["config.cfg"],
23+
"modelseedpy": ["config.cfg", "data/*"],
2424
},
2525
classifiers=[
2626
"Development Status :: 3 - Alpha",

tests/core/test_msatpcorreption.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ def test_infinite_atp_model_growth_boost(
207207
def test_ms_atp_correction1(get_model, template, media_all_aerobic):
208208
model = get_model(["GLCpts_c0", "NADH16_c0", "CYTBD_c0", "O2t_c0"])
209209
atp_correction = MSATPCorrection(
210-
model, template, media_all_aerobic, atp_hydrolysis_id="ATPM_c0"
210+
model,
211+
template,
212+
media_all_aerobic,
213+
atp_hydrolysis_id="ATPM_c0",
214+
load_default_medias=False,
211215
)
212216
atp_correction.evaluate_growth_media()
213217
assert len(atp_correction.noncore_reactions) == 1 # the biomass
@@ -249,7 +253,11 @@ def test_ms_atp_correction_and_gap_fill1(
249253
model.reactions.ATPM_c0.upper_bound = 1000
250254

251255
atp_correction = MSATPCorrection(
252-
model, template, [media_glucose_aerobic], atp_hydrolysis_id="ATPM_c0"
256+
model,
257+
template,
258+
[media_glucose_aerobic],
259+
atp_hydrolysis_id="ATPM_c0",
260+
load_default_medias=False,
253261
)
254262
tests = atp_correction.run_atp_correction()
255263

@@ -273,6 +281,6 @@ def test_ms_atp_correction_and_gap_fill1(
273281
assert len(result["new"]) == 1
274282
assert "GLUSy_c0" in result["new"] or "GLUDy_c0" in result["new"]
275283

276-
model = gap_fill.integrate_gapfill_solution(result)
284+
gap_fill.integrate_gapfill_solution(result)
277285

278-
assert model
286+
# TODO: add some model testing assertion

0 commit comments

Comments
 (0)