Skip to content

Commit

Permalink
release 0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoli committed Apr 18, 2016
1 parent f53d3d2 commit 837764b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 115 deletions.
Binary file modified cbmpy-docs/cbmpy_reference_manual.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions src/CBConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
Author: Brett G. Olivier
Contact email: [email protected]
Last edit: $Author: bgoli $ ($Id: CBConfig.py 432 2016-04-15 13:38:26Z bgoli $)
Last edit: $Author: bgoli $ ($Id: CBConfig.py 445 2016-04-18 21:44:38Z bgoli $)
"""
## gets rid of "invalid variable name" info #
## gets rid of "invalid variable name" info
# pylint: disable=C0103
## gets rid of "line to long" info
# pylint: disable=C0301
Expand All @@ -38,7 +38,7 @@
# release

try:
STATUS = '$Rev: 432 $'.replace('Rev: ', '').replace('$', '').strip()
STATUS = '$Rev: 445 $'.replace('Rev: ', '').replace('$', '').strip()
except Exception:
STATUS = ''

Expand Down
104 changes: 3 additions & 101 deletions src/CBVersion.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< .mine
"""
CBMPy: CBVersion module
=======================
Expand All @@ -20,10 +19,10 @@
Author: Brett G. Olivier
Contact email: [email protected]
Last edit: $Author: bgoli $ ($Id: CBVersion.py 432 2016-04-15 13:38:26Z bgoli $)
Last edit: $Author: bgoli $ ($Id: CBVersion.py 445 2016-04-18 21:44:38Z bgoli $)
"""
# bump 1
# bump 2
# preparing for Python 3 port
from __future__ import division, print_function
from __future__ import absolute_import
Expand All @@ -33,7 +32,7 @@
MINOR = 7
MICRO = 4
try:
STATUS = '$Rev: 432 $'.replace('Rev: ','').replace('$','').strip()
STATUS = '$Rev: 445 $'.replace('Rev: ','').replace('$','').strip()
except:
STATUS = ''

Expand All @@ -46,100 +45,3 @@ def current_version_tuple():
__version__ = current_version()
__DEBUG__ = True
__DEBUG__ = False
||||||| .r428
"""
CBMPy: CBVersion module
=======================
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
Copyright (C) 2009-2015 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
Author: Brett G. Olivier
Contact email: [email protected]
Last edit: $Author: bgoli $ ($Id: CBVersion.py 432 2016-04-15 13:38:26Z bgoli $)
"""
# bump
# preparing for Python 3 port
from __future__ import division, print_function
from __future__ import absolute_import
#from __future__ import unicode_literals

MAJOR = 0
MINOR = 7
MICRO = 4
try:
STATUS = '$Rev: 432 $'.replace('Rev: ','').replace('$','').strip()
except:
STATUS = ''

def current_version():
return '%s.%s.%s.r%s' % (MAJOR, MINOR, MICRO, STATUS)

def current_version_tuple():
return (MAJOR, MINOR, MICRO)

__version__ = current_version()
__DEBUG__ = True
__DEBUG__ = False
=======
"""
CBMPy: CBVersion module
=======================
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
Copyright (C) 2009-2015 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
Author: Brett G. Olivier
Contact email: [email protected]
Last edit: $Author: bgoli $ ($Id: CBVersion.py 432 2016-04-15 13:38:26Z bgoli $)
"""
# bump 1
# preparing for Python 3 port
from __future__ import division, print_function
from __future__ import absolute_import
#from __future__ import unicode_literals

MAJOR = 0
MINOR = 7
MICRO = 4
try:
STATUS = '$Rev: 432 $'.replace('Rev: ','').replace('$','').strip()
except:
STATUS = ''

def current_version():
return '%s.%s.%s.r%s' % (MAJOR, MINOR, MICRO, STATUS)

def current_version_tuple():
return (MAJOR, MINOR, MICRO)

__version__ = current_version()
__DEBUG__ = True
__DEBUG__ = False
>>>>>>> .r442
3 changes: 2 additions & 1 deletion src/CBXML.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Author: Brett G. Olivier
Contact email: [email protected]
Last edit: $Author: bgoli $ ($Id: CBXML.py 435 2016-04-15 14:37:38Z bgoli $)
Last edit: $Author: bgoli $ ($Id: CBXML.py 443 2016-04-18 21:28:42Z bgoli $)
"""
## gets rid of "invalid variable name" info
Expand Down Expand Up @@ -2404,6 +2404,7 @@ def sbml_readCOBRASBML(fname, work_dir=None, return_sbml_model=False, delete_int
"""
try:
new_file = sbml_convertCOBRASBMLtoFBC(fname, outname=None, work_dir=work_dir, output_dir=output_dir)
print(new_file)
except Exception as why:
print('\nCOBRA file conversion failed:\n\"{}\"'.format(why))
return None
Expand Down
4 changes: 2 additions & 2 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
Author: Brett G. Olivier
Contact email: [email protected]
Last edit: $Author: bgoli $ ($Id: __init__.py 432 2016-04-15 13:38:26Z bgoli $)
Last edit: $Author: bgoli $ ($Id: __init__.py 445 2016-04-18 21:44:38Z bgoli $)
"""
###
##
# preparing for Python 3 port
from __future__ import division, print_function
from __future__ import absolute_import
Expand Down
18 changes: 10 additions & 8 deletions src/nosetests/test_loadSBML.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
MDIR = os.path.join(os.path.split(cDir)[0], 'models')
MDIR = cDir

import nose
try:
import nose
except ImportError:
print('WARNING: To run tests please install python-nose')
from nose.tools import assert_equal
from nose.tools import assert_almost_equal
from nose.tools import assert_not_equal
Expand Down Expand Up @@ -48,8 +51,7 @@ def test_load_L2FBA_iJR904(self):
assert_not_equal(cmod, None)

def test_load_L2CBR_iJR904(self):
print('\n\nThis test fails under Linux.\n\n')
cmod = cbmpy.readCOBRASBML(os.path.join(MDIR, 'L2CBR_iJR904.glc.xml'), work_dir=self.CDIR,\
cmod = cbmpy.readCOBRASBML('L2CBR_iJR904.glc.xml', work_dir=MDIR,\
output_dir=self.CDIR, delete_intermediate=False)
assert_not_equal(cmod, None)

Expand All @@ -61,8 +63,8 @@ def setup_class(klass):
klass.m = {}
for m in DATA:
if m.startswith('L2CBR_'):
cmod = cbmpy.readCOBRASBML(os.path.join(MDIR, m), work_dir=self.CDIR,\
output_dir=self.CDIR, delete_intermediate=False)
cmod = cbmpy.readCOBRASBML(m, work_dir=MDIR,\
output_dir=self.CDIR, delete_intermediate=True)
elif m.startswith('L2FBA_'):
cmod = cbmpy.readSBML2FBA(os.path.join(MDIR, m))
elif m.startswith('L3FBCV1_') or m.startswith('L3FBCV2_'):
Expand All @@ -84,9 +86,9 @@ def test_load(self):

def test_run_fba_cobra(self):
print('\n\nThis test fails under Linux.\n\n')
cmod = cbmpy.readCOBRASBML(os.path.join(MDIR, 'L2CBR_iJR904.glc.xml'), work_dir=self.CDIR,\
output_dir=self.CDIR, delete_intermediate=False)
cmod2 = cbmpy.readSBML3FBC(os.path.join(MDIR, 'L3FBCV1_iJR904.glc.xml'))
cmod = cbmpy.readCOBRASBML('L2CBR_iJR904.glc.xml', work_dir=MDIR,\
output_dir=self.CDIR, delete_intermediate=True)
cmod2 = cbmpy.readSBML3FBC('L3FBCV1_iJR904.glc.xml', work_dir=MDIR)
fba1 = cbmpy.doFBA(cmod)
fba2 = cbmpy.doFBA(cmod2)
del cmod, cmod2
Expand Down

0 comments on commit 837764b

Please sign in to comment.