Skip to content

Commit

Permalink
Resolved travis conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
esameth committed May 12, 2021
2 parents d675c11 + 479c318 commit a32f96b
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 117 deletions.
71 changes: 20 additions & 51 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,28 @@ install:
if [ ! -f "src" ]; then
mkdir src;
fi;
version=$(python -V 3>&1);
if [ -n "$version" ]; then
pip install Cython;
if [ ! -f "$HOME/qsopt-ex/esolver" ]; then
( cd src/;
git clone https://github.com/jonls/qsopt-ex.git;
cd qsopt-ex/;
./bootstrap;
mkdir build && cd build;
../configure --prefix="$HOME/qsopt-ex" && make install;
cd $HOME );
fi;
if [ ! -f "$HOME/python-qsoptex" ]; then
( cd src/;
git clone https://github.com/jonls/python-qsoptex.git;
cd python-qsoptex/;
./setup.py install;
cd $HOME );
fi;
pip install python-qsoptex;
export CPATH="$HOME/qsopt-ex/include:$CPATH";
export LIBRARY_PATH="$HOME/qsopt-ex/lib:$LIBRARY_PATH";
export LD_LIBRARY_PATH="$HOME/qsopt-ex/lib:$LD_LIBRARY_PATH";
else
if [ ! -f "$HOME/get-pip.py" ]; then

pip install Cython;
if [ ! -f "$HOME/qsopt-ex/esolver" ]; then
( cd src/;
curl -O https://bootstrap.pypa.io/pip/2.7/get-pip.py;
python get-pip.py;
python -m pip install --upgrade "pip < 19.2" );
fi;
if [ ! -f "$HOME/qsopt_ex-2.5.10.3/bin/esolver" ]; then
( cd src/;
curl -LO https://github.com/jonls/qsopt-ex/releases/download/v2.5.10.3/qsopt_ex-2.5.10.3.tar.xz;
tar -xvaf qsopt_ex-2.5.10.3.tar.xz;
cd qsopt_ex-2.5.10.3/;
./configure --prefix="$HOME/qsopt_ex-2.5.10.3" && make install );
fi;
export CPATH="$HOME/qsopt_ex-2.5.10.3/include:$CPATH";
export LIBRARY_PATH="$HOME/qsopt_ex-2.5.10.3/lib:$LIBRARY_PATH";
export LD_LIBRARY_PATH="$HOME/qsopt_ex-2.5.10.3/lib:$LD_LIBRARY_PATH";
git clone https://github.com/jonls/qsopt-ex.git;
cd qsopt-ex/;
./bootstrap;
mkdir build && cd build;
../configure --prefix="$HOME/qsopt-ex" && make install;
cd $HOME );
fi;
if [ ! -f "$HOME/python-qsoptex" ]; then
( cd src/;
git clone https://github.com/jonls/python-qsoptex.git;
cd python-qsoptex/;
./setup.py install;
cd $HOME );
fi;
pip install python-qsoptex;
export CPATH="$HOME/qsopt-ex/include:$CPATH";
export LIBRARY_PATH="$HOME/qsopt-ex/lib:$LIBRARY_PATH";
export LD_LIBRARY_PATH="$HOME/qsopt-ex/lib:$LD_LIBRARY_PATH";
fi;
- pip install tox coveralls
- pip install tox-travis
Expand All @@ -70,18 +51,6 @@ after_success: coveralls
matrix:
include:
- env: TOXENV=flake
- env: TOXENV=py27-nosolver,coverage
python: '2.7'
- env: TOXENV=py27-glpk,coverage
python: '2.7'
- env: TOXENV=py27-qsoptex,coverage
python: '2.7'
- env: TOXENV=py35-nosolver,coverage
python: '3.5'
- env: TOXENV=py35-glpk,coverage
python: '3.5'
- env: TOXENV=py35-qsoptex,coverage
python: '3.5'
- env: TOXENV=py36-nosolver,coverage
python: '3.6'
- env: TOXENV=py36-glpk,coverage
Expand Down
8 changes: 5 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
v1.1.2 (2021-05-10)

v1.1.2 (2021-05-10)
------------------


