Skip to content

Commit 21a9a30

Browse files
authored
Merge pull request #35 from SystemsBioinformatics/dev
Merge in 0.8.1 development for release
2 parents f71824a + 40a8432 commit 21a9a30

40 files changed

+4639
-2463
lines changed

CONTRIBUTORS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Contributors to CBMPy
2+
=====================
3+
4+
Release 0.8.1
5+
-------------
6+
7+
Many thanks go to @jonrkarr and @willigot for their suggestions and code contributions.
8+
9+
10+
(c) Brett G. Olivier, Amsterdam, 2021

MANIFEST.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
include LICENCE_GPLv3.txt
2-
include README.txt
2+
include README.md
3+
include RELEASES.md
4+
include CONTRIBUTORS.md
5+
include environment.yml
6+
include requirements.txt
37
include cbmpy/*
4-
include cbmpy/models/*
5-
include cbmpy/nosetests/*
68
include cbmpy/fluxmodules/*

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
1717

1818
Author: Brett G. Olivier (@bgoli)
1919

20-
# About
20+
## About
2121
PySCeS CBMPy (http://cbmpy.sourceforge.net) is a new platform for constraint
2222
based modelling and analysis. It has been designed using principles developed
2323
in the PySCeS simulation software project: usability, flexibility and accessibility.
@@ -40,36 +40,39 @@ For more information on the development and use of CBMPy (https://github.com/Sys
4040
CBMPy has been tested on Windows 7 and 8.1, 10, Mac OSX and Ubuntu Linux 12.04, 14.04, 16.04, 20.04.
4141
CBMPy is currently developed on Python 3.7 and Python 3.6 or newer is highly recommended
4242

43-
# Install
44-
The best way to get the basic CBMPy running is to install with Pip or create an Anaconda environment. CBMPy is developed on GitHub (https://github.com/SystemsBioinformatics/cbmpy)
43+
## Install
44+
The best way to get the basic CBMPy running is to install from **PyPI** or create an Anaconda environment. CBMPy is developed on GitHub (https://github.com/SystemsBioinformatics/cbmpy)
4545

46-
## Install with pip using requirements.txt
46+
### Install with pip using requirements.txt
4747
From a terrminal or command prompt try:
4848

4949
`pip install -r requirements.txt`
5050

51-
## Install by creating an Anaconda environment using environment.yml
52-
From a terrminal or command prompt try:
51+
### New experimental PyPI install method.
52+
`pip install cbmpy[sbml]`
53+
54+
### Install by creating an Anaconda environment using environment.yml
55+
From a terminal or command prompt try:
5356

5457
`conda env create -f=environment.yml`
5558

56-
This creates an environment **cbmpy** that can be accessed from the command line using `conda activate cbmpy3`
59+
This creates an environment **cbmpy3** that can be accessed from the command line using `conda activate cbmpy3`
5760

58-
## Check the basic installation
61+
### Check the basic installation
5962
To check you installation follow the installation try the following in a Python shell:
6063

6164
```
6265
import cbmpy
6366
cmod = cbmpy.readSBML3FBC('cbmpy_test_core')
6467
cbmpy.doFBA(cmod)
6568
```
66-
# Updating CBMPy
69+
## Updating CBMPy
6770
Once you have installed CBMPy it can be easily upgraded.
6871

69-
## Pip update
72+
### Pip update
7073
`pip install --upgrade cbmpy`
7174

72-
## Anaconda update
75+
### Anaconda update
7376
`conda update cbmpy`
7477

7578
(c) Brett G. Olivier, Amsterdam, 2014-2021

RELEASES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Release history
2+
===============
3+
4+
Release 0.8.1 (2021-07-23)
5+
--------------------------
6+
7+
Primarily a bugfix release to fix the SymPy compatability issues as well as improved requirements handling.
8+
9+
10+
11+
12+
13+
(c) Brett G. Olivier, Amsterdam, 2021

cbmpy/CBCPLEX.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBCPLEX module
33
=====================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -39,6 +39,7 @@
3939
import time
4040
import gc
4141
from collections import OrderedDict
42+
from packaging import version as pkgver
4243

4344
# this is a hack that needs to be streamlined a bit
4445
try:
@@ -50,15 +51,16 @@
5051
try:
5152
import sympy
5253

53-
if (
54-
int(sympy.__version__.split('.')[1]) >= 7
55-
and int(sympy.__version__.split('.')[2]) >= 4
56-
):
54+
if pkgver.parse(sympy.__version__) >= pkgver.Version('0.7.4'):
5755
HAVE_SYMPY = True
5856
else:
5957
del sympy
58+
print(
59+
'\nWARNING: SymPy version 0.7.5 or newer is required for symbolic matrix support.'
60+
)
6061
except ImportError:
6162
HAVE_SYMPY = False
63+
6264
HAVE_SCIPY = False
6365
try:
6466
from scipy.sparse import csr

cbmpy/CBCommon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBCommon module
33
======================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by

cbmpy/CBConfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBConfig module
33
======================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by

cbmpy/CBDataStruct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBDataStruct module
33
==========================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by

cbmpy/CBDefaultModels.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: default model module
33
===========================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66

77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919

2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBCommon.py 660 2018-09-24 14:57:04Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBCommon.py 660 2022-09-24 14:57:04Z bgoli $)
2323

2424
"""
2525

@@ -73901,4 +73901,4 @@
7390173901
</model>
7390273902
</sbml>
7390373903

73904-
"""
73904+
"""

cbmpy/CBGLPK.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBGLPK module
33
====================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -29,20 +29,24 @@
2929

3030
# from __future__ import unicode_literals
3131

32+
from packaging import version as pkgver
33+
3234
HAVE_SYMPY = False
3335
try:
3436
import sympy
3537

36-
if (
37-
int(sympy.__version__.split('.')[1]) >= 7
38-
and int(sympy.__version__.split('.')[2]) >= 4
39-
):
38+
if pkgver.parse(sympy.__version__) >= pkgver.Version('0.7.5'):
4039
HAVE_SYMPY = True
40+
4141
else:
4242
del sympy
43+
print(
44+
'\nWARNING: SymPy version 0.7.5 or newer is required for symbolic matrix support.'
45+
)
4346
except ImportError:
4447
HAVE_SYMPY = False
4548

49+
4650
import os
4751
import time
4852
import numpy
@@ -119,6 +123,9 @@ def glpk_constructLPfromFBA(fba, fname=None):
119123
- *fname* optional filename if defined writes out the constructed lp
120124
121125
"""
126+
127+
print('\nCBGLPK based on swiglpk: not all methods implimented yet!')
128+
122129
_Stime = time.time()
123130

124131
# define model and add variables

0 commit comments

Comments
 (0)