Skip to content

Commit 5bd079a

Browse files
committed
updated docstrings
1 parent 174b060 commit 5bd079a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/CBModel.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBModel.py 691 2019-07-26 12:09:03Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBModel.py 693 2019-07-26 12:25:25Z bgoli $)
2323
2424
"""
2525
## gets rid of "invalid variable name" info
@@ -1026,11 +1026,16 @@ def addFluxBound(self, fluxbound, fbexists=None):
10261026
```python
10271027
fbexists = []
10281028
for fluxbound in list_of_fluxbounds:
1029-
model.addFluxBound(c_, fbexists=fbexists)
1029+
model.addFluxBound(fluxbound, fbexists=fbexists)
10301030
fbexists.append("{}_{}".format(fluxbound.getReactionId(), fluxbound.getType()))
10311031
```
10321032
1033-
Using the fbexists list drastically reduces the time it takes to add fluxbounds
1033+
Using the fbexists list drastically reduces the time it takes to add fluxbounds but circumvents any sort of existence checking and should *only* be
1034+
used as shown above when constructing a model from scratch. Alternativel, you need to prepopulate fbexists with existing fluxbound component information:
1035+
1036+
```python
1037+
fbexists = ["{}_{}".format(fluxbound.getReactionId(), fluxbound.getType()) for fluxbound in model.flux_bounds]
1038+
```
10341039
10351040
"""
10361041
assert type(fluxbound) == FluxBound, '\nERROR: requires a FluxBound object, not something of type {}'.format(type(fluxbound))

0 commit comments

Comments
 (0)