- Drops support for Python 2.7 (deprecated Jan. 01, 2020), 3.3, and 3.4
- Adds the --phin and --phout options to the `tmfa` command
- Adds descriptive counts of the number of reactions and compounds
- Adds descriptive counts of the number of reactions and compounds
curated in the _manual curation_ option of `modelmapping`


Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

# General information about the project.
project = u'PSAMM'
copyright = u'2015-2017, PSAMM developers'
copyright = u'2015-2021, PSAMM developers'
author = u'PSAMM developers'

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -124,7 +124,7 @@
todo_include_todos = False

intersphinx_mapping = {
'python': ('https://docs.python.org/2.7', None)
'python': ('https://docs.python.org/3', None)
}

autodoc_member_order = 'bysource'
Expand Down
15 changes: 5 additions & 10 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,22 @@ for coding style (PEP8) and building documentation, use tox_:
$ tox
When testing with tox, the local path for the Cplex python module must be
provided in the environment variables ``CPLEX_PYTHON2_PACKAGE`` and
``CPLEX_PYTHON3_PACKAGE`` for Python 2 and Python 3, respectively. For example:
provided in the environment variables ``CPLEX_PYTHON3_PACKAGE`` for Python 3.
For example:

.. code-block:: shell
$ export CPLEX_PYTHON2_PACKAGE=/path/to/IBM/ILOG/CPLEX_StudioXXX/cplex/python/2.7/x86-64_osx
$ export CPLEX_PYTHON3_PACKAGE=/path/to/IBM/ILOG/CPLEX_StudioXXX/cplex/python/3.4/x86-64_osx
$ tox -e py27-cplex,py34-cplex
$ export CPLEX_PYTHON3_PACKAGE=/path/to/IBM/ILOG/CPLEX_StudioXXX/cplex/python/3.7/x86-64_osx
$ tox -e py37-cplex
.. note::

Python 3 support was added in a recent release of Cplex. Older versions
only support Python 2.
Similarly, the local path to the Gurobi package must be specified in the
environment variable ``GUROBI_PYTHON_PACKAGE``:

.. code-block:: shell
$ export GUROBI_PYTHON_PACKAGE=/Library/gurobi604/mac64
$ tox -e py27-gurobi
$ tox -e py37-gurobi
Adding new tests
----------------
Expand Down
33 changes: 4 additions & 29 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ the virtual environment:
1. Locate the directory where Cplex was installed (e.g. ``/path/to/IBM/ILOG/CPLEX_StudioXXX``).
2. Locate the appropriate subdirectory based on your platform and Python
version: ``cplex/python/<version>/<platform>``
(e.g. ``cplex/python/2.7/x86-64_osx``).
(e.g. ``cplex/python/3.7/x86-64_osx``).
3. Use ``pip`` to install the package from this directory using the following
command.

Expand All @@ -76,11 +76,6 @@ the virtual environment:
Further documentation on installing Cplex can be found in
`the Cplex documentation <http://www-01.ibm.com/support/docview.wss?uid=swg21444285>`_.

.. note::

Python 3 support was added in a recent release of Cplex. Older versions
only support Python 2. If you are using Python 3 make sure that you have
the latest version of Cplex installed.

Gurobi
------
Expand Down Expand Up @@ -111,23 +106,8 @@ Python bindings are required for PSAMM to use the GLPK library.
QSopt_ex
--------

QSopt_ex is supported through `python-qsoptex`_ which requires `GnuMP`_ and
the `QSopt_ex library`_. After installing these libraries the Python bindings
can be installed using ``pip``:

.. code-block:: shell
(env) $ pip install python-qsoptex
.. _Virtualenv: https://virtualenv.pypa.io/
.. _python-qsoptex: https://pypi.python.org/pypi/python-qsoptex
.. _GnuMP: https://gmplib.org/
.. _QSopt_ex library: https://github.com/jonls/qsopt-ex

The installation method detailed above is only supported on Python 3.4 or lower.
If you want to use this solver with later versions of Python, you must first
install this `python-qsoptex_higherPython`_, a different library for this solver,
and different bindings from `QSopt_ex_higherPython`_
QSopt_ex is supported through `python-qsoptex`_ which requires `python-qsoptex_higherPython`_
and `QSopt_ex_higherPython`_ . This can be installed using ``pip``:

