-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement automated building of python manylinux and mac wheels (#274)
* Feature/auto wheel (#264) Implement automated building of python manylinux and mac wheels This new feature came with a couple of (minor) drawbacks - change to codecov instead of coveralls as difficulty getting coveralls to report for installed wheel (can't use coverage run setup.py test on library package) - (for the moment) drop support for testing matplotlib functions (as difficulty installing matplotlib in non-framework mode in docker container) - readme files switch to native rst mode to avoid dependency on pypandoc * fix #255 common warnings w/o palettable (#269) give same warning w/w/o palettable if the number of segments is too large for picking good colors * debug travis wheel build travis plan did not fail properly when unit-tests broke. This commit fixes that issue and also adds tabulate as a dependency to the test stage (as needed for model_summary) * uninstall glpk before testing * use testpypi to get test builds * revert original config for test pypi server * trigger own travis build * remove test code
- Loading branch information
Showing
15 changed files
with
381 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,77 @@ | ||
language: python | ||
sudo: false | ||
python: 3.5 | ||
sudo: required | ||
dist: trusty | ||
services: docker | ||
sudo: required | ||
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
python: | ||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
addons: | ||
apt: | ||
packages: | ||
- gfortran | ||
- libatlas-dev | ||
- libatlas-base-dev | ||
- liblapack-dev | ||
- libgmp-dev | ||
- libglpk-dev | ||
- libmpfr-dev | ||
|
||
# command to install dependencies | ||
- libfreetype6-dev | ||
- libpng12-dev | ||
|
||
env: | ||
- PIP_CACHE_DIR=$HOME/.cache/pip | ||
global: | ||
- secure: "cZb8f52Ei3Rxr0r7mCkYClk/gMRia3Idi6EO8VvsJKcVwAn3r0hVRnpP3H75hFEFpys4K000CdzhRMQgKF2Se6cmEad2UbyIJa193pHZ9kqPbhK/amEx5F8EO8SuozR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qx4+yRKUjF2AtWbftQmN0sKNwIo6JPNiFDunP49Lk35LsQTQ0T/OxjLZRMfb8uBrp11b9BAj7bCCUBQErI9HUzLXeyLaDLKwBYYtUx5zLJ5sfvcjWiub2FHfwjfCYBi1NqBcWLRgN1lx3vCA7SoUs9SJEQPOgGwyg9bHdjg70m13jMMBPU=" | ||
- PLAT=x86_64 | ||
- UNICODE_WIDTH=32 | ||
|
||
matrix: | ||
exclude: | ||
- python: 3.5 | ||
include: | ||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=2.7 | ||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=3.4 | ||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=3.5 | ||
- os: osx | ||
language: objective-c | ||
env: | ||
- MB_PYTHON_VERSION=2.7 | ||
- os: osx | ||
language: objective-c | ||
env: | ||
- MB_PYTHON_VERSION=3.4 | ||
- os: osx | ||
language: objective-c | ||
env: | ||
- MB_PYTHON_VERSION=3.5 | ||
|
||
before_install: | ||
- pip install pip --upgrade | ||
# These get cached | ||
- pip install numpy scipy python-libsbml cython coveralls jsonschema six matplotlib pandas tabulate | ||
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install lxml glpk pep8 palettable; fi | ||
# Download esolver and add it to the path | ||
- wget https://opencobra.github.io/pypi_cobrapy_travis/esolver.gz | ||
- gzip -d esolver.gz; chmod +x esolver; export PATH=$PATH:$PWD | ||
- mkdir -p $HOME/.config/matplotlib | ||
- "echo 'backend: Agg' >> $HOME/.config/matplotlib/matplotlibrc" | ||
- (git clone https://github.com/matthew-brett/multibuild.git && cd multibuild && git checkout d7ba4ae) | ||
# matplotlib non-compatible as testing runs in venv (non-framework) | ||
- TEST_DEPENDS="cython codecov coverage numpy scipy python-libsbml jsonschema six pandas tabulate" | ||
- BUILD_DEPENDS="cython numpy scipy" | ||
- source multibuild/common_utils.sh | ||
- source multibuild/travis_steps.sh | ||
- before_install | ||
|
||
before_cache: | ||
- set +e | ||
|
||
install: | ||
- python setup.py develop | ||
# # command to run tests | ||
- build_wheel . $PLAT | ||
|
||
script: | ||
- coverage run --source=cobra setup.py test | ||
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then | ||
pep8 cobra --exclude=oven,solvers,sbml.py --show-source; | ||
fi | ||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then pip install pip --upgrade; pip install pep8; pep8 cobra --exclude=oven,solvers,sbml.py --show-source; fi | ||
- install_run $PLAT | ||
|
||
deploy: | ||
provider: script | ||
skip_cleanup: true | ||
script: scripts/deploy.sh | ||
on: | ||
branch: master | ||
tags: true | ||
|
||
after_success: | ||
- coveralls | ||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then pip install pip --upgrade; pip install codecov; codecov; fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Contribution Guidelines | ||
----------------------- | ||
|
||
Generally, the following practices are recommended for making | ||
contributions to cobrapy. These aren't all necessarily hard-and-fast | ||
rules, but should serve as guidelines in most cases. | ||
|
||
1. Please comment code. | ||
2. All new python code should be pep8 compliant. | ||
3. Please use git best practices, with a 50 line summary for each | ||
commit. Generally, separate features should be made in separate | ||
commits so they can be tested and merged independently. For example, | ||
adding a new solver would be a separate commit from fixing whitespace | ||
in cobra.core. | ||
4. Documentation is written as IPython/jupyter notebooks in the | ||
``documentation_builder`` directory, which are then converted to rst | ||
by the ``autodoc.sh`` script. | ||
5. Tests are in the ``cobra/test`` directory. They are automatically run | ||
through continuous integration services on both python 2 and python 3 | ||
when pull requests are made. | ||
6. Please write tests for new functions. Writing documentation as well | ||
would also be very helpful. | ||
7. Ensure code will work with both python 2 and python 3. For example, | ||
instead of ``my_dict.iteritems()`` use ``six.iteritems(my_dict)`` | ||
|
||
Thank you very much for contributing to cobrapy. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.