-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add style-checking for notebooks & refactor Travis config (#1522)
* add installation script for env * Add run script for test/codestyle * modify travis file * fix misprints * add pytest * Add basic version checking * try to fix FAST_VERSION==-1 * try to fix FAST_VERSION==-1[2] * remove debug info * fix flake8 problems with ignore list * continue with flake (break pep8 in matutils) * fix regexp for grep * restore matutils * echo files for flake8 * Add ipynb checking * special mistakes in .ipynb for testing purposes * Distinct file checking for ipynb * remove mistakes from notebooks
- Loading branch information
1 parent
3d2227d
commit ed0b03e
Showing
5 changed files
with
64 additions
and
25 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,23 +1,22 @@ | ||
sudo: false | ||
|
||
cache: | ||
apt: true | ||
directories: | ||
- $HOME/.cache/pip | ||
- $HOME/.ccache | ||
|
||
dist: trusty | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.5" | ||
- "3.6" | ||
before_install: | ||
- wget 'http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh' -O miniconda.sh | ||
- chmod +x miniconda.sh | ||
- ./miniconda.sh -b | ||
- export PATH=/home/travis/miniconda2/bin:$PATH | ||
- conda update --yes conda | ||
install: | ||
- conda create --yes -n gensim-test python=$TRAVIS_PYTHON_VERSION pip atlas numpy==1.11.3 scipy==0.18.1 | ||
- source activate gensim-test | ||
- python setup.py install | ||
- pip install .[test] | ||
script: | ||
- pip freeze | ||
- python setup.py test | ||
- pip install flake8 | ||
- continuous_integration/travis/flake8_diff.sh | ||
|
||
|
||
matrix: | ||
include: | ||
- env: PYTHON_VERSION="2.7" NUMPY_VERSION="1.11.3" SCIPY_VERSION="0.18.1" ONLY_CODESTYLE="yes" | ||
- env: PYTHON_VERSION="2.7" NUMPY_VERSION="1.11.3" SCIPY_VERSION="0.18.1" ONLY_CODESTYLE="no" | ||
- env: PYTHON_VERSION="3.5" NUMPY_VERSION="1.11.3" SCIPY_VERSION="0.18.1" ONLY_CODESTYLE="no" | ||
- env: PYTHON_VERSION="3.6" NUMPY_VERSION="1.11.3" SCIPY_VERSION="0.18.1" ONLY_CODESTYLE="no" | ||
|
||
|
||
install: source continuous_integration/travis/install.sh | ||
script: bash continuous_integration/travis/run.sh |
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
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,13 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
deactivate | ||
wget 'http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh' -O miniconda.sh | ||
chmod +x miniconda.sh && ./miniconda.sh -b | ||
export PATH=/home/travis/miniconda2/bin:$PATH | ||
conda update --yes conda | ||
|
||
|
||
conda create --yes -n gensim-test python=$PYTHON_VERSION pip atlas flake8 jupyter numpy==$NUMPY_VERSION scipy==$SCIPY_VERSION && source activate gensim-test | ||
pip install . && pip install .[test] |
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,11 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
pip freeze | ||
|
||
if [[ "$ONLY_CODESTYLE" == "yes" ]]; then | ||
continuous_integration/travis/flake8_diff.sh | ||
else | ||
python setup.py test | ||
fi |
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 |
---|---|---|
|
@@ -468,4 +468,4 @@ | |
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} | ||
} |