.. code-block:: shell
Expand All @@ -148,7 +128,6 @@ is shown below:
:header-rows: 1

* - Solver
- Python 2.7
- Python 3.5
- Python 3.6
- Python 3.7
Expand All @@ -158,21 +137,17 @@ is shown below:
- Yes
- Yes
- Yes
- Yes
* - Qsopt_ex
- Yes
- Yes
- Yes
- Yes
- Yes
* - Gurobi
- Yes
- Yes
- No
- No
- No
* - GLPK
- Yes
- No
- Yes
- Yes
Expand All @@ -192,7 +167,7 @@ global parameters you might require before choosing a solver.
* - Solver
- feasibility tolerance
- optimality tolerance
- inegrality tolerance
- integrality tolerance
- threads
* - Cplex
- Yes
Expand Down
18 changes: 7 additions & 11 deletions docs/tutorial/psamm-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,7 @@ the ``psamm-tutorial`` folder:
In this command, ``<PATH>`` should be substituted by the directory path to
where you created the ``psamm-tutorial``. This will change your current
directory to the ``psamm-tutorial`` directory. Then, you can create a virtual
environment for Python 2 in the ``psamm-tutorial`` directory:

.. code-block:: shell
$ virtualenv psamm-env
For Python 3, use the following command instead:
environment in the ``psamm-tutorial`` directory:

.. code-block:: shell
Expand Down Expand Up @@ -235,19 +229,21 @@ will be different):
(psamm-env) $ cd /Library/gurobi604/mac64/
(psamm-env) $ python setup.py install
The QSopt_ex solver can also be used with PSAMM. To install this solver, Python 3.4 or
lower is required. You will first need to install Qsopt_ex on your computer and
The QSopt_ex solver can also be used with PSAMM. To install this solver, Python 3.5 or
higher is required. You will first need to install Qsopt_ex on your computer and
afterwards the Python bindings (`python-qsoptex`) can be installed in the virtual
environment:

.. code-block:: shell
(psamm-env) $ pip install python-qsoptex
(env) $ pip install cython
(env) $ pip install python-qsoptex
Please see the `python-qsoptex documentation`_ for more information on
installing both the library and the Python bindings.

.. _`python-qsoptex documentation`: https://github.com/jonls/python-qsoptex
.. _python-qsoptex_higherPython: https://github.com/jonls/python-qsoptex.git
.. _QSopt_ex_higherPython: https://github.com/jonls/qsopt-ex.git

.. note::
The QSopt_ex solver does not support Integer LP problems and as a result
Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@
(
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)'),
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
Expand Down Expand Up @@ -129,7 +126,5 @@
'pandas'
],
extras_require={
'docs': ['sphinx', 'sphinx_rtd_theme', 'mock'],
':python_version=="2.7"': ['enum34'],
':python_version=="3.3"': ['enum34']
'docs': ['sphinx', 'sphinx_rtd_theme', 'mock']
})
6 changes: 1 addition & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[tox]
envlist =
py27-{nosolver,qsoptex,glpk},
py33-{nosolver,qsoptex,glpk},
py34-{nosolver,qsoptex,glpk},
py35-{nosolver,qsoptex,glpk},
py36-{nosolver,qsoptex,glpk},
py37-{nosolver,qsoptex,glpk},
Expand All @@ -23,9 +20,8 @@ setenv =
glpk: PSAMM_SOLVER=glpk
deps =
coverage~=4.0
py27-cplex: {env:CPLEX_PYTHON2_PACKAGE}
py35-cplex: {env:CPLEX_PYTHON3_PACKAGE}
py{33,34,35,36,37}-qsoptex: cython
py{35,36,37}-qsoptex: cython
qsoptex: python-qsoptex>=0.5
gurobi: {env:GUROBI_PYTHON_PACKAGE}
glpk: swiglpk==1.2.13
Expand Down

0 comments on commit a32f96b

Please sign in to comment.